diff --git a/.env b/.env new file mode 100644 index 00000000..617cf9de --- /dev/null +++ b/.env @@ -0,0 +1,9 @@ +GO111MODULE=on +ROOT_DIR=${AKASH_ROOT} +AKASH_DEVCACHE_BASE=${AKASH_ROOT}/.cache +AKASH_DEVCACHE=${AKASH_DEVCACHE_BASE} +AKASH_DEVCACHE_BIN=${AKASH_DEVCACHE}/bin +AKASH_DEVCACHE_INCLUDE=${AKASH_DEVCACHE}/include +AKASH_DEVCACHE_VERSIONS=${AKASH_DEVCACHE}/versions +AKASH_DEVCACHE_NODE_MODULES=${AKASH_DEVCACHE} +AKASH_DEVCACHE_NODE_BIN=${AKASH_DEVCACHE_NODE_MODULES}/node_modules/.bin diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..c983217a --- /dev/null +++ b/.envrc @@ -0,0 +1,40 @@ +# if ! has make ; then +# echo "make is not installed"; exit 1 +# fi +# +# if ! has go ; then +# echo "go is not installed"; exit 1 +# fi +# +# if ! has unzip ; then +# echo "unzip is not installed"; exit 1 +# fi +# +# if ! has wget ; then +# echo "wget is not installed"; exit 1 +# fi +# +# if ! has curl ; then +# echo "curl is not installed"; exit 1 +# fi +# +# if ! has npm ; then +# echo "npm is not installed"; exit 1 +# fi +# +# if ! has jq ; then +# echo "jq is not installed"; exit 1 +# fi +# +# if ! has readlink ; then +# echo "readlink is not installed"; exit 1 +# fi + +export AKASH_ROOT=$(pwd) + +dotenv + +PATH_add "$AKASH_DEVCACHE_NODE_BIN" +PATH_add "$AKASH_DEVCACHE_BIN" + +make cache diff --git a/.github/workflows/proto.yaml b/.github/workflows/proto.yaml new file mode 100644 index 00000000..87f73a49 --- /dev/null +++ b/.github/workflows/proto.yaml @@ -0,0 +1,39 @@ +name: protobuf + +on: + pull_request: + paths: + - "**.proto" +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v3 + - uses: c-py/action-dotenv-to-setenv@v3 + with: + env-file: .env + - uses: actions/setup-go@v3 + with: + go-version: "${{ env.GOLANG_VERSION }}" + - name: go mod vendor + run: make modvendor + - name: lint + run: make lint + breakage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: git fetch --prune --unshallow + with: + fetch-depth: 0 + - uses: c-py/action-dotenv-to-setenv@v3 + with: + env-file: .env + - uses: actions/setup-go@v3 + with: + go-version: "${{ env.GOLANG_VERSION }}" + - name: go mod vendor + run: make modvendor + - name: check-breakage + run: make check-breaking diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..dc8a109d --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +UNAME_OS := $(shell uname -s) +UNAME_ARCH := $(shell uname -m) + +GO := GO111MODULE=$(GO111MODULE) go +GO_MOD_NAME := $(shell go list -m 2>/dev/null) + +BUF_VERSION ?= 1.13.1 +PROTOC_VERSION ?= 21.12 +GOGOPROTO_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/gogoproto) +PROTOC_GEN_GO_PULSAR_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/cosmos-proto) +PROTOC_GEN_GO_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' google.golang.org/protobuf) +PROTOC_GEN_GRPC_GATEWAY_VERSION := $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/grpc-ecosystem/grpc-gateway) +PROTOC_GEN_SWAGGER_VERSION := $(PROTOC_GEN_GRPC_GATEWAY_VERSION) +MODVENDOR_VERSION ?= v0.5.0 + +BUF_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/buf/$(BUF_VERSION) +PROTOC_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc/$(PROTOC_VERSION) +GOGOPROTO_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/gogoproto/$(GOGOPROTO_VERSION) +PROTOC_GEN_GO_PULSAR_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc-gen-go-pulsar/$(PROTOC_GEN_GO_PULSAR_VERSION) +PROTOC_GEN_GO_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc-gen-go/$(PROTOC_GEN_GO_VERSION) +PROTOC_GEN_GRPC_GATEWAY_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc-gen-grpc-gateway/$(PROTOC_GEN_GRPC_GATEWAY_VERSION) +PROTOC_GEN_SWAGGER_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc-gen-swagger/$(PROTOC_GEN_SWAGGER_VERSION) +MODVENDOR_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/modvendor/$(MODVENDOR_VERSION) + +BUF := $(AKASH_DEVCACHE_BIN)/buf +PROTOC := $(AKASH_DEVCACHE_BIN)/protoc +PROTOC_GEN_GO_PULSAR := $(AKASH_DEVCACHE_BIN)/protoc-gen-go-pulsar +PROTOC_GEN_GO := $(AKASH_DEVCACHE_BIN)/protoc-gen-go +PROTOC_GEN_GRPC_GATEWAY := $(AKASH_DEVCACHE_BIN)/protoc-gen-grpc-gateway +PROTOC_GEN_SWAGGER := $(AKASH_DEVCACHE_BIN)/protoc-gen-swagger +MODVENDOR := $(AKASH_DEVCACHE_BIN)/modvendor +SWAGGER_COMBINE := $(AKASH_DEVCACHE_NODE_BIN)/swagger-combine + +DOCKER_RUN := docker run --rm -v $(shell pwd):/workspace -w /workspace +DOCKER_BUF := $(DOCKER_RUN) bufbuild/buf:$(BUF_VERSION) + +ifeq (, $(shell which direnv)) +$(warning "No direnv in $(PATH), consider installing. https://direnv.net") +endif + +# AKASH_ROOT may not be set if environment does not support/use direnv +# in this case define it manually as well as all required env variables +ifndef AKASH_ROOT + AKASH_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../) + include $(AKASH_ROOT)/.env + + AKASH := $(AKASH_DEVCACHE_BIN)/akash + # setup .cache bins first in paths to have precedence over already installed same tools for system wide use + PATH := $(AKASH_DEVCACHE_BIN):$(AKASH_DEVCACHE_NODE_BIN):$(PATH) +endif + +include $(AKASH_ROOT)/make/setup-cache.mk +include $(AKASH_ROOT)/make/mod.mk +include $(AKASH_ROOT)/make/test.mk +include $(AKASH_ROOT)/make/codegen.mk +include $(AKASH_ROOT)/make/lint.mk diff --git a/README.md b/README.md new file mode 100644 index 00000000..807b312f --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Akash API + +## Node + +## Provider diff --git a/buf.gen.gogo.yaml b/buf.gen.gogo.yaml new file mode 100644 index 00000000..d70ff5d6 --- /dev/null +++ b/buf.gen.gogo.yaml @@ -0,0 +1,9 @@ +version: v1 +plugins: + - name: gocosmos + out: . + opt: + - plugins=interface+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - name: grpc-gateway + out: . + opt: logtostderr=true,allow_colon_final_segments=true diff --git a/buf.gen.pulsar.yaml b/buf.gen.pulsar.yaml new file mode 100644 index 00000000..fada5e7d --- /dev/null +++ b/buf.gen.pulsar.yaml @@ -0,0 +1,17 @@ +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 + override: +plugins: + - name: go-pulsar + out: ../api + opt: paths=source_relative + - name: go-grpc + out: ../api + opt: paths=source_relative diff --git a/buf.gen.swagger.yaml b/buf.gen.swagger.yaml new file mode 100644 index 00000000..8ea84c9b --- /dev/null +++ b/buf.gen.swagger.yaml @@ -0,0 +1,5 @@ +version: v1 +plugins: + - name: swagger + out: ./.cache/tmp/swagger-gen + opt: logtostderr=true,fqn_for_swagger_name=true,simple_operation_ids=true diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 00000000..2c2d588d --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,6 @@ +version: v1 +directories: + - proto/node + - proto/provider + - vendor/github.com/cosmos/cosmos-sdk/proto + - vendor/github.com/cosmos/cosmos-sdk/third_party/proto diff --git a/docs/config.json b/docs/config.json new file mode 100644 index 00000000..b4a3707c --- /dev/null +++ b/docs/config.json @@ -0,0 +1,37 @@ +{ + "swagger": "2.0", + "info": { + "title": "AKASH - gRPC Gateway docs", + "description": "A REST interface for state queries, legacy transactions", + "version": "1.0.0" + }, + "apis": [ + { + "url": "./.cache/tmp/swagger-gen/akash/audit/v1beta3/query.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/cert/v1beta3/query.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/deployment/v1beta3/query.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/deployment/v1beta3/service.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/market/v1beta3/query.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/market/v1beta3/service.swagger.json" + }, + { + "url": "./.cache/tmp/swagger-gen/akash/provider/v1beta3/query.swagger.json" + }, + { + "url": "./vendor/github.com/cosmos/cosmos-sdk/client/docs/swagger-ui/swagger.yaml", + "dereference": { + "circular": "ignore" + } + } + ] +} diff --git a/docs/swagger-ui/swagger.yaml b/docs/swagger-ui/swagger.yaml new file mode 100644 index 00000000..a908f259 --- /dev/null +++ b/docs/swagger-ui/swagger.yaml @@ -0,0 +1,47974 @@ +swagger: '2.0' +info: + title: AKASH - gRPC Gateway docs + description: A REST interface for state queries, legacy transactions + version: 1.0.0 +paths: + /akash/audit/v1beta3/audit/attributes/list: + get: + summary: |- + AllProvidersAttributes queries all providers + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + operationId: AllProvidersAttributes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryProvidersResponse is response type for the Query/Providers + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + /akash/audit/v1beta3/audit/attributes/{auditor}/{owner}: + get: + summary: >- + ProviderAuditorAttributes queries provider signed attributes by specific + auditor + + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + + buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + operationId: ProviderAuditorAttributes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryProvidersResponse is response type for the Query/Providers + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: auditor + in: path + required: true + type: string + - name: owner + in: path + required: true + type: string + tags: + - Query + /akash/audit/v1beta3/audit/attributes/{owner}/list: + get: + summary: |- + ProviderAttributes queries all provider signed attributes + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + operationId: ProviderAttributes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryProvidersResponse is response type for the Query/Providers + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: owner + 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 + /akash/provider/v1beta3/auditor/{auditor}/list: + get: + summary: |- + AuditorAttributes queries all providers signed by this auditor + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + operationId: AuditorAttributes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryProvidersResponse is response type for the Query/Providers + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: auditor + 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 + /akash/cert/v1beta3/certificates/list: + get: + summary: Certificates queries certificates + operationId: Certificates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + certificates: + type: array + items: + type: object + properties: + certificate: + type: object + properties: + state: + type: string + enum: + - invalid + - valid + - revoked + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - valid: CertificateValid denotes state for deployment active + - revoked: CertificateRevoked denotes state for deployment closed + title: State is an enum which refers to state of deployment + cert: + type: string + format: byte + pubkey: + type: string + format: byte + title: >- + Certificate stores state, certificate and it's public + key + serial: + type: string + title: >- + CertificateResponse contains a single X509 certificate and + its serial number + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryCertificatesResponse is response type for the + Query/Certificates RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: filter.owner + in: query + required: false + type: string + - name: filter.serial + in: query + required: false + type: string + - name: filter.state + 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 + /akash/deployment/v1beta3/deployments/info: + get: + summary: Deployment queries deployment details + operationId: Deployment + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deployment: + type: object + properties: + deployment_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + state: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + version: + type: string + format: byte + created_at: + type: string + format: int64 + title: Deployment stores deploymentID, state and version details + groups: + type: array + items: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and + group sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to + have signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have + signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list + must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from + the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available + resources types for deployment/node etc + + if field is nil resource is not present in the + given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price of + resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this escrow + account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins + are added to the Balance. + + If depositor isn't same as the owner, then any incoming + coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: >- + QueryDeploymentResponse is response type for the Query/Deployment + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id.owner + in: query + required: false + type: string + - name: id.dseq + in: query + required: false + type: string + format: uint64 + tags: + - Query + /akash/deployment/v1beta3/deployments/list: + get: + summary: Deployments queries deployments + operationId: Deployments + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deployments: + type: array + items: + type: object + properties: + deployment: + type: object + properties: + deployment_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + state: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + version: + type: string + format: byte + created_at: + type: string + format: int64 + title: >- + Deployment stores deploymentID, state and version + details + groups: + type: array + items: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number + and group sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect + to have signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have + signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the + list must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant + expects from the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and + memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available + resources types for deployment/node etc + + if field is nil resource is not present + in the given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price + of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: >- + Group stores group id, state and specifications of + group + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this + escrow account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming + coins are added to the Balance. + + If depositor isn't same as the owner, then any + incoming coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: >- + QueryDeploymentResponse is response type for the + Query/Deployment RPC method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryDeploymentsResponse is response type for the + Query/Deployments RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: filters.owner + in: query + required: false + type: string + - name: filters.dseq + in: query + required: false + type: string + format: uint64 + - name: filters.state + 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 + /akash/deployment/v1beta3/groups/info: + get: + summary: Group queries group details + operationId: Group + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and group + sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list + must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from + the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available resources + types for deployment/node etc + + if field is nil resource is not present in the + given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price of + resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + title: QueryGroupResponse is response type for the Query/Group RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id.owner + in: query + required: false + type: string + - name: id.dseq + in: query + required: false + type: string + format: uint64 + - name: id.gseq + in: query + required: false + type: integer + format: int64 + tags: + - Query + /akash/market/v1beta3/bids/info: + get: + summary: Bid queries bid details + operationId: Bid + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bid: + type: object + properties: + bid_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + state: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + price: + 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. + created_at: + type: string + format: int64 + title: Bid stores BidID, state of bid and price + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this escrow + account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins + are added to the Balance. + + If depositor isn't same as the owner, then any incoming + coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: QueryBidResponse is response type for the Query/Bid RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id.owner + in: query + required: false + type: string + - name: id.dseq + in: query + required: false + type: string + format: uint64 + - name: id.gseq + in: query + required: false + type: integer + format: int64 + - name: id.oseq + in: query + required: false + type: integer + format: int64 + - name: id.provider + in: query + required: false + type: string + tags: + - Query + /akash/market/v1beta3/bids/list: + get: + summary: Bids queries bids with filters + operationId: Bids + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bids: + type: array + items: + type: object + properties: + bid: + type: object + properties: + bid_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + state: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + price: + 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. + created_at: + type: string + format: int64 + title: Bid stores BidID, state of bid and price + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this + escrow account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming + coins are added to the Balance. + + If depositor isn't same as the owner, then any + incoming coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: >- + QueryBidResponse is response type for the Query/Bid RPC + method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryBidsResponse is response type for the Query/Bids RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: filters.owner + in: query + required: false + type: string + - name: filters.dseq + in: query + required: false + type: string + format: uint64 + - name: filters.gseq + in: query + required: false + type: integer + format: int64 + - name: filters.oseq + in: query + required: false + type: integer + format: int64 + - name: filters.provider + in: query + required: false + type: string + - name: filters.state + 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 + /akash/market/v1beta3/leases/info: + get: + summary: Lease queries lease details + operationId: Lease + responses: + '200': + description: A successful response. + schema: + type: object + properties: + lease: + type: object + properties: + lease_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + state: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + price: + 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. + created_at: + type: string + format: int64 + closed_on: + type: string + format: int64 + title: Lease stores LeaseID, state of lease and price + escrow_payment: + type: object + properties: + account_id: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + payment_id: + type: string + owner: + type: string + state: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: >- + - invalid: PaymentStateInvalid is the state when the + payment is invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + rate: + 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. + balance: + 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. + withdrawn: + 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: Payment stores state for a payment + title: QueryLeaseResponse is response type for the Query/Lease RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id.owner + in: query + required: false + type: string + - name: id.dseq + in: query + required: false + type: string + format: uint64 + - name: id.gseq + in: query + required: false + type: integer + format: int64 + - name: id.oseq + in: query + required: false + type: integer + format: int64 + - name: id.provider + in: query + required: false + type: string + tags: + - Query + /akash/market/v1beta3/leases/list: + get: + summary: Leases queries leases with filters + operationId: Leases + responses: + '200': + description: A successful response. + schema: + type: object + properties: + leases: + type: array + items: + type: object + properties: + lease: + type: object + properties: + lease_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + state: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + price: + 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. + created_at: + type: string + format: int64 + closed_on: + type: string + format: int64 + title: Lease stores LeaseID, state of lease and price + escrow_payment: + type: object + properties: + account_id: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + payment_id: + type: string + owner: + type: string + state: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: >- + - invalid: PaymentStateInvalid is the state when the + payment is invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + rate: + 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. + balance: + 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. + withdrawn: + 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: Payment stores state for a payment + title: >- + QueryLeaseResponse is response type for the Query/Lease RPC + method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryLeasesResponse is response type for the Query/Leases RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: filters.owner + in: query + required: false + type: string + - name: filters.dseq + in: query + required: false + type: string + format: uint64 + - name: filters.gseq + in: query + required: false + type: integer + format: int64 + - name: filters.oseq + in: query + required: false + type: integer + format: int64 + - name: filters.provider + in: query + required: false + type: string + - name: filters.state + 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 + /akash/market/v1beta3/orders/info: + get: + summary: Order queries order details + operationId: Order + responses: + '200': + description: A successful response. + schema: + type: object + properties: + order: + type: object + properties: + order_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + state: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list + must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from + the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available resources + types for deployment/node etc + + if field is nil resource is not present in the + given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price of + resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + title: QueryOrderResponse is response type for the Query/Order RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id.owner + in: query + required: false + type: string + - name: id.dseq + in: query + required: false + type: string + format: uint64 + - name: id.gseq + in: query + required: false + type: integer + format: int64 + - name: id.oseq + in: query + required: false + type: integer + format: int64 + tags: + - Query + /akash/market/v1beta3/orders/list: + get: + summary: Orders queries orders with filters + operationId: Orders + responses: + '200': + description: A successful response. + schema: + type: object + properties: + orders: + type: array + items: + type: object + properties: + order_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + state: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to + have signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have + signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list + must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from + the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available + resources types for deployment/node etc + + if field is nil resource is not present in the + given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price of + resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryOrdersResponse is response type for the Query/Orders RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: filters.owner + in: query + required: false + type: string + - name: filters.dseq + in: query + required: false + type: string + format: uint64 + - name: filters.gseq + in: query + required: false + type: integer + format: int64 + - name: filters.oseq + in: query + required: false + type: integer + format: int64 + - name: filters.state + 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 + /akash/provider/v1beta3/providers: + get: + summary: Providers queries providers + operationId: Providers + responses: + '200': + description: A successful response. + schema: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + host_uri: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + info: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + title: Provider stores owner and host details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryProvidersResponse is response type for the Query/Providers + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + /akash/provider/v1beta3/providers/{owner}: + get: + summary: Provider queries provider details + operationId: Provider + responses: + '200': + description: A successful response. + schema: + type: object + properties: + provider: + type: object + properties: + owner: + type: string + host_uri: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + info: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + title: Provider stores owner and host details + title: >- + QueryProviderResponse is response type for the Query/Provider RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: owner + in: path + required: true + type: string + tags: + - Query + /node_info: + get: + description: Information about the connected node + summary: The properties of the connected node + tags: + - Gaia REST + produces: + - application/json + responses: + '200': + description: Node status + schema: + type: object + properties: + application_version: + properties: + build_tags: + type: string + client_name: + type: string + commit: + type: string + go: + type: string + name: + type: string + server_name: + type: string + version: + type: string + node_info: + properties: + id: + type: string + moniker: + type: string + example: validator-name + protocol_version: + properties: + p2p: + type: string + example: 7 + block: + type: string + example: 10 + app: + type: string + example: 0 + network: + type: string + example: gaia-2 + channels: + type: string + listen_addr: + type: string + example: 192.168.56.1:26656 + version: + description: Tendermint version + type: string + example: 0.15.0 + other: + description: more information on versions + type: object + properties: + tx_index: + type: string + example: 'on' + rpc_address: + type: string + example: tcp://0.0.0.0:26657 + '500': + description: Failed to query node status + /syncing: + get: + summary: Syncing state of node + tags: + - Tendermint RPC + description: Get if the node is currently syning with other nodes + produces: + - application/json + responses: + '200': + description: Node syncing status + schema: + type: object + properties: + syncing: + type: boolean + '500': + description: Server internal error + /blocks/latest: + get: + summary: Get the latest block + tags: + - Tendermint RPC + produces: + - application/json + responses: + '200': + description: The latest block + schema: + type: object + properties: + block_meta: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: + type: array + items: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: + type: object + properties: + validator_address: + type: string + validator_index: + type: string + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + '500': + description: Server internal error + /blocks/{height}: + get: + summary: Get a block at a certain height + tags: + - Tendermint RPC + produces: + - application/json + parameters: + - in: path + name: height + description: Block height + required: true + type: number + x-example: 1 + responses: + '200': + description: The block at a specific height + schema: + type: object + properties: + block_meta: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: + type: array + items: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: + type: object + properties: + validator_address: + type: string + validator_index: + type: string + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + '400': + description: Invalid height + '404': + description: Request block height doesn't + '500': + description: Server internal error + /validatorsets/latest: + get: + summary: Get the latest validator set + tags: + - Tendermint RPC + produces: + - application/json + responses: + '200': + description: The validator set at the latest block height + schema: + type: object + properties: + block_height: + type: string + validators: + type: array + items: + type: object + properties: + address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + pub_key: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + voting_power: + type: string + example: '1000' + proposer_priority: + type: string + example: '1000' + '500': + description: Server internal error + /validatorsets/{height}: + get: + summary: Get a validator set a certain height + tags: + - Tendermint RPC + produces: + - application/json + parameters: + - in: path + name: height + description: Block height + required: true + type: number + x-example: 1 + responses: + '200': + description: The validator set at a specific block height + schema: + type: object + properties: + block_height: + type: string + validators: + type: array + items: + type: object + properties: + address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + pub_key: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + voting_power: + type: string + example: '1000' + proposer_priority: + type: string + example: '1000' + '400': + description: Invalid height + '404': + description: Block at height not available + '500': + description: Server internal error + /txs/{hash}: + get: + deprecated: true + summary: Get a Tx by hash + tags: + - Transactions + description: Retrieve a transaction using its hash. + produces: + - application/json + parameters: + - in: path + name: hash + description: Tx hash + required: true + type: string + x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B + responses: + '200': + description: Tx with the provided hash + schema: + type: object + properties: + hash: + type: string + example: >- + D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + '500': + description: Internal Server Error + /txs: + get: + deprecated: true + tags: + - Transactions + summary: Search transactions + description: Search transactions by events. + produces: + - application/json + parameters: + - in: query + name: message.action + type: string + description: >- + transaction events such as 'message.action=send' which results in + the following endpoint: 'GET /txs?message.action=send'. note that + each module documents its own events. look for xx_events.md in the + corresponding cosmos-sdk/docs/spec directory + x-example: send + - in: query + name: message.sender + type: string + description: >- + transaction tags with sender: 'GET + /txs?message.action=send&message.sender=cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv' + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: query + name: page + description: Page number + type: integer + x-example: 1 + - in: query + name: limit + description: Maximum number of items per page + type: integer + x-example: 1 + - in: query + name: tx.minheight + type: integer + description: transactions on blocks with height greater or equal this value + x-example: 25 + - in: query + name: tx.maxheight + type: integer + description: transactions on blocks with height less than or equal this value + x-example: 800000 + responses: + '200': + description: All txs matching the provided events + schema: + type: object + properties: + total_count: + type: number + example: 1 + count: + type: number + example: 1 + page_number: + type: number + example: 1 + page_total: + type: number + example: 1 + limit: + type: number + example: 30 + txs: + type: array + items: + type: object + properties: + hash: + type: string + example: >- + D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + '400': + description: Invalid search events + '500': + description: Internal Server Error + post: + tags: + - Transactions + summary: Broadcast a signed tx + description: Broadcast a signed tx to a full node + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: txBroadcast + description: >- + The tx must be a signed StdTx. The supported broadcast modes include + `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and + `"async"`(return right away). + required: true + schema: + type: object + properties: + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + mode: + type: string + example: block + responses: + '200': + description: Tx broadcasting result + schema: + type: object + properties: + check_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 0 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + deliver_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 5 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + height: + type: integer + '500': + description: Internal Server Error + /txs/encode: + post: + deprecated: true + tags: + - Transactions + summary: Encode a transaction to the Amino wire format + description: >- + Encode a transaction (signed or not) from JSON to base64-encoded Amino + serialized bytes + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: tx + description: The tx to encode + required: true + schema: + type: object + properties: + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + responses: + '200': + description: The tx was successfully decoded and re-encoded + schema: + type: object + properties: + tx: + type: string + example: The base64-encoded Amino-serialized bytes for the tx + '400': + description: The tx was malformated + '500': + description: Server internal error + /txs/decode: + post: + deprecated: true + tags: + - Transactions + summary: Decode a transaction from the Amino wire format + description: >- + Decode a transaction (signed or not) from base64-encoded Amino + serialized bytes to JSON + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: tx + description: The tx to decode + required: true + schema: + type: object + properties: + tx: + type: string + example: >- + SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM + responses: + '200': + description: The tx was successfully decoded + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: The tx was malformated + '500': + description: Server internal error + /bank/balances/{address}: + get: + deprecated: true + summary: Get the account balances + tags: + - Bank + produces: + - application/json + parameters: + - in: path + name: address + description: Account address in bech32 format + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + responses: + '200': + description: Account balances + schema: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '500': + description: Server internal error + /bank/accounts/{address}/transfers: + post: + deprecated: true + summary: Send coins from one account to another + tags: + - Bank + consumes: + - application/json + produces: + - application/json + parameters: + - in: path + name: address + description: Account address in bech32 format + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: body + name: account + description: The sender and tx information + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + responses: + '202': + description: Tx was succesfully generated + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid request + '500': + description: Server internal error + /bank/total: + get: + deprecated: true + summary: Total supply of coins in the chain + tags: + - Bank + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + total: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '500': + description: Internal Server Error + /bank/total/{denomination}: + parameters: + - in: path + name: denomination + description: Coin denomination + required: true + type: string + x-example: uatom + get: + deprecated: true + summary: Total supply of a single coin denomination + tags: + - Bank + produces: + - application/json + responses: + '200': + description: OK + schema: + type: string + '400': + description: Invalid coin denomination + '500': + description: Internal Server Error + /auth/accounts/{address}: + get: + deprecated: true + summary: Get the account information on blockchain + tags: + - Auth + produces: + - application/json + parameters: + - in: path + name: address + description: Account address + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + responses: + '200': + description: Account information on the blockchain + schema: + type: object + properties: + type: + type: string + value: + type: object + properties: + account_number: + type: string + address: + type: string + coins: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + public_key: + type: object + properties: + type: + type: string + value: + type: string + sequence: + type: string + '500': + description: Server internel error + /staking/delegators/{delegatorAddr}/delegations: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + get: + deprecated: true + summary: Get all delegations from a delegator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + shares: + type: string + balance: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + post: + summary: Submit delegation + parameters: + - in: body + name: delegation + description: Delegate an amount of liquid coins to a validator + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + delegator_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + validator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + amount: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + tags: + - Staking + consumes: + - application/json + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator address or delegation request body + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/delegations/{validatorAddr}: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Query the current delegation between a delegator and a validator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + shares: + type: string + balance: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid delegator address or validator address + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/unbonding_delegations: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + get: + deprecated: true + summary: Get all unbonding delegations from a delegator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + initial_balance: + type: string + balance: + type: string + creation_height: + type: integer + min_time: + type: integer + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + post: + summary: Submit an unbonding delegation + parameters: + - in: body + name: delegation + description: Unbond an amount of bonded shares from a validator + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + delegator_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + validator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + amount: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + tags: + - Staking + consumes: + - application/json + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator address or unbonding delegation request body + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Query all unbonding delegations between a delegator and a validator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + entries: + type: array + items: + type: object + properties: + initial_balance: + type: string + balance: + type: string + creation_height: + type: string + min_time: + type: string + '400': + description: Invalid delegator address or validator address + '500': + description: Internal Server Error + /staking/redelegations: + parameters: + - in: query + name: delegator + description: Bech32 AccAddress of Delegator + required: false + type: string + - in: query + name: validator_from + description: Bech32 ValAddress of SrcValidator + required: false + type: string + - in: query + name: validator_to + description: Bech32 ValAddress of DstValidator + required: false + type: string + get: + deprecated: true + summary: Get all redelegations (filter by query params) + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + $ref: '#/definitions/Redelegation' + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/redelegations: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + post: + deprecated: true + summary: Submit a redelegation + parameters: + - in: body + name: delegation + description: The sender and tx information + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + delegator_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + validator_src_addressess: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + validator_dst_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + shares: + type: string + example: '100' + tags: + - Staking + consumes: + - application/json + produces: + - application/json + responses: + '200': + description: Tx was succesfully generated + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator address or redelegation request body + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/validators: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + get: + deprecated: true + summary: Query all validators that a delegator is bonded to + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + consensus_pubkey: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: + type: object + properties: + moniker: + type: string + identity: + type: string + website: + type: string + security_contact: + type: string + details: + type: string + bond_height: + type: string + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: + type: string + example: '0' + unbonding_time: + type: string + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + /staking/delegators/{delegatorAddr}/validators/{validatorAddr}: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: path + name: validatorAddr + description: Bech32 ValAddress of Delegator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Query a validator that a delegator is bonded to + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + consensus_pubkey: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: + type: object + properties: + moniker: + type: string + identity: + type: string + website: + type: string + security_contact: + type: string + details: + type: string + bond_height: + type: string + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: + type: string + example: '0' + unbonding_time: + type: string + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + '400': + description: Invalid delegator address or validator address + '500': + description: Internal Server Error + /staking/validators: + get: + deprecated: true + summary: >- + Get all validator candidates. By default it returns only the bonded + validators. + parameters: + - in: query + name: status + type: string + description: >- + The validator bond status. Must be either 'bonded', 'unbonded', or + 'unbonding'. + x-example: bonded + - in: query + name: page + description: The page number. + type: integer + x-example: 1 + - in: query + name: limit + description: The maximum number of items per page. + type: integer + x-example: 1 + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + consensus_pubkey: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: + type: object + properties: + moniker: + type: string + identity: + type: string + website: + type: string + security_contact: + type: string + details: + type: string + bond_height: + type: string + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: + type: string + example: '0' + unbonding_time: + type: string + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + '500': + description: Internal Server Error + /staking/validators/{validatorAddr}: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Query the information from a single validator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + consensus_pubkey: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: + type: object + properties: + moniker: + type: string + identity: + type: string + website: + type: string + security_contact: + type: string + details: + type: string + bond_height: + type: string + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: + type: string + example: '0' + unbonding_time: + type: string + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + '400': + description: Invalid validator address + '500': + description: Internal Server Error + /staking/validators/{validatorAddr}/delegations: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Get all delegations from a validator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + shares: + type: string + balance: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid validator address + '500': + description: Internal Server Error + /staking/validators/{validatorAddr}/unbonding_delegations: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Get all unbonding delegations from a validator + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + initial_balance: + type: string + balance: + type: string + creation_height: + type: integer + min_time: + type: integer + '400': + description: Invalid validator address + '500': + description: Internal Server Error + /staking/pool: + get: + deprecated: true + summary: Get the current state of the staking pool + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + loose_tokens: + type: string + bonded_tokens: + type: string + inflation_last_time: + type: string + inflation: + type: string + date_last_commission_reset: + type: string + prev_bonded_shares: + type: string + '500': + description: Internal Server Error + /staking/parameters: + get: + deprecated: true + summary: Get the current staking parameter values + tags: + - Staking + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + inflation_rate_change: + type: string + inflation_max: + type: string + inflation_min: + type: string + goal_bonded: + type: string + unbonding_time: + type: string + max_validators: + type: integer + bond_denom: + type: string + '500': + description: Internal Server Error + /slashing/signing_infos: + get: + deprecated: true + summary: Get sign info of given all validators + description: Get sign info of all validators + produces: + - application/json + tags: + - Slashing + parameters: + - in: query + name: page + description: Page number + type: integer + required: true + x-example: 1 + - in: query + name: limit + description: Maximum number of items per page + type: integer + required: true + x-example: 5 + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + start_height: + type: string + index_offset: + type: string + jailed_until: + type: string + missed_blocks_counter: + type: string + '400': + description: Invalid validator public key for one of the validators + '500': + description: Internal Server Error + /slashing/validators/{validatorAddr}/unjail: + post: + deprecated: true + summary: Unjail a jailed validator + description: Send transaction to unjail a jailed validator + consumes: + - application/json + produces: + - application/json + tags: + - Slashing + parameters: + - type: string + description: Bech32 validator address + name: validatorAddr + required: true + in: path + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + - description: '' + name: UnjailBody + in: body + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + responses: + '200': + description: Tx was succesfully generated + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid validator address or base_req + '500': + description: Internal Server Error + /slashing/parameters: + get: + deprecated: true + summary: Get the current slashing parameters + tags: + - Slashing + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + max_evidence_age: + type: string + signed_blocks_window: + type: string + min_signed_per_window: + type: string + double_sign_unbond_duration: + type: string + downtime_unbond_duration: + type: string + slash_fraction_double_sign: + type: string + slash_fraction_downtime: + type: string + '500': + description: Internal Server Error + /gov/proposals: + post: + deprecated: true + summary: Submit a proposal + description: Send transaction to submit a proposal + consumes: + - application/json + produces: + - application/json + tags: + - Governance + parameters: + - description: >- + valid value of `"proposal_type"` can be `"text"`, + `"parameter_change"`, `"software_upgrade"` + name: post_proposal_body + in: body + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + title: + type: string + description: + type: string + proposal_type: + type: string + example: text + proposer: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + initial_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + responses: + '200': + description: Tx was succesfully generated + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid proposal body + '500': + description: Internal Server Error + get: + deprecated: true + summary: Query proposals + description: Query proposals information with parameters + produces: + - application/json + tags: + - Governance + parameters: + - in: query + name: voter + description: voter address + required: false + type: string + - in: query + name: depositor + description: depositor address + required: false + type: string + - in: query + name: status + description: >- + proposal status, valid values can be `"deposit_period"`, + `"voting_period"`, `"passed"`, `"rejected"` + required: false + type: string + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + proposal_id: + type: integer + title: + type: string + description: + type: string + proposal_type: + type: string + proposal_status: + type: string + final_tally_result: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + submit_time: + type: string + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + voting_start_time: + type: string + '400': + description: Invalid query parameters + '500': + description: Internal Server Error + /gov/proposals/param_change: + post: + deprecated: true + summary: Generate a parameter change proposal transaction + description: Generate a parameter change proposal transaction + consumes: + - application/json + produces: + - application/json + tags: + - Governance + parameters: + - description: >- + The parameter change proposal body that contains all parameter + changes + name: post_proposal_body + in: body + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + title: + type: string + x-example: Param Change + description: + type: string + x-example: Update max validators + proposer: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + changes: + type: array + items: + type: object + properties: + subspace: + type: string + example: staking + key: + type: string + example: MaxValidators + subkey: + type: string + example: '' + value: + type: object + responses: + '200': + description: The transaction was succesfully generated + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid proposal body + '500': + description: Internal Server Error + /gov/proposals/{proposalId}: + get: + deprecated: true + summary: Query a proposal + description: Query a proposal by id + produces: + - application/json + tags: + - Governance + parameters: + - type: string + name: proposalId + required: true + in: path + x-example: '2' + responses: + '200': + description: OK + schema: + type: object + properties: + proposal_id: + type: integer + title: + type: string + description: + type: string + proposal_type: + type: string + proposal_status: + type: string + final_tally_result: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + submit_time: + type: string + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + voting_start_time: + type: string + '400': + description: Invalid proposal id + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/proposer: + get: + deprecated: true + summary: Query proposer + description: Query for the proposer for a proposal + produces: + - application/json + tags: + - Governance + parameters: + - type: string + name: proposalId + required: true + in: path + x-example: '2' + responses: + '200': + description: OK + schema: + type: object + properties: + proposal_id: + type: string + proposer: + type: string + '400': + description: Invalid proposal ID + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/deposits: + get: + deprecated: true + summary: Query deposits + description: Query deposits by proposalId + produces: + - application/json + tags: + - Governance + parameters: + - type: string + name: proposalId + required: true + in: path + x-example: '2' + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + proposal_id: + type: string + depositor: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + '400': + description: Invalid proposal id + '500': + description: Internal Server Error + post: + deprecated: true + summary: Deposit tokens to a proposal + description: Send transaction to deposit tokens to a proposal + consumes: + - application/json + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + - description: '' + name: post_deposit_body + in: body + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + depositor: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid proposal id or deposit body + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/deposits/{depositor}: + get: + deprecated: true + summary: Query deposit + description: Query deposit by proposalId and depositor address + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + - type: string + description: Bech32 depositor address + name: depositor + required: true + in: path + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + responses: + '200': + description: OK + schema: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + proposal_id: + type: string + depositor: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + '400': + description: Invalid proposal id or depositor address + '404': + description: Found no deposit + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/votes: + get: + deprecated: true + summary: Query voters + description: Query voters information by proposalId + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + voter: + type: string + proposal_id: + type: string + option: + type: string + '400': + description: Invalid proposal id + '500': + description: Internal Server Error + post: + deprecated: true + summary: Vote a proposal + description: Send transaction to vote a proposal + consumes: + - application/json + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + - description: >- + valid value of `"option"` field can be `"yes"`, `"no"`, + `"no_with_veto"` and `"abstain"` + name: post_vote_body + in: body + required: true + schema: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + voter: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + option: + type: string + example: 'yes' + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid proposal id or vote body + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/votes/{voter}: + get: + deprecated: true + summary: Query vote + description: Query vote information by proposal Id and voter address + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + - type: string + description: Bech32 voter address + name: voter + required: true + in: path + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + responses: + '200': + description: OK + schema: + type: object + properties: + voter: + type: string + proposal_id: + type: string + option: + type: string + '400': + description: Invalid proposal id or voter address + '404': + description: Found no vote + '500': + description: Internal Server Error + /gov/proposals/{proposalId}/tally: + get: + deprecated: true + summary: Get a proposal's tally result at the current time + description: >- + Gets a proposal's tally result at the current time. If the proposal is + pending deposits (i.e status 'DepositPeriod') it returns an empty tally + result. + produces: + - application/json + tags: + - Governance + parameters: + - type: string + description: proposal id + name: proposalId + required: true + in: path + x-example: '2' + responses: + '200': + description: OK + schema: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + '400': + description: Invalid proposal id + '500': + description: Internal Server Error + /gov/parameters/deposit: + get: + deprecated: true + summary: Query governance deposit parameters + description: >- + Query governance deposit parameters. The max_deposit_period units are in + nanoseconds. + produces: + - application/json + tags: + - Governance + responses: + '200': + description: OK + schema: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + max_deposit_period: + type: string + example: '86400000000000' + '400': + description: is not a valid query request path + '404': + description: Found no deposit parameters + '500': + description: Internal Server Error + /gov/parameters/tallying: + get: + deprecated: true + summary: Query governance tally parameters + description: Query governance tally parameters + produces: + - application/json + tags: + - Governance + responses: + '200': + description: OK + schema: + properties: + threshold: + type: string + example: '0.5000000000' + veto: + type: string + example: '0.3340000000' + governance_penalty: + type: string + example: '0.0100000000' + '400': + description: is not a valid query request path + '404': + description: Found no tally parameters + '500': + description: Internal Server Error + /gov/parameters/voting: + get: + deprecated: true + summary: Query governance voting parameters + description: >- + Query governance voting parameters. The voting_period units are in + nanoseconds. + produces: + - application/json + tags: + - Governance + responses: + '200': + description: OK + schema: + properties: + voting_period: + type: string + example: '86400000000000' + '400': + description: is not a valid query request path + '404': + description: Found no voting parameters + '500': + description: Internal Server Error + /distribution/delegators/{delegatorAddr}/rewards: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf + get: + deprecated: true + summary: Get the total rewards balance from all delegations + description: >- + Get the sum of all the rewards earned by delegations by a single + delegator + produces: + - application/json + tags: + - Distribution + responses: + '200': + description: OK + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + reward: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + total: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + post: + deprecated: true + summary: Withdraw all the delegator's delegation rewards + description: Withdraw all the delegator's delegation rewards + tags: + - Distribution + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator address + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Query a delegation reward + description: Query a single delegation reward by a delegator + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + post: + deprecated: true + summary: Withdraw a delegation reward + description: Withdraw a delegator's delegation reward from a single validator + tags: + - Distribution + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator address or delegation body + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /distribution/delegators/{delegatorAddr}/withdraw_address: + parameters: + - in: path + name: delegatorAddr + description: Bech32 AccAddress of Delegator + required: true + type: string + x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf + get: + deprecated: true + summary: Get the rewards withdrawal address + description: >- + Get the delegations' rewards withdrawal address. This is the address in + which the user will receive the reward funds + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + '400': + description: Invalid delegator address + '500': + description: Internal Server Error + post: + deprecated: true + summary: Replace the rewards withdrawal address + description: Replace the delegations' rewards withdrawal address for a new one. + tags: + - Distribution + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + withdraw_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid delegator or withdraw address + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /distribution/validators/{validatorAddr}: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Validator distribution information + description: Query the distribution information of a single validator + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + val_commission: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid validator address + '500': + description: Internal Server Error + /distribution/validators/{validatorAddr}/outstanding_rewards: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Fee distribution outstanding rewards of a single validator + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '500': + description: Internal Server Error + /distribution/validators/{validatorAddr}/rewards: + parameters: + - in: path + name: validatorAddr + description: Bech32 OperatorAddress of validator + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + get: + deprecated: true + summary: Commission and self-delegation rewards of a single validator + description: Query the commission and self-delegation rewards of validator. + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '400': + description: Invalid validator address + '500': + description: Internal Server Error + post: + deprecated: true + summary: Withdraw the validator's rewards + description: Withdraw the validator's self-delegation and commissions rewards + tags: + - Distribution + consumes: + - application/json + produces: + - application/json + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in + conjunction with generate_only) + responses: + '200': + description: OK + schema: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + '400': + description: Invalid validator address + '401': + description: Key password is wrong + '500': + description: Internal Server Error + /distribution/community_pool: + get: + deprecated: true + summary: Community pool parameters + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + '500': + description: Internal Server Error + /distribution/parameters: + get: + deprecated: true + summary: Fee distribution parameters + tags: + - Distribution + produces: + - application/json + responses: + '200': + description: OK + schema: + properties: + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + community_tax: + type: string + '500': + description: Internal Server Error + /minting/parameters: + get: + deprecated: true + summary: Minting module parameters + tags: + - Mint + produces: + - application/json + responses: + '200': + description: OK + schema: + properties: + mint_denom: + type: string + inflation_rate_change: + type: string + inflation_max: + type: string + inflation_min: + type: string + goal_bonded: + type: string + blocks_per_year: + type: string + '500': + description: Internal Server Error + /minting/inflation: + get: + deprecated: true + summary: Current minting inflation value + tags: + - Mint + produces: + - application/json + responses: + '200': + description: OK + schema: + type: string + '500': + description: Internal Server Error + /minting/annual-provisions: + get: + deprecated: true + summary: Current minting annual provisions value + tags: + - Mint + produces: + - application/json + responses: + '200': + description: OK + schema: + type: string + '500': + description: Internal Server Error + /cosmos/auth/v1beta1/accounts: + get: + summary: Accounts returns all the existing accounts + operationId: Accounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/auth/v1beta1/accounts/{address}: + get: + summary: Account returns account details based on address. + operationId: Account + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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/params: + get: + summary: Params queries all parameters. + operationId: AuthParams + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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/bank/v1beta1/balances/{address}: + get: + summary: AllBalances queries the balance of all coins for a single account. + operationId: AllBalances + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/bank/v1beta1/balances/{address}/{denom}: + get: + summary: Balance queries the balance of a single coin for a single account. + operationId: Balance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + 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: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: path + required: true + type: string + tags: + - Query + /cosmos/bank/v1beta1/denom_owners/{denom}: + get: + summary: >- + DenomOwners queries for all account addresses that own a particular + token + + denomination. + operationId: DenomOwners + 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: + 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: >- + 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. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/bank/v1beta1/denoms_metadata: + get: + summary: |- + DenomsMetadata queries the client metadata for all registered coin + denominations. + operationId: DenomsMetadata + 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 = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a + given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges + (eg: ATOM). This can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. + It's used to verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the + registered tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/bank/v1beta1/denoms_metadata/{denom}: + get: + summary: DenomsMetadata queries the client metadata of a given coin denomination. + operationId: DenomMetadata + responses: + '200': + description: A successful response. + schema: + type: object + properties: + 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 = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a given + coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. + It's used to verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: BankParams + 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 + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status + (whether a denom is + + sendable). + default_send_enabled: + type: boolean + format: 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/bank/v1beta1/supply: + get: + summary: TotalSupply queries the total supply of all coins. + operationId: TotalSupply + 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. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/bank/v1beta1/supply/{denom}: + get: + summary: SupplyOf queries the supply of a single coin. + operationId: SupplyOf + 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: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: denom is the coin denom to query balances for. + in: path + required: true + type: string + tags: + - Query + /cosmos/base/tendermint/v1beta1/blocks/latest: + get: + summary: GetLatestBlock returns the latest block. + operationId: GetLatestBlock + 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: + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a + Tendermint 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 Tendermint 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 Tendermint 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 Tendermint 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: >- + GetLatestBlockResponse is the response type for the + Query/GetLatestBlock RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: GetBlockByHeight + 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: + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a + Tendermint 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 Tendermint 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 Tendermint 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 Tendermint 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: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: GetNodeInfo + 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 + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the request type for the Query/GetNodeInfo + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: GetSyncing + responses: + '200': + description: A successful response. + schema: + type: object + properties: + syncing: + type: boolean + format: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: GetLatestValidatorSet + 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Service + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: + get: + summary: GetValidatorSetByHeight queries validator-set at a given height. + operationId: GetValidatorSetByHeight + 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Service + /cosmos/distribution/v1beta1/community_pool: + get: + summary: CommunityPool queries the community pool coins. + operationId: CommunityPool + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: + get: + summary: |- + DelegationTotalRewards queries the total rewards accrued by a each + validator. + operationId: DelegationTotalRewards + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: DelegationRewards + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: DelegatorValidators + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: DelegatorWithdrawAddress + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: DistributionParams + 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 + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: boolean + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/distribution/v1beta1/validators/{validator_address}/commission: + get: + summary: ValidatorCommission queries accumulated commission for a validator. + operationId: ValidatorCommission + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commission: + description: commission defines the commision 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: ValidatorOutstandingRewards + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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: ValidatorSlashes + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/evidence/v1beta1/evidence: + get: + summary: AllEvidence queries all evidence. + operationId: AllEvidence + responses: + '200': + description: A successful response. + schema: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/evidence/v1beta1/evidence/{evidence_hash}: + get: + summary: Evidence queries evidence based on evidence hash. + operationId: Evidence + responses: + '200': + description: A successful response. + schema: + type: object + properties: + evidence: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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: >- + QueryEvidenceResponse is the response type for the Query/Evidence + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: evidence_hash + description: evidence_hash defines the hash of the requested evidence. + in: path + required: true + type: string + format: byte + tags: + - Query + /cosmos/gov/v1beta1/params/{params_type}: + get: + summary: Params queries all parameters of the gov module. + operationId: GovParams + 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: Length 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: Proposals + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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" + } + 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 + description: >- + ProposalStatus enumerates the valid statuses of a + proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal 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. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + 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. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: >- + Proposal defines the core field members of a governance + proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 propopsal 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}: + get: + summary: Proposal queries proposal details based on ProposalID. + operationId: Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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" + } + 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 + description: >- + ProposalStatus enumerates the valid statuses of a + proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal 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. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + 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. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: Deposits + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + 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: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: + get: + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: Deposit + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + 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: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. + description: >- + QueryDepositResponse is the response type for the Query/Deposit + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: Votes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + 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: + 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. + weight: + type: string + description: >- + WeightedVoteOption defines a unit of vote for vote + split. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: Vote + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + 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: + 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. + weight: + type: string + description: >- + WeightedVoteOption defines a unit of vote for vote + split. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. + description: >- + QueryVoteResponse is the response type for the Query/Vote RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 oter address for the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/mint/v1beta1/annual_provisions: + get: + summary: AnnualProvisions current minting annual provisions value. + operationId: AnnualProvisions + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/mint/v1beta1/inflation: + get: + summary: Inflation returns the current minting inflation value. + operationId: Inflation + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/mint/v1beta1/params: + get: + summary: Params returns the total set of minting parameters. + operationId: MintParams + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/params/v1beta1/params: + get: + summary: |- + Params queries a specific parameter of a module, given its subspace and + key. + operationId: Params + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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/slashing/v1beta1/params: + get: + summary: Params queries the parameters of slashing module + operationId: SlashingParams + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos: + get: + summary: SigningInfos queries signing info of all validators + operationId: SigningInfos + 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 + format: 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos/{cons_address}: + get: + summary: SigningInfo queries the signing info of given cons address + operationId: SigningInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + val_signing_info: + 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 + format: 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: >- + val_signing_info is the signing info of requested val cons + address + title: >- + QuerySigningInfoResponse is the response type for the + Query/SigningInfo RPC + + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + 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. + operationId: DelegatorDelegations + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: + get: + summary: Redelegations queries redelegations of given address. + operationId: Redelegations + 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. + description: >- + RedelegationEntry defines a redelegation object + with relevant metadata. + description: entries are the 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. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: + get: + summary: >- + DelegatorUnbondingDelegations queries all unbonding delegations of a + given + + delegator address. + operationId: DelegatorUnbondingDelegations + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: + get: + summary: |- + DelegatorValidators queries all validators info for given delegator + address. + operationId: StakingDelegatorValidators + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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 the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: + get: + summary: |- + DelegatorValidator queries validator info for given delegator validator + pair. + operationId: DelegatorValidator + responses: + '200': + description: A successful response. + schema: + type: object + properties: + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: HistoricalInfo + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must + contain at least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name + should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, + for URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message + definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup + results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently + available in the official + + protobuf release, and it is not used for type + URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of + the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol + buffer message along with a + + URL that describes the type of the serialized + message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods + of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will + by default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" + will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded + message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: StakingParams + 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. + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: Pool + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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. + operationId: Validators + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}: + get: + summary: Validator queries validator info for given validator address. + operationId: Validator + responses: + '200': + description: A successful response. + schema: + type: object + properties: + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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. + title: >- + QueryValidatorResponse is response type for the Query/Validator + RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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. + operationId: ValidatorDelegations + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: + get: + summary: Delegation queries delegate info for given validator delegator pair. + operationId: Delegation + responses: + '200': + description: A successful response. + schema: + type: object + properties: + delegation_response: + 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: >- + QueryDelegationResponse is response type for the Query/Delegation + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: UnbondingDelegation + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbond: + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds + + for a single validator in an time-ordered list. + description: >- + QueryDelegationResponse is response type for the + Query/UnbondingDelegation + + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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. + operationId: ValidatorUnbondingDelegations + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate simulates executing a transaction for estimating gas usage. + operationId: Simulate + 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. + 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 + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + 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. + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + 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: GetTxsEvent + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: 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 + tags: + - Service + post: + summary: BroadcastTx broadcast transaction. + operationId: BroadcastTx + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tx_response: + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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" + } + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + 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: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - 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/{hash}: + get: + summary: GetTx fetches a tx by hash. + operationId: GetTx + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: AppliedPlan + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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/current_plan: + get: + summary: CurrentPlan queries the current upgrade plan. + operationId: CurrentPlan + 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. + Only used if Time is not set. + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: >- + QueryCurrentPlanResponse is the response type for the + Query/CurrentPlan RPC + + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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. + operationId: ModuleVersions + 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. + 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. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + operationId: UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + /cosmos/authz/v1beta1/grants: + get: + summary: Returns list of `Authorization`, granted to the grantee by the granter. + operationId: Grants + responses: + '200': + description: A successful response. + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the 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 + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: + get: + summary: Allowance returns fee granted to the grantee by the granter. + operationId: Allowance + 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 and filtered fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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: Allowances + 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 and filtered fee + allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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 + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query +definitions: + akash.audit.v1beta3.Provider: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + akash.audit.v1beta3.QueryProvidersResponse: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + auditor: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Provider stores owner auditor and attributes details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryProvidersResponse is response type for the Query/Providers RPC method + akash.base.v1beta3.Attribute: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + 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. + format: boolean + reverse: + type: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + format: boolean + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + grpc.gateway.runtime.Error: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + akash.cert.v1beta3.Certificate: + type: object + properties: + state: + type: string + enum: + - invalid + - valid + - revoked + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - valid: CertificateValid denotes state for deployment active + - revoked: CertificateRevoked denotes state for deployment closed + title: State is an enum which refers to state of deployment + cert: + type: string + format: byte + pubkey: + type: string + format: byte + title: Certificate stores state, certificate and it's public key + akash.cert.v1beta3.Certificate.State: + type: string + enum: + - invalid + - valid + - revoked + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - valid: CertificateValid denotes state for deployment active + - revoked: CertificateRevoked denotes state for deployment closed + title: State is an enum which refers to state of deployment + akash.cert.v1beta3.CertificateFilter: + type: object + properties: + owner: + type: string + serial: + type: string + state: + type: string + title: CertificateFilter defines filters used to filter certificates + akash.cert.v1beta3.CertificateResponse: + type: object + properties: + certificate: + type: object + properties: + state: + type: string + enum: + - invalid + - valid + - revoked + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - valid: CertificateValid denotes state for deployment active + - revoked: CertificateRevoked denotes state for deployment closed + title: State is an enum which refers to state of deployment + cert: + type: string + format: byte + pubkey: + type: string + format: byte + title: Certificate stores state, certificate and it's public key + serial: + type: string + title: >- + CertificateResponse contains a single X509 certificate and its serial + number + akash.cert.v1beta3.QueryCertificatesResponse: + type: object + properties: + certificates: + type: array + items: + type: object + properties: + certificate: + type: object + properties: + state: + type: string + enum: + - invalid + - valid + - revoked + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - valid: CertificateValid denotes state for deployment active + - revoked: CertificateRevoked denotes state for deployment closed + title: State is an enum which refers to state of deployment + cert: + type: string + format: byte + pubkey: + type: string + format: byte + title: Certificate stores state, certificate and it's public key + serial: + type: string + title: >- + CertificateResponse contains a single X509 certificate and its + serial number + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryCertificatesResponse is response type for the Query/Certificates RPC + method + akash.base.v1beta3.CPU: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + akash.base.v1beta3.Endpoint: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: |- + - SHARED_HTTP: Describes an endpoint that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented when the lease is + deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + akash.base.v1beta3.Endpoint.Kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: |- + - SHARED_HTTP: Describes an endpoint that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: This describes how the endpoint is implemented when the lease is deployed + akash.base.v1beta3.GPU: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + akash.base.v1beta3.Memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + akash.base.v1beta3.PlacementRequirements: + type: object + properties: + signed_by: + title: SignedBy list of keys that tenants expect to have signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: all_of all keys in this list must have signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have signed + attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Attribute list of attributes tenant expects from the provider + title: PlacementRequirements + akash.base.v1beta3.ResourceUnits: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Storage stores resource quantity and storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that becomes a Kubernetes + Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented when the lease is + deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + title: >- + ResourceUnits describes all available resources types for deployment/node + etc + + if field is nil resource is not present in the given data-structure + akash.base.v1beta3.ResourceValue: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + akash.base.v1beta3.SignedBy: + type: object + properties: + all_of: + type: array + items: + type: string + title: all_of all keys in this list must have signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have signed + attributes + title: >- + SignedBy represents validation accounts that tenant expects signatures for + provider attributes + + AllOf has precedence i.e. if there is at least one entry AnyOf is ignored + regardless to how many + + entries there + + this behaviour to be discussed + akash.base.v1beta3.Storage: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Storage stores resource quantity and storage attributes + akash.deployment.v1beta3.Deployment: + type: object + properties: + deployment_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + state: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + version: + type: string + format: byte + created_at: + type: string + format: int64 + title: Deployment stores deploymentID, state and version details + akash.deployment.v1beta3.Deployment.State: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + akash.deployment.v1beta3.DeploymentFilters: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + state: + type: string + title: DeploymentFilters defines filters used to filter deployments + akash.deployment.v1beta3.DeploymentID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + akash.deployment.v1beta3.Group: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and group sequence + number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have signatures + from + type: object + properties: + all_of: + type: array + items: + type: string + title: all_of all keys in this list must have signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have + signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Attribute list of attributes tenant expects from the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that becomes + a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented + when the lease is deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + title: >- + ResourceUnits describes all available resources types for + deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + akash.deployment.v1beta3.Group.State: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + akash.deployment.v1beta3.GroupID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: GroupID stores owner, deployment sequence number and group sequence number + akash.deployment.v1beta3.GroupSpec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: SignedBy list of keys that tenants expect to have signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: all_of all keys in this list must have signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have signed + attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Attribute list of attributes tenant expects from the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Storage stores resource quantity and storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that becomes a + Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented when + the lease is deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + title: >- + ResourceUnits describes all available resources types for + deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + akash.deployment.v1beta3.QueryDeploymentResponse: + type: object + properties: + deployment: + type: object + properties: + deployment_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + state: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + version: + type: string + format: byte + created_at: + type: string + format: int64 + title: Deployment stores deploymentID, state and version details + groups: + type: array + items: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and group + sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must + have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from the + provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that + becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible IP + service + title: >- + ResourceUnits describes all available resources types + for deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: bech32 encoded account address of the owner of this escrow account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins are + added to the Balance. + + If depositor isn't same as the owner, then any incoming coins are + added to the Funds. + funds: + 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: Account stores state for an escrow account + title: >- + QueryDeploymentResponse is response type for the Query/Deployment RPC + method + akash.deployment.v1beta3.QueryDeploymentsResponse: + type: object + properties: + deployments: + type: array + items: + type: object + properties: + deployment: + type: object + properties: + deployment_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + state: + type: string + enum: + - invalid + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - active: DeploymentActive denotes state for deployment active + - closed: DeploymentClosed denotes state for deployment closed + title: State is an enum which refers to state of deployment + version: + type: string + format: byte + created_at: + type: string + format: int64 + title: Deployment stores deploymentID, state and version details + groups: + type: array + items: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and group + sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So + declaring dummy state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list + must have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from + the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and + storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: >- + Unit stores cpu, memory and storage + metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint + that becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible + IP service + title: >- + ResourceUnits describes all available resources + types for deployment/node etc + + if field is nil resource is not present in the + given data-structure + count: + type: integer + format: int64 + price: + 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: >- + Resource stores unit, total count and price of + resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this escrow + account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins + are added to the Balance. + + If depositor isn't same as the owner, then any incoming + coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: >- + QueryDeploymentResponse is response type for the Query/Deployment + RPC method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: >- + QueryDeploymentsResponse is response type for the Query/Deployments RPC + method + akash.deployment.v1beta3.QueryGroupResponse: + type: object + properties: + group: + type: object + properties: + group_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + title: >- + GroupID stores owner, deployment sequence number and group + sequence number + state: + type: string + enum: + - invalid + - open + - paused + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: GroupOpen denotes state for group open + - paused: GroupOrdered denotes state for group ordered + - insufficient_funds: GroupInsufficientFunds denotes state for group insufficient_funds + - closed: GroupClosed denotes state for group closed + title: State is an enum which refers to state of group + group_spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have + signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from the + provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that + becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented + when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible IP + service + title: >- + ResourceUnits describes all available resources types + for deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + title: QueryGroupResponse is response type for the Query/Group RPC method + akash.deployment.v1beta3.Resource: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Storage stores resource quantity and storage attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that becomes a + Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented when the + lease is deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + title: >- + ResourceUnits describes all available resources types for + deployment/node etc + + if field is nil resource is not present in the given data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + akash.escrow.v1beta3.Account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: bech32 encoded account address of the owner of this escrow account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins are added + to the Balance. + + If depositor isn't same as the owner, then any incoming coins are + added to the Funds. + funds: + 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: Account stores state for an escrow account + akash.escrow.v1beta3.Account.State: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + title: State stores state for an escrow account + akash.escrow.v1beta3.AccountID: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + 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. + akash.deployment.v1beta3.MsgCloseDeploymentResponse: + type: object + description: MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. + akash.deployment.v1beta3.MsgCloseGroupResponse: + type: object + description: MsgCloseGroupResponse defines the Msg/CloseGroup response type. + akash.deployment.v1beta3.MsgCreateDeploymentResponse: + type: object + description: >- + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response + type. + akash.deployment.v1beta3.MsgDepositDeploymentResponse: + type: object + description: >- + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response + type. + akash.deployment.v1beta3.MsgPauseGroupResponse: + type: object + description: MsgPauseGroupResponse defines the Msg/PauseGroup response type. + akash.deployment.v1beta3.MsgStartGroupResponse: + type: object + description: MsgStartGroupResponse defines the Msg/StartGroup response type. + akash.deployment.v1beta3.MsgUpdateDeploymentResponse: + type: object + description: >- + MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response + type. + 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. + akash.escrow.v1beta3.FractionalPayment: + type: object + properties: + account_id: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + payment_id: + type: string + owner: + type: string + state: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: >- + - invalid: PaymentStateInvalid is the state when the payment is + invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + rate: + 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. + balance: + 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. + withdrawn: + 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: Payment stores state for a payment + akash.escrow.v1beta3.FractionalPayment.State: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: PaymentStateInvalid is the state when the payment is invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + akash.market.v1beta3.Bid: + type: object + properties: + bid_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + state: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + price: + 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. + created_at: + type: string + format: int64 + title: Bid stores BidID, state of bid and price + akash.market.v1beta3.Bid.State: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + akash.market.v1beta3.BidFilters: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + state: + type: string + title: BidFilters defines flags for bid list filter + akash.market.v1beta3.BidID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + akash.market.v1beta3.Lease: + type: object + properties: + lease_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + state: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + price: + 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. + created_at: + type: string + format: int64 + closed_on: + type: string + format: int64 + title: Lease stores LeaseID, state of lease and price + akash.market.v1beta3.Lease.State: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + akash.market.v1beta3.LeaseFilters: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + state: + type: string + title: LeaseFilters defines flags for lease list filter + akash.market.v1beta3.LeaseID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + akash.market.v1beta3.Order: + type: object + properties: + order_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + state: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have signatures + from + type: object + properties: + all_of: + type: array + items: + type: string + title: all_of all keys in this list must have signed attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have + signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Attribute list of attributes tenant expects from the provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: Memory stores resource quantity and memory attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that becomes + a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented + when the lease is deployed + sequence_number: + type: integer + format: int64 + title: Endpoint describes a publicly accessible IP service + title: >- + ResourceUnits describes all available resources types for + deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + akash.market.v1beta3.Order.State: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: |- + - invalid: Prefix should start with 0 in enum. So declaring dummy state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + akash.market.v1beta3.OrderFilters: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + state: + type: string + title: OrderFilters defines flags for order list filter + akash.market.v1beta3.OrderID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + akash.market.v1beta3.QueryBidResponse: + type: object + properties: + bid: + type: object + properties: + bid_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + state: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + price: + 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. + created_at: + type: string + format: int64 + title: Bid stores BidID, state of bid and price + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: bech32 encoded account address of the owner of this escrow account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins are + added to the Balance. + + If depositor isn't same as the owner, then any incoming coins are + added to the Funds. + funds: + 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: Account stores state for an escrow account + title: QueryBidResponse is response type for the Query/Bid RPC method + akash.market.v1beta3.QueryBidsResponse: + type: object + properties: + bids: + type: array + items: + type: object + properties: + bid: + type: object + properties: + bid_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + description: |- + BidID stores owner and all other seq numbers + A successful bid becomes a Lease(ID). + state: + type: string + enum: + - invalid + - open + - active + - lost + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - open: BidOpen denotes state for bid open + - active: BidMatched denotes state for bid open + - lost: BidLost denotes state for bid lost + - closed: BidClosed denotes state for bid closed + title: State is an enum which refers to state of bid + price: + 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. + created_at: + type: string + format: int64 + title: Bid stores BidID, state of bid and price + escrow_account: + type: object + properties: + id: + title: unique identifier for this escrow account + type: object + properties: + scope: + type: string + xid: + type: string + owner: + type: string + title: >- + bech32 encoded account address of the owner of this escrow + account + state: + title: current state of this escrow account + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: |- + - invalid: AccountStateInvalid is an invalid state + - open: AccountOpen is the state when an account is open + - closed: AccountClosed is the state when an account is closed + - overdrawn: AccountOverdrawn is the state when an account is overdrawn + balance: + 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: unspent coins received from the owner's wallet + transferred: + 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: total coins spent by this account + settled_at: + type: string + format: int64 + title: block height at which this account was last settled + depositor: + type: string + description: >- + bech32 encoded account address of the depositor. + + If depositor is same as the owner, then any incoming coins + are added to the Balance. + + If depositor isn't same as the owner, then any incoming + coins are added to the Funds. + funds: + 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: Account stores state for an escrow account + title: QueryBidResponse is response type for the Query/Bid RPC method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryBidsResponse is response type for the Query/Bids RPC method + akash.market.v1beta3.QueryLeaseResponse: + type: object + properties: + lease: + type: object + properties: + lease_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + state: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + price: + 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. + created_at: + type: string + format: int64 + closed_on: + type: string + format: int64 + title: Lease stores LeaseID, state of lease and price + escrow_payment: + type: object + properties: + account_id: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + payment_id: + type: string + owner: + type: string + state: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: >- + - invalid: PaymentStateInvalid is the state when the payment is + invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + rate: + 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. + balance: + 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. + withdrawn: + 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: Payment stores state for a payment + title: QueryLeaseResponse is response type for the Query/Lease RPC method + akash.market.v1beta3.QueryLeasesResponse: + type: object + properties: + leases: + type: array + items: + type: object + properties: + lease: + type: object + properties: + lease_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + provider: + type: string + title: LeaseID stores bid details of lease + state: + type: string + enum: + - invalid + - active + - insufficient_funds + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - active: LeaseActive denotes state for lease active + - insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + price: + 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. + created_at: + type: string + format: int64 + closed_on: + type: string + format: int64 + title: Lease stores LeaseID, state of lease and price + escrow_payment: + type: object + properties: + account_id: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + payment_id: + type: string + owner: + type: string + state: + type: string + enum: + - invalid + - open + - closed + - overdrawn + default: invalid + description: >- + - invalid: PaymentStateInvalid is the state when the payment + is invalid + - open: PaymentStateOpen is the state when the payment is open + - closed: PaymentStateClosed is the state when the payment is closed + - overdrawn: PaymentStateOverdrawn is the state when the payment is overdrawn + title: Payment State + rate: + 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. + balance: + 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. + withdrawn: + 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: Payment stores state for a payment + title: QueryLeaseResponse is response type for the Query/Lease RPC method + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryLeasesResponse is response type for the Query/Leases RPC method + akash.market.v1beta3.QueryOrderResponse: + type: object + properties: + order: + type: object + properties: + order_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + state: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring dummy + state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must have + signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from the + provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: CPU stores resource units and cpu config attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: GPU stores resource units and cpu config attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that + becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is implemented + when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible IP + service + title: >- + ResourceUnits describes all available resources types + for deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + title: QueryOrderResponse is response type for the Query/Order RPC method + akash.market.v1beta3.QueryOrdersResponse: + type: object + properties: + orders: + type: array + items: + type: object + properties: + order_id: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + gseq: + type: integer + format: int64 + oseq: + type: integer + format: int64 + title: OrderID stores owner and all other seq numbers + state: + type: string + enum: + - invalid + - open + - active + - closed + default: invalid + description: >- + - invalid: Prefix should start with 0 in enum. So declaring + dummy state + - open: OrderOpen denotes state for order open + - active: OrderMatched denotes state for order matched + - closed: OrderClosed denotes state for order lost + title: State is an enum which refers to state of order + spec: + type: object + properties: + name: + type: string + requirements: + type: object + properties: + signed_by: + title: >- + SignedBy list of keys that tenants expect to have + signatures from + type: object + properties: + all_of: + type: array + items: + type: string + title: >- + all_of all keys in this list must have signed + attributes + any_of: + type: array + items: + type: string + title: >- + any_of at least of of the keys from the list must + have signed attributes + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Attribute list of attributes tenant expects from the + provider + title: PlacementRequirements + resources: + type: array + items: + type: object + properties: + resources: + type: object + properties: + cpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + CPU stores resource units and cpu config + attributes + memory: + type: object + properties: + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Memory stores resource quantity and memory + attributes + storage: + type: array + items: + type: object + properties: + name: + type: string + quantity: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + Storage stores resource quantity and storage + attributes + gpu: + type: object + properties: + units: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + title: >- + GPU stores resource units and cpu config + attributes + endpoints: + type: array + items: + type: object + properties: + kind: + type: string + enum: + - SHARED_HTTP + - RANDOM_PORT + - LEASED_IP + default: SHARED_HTTP + description: >- + - SHARED_HTTP: Describes an endpoint that + becomes a Kubernetes Ingress + - RANDOM_PORT: Describes an endpoint that becomes a Kubernetes NodePort + - LEASED_IP: Describes an endpoint that becomes a leased IP + title: >- + This describes how the endpoint is + implemented when the lease is deployed + sequence_number: + type: integer + format: int64 + title: >- + Endpoint describes a publicly accessible IP + service + title: >- + ResourceUnits describes all available resources types + for deployment/node etc + + if field is nil resource is not present in the given + data-structure + count: + type: integer + format: int64 + price: + 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: Resource stores unit, total count and price of resource + title: GroupSpec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryOrdersResponse is response type for the Query/Orders RPC method + akash.market.v1beta3.MsgCloseBidResponse: + type: object + description: MsgCloseBidResponse defines the Msg/CloseBid response type. + akash.market.v1beta3.MsgCloseLeaseResponse: + type: object + description: MsgCloseLeaseResponse defines the Msg/CloseLease response type. + akash.market.v1beta3.MsgCreateBidResponse: + type: object + description: MsgCreateBidResponse defines the Msg/CreateBid response type. + akash.market.v1beta3.MsgCreateLeaseResponse: + type: object + title: MsgCreateLeaseResponse is the response from creating a lease + akash.market.v1beta3.MsgWithdrawLeaseResponse: + type: object + description: MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. + akash.provider.v1beta3.Provider: + type: object + properties: + owner: + type: string + host_uri: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + info: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + title: Provider stores owner and host details + akash.provider.v1beta3.ProviderInfo: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + akash.provider.v1beta3.QueryProviderResponse: + type: object + properties: + provider: + type: object + properties: + owner: + type: string + host_uri: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + info: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + title: Provider stores owner and host details + title: QueryProviderResponse is response type for the Query/Provider RPC method + akash.provider.v1beta3.QueryProvidersResponse: + type: object + properties: + providers: + type: array + items: + type: object + properties: + owner: + type: string + host_uri: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + title: Attribute represents key value pair + info: + type: object + properties: + email: + type: string + website: + type: string + title: ProviderInfo + title: Provider stores owner and host details + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: QueryProvidersResponse is response type for the Query/Providers RPC method + CheckTxResult: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 0 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + DeliverTxResult: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 5 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + BroadcastTxCommitResult: + type: object + properties: + check_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 0 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + deliver_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 5 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + height: + type: integer + KVPair: + type: object + properties: + key: + type: string + value: + type: string + Msg: + type: string + Address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + ValidatorAddress: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + Coin: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + Hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + TxQuery: + type: object + properties: + hash: + type: string + example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + PaginatedQueryTxs: + type: object + properties: + total_count: + type: number + example: 1 + count: + type: number + example: 1 + page_number: + type: number + example: 1 + page_total: + type: number + example: 1 + limit: + type: number + example: 30 + txs: + type: array + items: + type: object + properties: + hash: + type: string + example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + StdTx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + BlockID: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + BlockHeader: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + Block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: + type: array + items: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: + type: object + properties: + validator_address: + type: string + validator_index: + type: string + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + BlockQuery: + type: object + properties: + block_meta: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: cosmoshub-2 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: + type: array + items: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: + type: object + properties: + validator_address: + type: string + validator_index: + type: string + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + DelegationDelegatorReward: + type: object + properties: + validator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + reward: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + DelegatorTotalRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + reward: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + total: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + BaseReq: + type: object + properties: + from: + type: string + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: Sent via Cosmos Voyager 🚀 + chain_id: + type: string + example: Cosmos-Hub + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + TendermintValidator: + type: object + properties: + address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + pub_key: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + voting_power: + type: string + example: '1000' + proposer_priority: + type: string + example: '1000' + TextProposal: + type: object + properties: + proposal_id: + type: integer + title: + type: string + description: + type: string + proposal_type: + type: string + proposal_status: + type: string + final_tally_result: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + submit_time: + type: string + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + voting_start_time: + type: string + Proposer: + type: object + properties: + proposal_id: + type: string + proposer: + type: string + Deposit: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + proposal_id: + type: string + depositor: + type: string + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + TallyResult: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + Vote: + type: object + properties: + voter: + type: string + proposal_id: + type: string + option: + type: string + Validator: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + consensus_pubkey: + type: string + example: >- + cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: + type: object + properties: + moniker: + type: string + identity: + type: string + website: + type: string + security_contact: + type: string + details: + type: string + bond_height: + type: string + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: + type: string + example: '0' + unbonding_time: + type: string + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + Delegation: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + shares: + type: string + balance: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + UnbondingDelegationPair: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + entries: + type: array + items: + type: object + properties: + initial_balance: + type: string + balance: + type: string + creation_height: + type: string + min_time: + type: string + UnbondingEntries: + type: object + properties: + initial_balance: + type: string + balance: + type: string + creation_height: + type: string + min_time: + type: string + UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + validator_address: + type: string + initial_balance: + type: string + balance: + type: string + creation_height: + type: integer + min_time: + type: integer + Redelegation: + type: object + properties: + delegator_address: + type: string + validator_src_address: + type: string + validator_dst_address: + type: string + entries: + type: array + items: + $ref: '#/definitions/Redelegation' + RedelegationEntry: + type: object + properties: + creation_height: + type: integer + completion_time: + type: integer + initial_balance: + type: string + balance: + type: string + shares_dst: + type: string + ValidatorDistInfo: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + val_commission: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + PublicKey: + type: object + properties: + type: + type: string + value: + type: string + SigningInfo: + type: object + properties: + start_height: + type: string + index_offset: + type: string + jailed_until: + type: string + missed_blocks_counter: + type: string + ParamChange: + type: object + properties: + subspace: + type: string + example: staking + key: + type: string + example: MaxValidators + subkey: + type: string + example: '' + value: + type: object + Supply: + type: object + properties: + total: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' + 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.QueryAccountResponse: + type: object + properties: + account: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + 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.bank.v1beta1.DenomOwner: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + 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: |- + 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. + 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 = 1^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.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 = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to + verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + format: 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + 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: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + 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 = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used + to verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + 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: + 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: >- + 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. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + 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 = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used + to verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySupplyOfResponse: + 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: >- + 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. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + format: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + 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: + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + 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 Tendermint 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 Tendermint 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 Tendermint 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: >- + 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: + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + 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 Tendermint 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 Tendermint 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 Tendermint 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: >- + 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC + method. + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + format: 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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.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.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + 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 Tendermint 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + 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 Tendermint 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 Tendermint 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 + Tendermint 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 + 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 + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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 + Tendermint 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 + Tendermint 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 Tendermint + 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 + 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 + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint 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 Tendermint 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 Tendermint 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 + Tendermint 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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 Tendermint + 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 Tendermint + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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 + Tendermint 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 + Tendermint 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 Tendermint + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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 Tendermint + 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 Tendermint + 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 Tendermint + 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 + 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.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.Params: + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: 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 + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: 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 commision 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.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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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.QueryAllEvidenceResponse: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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: >- + QueryEvidenceResponse is the response type for the Query/Evidence RPC + method. + cosmos.gov.v1beta1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + 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: |- + 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.Proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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 + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal 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. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + 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. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + 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 propopsal 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: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + 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: |- + Deposit defines an amount deposited by an account address to an active + proposal. + 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 + depositor: + type: string + 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: >- + Deposit defines an amount deposited by an account address to an + active + + proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: Length 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 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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 + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal 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. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + 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. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + 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 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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 + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal 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. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + 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. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + 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: + 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. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + 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 + voter: + type: string + 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: + 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. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + 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: + 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. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + 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: Length of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + 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. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + 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 holds parameters for the 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.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.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: + 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 + format: 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: val_signing_info is the signing info of requested val cons address + 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 + format: 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + format: 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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.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. + description: Params defines the parameters for the 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: + 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: >- + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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: |- + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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 the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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 + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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. + 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. + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + description: entries are the 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. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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. + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the 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. + 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. + 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. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the 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. + 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. + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + description: entries are the 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. + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + jailed: + type: boolean + format: 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. + 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. + 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 + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + 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. + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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. + 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_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + - 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 + - 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 + cosmos.tx.v1beta1.AuthInfo: + type: object + properties: + signer_infos: + type: array + items: + $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 + 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: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - 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: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - 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: + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + 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.GetTxResponse: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + tx_response: + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: GetTxResponse is the response type for the Service.GetTx method. + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + $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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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. + 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 an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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: |- + 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_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security + guarantees. + + - 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 + - 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 + 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: + $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_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security guarantees. + + - 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 + - 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 + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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" + } + 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. + 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. + 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 + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + 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. + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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. + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + 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 + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + 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. + 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. + Only used if Time is not set. + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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: >- + 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.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. + Only used if Time is not set. + 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: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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: >- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan + RPC + + method. + cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + cosmos.authz.v1beta1.Grant: + type: object + properties: + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + description: |- + Grant gives permissions to execute + the provide method with expiration time. + cosmos.authz.v1beta1.QueryGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: 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 := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the 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 + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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.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 and filtered fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + title: Grant is stored in the KVStore to record a grant with full context + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is 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 and filtered fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + 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.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 and filtered fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + 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 + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + 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. +securityDefinitions: + kms: + type: basic diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..10a027e0 --- /dev/null +++ b/go.mod @@ -0,0 +1,144 @@ +module github.com/akash-network/akash-api + +go 1.19 + +require ( + github.com/akash-network/node v0.22.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.1 + github.com/cosmos/cosmos-sdk v0.45.9 + github.com/cosmos/gogoproto v1.4.2 + github.com/gogo/protobuf v1.3.3 + github.com/golang/protobuf v1.5.2 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/pkg/errors v0.9.1 + github.com/regen-network/cosmos-proto v0.3.1 + github.com/stretchr/testify v1.8.1 + github.com/tendermint/tendermint v0.34.21 + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f + google.golang.org/grpc v1.53.0 + gopkg.in/yaml.v3 v3.0.1 + k8s.io/api v0.23.4 +) + +replace github.com/gogo/protobuf => github.com/cosmos/gogoproto v1.4.4 + +require ( + filippo.io/edwards25519 v1.0.0-beta.2 // indirect + github.com/99designs/keyring v1.1.6 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/DataDog/zstd v1.4.5 // indirect + github.com/Workiva/go-datastructures v1.0.53 // indirect + github.com/armon/go-metrics v0.4.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/blang/semver v3.5.1+incompatible // indirect + github.com/btcsuite/btcd v0.22.1 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect + github.com/confio/ics23/go v0.7.0 // indirect + github.com/cosmos/btcutil v1.0.4 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gorocksdb v1.2.0 // indirect + github.com/cosmos/iavl v0.19.3 // indirect + github.com/cosmos/ibc-go/v3 v3.1.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect + github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/danieljoos/wincred v1.1.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.2 // indirect + github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.5.4 // 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.5.1 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/gateway v1.1.0 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/btree v1.0.1 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.1-0.20191016231534-914dc3f8dd7c // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect + github.com/improbable-eng/grpc-web v0.14.1 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmhodges/levigo v1.0.1-0.20191019112844-b572e7f4cdac // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/lib/pq v1.10.6 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect + github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.34.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/rakyll/statik v0.1.7 // indirect + github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect + github.com/rs/cors v1.8.2 // indirect + github.com/rs/zerolog v1.27.0 // indirect + github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.5.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/subosito/gotenv v1.4.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect + github.com/tendermint/btcd v0.1.1 // indirect + github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tendermint/tm-db v0.6.7 // indirect + github.com/zondax/hid v0.9.0 // indirect + go.etcd.io/bbolt v1.3.6 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/net v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/term v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/apimachinery v0.23.4 // indirect + k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect + nhooyr.io/websocket v1.8.6 // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..334a0967 --- /dev/null +++ b/go.sum @@ -0,0 +1,1899 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= +filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= +github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= +github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +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/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +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/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/akash-network/node v0.22.0 h1:T4MZwJpDjyDJdYQU/aEb+jLbiXKNFr73oK8gM5xSUaU= +github.com/akash-network/node v0.22.0/go.mod h1:oVlRWnpGjmqBCOPTe8xWqkmbGz22+LCv0NmgmswBv/Q= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +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= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +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= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= +github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +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/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +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= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= +github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= +github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= +github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= +github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= +github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0= +github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= +github.com/cosmos/cosmos-sdk v0.45.9 h1:Z4s1EZL/mfM8uSSZr8WmyEbWp4hqbWVI5sAIFR432KY= +github.com/cosmos/cosmos-sdk v0.45.9/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.4 h1:nVAsgLlAf5jeN0fV7hRlkZvf768zU+dy4pG+hxc2P34= +github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU= +github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= +github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= +github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= +github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/ibc-go/v3 v3.1.0 h1:aVPqkrGBluz6t9+d/sLZIG/zQ9O1KJzVeR4UlL/IFTQ= +github.com/cosmos/ibc-go/v3 v3.1.0/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= +github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= +github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= +github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= +github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= +github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +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 v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +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= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= +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= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +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= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +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/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/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= +github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +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= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +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-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-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/hcl v1.0.1-0.20191016231534-914dc3f8dd7c h1:PdZEHcpa3117kJ1Wa5EYupzCzn9QlBby8Fx2YpZPYvo= +github.com/hashicorp/hcl v1.0.1-0.20191016231534-914dc3f8dd7c/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +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/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= +github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= +github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= +github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +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.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.1-0.20191019112844-b572e7f4cdac h1:GcJkaxD5Wy/Ucn+L0USlpbGJy9O6+7r0nBI7ftJ7Uu0= +github.com/jmhodges/levigo v1.0.1-0.20191019112844-b572e7f4cdac/go.mod h1:dM7ihgFM8Do6WGIfOXWPgpJ+4bKGR/4ZkYh8HKDdFy4= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +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.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +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.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/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 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= +github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +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.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +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/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +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 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +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= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= +github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.21 h1:UiGGnBFHVrZhoQVQ7EfwSOLuCtarqCSsRf8VrklqB7s= +github.com/tendermint/tendermint v0.34.21/go.mod h1:XDvfg6U7grcFTDx7VkzxnhazQ/bspGJAn4DZ6DcLLjQ= +github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= +github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= +github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= +github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= +github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +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= +golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +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.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +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= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +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-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +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-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-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-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.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.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +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= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/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.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +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= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +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/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +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= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E= +k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= +k8s.io/apimachinery v0.23.4 h1:fhnuMd/xUL3Cjfl64j5ULKZ1/J9n8NuQEgNL+WXWfdM= +k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/go/manifest/v2beta2/group.pb.go b/go/manifest/v2beta2/group.pb.go new file mode 100644 index 00000000..fefc643b --- /dev/null +++ b/go/manifest/v2beta2/group.pb.go @@ -0,0 +1,412 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/manifest/v2beta2/group.proto + +package v2beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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 + +// Group store name and list of services +type Group struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Services []*Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` +} + +func (m *Group) Reset() { *m = Group{} } +func (*Group) ProtoMessage() {} +func (*Group) Descriptor() ([]byte, []int) { + return fileDescriptor_9735f16570903042, []int{0} +} +func (m *Group) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Group.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 *Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Group.Merge(m, src) +} +func (m *Group) XXX_Size() int { + return m.Size() +} +func (m *Group) XXX_DiscardUnknown() { + xxx_messageInfo_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Group proto.InternalMessageInfo + +func (m *Group) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Group) GetServices() []*Service { + if m != nil { + return m.Services + } + return nil +} + +func init() { + proto.RegisterType((*Group)(nil), "akash.manifest.v2beta2.Group") +} + +func init() { + proto.RegisterFile("akash/manifest/v2beta2/group.proto", fileDescriptor_9735f16570903042) +} + +var fileDescriptor_9735f16570903042 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0xcc, 0xcb, 0x4c, 0x4b, 0x2d, 0x2e, 0xd1, 0x2f, 0x33, 0x4a, 0x4a, 0x2d, + 0x49, 0x34, 0xd2, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x03, 0xab, 0xd1, 0x83, 0xa9, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, + 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x54, 0x70, 0x98, 0x58, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c, + 0x0a, 0x51, 0xa5, 0x34, 0x89, 0x91, 0x8b, 0xd5, 0x1d, 0x64, 0x87, 0x90, 0x36, 0x17, 0x4b, 0x5e, + 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xf8, 0xab, 0x7b, 0xf2, 0x60, 0xfe, + 0xa7, 0x7b, 0xf2, 0xdc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x20, 0x9e, 0x52, 0x10, 0x58, 0x50, + 0x28, 0x86, 0x8b, 0x03, 0x6a, 0x4e, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xbc, 0x1e, + 0x76, 0xd7, 0xe9, 0x05, 0x43, 0xd4, 0x39, 0xc9, 0xbf, 0xba, 0x27, 0x0f, 0xd7, 0xf4, 0xe9, 0x9e, + 0x3c, 0x3f, 0xc4, 0x54, 0x98, 0x88, 0x52, 0x10, 0x5c, 0xd2, 0x29, 0xe2, 0xc6, 0x43, 0x39, 0x86, + 0x86, 0x47, 0x72, 0x8c, 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, 0x65, 0x96, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xb6, 0x57, 0x37, 0x2f, 0xb5, + 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xc7, 0xf0, 0x7c, 0x12, + 0x1b, 0xd8, 0xd7, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x85, 0x2f, 0x3e, 0x6f, 0x01, + 0x00, 0x00, +} + +func (m *Group) 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 *Group) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Services[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Group) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.Services) > 0 { + for _, e := range m.Services { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func sovGroup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Group) String() string { + if this == nil { + return "nil" + } + repeatedStringForServices := "[]*Service{" + for _, f := range this.Services { + repeatedStringForServices += strings.Replace(fmt.Sprintf("%v", f), "Service", "Service", 1) + "," + } + repeatedStringForServices += "}" + s := strings.Join([]string{`&Group{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Services:` + repeatedStringForServices + `,`, + `}`, + }, "") + return s +} +func valueToStringGroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Group) 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 ErrIntOverflowGroup + } + 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: Group: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowGroup + } + 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 ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, &Service{}) + if err := m.Services[len(m.Services)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroup(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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrInvalidLengthGroup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/manifest/v2beta2/httpoptions.pb.go b/go/manifest/v2beta2/httpoptions.pb.go new file mode 100644 index 00000000..3d81cc1e --- /dev/null +++ b/go/manifest/v2beta2/httpoptions.pb.go @@ -0,0 +1,535 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/manifest/v2beta2/httpoptions.proto + +package v2beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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 + +// ServiceExposeHTTPOptions +type ServiceExposeHTTPOptions struct { + MaxBodySize uint32 `protobuf:"varint,1,opt,name=max_body_size,json=maxBodySize,proto3" json:"maxBodySize" yaml:"maxBodySize"` + ReadTimeout uint32 `protobuf:"varint,2,opt,name=read_timeout,json=readTimeout,proto3" json:"readTimeout" yaml:"readTimeout"` + SendTimeout uint32 `protobuf:"varint,3,opt,name=send_timeout,json=sendTimeout,proto3" json:"sendTimeout" yaml:"sendTimeout"` + NextTries uint32 `protobuf:"varint,4,opt,name=next_tries,json=nextTries,proto3" json:"nextTries" yaml:"nextTries"` + NextTimeout uint32 `protobuf:"varint,5,opt,name=next_timeout,json=nextTimeout,proto3" json:"nextTimeout" yaml:"nextTimeout"` + NextCases []string `protobuf:"bytes,6,rep,name=next_cases,json=nextCases,proto3" json:"nextCases" yaml:"nextCases"` +} + +func (m *ServiceExposeHTTPOptions) Reset() { *m = ServiceExposeHTTPOptions{} } +func (*ServiceExposeHTTPOptions) ProtoMessage() {} +func (*ServiceExposeHTTPOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_8764ded002d8de0f, []int{0} +} +func (m *ServiceExposeHTTPOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceExposeHTTPOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceExposeHTTPOptions.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 *ServiceExposeHTTPOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceExposeHTTPOptions.Merge(m, src) +} +func (m *ServiceExposeHTTPOptions) XXX_Size() int { + return m.Size() +} +func (m *ServiceExposeHTTPOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceExposeHTTPOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceExposeHTTPOptions proto.InternalMessageInfo + +func (m *ServiceExposeHTTPOptions) GetMaxBodySize() uint32 { + if m != nil { + return m.MaxBodySize + } + return 0 +} + +func (m *ServiceExposeHTTPOptions) GetReadTimeout() uint32 { + if m != nil { + return m.ReadTimeout + } + return 0 +} + +func (m *ServiceExposeHTTPOptions) GetSendTimeout() uint32 { + if m != nil { + return m.SendTimeout + } + return 0 +} + +func (m *ServiceExposeHTTPOptions) GetNextTries() uint32 { + if m != nil { + return m.NextTries + } + return 0 +} + +func (m *ServiceExposeHTTPOptions) GetNextTimeout() uint32 { + if m != nil { + return m.NextTimeout + } + return 0 +} + +func (m *ServiceExposeHTTPOptions) GetNextCases() []string { + if m != nil { + return m.NextCases + } + return nil +} + +func init() { + proto.RegisterType((*ServiceExposeHTTPOptions)(nil), "akash.manifest.v2beta2.ServiceExposeHTTPOptions") +} + +func init() { + proto.RegisterFile("akash/manifest/v2beta2/httpoptions.proto", fileDescriptor_8764ded002d8de0f) +} + +var fileDescriptor_8764ded002d8de0f = []byte{ + // 377 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xb1, 0x6a, 0xdb, 0x40, + 0x1c, 0x87, 0xa5, 0xba, 0x35, 0x58, 0xad, 0xa1, 0x88, 0x52, 0x44, 0x87, 0x93, 0x2b, 0x28, 0x78, + 0xa9, 0x04, 0x0e, 0x64, 0xc8, 0x14, 0x1c, 0x02, 0xce, 0x94, 0x20, 0x6b, 0x08, 0x59, 0xc4, 0xc9, + 0xbe, 0xc8, 0x87, 0x23, 0x9d, 0xd0, 0x9d, 0x1d, 0xd9, 0x53, 0x1e, 0x21, 0x6f, 0x95, 0x8c, 0x1e, + 0x3d, 0x89, 0x44, 0xde, 0x3c, 0xfa, 0x09, 0xc2, 0x9d, 0x14, 0xeb, 0x12, 0x6f, 0xa7, 0x4f, 0x1f, + 0x1f, 0xbf, 0xe1, 0xaf, 0x75, 0xe1, 0x14, 0xd2, 0x89, 0x13, 0xc1, 0x18, 0xdf, 0x22, 0xca, 0x9c, + 0x79, 0x2f, 0x40, 0x0c, 0xf6, 0x9c, 0x09, 0x63, 0x09, 0x49, 0x18, 0x26, 0x31, 0xb5, 0x93, 0x94, + 0x30, 0xa2, 0xff, 0x16, 0xa6, 0xfd, 0x6e, 0xda, 0x95, 0xf9, 0xe7, 0x57, 0x48, 0x42, 0x22, 0x14, + 0x87, 0xbf, 0x4a, 0xdb, 0x7a, 0x6a, 0x68, 0xc6, 0x10, 0xa5, 0x73, 0x3c, 0x42, 0xe7, 0x59, 0x42, + 0x28, 0x1a, 0x78, 0xde, 0xd5, 0x65, 0x19, 0xd4, 0x2f, 0xb4, 0x76, 0x04, 0x33, 0x3f, 0x20, 0xe3, + 0x85, 0x4f, 0xf1, 0x12, 0x19, 0x6a, 0x47, 0xed, 0xb6, 0xfb, 0xff, 0xb6, 0xb9, 0xf9, 0x3d, 0x82, + 0x59, 0x9f, 0x8c, 0x17, 0x43, 0xbc, 0x44, 0xbb, 0xdc, 0xd4, 0x17, 0x30, 0xba, 0x3b, 0xb1, 0x24, + 0x68, 0xb9, 0xb2, 0xa2, 0x0f, 0xb4, 0x1f, 0x29, 0x82, 0x63, 0x9f, 0xe1, 0x08, 0x91, 0x19, 0x33, + 0xbe, 0xd4, 0x25, 0xce, 0xbd, 0x12, 0xd7, 0x25, 0x09, 0x5a, 0xae, 0xac, 0xf0, 0x12, 0x45, 0x71, + 0x5d, 0x6a, 0xd4, 0x25, 0xce, 0x0f, 0x4a, 0x12, 0xb4, 0x5c, 0x59, 0xd1, 0x4f, 0x35, 0x2d, 0x46, + 0x19, 0xf3, 0x59, 0x8a, 0x11, 0x35, 0xbe, 0x8a, 0xce, 0xdf, 0x6d, 0x6e, 0xb6, 0x38, 0xf5, 0x38, + 0xdc, 0xe5, 0xe6, 0xcf, 0xb2, 0xb2, 0x47, 0x96, 0x5b, 0xff, 0xe6, 0x5b, 0xca, 0x42, 0xb5, 0xe5, + 0x5b, 0xbd, 0x45, 0x48, 0x9f, 0xb7, 0x48, 0xd0, 0x72, 0x65, 0x65, 0xbf, 0x65, 0x04, 0x29, 0xa2, + 0x46, 0xb3, 0xd3, 0xe8, 0xb6, 0xea, 0x2d, 0x67, 0x1c, 0x7e, 0xdc, 0x22, 0x50, 0xb5, 0x45, 0xbc, + 0xfb, 0xd7, 0xeb, 0x57, 0xa0, 0x3c, 0x14, 0x40, 0x7d, 0x2e, 0x80, 0xba, 0x2a, 0x80, 0xfa, 0x52, + 0x00, 0xf5, 0x71, 0x03, 0x94, 0xd5, 0x06, 0x28, 0xeb, 0x0d, 0x50, 0x6e, 0x8e, 0x43, 0xcc, 0x26, + 0xb3, 0xc0, 0x1e, 0x91, 0xc8, 0x11, 0x47, 0xf2, 0x3f, 0x46, 0xec, 0x9e, 0xa4, 0xd3, 0xea, 0x0b, + 0x26, 0xd8, 0x09, 0xc9, 0xc1, 0x8d, 0x05, 0x4d, 0x71, 0x2a, 0x47, 0x6f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x0d, 0x59, 0x8b, 0x64, 0x84, 0x02, 0x00, 0x00, +} + +func (m *ServiceExposeHTTPOptions) 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 *ServiceExposeHTTPOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceExposeHTTPOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextCases) > 0 { + for iNdEx := len(m.NextCases) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NextCases[iNdEx]) + copy(dAtA[i:], m.NextCases[iNdEx]) + i = encodeVarintHttpoptions(dAtA, i, uint64(len(m.NextCases[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if m.NextTimeout != 0 { + i = encodeVarintHttpoptions(dAtA, i, uint64(m.NextTimeout)) + i-- + dAtA[i] = 0x28 + } + if m.NextTries != 0 { + i = encodeVarintHttpoptions(dAtA, i, uint64(m.NextTries)) + i-- + dAtA[i] = 0x20 + } + if m.SendTimeout != 0 { + i = encodeVarintHttpoptions(dAtA, i, uint64(m.SendTimeout)) + i-- + dAtA[i] = 0x18 + } + if m.ReadTimeout != 0 { + i = encodeVarintHttpoptions(dAtA, i, uint64(m.ReadTimeout)) + i-- + dAtA[i] = 0x10 + } + if m.MaxBodySize != 0 { + i = encodeVarintHttpoptions(dAtA, i, uint64(m.MaxBodySize)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintHttpoptions(dAtA []byte, offset int, v uint64) int { + offset -= sovHttpoptions(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ServiceExposeHTTPOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxBodySize != 0 { + n += 1 + sovHttpoptions(uint64(m.MaxBodySize)) + } + if m.ReadTimeout != 0 { + n += 1 + sovHttpoptions(uint64(m.ReadTimeout)) + } + if m.SendTimeout != 0 { + n += 1 + sovHttpoptions(uint64(m.SendTimeout)) + } + if m.NextTries != 0 { + n += 1 + sovHttpoptions(uint64(m.NextTries)) + } + if m.NextTimeout != 0 { + n += 1 + sovHttpoptions(uint64(m.NextTimeout)) + } + if len(m.NextCases) > 0 { + for _, s := range m.NextCases { + l = len(s) + n += 1 + l + sovHttpoptions(uint64(l)) + } + } + return n +} + +func sovHttpoptions(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozHttpoptions(x uint64) (n int) { + return sovHttpoptions(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ServiceExposeHTTPOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceExposeHTTPOptions{`, + `MaxBodySize:` + fmt.Sprintf("%v", this.MaxBodySize) + `,`, + `ReadTimeout:` + fmt.Sprintf("%v", this.ReadTimeout) + `,`, + `SendTimeout:` + fmt.Sprintf("%v", this.SendTimeout) + `,`, + `NextTries:` + fmt.Sprintf("%v", this.NextTries) + `,`, + `NextTimeout:` + fmt.Sprintf("%v", this.NextTimeout) + `,`, + `NextCases:` + fmt.Sprintf("%v", this.NextCases) + `,`, + `}`, + }, "") + return s +} +func valueToStringHttpoptions(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ServiceExposeHTTPOptions) 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 ErrIntOverflowHttpoptions + } + 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: ServiceExposeHTTPOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceExposeHTTPOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxBodySize", wireType) + } + m.MaxBodySize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxBodySize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadTimeout", wireType) + } + m.ReadTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadTimeout |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SendTimeout", wireType) + } + m.SendTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SendTimeout |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextTries", wireType) + } + m.NextTries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextTries |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextTimeout", wireType) + } + m.NextTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextTimeout |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextCases", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpoptions + } + 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 ErrInvalidLengthHttpoptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthHttpoptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextCases = append(m.NextCases, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHttpoptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthHttpoptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipHttpoptions(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, ErrIntOverflowHttpoptions + } + 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, ErrIntOverflowHttpoptions + } + 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, ErrIntOverflowHttpoptions + } + 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, ErrInvalidLengthHttpoptions + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupHttpoptions + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthHttpoptions + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthHttpoptions = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHttpoptions = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupHttpoptions = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/manifest/v2beta2/parse.go b/go/manifest/v2beta2/parse.go new file mode 100644 index 00000000..bda74b12 --- /dev/null +++ b/go/manifest/v2beta2/parse.go @@ -0,0 +1,62 @@ +package v2beta2 + +import ( + "errors" + "fmt" + "strings" + + corev1 "k8s.io/api/core/v1" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +var ( + errUnknownServiceProtocol = errors.New("unknown service protocol") + ErrUnsupportedServiceProtocol = errors.New("unsupported service protocol") +) + +func ParseServiceProtocol(input string) (ServiceProtocol, error) { + var result ServiceProtocol + + // This is not a case-sensitive parse, so make all input uppercase + input = strings.ToUpper(input) + + switch input { + case "TCP", "": // The empty string (no input) implies TCP + result = TCP + case "UDP": + result = UDP + default: + return result, ErrUnsupportedServiceProtocol + } + + return result, nil +} + +func (sp ServiceProtocol) ToString() string { + return string(sp) +} + +func (sp ServiceProtocol) ToKube() (corev1.Protocol, error) { + switch sp { + case TCP: + return corev1.ProtocolTCP, nil + case UDP: + return corev1.ProtocolUDP, nil + } + + return "", fmt.Errorf("%w: %v", errUnknownServiceProtocol, sp) +} + +// GetResources returns list of resources in a group +func (g *Group) GetResources() []types.Resources { + resources := make([]types.Resources, 0, len(g.Services)) + for _, s := range g.Services { + resources = append(resources, types.Resources{ + Resources: s.Resources, + Count: s.Count, + }) + } + + return resources +} diff --git a/go/manifest/v2beta2/service.pb.go b/go/manifest/v2beta2/service.pb.go new file mode 100644 index 00000000..00549813 --- /dev/null +++ b/go/manifest/v2beta2/service.pb.go @@ -0,0 +1,1269 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/manifest/v2beta2/service.proto + +package v2beta2 + +import ( + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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 StorageParams struct { + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml:"name"` + Mount string `protobuf:"bytes,2,opt,name=Mount,proto3" json:"mount" yaml:"mount"` + ReadOnly bool `protobuf:"varint,3,opt,name=ReadOnly,proto3" json:"readOnly" yaml:"readOnly"` +} + +func (m *StorageParams) Reset() { *m = StorageParams{} } +func (*StorageParams) ProtoMessage() {} +func (*StorageParams) Descriptor() ([]byte, []int) { + return fileDescriptor_de124a4cb11edaa1, []int{0} +} +func (m *StorageParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StorageParams.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 *StorageParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageParams.Merge(m, src) +} +func (m *StorageParams) XXX_Size() int { + return m.Size() +} +func (m *StorageParams) XXX_DiscardUnknown() { + xxx_messageInfo_StorageParams.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageParams proto.InternalMessageInfo + +func (m *StorageParams) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *StorageParams) GetMount() string { + if m != nil { + return m.Mount + } + return "" +} + +func (m *StorageParams) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +type ServiceParams struct { + Storage []*StorageParams `protobuf:"bytes,1,rep,name=Storage,proto3" json:"storage" yaml:"storage"` +} + +func (m *ServiceParams) Reset() { *m = ServiceParams{} } +func (*ServiceParams) ProtoMessage() {} +func (*ServiceParams) Descriptor() ([]byte, []int) { + return fileDescriptor_de124a4cb11edaa1, []int{1} +} +func (m *ServiceParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceParams.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 *ServiceParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceParams.Merge(m, src) +} +func (m *ServiceParams) XXX_Size() int { + return m.Size() +} +func (m *ServiceParams) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceParams proto.InternalMessageInfo + +func (m *ServiceParams) GetStorage() []*StorageParams { + if m != nil { + return m.Storage + } + return nil +} + +// Service stores name, image, args, env, unit, count and expose list of service +type Service struct { + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"name" yaml:"name"` + Image string `protobuf:"bytes,2,opt,name=Image,proto3" json:"image" yaml:"image"` + Command []string `protobuf:"bytes,3,rep,name=Command,proto3" json:"command" yaml:"command"` + Args string `protobuf:"bytes,4,opt,name=Args,proto3" json:"args" yaml:"args"` + Env []string `protobuf:"bytes,5,rep,name=Env,proto3" json:"env" yaml:"env"` + Resources v1beta3.ResourceUnits `protobuf:"bytes,6,opt,name=Resources,proto3" json:"resources" yaml:"resources"` + Count uint32 `protobuf:"varint,7,opt,name=Count,proto3" json:"count" yaml:"count"` + Expose []*ServiceExpose `protobuf:"bytes,8,rep,name=Expose,proto3" json:"expose" yaml:"expose"` + Params *ServiceParams `protobuf:"bytes,9,opt,name=Params,proto3" json:"params" yaml:"params"` +} + +func (m *Service) Reset() { *m = Service{} } +func (*Service) ProtoMessage() {} +func (*Service) Descriptor() ([]byte, []int) { + return fileDescriptor_de124a4cb11edaa1, []int{2} +} +func (m *Service) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Service.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 *Service) XXX_Merge(src proto.Message) { + xxx_messageInfo_Service.Merge(m, src) +} +func (m *Service) XXX_Size() int { + return m.Size() +} +func (m *Service) XXX_DiscardUnknown() { + xxx_messageInfo_Service.DiscardUnknown(m) +} + +var xxx_messageInfo_Service proto.InternalMessageInfo + +func (m *Service) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Service) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +func (m *Service) GetCommand() []string { + if m != nil { + return m.Command + } + return nil +} + +func (m *Service) GetArgs() string { + if m != nil { + return m.Args + } + return "" +} + +func (m *Service) GetEnv() []string { + if m != nil { + return m.Env + } + return nil +} + +func (m *Service) GetResources() v1beta3.ResourceUnits { + if m != nil { + return m.Resources + } + return v1beta3.ResourceUnits{} +} + +func (m *Service) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *Service) GetExpose() []*ServiceExpose { + if m != nil { + return m.Expose + } + return nil +} + +func (m *Service) GetParams() *ServiceParams { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*StorageParams)(nil), "akash.manifest.v2beta2.StorageParams") + proto.RegisterType((*ServiceParams)(nil), "akash.manifest.v2beta2.ServiceParams") + proto.RegisterType((*Service)(nil), "akash.manifest.v2beta2.Service") +} + +func init() { + proto.RegisterFile("akash/manifest/v2beta2/service.proto", fileDescriptor_de124a4cb11edaa1) +} + +var fileDescriptor_de124a4cb11edaa1 = []byte{ + // 603 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcb, 0x6e, 0xd3, 0x4e, + 0x14, 0xc6, 0x33, 0xff, 0xa4, 0xb9, 0x4c, 0xff, 0x01, 0x64, 0x71, 0x31, 0x45, 0x78, 0xc2, 0x88, + 0x42, 0x04, 0xc2, 0x16, 0xa9, 0x04, 0x12, 0xac, 0x48, 0xd5, 0x05, 0x0b, 0x2e, 0x9a, 0x0a, 0x09, + 0x75, 0x51, 0x69, 0xe2, 0x4e, 0x5d, 0xab, 0xb5, 0x27, 0xf2, 0x38, 0x86, 0xee, 0x78, 0x04, 0x9e, + 0x83, 0x27, 0xa9, 0xc4, 0xa6, 0xcb, 0xae, 0x46, 0x90, 0xec, 0xbc, 0xf4, 0x13, 0xa0, 0xb9, 0x98, + 0x50, 0x81, 0xa8, 0xd8, 0xe5, 0x1c, 0xfd, 0xfc, 0x9d, 0x6f, 0xce, 0x7c, 0x13, 0x78, 0x97, 0x1e, + 0x52, 0x71, 0x10, 0x24, 0x34, 0x8d, 0xf7, 0x99, 0xc8, 0x83, 0x62, 0x34, 0x61, 0x39, 0x1d, 0x05, + 0x82, 0x65, 0x45, 0x1c, 0x32, 0x7f, 0x9a, 0xf1, 0x9c, 0x3b, 0xd7, 0x35, 0xe5, 0xd7, 0x94, 0x6f, + 0xa9, 0xb5, 0xab, 0x11, 0x8f, 0xb8, 0x46, 0x02, 0xf5, 0xcb, 0xd0, 0x6b, 0x0f, 0xfe, 0xae, 0xc9, + 0x3e, 0x4e, 0xb9, 0xb0, 0xca, 0x6b, 0xf7, 0x0c, 0x3b, 0xa1, 0x82, 0x05, 0xc5, 0x63, 0xc5, 0x6d, + 0x04, 0x19, 0x13, 0x7c, 0x96, 0x85, 0x6c, 0x96, 0xc6, 0xb9, 0x30, 0x1c, 0xfe, 0x02, 0x60, 0x7f, + 0x3b, 0xe7, 0x19, 0x8d, 0xd8, 0x5b, 0x9a, 0xd1, 0x44, 0x38, 0x0f, 0x61, 0xeb, 0x35, 0x4d, 0x98, + 0x0b, 0x06, 0x60, 0xd8, 0x1b, 0xdf, 0x28, 0x25, 0x6a, 0xa5, 0x34, 0x61, 0x95, 0x44, 0xab, 0xc7, + 0x34, 0x39, 0x7a, 0x86, 0x55, 0x85, 0x89, 0x86, 0x9c, 0x00, 0xae, 0xbc, 0xe2, 0xb3, 0x34, 0x77, + 0xff, 0xd3, 0xf4, 0xcd, 0x52, 0xa2, 0x95, 0x44, 0x35, 0x2a, 0x89, 0xfe, 0x37, 0xb8, 0x2e, 0x31, + 0x31, 0x9c, 0xf3, 0x1c, 0x76, 0x09, 0xa3, 0x7b, 0x6f, 0xd2, 0xa3, 0x63, 0xb7, 0x39, 0x00, 0xc3, + 0xee, 0x18, 0x95, 0x12, 0x75, 0x33, 0xdb, 0xab, 0x24, 0xba, 0x6c, 0x3e, 0xab, 0x3b, 0x98, 0xfc, + 0xfc, 0x00, 0x73, 0xd8, 0xdf, 0x36, 0x67, 0xb5, 0x5e, 0x77, 0x61, 0xc7, 0x9a, 0x77, 0xc1, 0xa0, + 0x39, 0x5c, 0x1d, 0xad, 0xfb, 0x7f, 0xde, 0xa8, 0x7f, 0xee, 0x8c, 0xe3, 0xdb, 0xa5, 0x44, 0x1d, + 0x61, 0x5a, 0x95, 0x44, 0x97, 0xcc, 0x48, 0xdb, 0xc0, 0xa4, 0x16, 0xc5, 0x5f, 0x5b, 0xb0, 0x63, + 0x27, 0xfe, 0xf3, 0x5e, 0x5e, 0x26, 0xca, 0xd6, 0x2f, 0x7b, 0x89, 0x13, 0x33, 0xcd, 0xee, 0x45, + 0x97, 0x98, 0x18, 0xce, 0x79, 0x0a, 0x3b, 0x9b, 0x3c, 0x49, 0x68, 0xba, 0xe7, 0x36, 0x07, 0xcd, + 0x61, 0xcf, 0x58, 0x0c, 0x4d, 0x6b, 0x69, 0xd1, 0x36, 0x30, 0xa9, 0x69, 0x65, 0xeb, 0x45, 0x16, + 0x09, 0xb7, 0xb5, 0xb4, 0x45, 0xb3, 0x48, 0x2c, 0x6d, 0xa9, 0x0a, 0x13, 0x0d, 0x39, 0xf7, 0x61, + 0x73, 0x2b, 0x2d, 0xdc, 0x15, 0x3d, 0xe1, 0x5a, 0x29, 0x51, 0x93, 0xa5, 0x45, 0x25, 0x11, 0x34, + 0x28, 0x4b, 0x0b, 0x4c, 0x14, 0xe1, 0xec, 0xc3, 0x1e, 0xb1, 0x69, 0x11, 0x6e, 0x7b, 0x00, 0x86, + 0xab, 0xa3, 0x3b, 0x76, 0xb5, 0x2a, 0x52, 0xbe, 0x8d, 0x94, 0x5f, 0x43, 0xef, 0x54, 0xa4, 0xc6, + 0xeb, 0x27, 0x12, 0x35, 0x4a, 0x89, 0x7a, 0x75, 0xd2, 0x94, 0x8d, 0x2b, 0xf5, 0x7d, 0xda, 0x16, + 0x26, 0x4b, 0x69, 0xb5, 0xa7, 0x4d, 0x9d, 0x9f, 0xce, 0x00, 0x0c, 0xfb, 0x66, 0x4f, 0xe1, 0xf9, + 0xfc, 0x84, 0x36, 0x3f, 0x9a, 0x73, 0x76, 0x60, 0x7b, 0x4b, 0xe7, 0xdc, 0xed, 0x5e, 0x70, 0xe1, + 0xe6, 0xda, 0x0c, 0x3c, 0xbe, 0x55, 0x4a, 0xd4, 0x36, 0x0f, 0xa4, 0x92, 0xa8, 0x6f, 0x8f, 0xab, + 0x6b, 0x4c, 0xac, 0xa2, 0xb3, 0x0b, 0xdb, 0x26, 0x1f, 0x6e, 0x4f, 0x9f, 0xf8, 0x22, 0x6d, 0x1b, + 0x26, 0x74, 0x22, 0x11, 0x50, 0xfa, 0x53, 0x5d, 0x2f, 0xf5, 0x4d, 0x8d, 0x89, 0x55, 0x1d, 0xbf, + 0x3f, 0xfb, 0xee, 0x35, 0x3e, 0xcd, 0x3d, 0x70, 0x32, 0xf7, 0xc0, 0xe9, 0xdc, 0x03, 0xdf, 0xe6, + 0x1e, 0xf8, 0xbc, 0xf0, 0x1a, 0xa7, 0x0b, 0xaf, 0x71, 0xb6, 0xf0, 0x1a, 0x3b, 0x4f, 0xa2, 0x38, + 0x3f, 0x98, 0x4d, 0xfc, 0x90, 0x27, 0x81, 0x9e, 0xfd, 0x28, 0x65, 0xf9, 0x07, 0x9e, 0x1d, 0xda, + 0x8a, 0x4e, 0xe3, 0x20, 0xe2, 0xbf, 0xfd, 0x03, 0x4c, 0xda, 0xfa, 0x31, 0x6f, 0xfc, 0x08, 0x00, + 0x00, 0xff, 0xff, 0x9d, 0xe0, 0x5e, 0xef, 0x76, 0x04, 0x00, 0x00, +} + +func (m *StorageParams) 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 *StorageParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ReadOnly { + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Mount) > 0 { + i -= len(m.Mount) + copy(dAtA[i:], m.Mount) + i = encodeVarintService(dAtA, i, uint64(len(m.Mount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintService(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceParams) 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 *ServiceParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Storage) > 0 { + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Service) 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 *Service) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.Expose) > 0 { + for iNdEx := len(m.Expose) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Expose[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if m.Count != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x38 + } + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if len(m.Env) > 0 { + for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Env[iNdEx]) + copy(dAtA[i:], m.Env[iNdEx]) + i = encodeVarintService(dAtA, i, uint64(len(m.Env[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Args) > 0 { + i -= len(m.Args) + copy(dAtA[i:], m.Args) + i = encodeVarintService(dAtA, i, uint64(len(m.Args))) + i-- + dAtA[i] = 0x22 + } + if len(m.Command) > 0 { + for iNdEx := len(m.Command) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Command[iNdEx]) + copy(dAtA[i:], m.Command[iNdEx]) + i = encodeVarintService(dAtA, i, uint64(len(m.Command[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Image) > 0 { + i -= len(m.Image) + copy(dAtA[i:], m.Image) + i = encodeVarintService(dAtA, i, uint64(len(m.Image))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintService(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StorageParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Mount) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.ReadOnly { + n += 2 + } + return n +} + +func (m *ServiceParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Storage) > 0 { + for _, e := range m.Storage { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + return n +} + +func (m *Service) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + l = len(m.Image) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if len(m.Command) > 0 { + for _, s := range m.Command { + l = len(s) + n += 1 + l + sovService(uint64(l)) + } + } + l = len(m.Args) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if len(m.Env) > 0 { + for _, s := range m.Env { + l = len(s) + n += 1 + l + sovService(uint64(l)) + } + } + l = m.Resources.Size() + n += 1 + l + sovService(uint64(l)) + if m.Count != 0 { + n += 1 + sovService(uint64(m.Count)) + } + if len(m.Expose) > 0 { + for _, e := range m.Expose { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *StorageParams) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageParams{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Mount:` + fmt.Sprintf("%v", this.Mount) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceParams) String() string { + if this == nil { + return "nil" + } + repeatedStringForStorage := "[]*StorageParams{" + for _, f := range this.Storage { + repeatedStringForStorage += strings.Replace(f.String(), "StorageParams", "StorageParams", 1) + "," + } + repeatedStringForStorage += "}" + s := strings.Join([]string{`&ServiceParams{`, + `Storage:` + repeatedStringForStorage + `,`, + `}`, + }, "") + return s +} +func (this *Service) String() string { + if this == nil { + return "nil" + } + repeatedStringForExpose := "[]*ServiceExpose{" + for _, f := range this.Expose { + repeatedStringForExpose += strings.Replace(fmt.Sprintf("%v", f), "ServiceExpose", "ServiceExpose", 1) + "," + } + repeatedStringForExpose += "}" + s := strings.Join([]string{`&Service{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Image:` + fmt.Sprintf("%v", this.Image) + `,`, + `Command:` + fmt.Sprintf("%v", this.Command) + `,`, + `Args:` + fmt.Sprintf("%v", this.Args) + `,`, + `Env:` + fmt.Sprintf("%v", this.Env) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceUnits", "v1beta3.ResourceUnits", 1), `&`, ``, 1) + `,`, + `Count:` + fmt.Sprintf("%v", this.Count) + `,`, + `Expose:` + repeatedStringForExpose + `,`, + `Params:` + strings.Replace(this.Params.String(), "ServiceParams", "ServiceParams", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringService(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *StorageParams) 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 ErrIntOverflowService + } + 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: StorageParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceParams) 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 ErrIntOverflowService + } + 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: ServiceParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Storage = append(m.Storage, &StorageParams{}) + if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Service) 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 ErrIntOverflowService + } + 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: Service: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Command = append(m.Command, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + 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 ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expose", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expose = append(m.Expose, &ServiceExpose{}) + if err := m.Expose[len(m.Expose)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + 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 ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &ServiceParams{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(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, ErrIntOverflowService + } + 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, ErrIntOverflowService + } + 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, ErrIntOverflowService + } + 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, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/manifest/v2beta2/serviceexpose.pb.go b/go/manifest/v2beta2/serviceexpose.pb.go new file mode 100644 index 00000000..1695cd51 --- /dev/null +++ b/go/manifest/v2beta2/serviceexpose.pb.go @@ -0,0 +1,749 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/manifest/v2beta2/serviceexpose.proto + +package v2beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + io "io" + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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 + +// State is an enum which refers to state of deployment +type ServiceProtocol int32 + +const ( + InvalidProtocol ServiceProtocol = 0 + TCP ServiceProtocol = 1 + UDP ServiceProtocol = 2 +) + +var ServiceProtocol_name = map[int32]string{ + 0: "invalid", + 1: "tcp", + 2: "udp", +} + +var ServiceProtocol_value = map[string]int32{ + "invalid": 0, + "tcp": 1, + "udp": 2, +} + +func (x ServiceProtocol) String() string { + return proto.EnumName(ServiceProtocol_name, int32(x)) +} + +func (ServiceProtocol) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e8dad39b3d78f39d, []int{0} +} + +// ServiceExpose stores exposed ports and hosts details +type ServiceExpose struct { + Port uint32 `protobuf:"varint,1,opt,name=Port,proto3" json:"port" yaml:"port"` + ExternalPort uint32 `protobuf:"varint,2,opt,name=ExternalPort,proto3" json:"externalPort" yaml:"externalPort"` + Proto ServiceProtocol `protobuf:"varint,3,opt,name=Proto,proto3,enum=akash.manifest.v2beta2.ServiceProtocol" json:"proto" yaml:"proto"` + Service string `protobuf:"bytes,4,opt,name=Service,proto3" json:"service" yaml:"service"` + Global bool `protobuf:"varint,5,opt,name=Global,proto3" json:"global" yaml:"global"` + Hosts []string `protobuf:"bytes,6,rep,name=Hosts,proto3" json:"hosts" yaml:"hosts"` + HTTPOptions *ServiceExposeHTTPOptions `protobuf:"bytes,7,opt,name=HTTPOptions,proto3" json:"httpOptions" yaml:"httpOptions"` + IP string `protobuf:"bytes,8,opt,name=IP,proto3" json:"ip" yaml:"ip"` + EndpointSequenceNumber uint32 `protobuf:"varint,9,opt,name=EndpointSequenceNumber,proto3" json:"endpointSequenceNumber" yaml:"endpointSequenceNumber"` +} + +func (m *ServiceExpose) Reset() { *m = ServiceExpose{} } +func (*ServiceExpose) ProtoMessage() {} +func (*ServiceExpose) Descriptor() ([]byte, []int) { + return fileDescriptor_e8dad39b3d78f39d, []int{0} +} +func (m *ServiceExpose) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceExpose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceExpose.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 *ServiceExpose) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceExpose.Merge(m, src) +} +func (m *ServiceExpose) XXX_Size() int { + return m.Size() +} +func (m *ServiceExpose) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceExpose.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceExpose proto.InternalMessageInfo + +func (m *ServiceExpose) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *ServiceExpose) GetExternalPort() uint32 { + if m != nil { + return m.ExternalPort + } + return 0 +} + +func (m *ServiceExpose) GetProto() ServiceProtocol { + if m != nil { + return m.Proto + } + return InvalidProtocol +} + +func (m *ServiceExpose) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +func (m *ServiceExpose) GetGlobal() bool { + if m != nil { + return m.Global + } + return false +} + +func (m *ServiceExpose) GetHosts() []string { + if m != nil { + return m.Hosts + } + return nil +} + +func (m *ServiceExpose) GetHTTPOptions() *ServiceExposeHTTPOptions { + if m != nil { + return m.HTTPOptions + } + return nil +} + +func (m *ServiceExpose) GetIP() string { + if m != nil { + return m.IP + } + return "" +} + +func (m *ServiceExpose) GetEndpointSequenceNumber() uint32 { + if m != nil { + return m.EndpointSequenceNumber + } + return 0 +} + +func init() { + proto.RegisterEnum("akash.manifest.v2beta2.ServiceProtocol", ServiceProtocol_name, ServiceProtocol_value) + proto.RegisterType((*ServiceExpose)(nil), "akash.manifest.v2beta2.ServiceExpose") +} + +func init() { + proto.RegisterFile("akash/manifest/v2beta2/serviceexpose.proto", fileDescriptor_e8dad39b3d78f39d) +} + +var fileDescriptor_e8dad39b3d78f39d = []byte{ + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xbf, 0x6f, 0xd3, 0x4e, + 0x18, 0xc6, 0xed, 0xfc, 0x6c, 0x2e, 0xfd, 0x11, 0x5d, 0xbf, 0xea, 0xd7, 0x04, 0xd5, 0x67, 0x19, + 0xa1, 0x5a, 0x45, 0xd8, 0x28, 0x95, 0x40, 0x82, 0xcd, 0x50, 0xd1, 0x0a, 0x09, 0x2c, 0xb7, 0x48, + 0x15, 0x12, 0x83, 0x93, 0x1c, 0x89, 0x55, 0xc7, 0x67, 0xec, 0x4b, 0x68, 0x37, 0x46, 0xd4, 0x89, + 0x8d, 0xa9, 0x13, 0xff, 0x0c, 0x63, 0xc7, 0x4e, 0x27, 0x48, 0x36, 0x8f, 0xfe, 0x0b, 0x90, 0xef, + 0x5c, 0x1a, 0x20, 0x15, 0x9b, 0xdf, 0xc7, 0x9f, 0xe7, 0xde, 0xf7, 0xbd, 0xc7, 0x06, 0xdb, 0xde, + 0xb1, 0x97, 0x0c, 0xad, 0x91, 0x17, 0xfa, 0xef, 0x70, 0x42, 0xad, 0x49, 0xa7, 0x8b, 0xa9, 0xd7, + 0xb1, 0x12, 0x1c, 0x4f, 0xfc, 0x1e, 0xc6, 0x27, 0x11, 0x49, 0xb0, 0x19, 0xc5, 0x84, 0x12, 0xb8, + 0xc1, 0x59, 0xf3, 0x8a, 0x35, 0x0b, 0xb6, 0xfd, 0xdf, 0x80, 0x0c, 0x08, 0x47, 0xac, 0xfc, 0x49, + 0xd0, 0x6d, 0xe3, 0x86, 0x93, 0x87, 0x94, 0x46, 0x24, 0xa2, 0x3e, 0x09, 0x13, 0x41, 0xea, 0x5f, + 0xaa, 0x60, 0xe5, 0x40, 0xf4, 0xdb, 0xe5, 0xfd, 0xe0, 0x3d, 0x50, 0x71, 0x48, 0x4c, 0x15, 0x59, + 0x93, 0x8d, 0x15, 0xfb, 0xff, 0x94, 0xa1, 0x4a, 0x44, 0x62, 0x9a, 0x31, 0xd4, 0x3c, 0xf5, 0x46, + 0xc1, 0x63, 0x3d, 0xaf, 0x74, 0x97, 0x43, 0xf0, 0x05, 0x58, 0xde, 0x3d, 0xa1, 0x38, 0x0e, 0xbd, + 0x80, 0x9b, 0x4a, 0xdc, 0xb4, 0x95, 0x32, 0xb4, 0x8c, 0xe7, 0xf4, 0x8c, 0xa1, 0x75, 0x61, 0x9e, + 0x57, 0x75, 0xf7, 0x37, 0x33, 0x3c, 0x02, 0x55, 0x27, 0x1f, 0x4a, 0x29, 0x6b, 0xb2, 0xb1, 0xda, + 0xd9, 0x32, 0x17, 0xef, 0x6c, 0x16, 0xf3, 0x72, 0xb6, 0x47, 0x02, 0xfb, 0x56, 0xca, 0x50, 0x95, + 0xaf, 0x93, 0x31, 0xb4, 0x5c, 0x0c, 0xc9, 0xb7, 0x73, 0xc5, 0x81, 0xf0, 0x11, 0xa8, 0x17, 0x26, + 0xa5, 0xa2, 0xc9, 0x46, 0xc3, 0xde, 0x4c, 0x19, 0xaa, 0x17, 0xf7, 0x9c, 0x31, 0xb4, 0x2a, 0x4c, + 0x85, 0xa0, 0xbb, 0x57, 0x34, 0xdc, 0x01, 0xb5, 0xe7, 0x01, 0xe9, 0x7a, 0x81, 0x52, 0xd5, 0x64, + 0x63, 0xc9, 0xbe, 0x9d, 0x32, 0x54, 0x1b, 0x70, 0x25, 0x63, 0x68, 0x45, 0xd8, 0x44, 0xad, 0xbb, + 0x05, 0x0a, 0x2d, 0x50, 0xdd, 0x23, 0x09, 0x4d, 0x94, 0x9a, 0x56, 0x36, 0x1a, 0x62, 0xbc, 0x61, + 0x2e, 0x5c, 0x8f, 0xc7, 0x4b, 0xdd, 0x15, 0x1c, 0x3c, 0x05, 0xcd, 0xbd, 0xc3, 0x43, 0xe7, 0x95, + 0x48, 0x46, 0xa9, 0x6b, 0xb2, 0xd1, 0xec, 0x3c, 0xf8, 0xc7, 0xfa, 0x22, 0xae, 0x39, 0x9f, 0x7d, + 0x37, 0x65, 0xa8, 0x99, 0x47, 0x5c, 0x08, 0x19, 0x43, 0xb0, 0x68, 0x77, 0x2d, 0xea, 0xee, 0x7c, + 0x2f, 0x78, 0x07, 0x94, 0xf6, 0x1d, 0x65, 0x89, 0x5f, 0xca, 0x7a, 0xca, 0x50, 0xc9, 0x8f, 0x32, + 0x86, 0x1a, 0xc2, 0xe6, 0x47, 0xba, 0x5b, 0xda, 0x77, 0x60, 0x02, 0x36, 0x76, 0xc3, 0x7e, 0x44, + 0xfc, 0x90, 0x1e, 0xe0, 0xf7, 0x63, 0x1c, 0xf6, 0xf0, 0xcb, 0xf1, 0xa8, 0x8b, 0x63, 0xa5, 0xc1, + 0xf3, 0x7e, 0x92, 0x32, 0xb4, 0x81, 0x17, 0x12, 0x19, 0x43, 0x9b, 0x45, 0xf2, 0x0b, 0xdf, 0xeb, + 0xee, 0x0d, 0x47, 0x6f, 0xbf, 0x05, 0x6b, 0x7f, 0x04, 0x0d, 0x35, 0x50, 0xf7, 0xc3, 0x89, 0x17, + 0xf8, 0xfd, 0x96, 0xd4, 0x5e, 0x3f, 0x3b, 0xd7, 0xd6, 0xf6, 0x45, 0xf9, 0x8b, 0x68, 0x81, 0x32, + 0xed, 0x45, 0x2d, 0xb9, 0x5d, 0x3f, 0x3b, 0xd7, 0xca, 0x87, 0x4f, 0x9d, 0x5c, 0x19, 0xf7, 0xa3, + 0x56, 0x49, 0x28, 0xaf, 0x9f, 0x39, 0xed, 0xca, 0xa7, 0xaf, 0xaa, 0x64, 0x1f, 0x5d, 0xfe, 0x50, + 0xa5, 0x8f, 0x53, 0x55, 0xfe, 0x36, 0x55, 0xe5, 0x8b, 0xa9, 0x2a, 0x7f, 0x9f, 0xaa, 0xf2, 0xe7, + 0x99, 0x2a, 0x5d, 0xcc, 0x54, 0xe9, 0x72, 0xa6, 0x4a, 0x6f, 0x1e, 0x0e, 0x7c, 0x3a, 0x1c, 0x77, + 0xcd, 0x1e, 0x19, 0x59, 0x3c, 0x8a, 0xfb, 0x21, 0xa6, 0x1f, 0x48, 0x7c, 0x5c, 0x54, 0x5e, 0xe4, + 0x5b, 0x03, 0xf2, 0xd7, 0x4f, 0xd6, 0xad, 0xf1, 0x6f, 0x6f, 0xe7, 0x67, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x42, 0x12, 0x8e, 0x3e, 0xdf, 0x03, 0x00, 0x00, +} + +func (m *ServiceExpose) 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 *ServiceExpose) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceExpose) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EndpointSequenceNumber != 0 { + i = encodeVarintServiceexpose(dAtA, i, uint64(m.EndpointSequenceNumber)) + i-- + dAtA[i] = 0x48 + } + if len(m.IP) > 0 { + i -= len(m.IP) + copy(dAtA[i:], m.IP) + i = encodeVarintServiceexpose(dAtA, i, uint64(len(m.IP))) + i-- + dAtA[i] = 0x42 + } + if m.HTTPOptions != nil { + { + size, err := m.HTTPOptions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintServiceexpose(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.Hosts) > 0 { + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Hosts[iNdEx]) + copy(dAtA[i:], m.Hosts[iNdEx]) + i = encodeVarintServiceexpose(dAtA, i, uint64(len(m.Hosts[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if m.Global { + i-- + if m.Global { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.Service) > 0 { + i -= len(m.Service) + copy(dAtA[i:], m.Service) + i = encodeVarintServiceexpose(dAtA, i, uint64(len(m.Service))) + i-- + dAtA[i] = 0x22 + } + if m.Proto != 0 { + i = encodeVarintServiceexpose(dAtA, i, uint64(m.Proto)) + i-- + dAtA[i] = 0x18 + } + if m.ExternalPort != 0 { + i = encodeVarintServiceexpose(dAtA, i, uint64(m.ExternalPort)) + i-- + dAtA[i] = 0x10 + } + if m.Port != 0 { + i = encodeVarintServiceexpose(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintServiceexpose(dAtA []byte, offset int, v uint64) int { + offset -= sovServiceexpose(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ServiceExpose) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Port != 0 { + n += 1 + sovServiceexpose(uint64(m.Port)) + } + if m.ExternalPort != 0 { + n += 1 + sovServiceexpose(uint64(m.ExternalPort)) + } + if m.Proto != 0 { + n += 1 + sovServiceexpose(uint64(m.Proto)) + } + l = len(m.Service) + if l > 0 { + n += 1 + l + sovServiceexpose(uint64(l)) + } + if m.Global { + n += 2 + } + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + l = len(s) + n += 1 + l + sovServiceexpose(uint64(l)) + } + } + if m.HTTPOptions != nil { + l = m.HTTPOptions.Size() + n += 1 + l + sovServiceexpose(uint64(l)) + } + l = len(m.IP) + if l > 0 { + n += 1 + l + sovServiceexpose(uint64(l)) + } + if m.EndpointSequenceNumber != 0 { + n += 1 + sovServiceexpose(uint64(m.EndpointSequenceNumber)) + } + return n +} + +func sovServiceexpose(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozServiceexpose(x uint64) (n int) { + return sovServiceexpose(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ServiceExpose) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceExpose{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `ExternalPort:` + fmt.Sprintf("%v", this.ExternalPort) + `,`, + `Proto:` + fmt.Sprintf("%v", this.Proto) + `,`, + `Service:` + fmt.Sprintf("%v", this.Service) + `,`, + `Global:` + fmt.Sprintf("%v", this.Global) + `,`, + `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`, + `HTTPOptions:` + strings.Replace(fmt.Sprintf("%v", this.HTTPOptions), "ServiceExposeHTTPOptions", "ServiceExposeHTTPOptions", 1) + `,`, + `IP:` + fmt.Sprintf("%v", this.IP) + `,`, + `EndpointSequenceNumber:` + fmt.Sprintf("%v", this.EndpointSequenceNumber) + `,`, + `}`, + }, "") + return s +} +func valueToStringServiceexpose(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ServiceExpose) 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 ErrIntOverflowServiceexpose + } + 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: ServiceExpose: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceExpose: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalPort", wireType) + } + m.ExternalPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExternalPort |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto", wireType) + } + m.Proto = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Proto |= ServiceProtocol(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + 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 ErrInvalidLengthServiceexpose + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthServiceexpose + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Global = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + 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 ErrInvalidLengthServiceexpose + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthServiceexpose + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTPOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthServiceexpose + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthServiceexpose + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTPOptions == nil { + m.HTTPOptions = &ServiceExposeHTTPOptions{} + } + if err := m.HTTPOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + 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 ErrInvalidLengthServiceexpose + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthServiceexpose + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IP = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndpointSequenceNumber", wireType) + } + m.EndpointSequenceNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowServiceexpose + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndpointSequenceNumber |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipServiceexpose(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthServiceexpose + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipServiceexpose(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, ErrIntOverflowServiceexpose + } + 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, ErrIntOverflowServiceexpose + } + 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, ErrIntOverflowServiceexpose + } + 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, ErrInvalidLengthServiceexpose + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupServiceexpose + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthServiceexpose + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthServiceexpose = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowServiceexpose = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupServiceexpose = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta1/audit.pb.go b/go/node/audit/v1beta1/audit.pb.go new file mode 100644 index 00000000..53d1c2d0 --- /dev/null +++ b/go/node/audit/v1beta1/audit.pb.go @@ -0,0 +1,2079 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta1/audit.proto + +package v1beta1 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta1 "github.com/akash-network/akash-api/go/node/types/v1beta1" + v1beta1 "github.com/akash-network/akash-api/go/node/types/v1beta1" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// Provider stores owner auditor and attributes details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,4,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (m *Provider) String() string { return proto.CompactTextString(m) } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{0} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// Attributes +type AuditedAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *AuditedAttributes) Reset() { *m = AuditedAttributes{} } +func (m *AuditedAttributes) String() string { return proto.CompactTextString(m) } +func (*AuditedAttributes) ProtoMessage() {} +func (*AuditedAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{1} +} +func (m *AuditedAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuditedAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AuditedAttributes.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 *AuditedAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuditedAttributes.Merge(m, src) +} +func (m *AuditedAttributes) XXX_Size() int { + return m.Size() +} +func (m *AuditedAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_AuditedAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_AuditedAttributes proto.InternalMessageInfo + +func (m *AuditedAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *AuditedAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *AuditedAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesResponse represents details of deployment along with group details +type AttributesResponse struct { + Attributes []AuditedAttributes `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *AttributesResponse) Reset() { *m = AttributesResponse{} } +func (m *AttributesResponse) String() string { return proto.CompactTextString(m) } +func (*AttributesResponse) ProtoMessage() {} +func (*AttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{2} +} +func (m *AttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesResponse.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 *AttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesResponse.Merge(m, src) +} +func (m *AttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *AttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesResponse proto.InternalMessageInfo + +func (m *AttributesResponse) GetAttributes() []AuditedAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesFilters defines filters used to filter deployments +type AttributesFilters struct { + Auditors []string `protobuf:"bytes,1,rep,name=auditors,proto3" json:"auditors" yaml:"auditors"` + Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners" yaml:"owners"` +} + +func (m *AttributesFilters) Reset() { *m = AttributesFilters{} } +func (m *AttributesFilters) String() string { return proto.CompactTextString(m) } +func (*AttributesFilters) ProtoMessage() {} +func (*AttributesFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{3} +} +func (m *AttributesFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesFilters.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 *AttributesFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesFilters.Merge(m, src) +} +func (m *AttributesFilters) XXX_Size() int { + return m.Size() +} +func (m *AttributesFilters) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesFilters proto.InternalMessageInfo + +func (m *AttributesFilters) GetAuditors() []string { + if m != nil { + return m.Auditors + } + return nil +} + +func (m *AttributesFilters) GetOwners() []string { + if m != nil { + return m.Owners + } + return nil +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +type MsgSignProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *MsgSignProviderAttributes) Reset() { *m = MsgSignProviderAttributes{} } +func (m *MsgSignProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributes) ProtoMessage() {} +func (*MsgSignProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{4} +} +func (m *MsgSignProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributes.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 *MsgSignProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributes.Merge(m, src) +} +func (m *MsgSignProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributes proto.InternalMessageInfo + +func (m *MsgSignProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +type MsgSignProviderAttributesResponse struct { +} + +func (m *MsgSignProviderAttributesResponse) Reset() { *m = MsgSignProviderAttributesResponse{} } +func (m *MsgSignProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributesResponse) ProtoMessage() {} +func (*MsgSignProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{5} +} +func (m *MsgSignProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributesResponse.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 *MsgSignProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributesResponse.Merge(m, src) +} +func (m *MsgSignProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributesResponse proto.InternalMessageInfo + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +type MsgDeleteProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Keys []string `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys" yaml:"keys"` +} + +func (m *MsgDeleteProviderAttributes) Reset() { *m = MsgDeleteProviderAttributes{} } +func (m *MsgDeleteProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributes) ProtoMessage() {} +func (*MsgDeleteProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{6} +} +func (m *MsgDeleteProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributes.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 *MsgDeleteProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributes.Merge(m, src) +} +func (m *MsgDeleteProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributes proto.InternalMessageInfo + +func (m *MsgDeleteProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +type MsgDeleteProviderAttributesResponse struct { +} + +func (m *MsgDeleteProviderAttributesResponse) Reset() { *m = MsgDeleteProviderAttributesResponse{} } +func (m *MsgDeleteProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributesResponse) ProtoMessage() {} +func (*MsgDeleteProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c24b9e4462ded131, []int{7} +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributesResponse.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 *MsgDeleteProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.Merge(m, src) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributesResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Provider)(nil), "akash.audit.v1beta1.Provider") + proto.RegisterType((*AuditedAttributes)(nil), "akash.audit.v1beta1.AuditedAttributes") + proto.RegisterType((*AttributesResponse)(nil), "akash.audit.v1beta1.AttributesResponse") + proto.RegisterType((*AttributesFilters)(nil), "akash.audit.v1beta1.AttributesFilters") + proto.RegisterType((*MsgSignProviderAttributes)(nil), "akash.audit.v1beta1.MsgSignProviderAttributes") + proto.RegisterType((*MsgSignProviderAttributesResponse)(nil), "akash.audit.v1beta1.MsgSignProviderAttributesResponse") + proto.RegisterType((*MsgDeleteProviderAttributes)(nil), "akash.audit.v1beta1.MsgDeleteProviderAttributes") + proto.RegisterType((*MsgDeleteProviderAttributesResponse)(nil), "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse") +} + +func init() { proto.RegisterFile("akash/audit/v1beta1/audit.proto", fileDescriptor_c24b9e4462ded131) } + +var fileDescriptor_c24b9e4462ded131 = []byte{ + // 575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0xcf, 0x39, 0xf9, 0xf6, 0x9b, 0x5c, 0xf9, 0xa1, 0x18, 0x04, 0x69, 0xaa, 0xfa, 0xca, 0x55, + 0x40, 0x25, 0x84, 0x4d, 0x5b, 0x09, 0xaa, 0x32, 0xd5, 0x20, 0xb6, 0x48, 0xc8, 0x6c, 0x6c, 0x0e, + 0x39, 0xb9, 0x56, 0x52, 0x5f, 0xe4, 0xbb, 0xb4, 0xca, 0xc6, 0xc4, 0x0a, 0x6c, 0x8c, 0x1d, 0x98, + 0x90, 0x98, 0x91, 0xe0, 0x1f, 0xe8, 0xd8, 0x91, 0xe9, 0x40, 0xc9, 0x82, 0x3c, 0xfa, 0x2f, 0x40, + 0xb9, 0xb3, 0x1d, 0x47, 0xad, 0x51, 0x33, 0x95, 0x81, 0xcd, 0xef, 0xf3, 0x3e, 0xef, 0xdd, 0xe7, + 0x7d, 0xfc, 0x4e, 0x07, 0x91, 0xdb, 0x75, 0xd9, 0x9e, 0xe5, 0x0e, 0x3a, 0x3e, 0xb7, 0x0e, 0x36, + 0xda, 0x84, 0xbb, 0x1b, 0x2a, 0x32, 0xfb, 0x21, 0xe5, 0x54, 0xbf, 0x26, 0x09, 0xa6, 0x82, 0x12, + 0x42, 0xf3, 0xba, 0x47, 0x3d, 0x2a, 0xf3, 0xd6, 0xe4, 0x4b, 0x51, 0x9b, 0x58, 0xf5, 0x6a, 0xbb, + 0x8c, 0x4c, 0x5b, 0x71, 0x1e, 0xfa, 0xed, 0x01, 0x27, 0x8a, 0x83, 0x3f, 0x6a, 0xb0, 0xfa, 0x3c, + 0xa4, 0x07, 0x7e, 0x87, 0x84, 0xba, 0x05, 0xff, 0xa3, 0x87, 0x01, 0x09, 0x1b, 0x60, 0x15, 0xac, + 0xd7, 0xec, 0xa5, 0x48, 0x20, 0x05, 0xc4, 0x02, 0x5d, 0x1a, 0xba, 0xfb, 0xbd, 0x1d, 0x2c, 0x43, + 0xec, 0x28, 0x58, 0x7f, 0x04, 0xff, 0x97, 0x42, 0x68, 0xd8, 0xd0, 0x64, 0xc9, 0x4a, 0x24, 0x50, + 0x0a, 0xc5, 0x02, 0x5d, 0x51, 0x45, 0x09, 0x80, 0x9d, 0x34, 0xa5, 0x7f, 0x06, 0x10, 0x66, 0x52, + 0x58, 0xa3, 0xb2, 0x5a, 0x5e, 0x5f, 0xdc, 0x5c, 0x31, 0xd5, 0x6c, 0x13, 0xc1, 0xe9, 0x68, 0xe6, + 0x6e, 0xca, 0xb2, 0x83, 0x63, 0x81, 0x4a, 0x91, 0x40, 0xb9, 0xc2, 0x58, 0xa0, 0x7a, 0x72, 0x44, + 0x86, 0xe1, 0x4f, 0x3f, 0xd0, 0x13, 0xcf, 0xe7, 0x7b, 0x83, 0xb6, 0xf9, 0x8a, 0xee, 0x5b, 0xb2, + 0xe7, 0xfd, 0x80, 0xf0, 0x43, 0x1a, 0x76, 0x93, 0xc8, 0xed, 0xfb, 0x96, 0x47, 0xad, 0x80, 0x76, + 0x88, 0xc5, 0x87, 0x7d, 0xc2, 0xac, 0x53, 0xc7, 0x31, 0x27, 0x77, 0x0e, 0xfe, 0xa2, 0xc1, 0xfa, + 0xee, 0x44, 0x3b, 0xe9, 0x4c, 0x19, 0x17, 0xe7, 0x57, 0xf9, 0x2f, 0xf7, 0x6b, 0xa7, 0xfa, 0xe1, + 0x08, 0x81, 0x5f, 0x47, 0xa8, 0x84, 0xdf, 0x02, 0xa8, 0xe7, 0x48, 0x84, 0xf5, 0x69, 0xc0, 0x88, + 0x4e, 0x67, 0xe6, 0x01, 0x72, 0x9e, 0x3b, 0xe6, 0x19, 0xbb, 0x6d, 0x9e, 0xb2, 0xdd, 0xbe, 0x7b, + 0xce, 0xc1, 0x8a, 0x15, 0xd5, 0xa7, 0xdd, 0x9e, 0xf9, 0x3d, 0x4e, 0x42, 0xa6, 0x3f, 0x86, 0xd5, + 0xc4, 0x6c, 0x25, 0xa7, 0x66, 0xa3, 0x48, 0xa0, 0x0c, 0x8b, 0x05, 0xba, 0x3a, 0xf3, 0x73, 0x18, + 0x76, 0xb2, 0xa4, 0xbe, 0x05, 0x17, 0xe4, 0x0f, 0x66, 0x0d, 0x4d, 0x96, 0x2e, 0x47, 0x02, 0x25, + 0x48, 0x2c, 0xd0, 0xe5, 0xdc, 0x2a, 0x30, 0xec, 0x24, 0x89, 0x9c, 0xa2, 0x6f, 0x1a, 0x5c, 0x6a, + 0x31, 0xef, 0x85, 0xef, 0x05, 0xe9, 0x5d, 0xfc, 0xb7, 0x65, 0xe7, 0xd8, 0xb2, 0x8a, 0x74, 0x6f, + 0x0d, 0xde, 0x2a, 0x34, 0x2f, 0xdd, 0x37, 0xfc, 0x15, 0xc0, 0xe5, 0x16, 0xf3, 0x9e, 0x92, 0x1e, + 0xe1, 0xe4, 0x42, 0x4d, 0xbe, 0x07, 0x2b, 0x5d, 0x32, 0x54, 0xee, 0xd6, 0xec, 0x9b, 0x91, 0x40, + 0x32, 0x8e, 0x05, 0x5a, 0x54, 0x25, 0x93, 0x08, 0x3b, 0x12, 0x4c, 0x26, 0xbc, 0x0d, 0xd7, 0xfe, + 0xa0, 0x3d, 0x9d, 0x71, 0xf3, 0xbd, 0x06, 0xcb, 0x2d, 0xe6, 0xe9, 0xaf, 0x01, 0xbc, 0x51, 0xb0, + 0x4b, 0xe6, 0x99, 0x57, 0xac, 0xd0, 0xbe, 0xe6, 0xc3, 0xf9, 0xf8, 0xd9, 0xf5, 0x7e, 0x03, 0x60, + 0xa3, 0xd0, 0xeb, 0x07, 0x45, 0x4d, 0x8b, 0x2a, 0x9a, 0xdb, 0xf3, 0x56, 0xa4, 0x42, 0x6c, 0xe7, + 0x78, 0x64, 0x80, 0x93, 0x91, 0x01, 0x7e, 0x8e, 0x0c, 0xf0, 0x6e, 0x6c, 0x94, 0x4e, 0xc6, 0x46, + 0xe9, 0xfb, 0xd8, 0x28, 0xbd, 0xdc, 0x9e, 0x63, 0x1b, 0x67, 0x9e, 0xe3, 0xf6, 0x82, 0x7c, 0x3a, + 0xb7, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xd0, 0xe7, 0x3b, 0xac, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) { + out := new(MsgSignProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Msg/SignProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) { + out := new(MsgDeleteProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Msg/DeleteProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(context.Context, *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(context.Context, *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SignProviderAttributes(ctx context.Context, req *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignProviderAttributes not implemented") +} +func (*UnimplementedMsgServer) DeleteProviderAttributes(ctx context.Context, req *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProviderAttributes not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SignProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSignProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SignProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta1.Msg/SignProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SignProviderAttributes(ctx, req.(*MsgSignProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta1.Msg/DeleteProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProviderAttributes(ctx, req.(*MsgDeleteProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.audit.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SignProviderAttributes", + Handler: _Msg_SignProviderAttributes_Handler, + }, + { + MethodName: "DeleteProviderAttributes", + Handler: _Msg_DeleteProviderAttributes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/audit/v1beta1/audit.proto", +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AuditedAttributes) 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 *AuditedAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuditedAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AttributesResponse) 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 *AttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AttributesFilters) 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 *AttributesFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owners) > 0 { + for iNdEx := len(m.Owners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Owners[iNdEx]) + copy(dAtA[i:], m.Owners[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owners[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Auditors) > 0 { + for iNdEx := len(m.Auditors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Auditors[iNdEx]) + copy(dAtA[i:], m.Auditors[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditors[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributes) 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 *MsgSignProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributesResponse) 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 *MsgSignProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributes) 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 *MsgDeleteProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributesResponse) 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 *MsgDeleteProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintAudit(dAtA []byte, offset int, v uint64) int { + offset -= sovAudit(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AuditedAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Auditors) > 0 { + for _, s := range m.Auditors { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + if len(m.Owners) > 0 { + for _, s := range m.Owners { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgDeleteProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovAudit(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAudit(x uint64) (n int) { + return sovAudit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Provider) 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 ErrIntOverflowAudit + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuditedAttributes) 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 ErrIntOverflowAudit + } + 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: AuditedAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditedAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesResponse) 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 ErrIntOverflowAudit + } + 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: AttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, AuditedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesFilters) 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 ErrIntOverflowAudit + } + 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: AttributesFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesFilters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditors = append(m.Auditors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owners = append(m.Owners, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAudit(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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrInvalidLengthAudit + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAudit + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAudit + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAudit = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAudit = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAudit = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta2/audit.pb.go b/go/node/audit/v1beta2/audit.pb.go new file mode 100644 index 00000000..0036fcdb --- /dev/null +++ b/go/node/audit/v1beta2/audit.pb.go @@ -0,0 +1,2079 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta2/audit.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// Provider stores owner auditor and attributes details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,4,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (m *Provider) String() string { return proto.CompactTextString(m) } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{0} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// Attributes +type AuditedAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *AuditedAttributes) Reset() { *m = AuditedAttributes{} } +func (m *AuditedAttributes) String() string { return proto.CompactTextString(m) } +func (*AuditedAttributes) ProtoMessage() {} +func (*AuditedAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{1} +} +func (m *AuditedAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuditedAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AuditedAttributes.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 *AuditedAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuditedAttributes.Merge(m, src) +} +func (m *AuditedAttributes) XXX_Size() int { + return m.Size() +} +func (m *AuditedAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_AuditedAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_AuditedAttributes proto.InternalMessageInfo + +func (m *AuditedAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *AuditedAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *AuditedAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesResponse represents details of deployment along with group details +type AttributesResponse struct { + Attributes []AuditedAttributes `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *AttributesResponse) Reset() { *m = AttributesResponse{} } +func (m *AttributesResponse) String() string { return proto.CompactTextString(m) } +func (*AttributesResponse) ProtoMessage() {} +func (*AttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{2} +} +func (m *AttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesResponse.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 *AttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesResponse.Merge(m, src) +} +func (m *AttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *AttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesResponse proto.InternalMessageInfo + +func (m *AttributesResponse) GetAttributes() []AuditedAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesFilters defines filters used to filter deployments +type AttributesFilters struct { + Auditors []string `protobuf:"bytes,1,rep,name=auditors,proto3" json:"auditors" yaml:"auditors"` + Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners" yaml:"owners"` +} + +func (m *AttributesFilters) Reset() { *m = AttributesFilters{} } +func (m *AttributesFilters) String() string { return proto.CompactTextString(m) } +func (*AttributesFilters) ProtoMessage() {} +func (*AttributesFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{3} +} +func (m *AttributesFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesFilters.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 *AttributesFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesFilters.Merge(m, src) +} +func (m *AttributesFilters) XXX_Size() int { + return m.Size() +} +func (m *AttributesFilters) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesFilters proto.InternalMessageInfo + +func (m *AttributesFilters) GetAuditors() []string { + if m != nil { + return m.Auditors + } + return nil +} + +func (m *AttributesFilters) GetOwners() []string { + if m != nil { + return m.Owners + } + return nil +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +type MsgSignProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *MsgSignProviderAttributes) Reset() { *m = MsgSignProviderAttributes{} } +func (m *MsgSignProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributes) ProtoMessage() {} +func (*MsgSignProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{4} +} +func (m *MsgSignProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributes.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 *MsgSignProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributes.Merge(m, src) +} +func (m *MsgSignProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributes proto.InternalMessageInfo + +func (m *MsgSignProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +type MsgSignProviderAttributesResponse struct { +} + +func (m *MsgSignProviderAttributesResponse) Reset() { *m = MsgSignProviderAttributesResponse{} } +func (m *MsgSignProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributesResponse) ProtoMessage() {} +func (*MsgSignProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{5} +} +func (m *MsgSignProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributesResponse.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 *MsgSignProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributesResponse.Merge(m, src) +} +func (m *MsgSignProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributesResponse proto.InternalMessageInfo + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +type MsgDeleteProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Keys []string `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys" yaml:"keys"` +} + +func (m *MsgDeleteProviderAttributes) Reset() { *m = MsgDeleteProviderAttributes{} } +func (m *MsgDeleteProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributes) ProtoMessage() {} +func (*MsgDeleteProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{6} +} +func (m *MsgDeleteProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributes.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 *MsgDeleteProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributes.Merge(m, src) +} +func (m *MsgDeleteProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributes proto.InternalMessageInfo + +func (m *MsgDeleteProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +type MsgDeleteProviderAttributesResponse struct { +} + +func (m *MsgDeleteProviderAttributesResponse) Reset() { *m = MsgDeleteProviderAttributesResponse{} } +func (m *MsgDeleteProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributesResponse) ProtoMessage() {} +func (*MsgDeleteProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_919e209b8bf6f93c, []int{7} +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributesResponse.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 *MsgDeleteProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.Merge(m, src) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributesResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Provider)(nil), "akash.audit.v1beta2.Provider") + proto.RegisterType((*AuditedAttributes)(nil), "akash.audit.v1beta2.AuditedAttributes") + proto.RegisterType((*AttributesResponse)(nil), "akash.audit.v1beta2.AttributesResponse") + proto.RegisterType((*AttributesFilters)(nil), "akash.audit.v1beta2.AttributesFilters") + proto.RegisterType((*MsgSignProviderAttributes)(nil), "akash.audit.v1beta2.MsgSignProviderAttributes") + proto.RegisterType((*MsgSignProviderAttributesResponse)(nil), "akash.audit.v1beta2.MsgSignProviderAttributesResponse") + proto.RegisterType((*MsgDeleteProviderAttributes)(nil), "akash.audit.v1beta2.MsgDeleteProviderAttributes") + proto.RegisterType((*MsgDeleteProviderAttributesResponse)(nil), "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse") +} + +func init() { proto.RegisterFile("akash/audit/v1beta2/audit.proto", fileDescriptor_919e209b8bf6f93c) } + +var fileDescriptor_919e209b8bf6f93c = []byte{ + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0xb9, 0xa1, 0x24, 0x57, 0x7e, 0x28, 0x06, 0x41, 0x9a, 0xaa, 0xbe, 0x72, 0x15, 0x50, + 0x09, 0x61, 0x43, 0x2a, 0x41, 0x55, 0xa6, 0x1a, 0xc4, 0x16, 0x09, 0x99, 0x8d, 0xcd, 0x21, 0x27, + 0xd7, 0x4a, 0xea, 0x8b, 0x7c, 0x97, 0x56, 0xd9, 0x98, 0x58, 0x81, 0x8d, 0xb1, 0x03, 0x13, 0x12, + 0x33, 0x12, 0xfc, 0x03, 0x1d, 0x3b, 0x32, 0x1d, 0x28, 0x59, 0x90, 0x47, 0xff, 0x05, 0x28, 0x77, + 0xb6, 0xe3, 0xa8, 0x35, 0x6a, 0xa6, 0x32, 0xb0, 0xf9, 0x7d, 0xef, 0x7b, 0xef, 0xbe, 0xf7, 0xf9, + 0x9d, 0x0e, 0x22, 0xb7, 0xeb, 0xb2, 0x5d, 0xcb, 0x1d, 0x74, 0x7c, 0x6e, 0xed, 0x3f, 0x6c, 0x13, + 0xee, 0x36, 0x55, 0x64, 0xf6, 0x43, 0xca, 0xa9, 0x7e, 0x4d, 0x12, 0x4c, 0x05, 0x25, 0x84, 0xc6, + 0x75, 0x8f, 0x7a, 0x54, 0xe6, 0xad, 0xc9, 0x97, 0xa2, 0x36, 0xb0, 0xea, 0xd5, 0x76, 0x19, 0x99, + 0xb6, 0xe2, 0x3c, 0xf4, 0xdb, 0x03, 0x4e, 0x14, 0x07, 0x7f, 0xd2, 0x60, 0xe5, 0x45, 0x48, 0xf7, + 0xfd, 0x0e, 0x09, 0x75, 0x0b, 0x5e, 0xa0, 0x07, 0x01, 0x09, 0xeb, 0x60, 0x0d, 0x6c, 0x54, 0xed, + 0xe5, 0x48, 0x20, 0x05, 0xc4, 0x02, 0x5d, 0x1a, 0xba, 0x7b, 0xbd, 0x6d, 0x2c, 0x43, 0xec, 0x28, + 0x58, 0x7f, 0x0c, 0x2f, 0x4a, 0x21, 0x34, 0xac, 0x6b, 0xb2, 0x64, 0x35, 0x12, 0x28, 0x85, 0x62, + 0x81, 0xae, 0xa8, 0xa2, 0x04, 0xc0, 0x4e, 0x9a, 0xd2, 0xbf, 0x00, 0x08, 0x33, 0x29, 0xac, 0x5e, + 0x5e, 0x5b, 0xd8, 0x58, 0x6a, 0xae, 0x9a, 0x6a, 0xb6, 0x89, 0xe0, 0x74, 0x34, 0x73, 0x27, 0x65, + 0xd9, 0xc1, 0x91, 0x40, 0xa5, 0x48, 0xa0, 0x5c, 0x61, 0x2c, 0x50, 0x2d, 0x39, 0x22, 0xc3, 0xf0, + 0xe7, 0x9f, 0xe8, 0xa9, 0xe7, 0xf3, 0xdd, 0x41, 0xdb, 0x7c, 0x4d, 0xf7, 0x2c, 0xd9, 0xf3, 0x7e, + 0x40, 0xf8, 0x01, 0x0d, 0xbb, 0x49, 0xe4, 0xf6, 0x7d, 0xcb, 0xa3, 0x56, 0x40, 0x3b, 0xc4, 0xe2, + 0xc3, 0x3e, 0x61, 0xd6, 0x89, 0xe3, 0x98, 0x93, 0x3b, 0x07, 0x7f, 0xd5, 0x60, 0x6d, 0x67, 0xa2, + 0x9d, 0x74, 0xa6, 0x8c, 0xf3, 0xf3, 0x6b, 0xe1, 0x1f, 0xf7, 0x6b, 0xbb, 0xf2, 0xf1, 0x10, 0x81, + 0xdf, 0x87, 0xa8, 0x84, 0xdf, 0x01, 0xa8, 0xe7, 0x48, 0x84, 0xf5, 0x69, 0xc0, 0x88, 0x4e, 0x67, + 0xe6, 0x01, 0x72, 0x9e, 0x3b, 0xe6, 0x29, 0xbb, 0x6d, 0x9e, 0xb0, 0xdd, 0xbe, 0x7b, 0xc6, 0xc1, + 0x8a, 0x15, 0xd5, 0xa6, 0xdd, 0x9e, 0xfb, 0x3d, 0x4e, 0x42, 0xa6, 0x3f, 0x81, 0x95, 0xc4, 0x6c, + 0x25, 0xa7, 0x6a, 0xa3, 0x48, 0xa0, 0x0c, 0x8b, 0x05, 0xba, 0x3a, 0xf3, 0x73, 0x18, 0x76, 0xb2, + 0xa4, 0xbe, 0x09, 0x17, 0xe5, 0x0f, 0x66, 0x75, 0x4d, 0x96, 0xae, 0x44, 0x02, 0x25, 0x48, 0x2c, + 0xd0, 0xe5, 0xdc, 0x2a, 0x30, 0xec, 0x24, 0x89, 0x9c, 0xa2, 0xef, 0x1a, 0x5c, 0x6e, 0x31, 0xef, + 0xa5, 0xef, 0x05, 0xe9, 0x5d, 0xfc, 0xbf, 0x65, 0x67, 0xd8, 0xb2, 0xb2, 0x74, 0x6f, 0x1d, 0xde, + 0x2a, 0x34, 0x2f, 0xdd, 0x37, 0xfc, 0x0d, 0xc0, 0x95, 0x16, 0xf3, 0x9e, 0x91, 0x1e, 0xe1, 0xe4, + 0x5c, 0x4d, 0xbe, 0x07, 0xcb, 0x5d, 0x32, 0x54, 0xee, 0x56, 0xed, 0x9b, 0x91, 0x40, 0x32, 0x8e, + 0x05, 0x5a, 0x52, 0x25, 0x93, 0x08, 0x3b, 0x12, 0x4c, 0x26, 0xbc, 0x0d, 0xd7, 0xff, 0xa2, 0x3d, + 0x9d, 0xb1, 0xf9, 0x41, 0x83, 0x0b, 0x2d, 0xe6, 0xe9, 0x6f, 0x00, 0xbc, 0x51, 0xb0, 0x4b, 0xe6, + 0xa9, 0x57, 0xac, 0xd0, 0xbe, 0xc6, 0xa3, 0xf9, 0xf8, 0xd9, 0xf5, 0x7e, 0x0b, 0x60, 0xbd, 0xd0, + 0xeb, 0x07, 0x45, 0x4d, 0x8b, 0x2a, 0x1a, 0x5b, 0xf3, 0x56, 0xa4, 0x42, 0x6c, 0xe7, 0x68, 0x64, + 0x80, 0xe3, 0x91, 0x01, 0x7e, 0x8d, 0x0c, 0xf0, 0x7e, 0x6c, 0x94, 0x8e, 0xc7, 0x46, 0xe9, 0xc7, + 0xd8, 0x28, 0xbd, 0xda, 0x9a, 0x63, 0x1b, 0x67, 0x9e, 0xe3, 0xf6, 0xa2, 0x7c, 0x3a, 0x37, 0xff, + 0x04, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x1b, 0x0f, 0x69, 0xac, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) { + out := new(MsgSignProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Msg/SignProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) { + out := new(MsgDeleteProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Msg/DeleteProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(context.Context, *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(context.Context, *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SignProviderAttributes(ctx context.Context, req *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignProviderAttributes not implemented") +} +func (*UnimplementedMsgServer) DeleteProviderAttributes(ctx context.Context, req *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProviderAttributes not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SignProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSignProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SignProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Msg/SignProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SignProviderAttributes(ctx, req.(*MsgSignProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Msg/DeleteProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProviderAttributes(ctx, req.(*MsgDeleteProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.audit.v1beta2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SignProviderAttributes", + Handler: _Msg_SignProviderAttributes_Handler, + }, + { + MethodName: "DeleteProviderAttributes", + Handler: _Msg_DeleteProviderAttributes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/audit/v1beta2/audit.proto", +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AuditedAttributes) 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 *AuditedAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuditedAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AttributesResponse) 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 *AttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AttributesFilters) 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 *AttributesFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owners) > 0 { + for iNdEx := len(m.Owners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Owners[iNdEx]) + copy(dAtA[i:], m.Owners[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owners[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Auditors) > 0 { + for iNdEx := len(m.Auditors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Auditors[iNdEx]) + copy(dAtA[i:], m.Auditors[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditors[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributes) 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 *MsgSignProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributesResponse) 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 *MsgSignProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributes) 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 *MsgDeleteProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributesResponse) 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 *MsgDeleteProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintAudit(dAtA []byte, offset int, v uint64) int { + offset -= sovAudit(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AuditedAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Auditors) > 0 { + for _, s := range m.Auditors { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + if len(m.Owners) > 0 { + for _, s := range m.Owners { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgDeleteProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovAudit(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAudit(x uint64) (n int) { + return sovAudit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Provider) 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 ErrIntOverflowAudit + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuditedAttributes) 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 ErrIntOverflowAudit + } + 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: AuditedAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditedAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesResponse) 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 ErrIntOverflowAudit + } + 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: AttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, AuditedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesFilters) 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 ErrIntOverflowAudit + } + 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: AttributesFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesFilters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditors = append(m.Auditors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owners = append(m.Owners, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAudit(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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrInvalidLengthAudit + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAudit + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAudit + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAudit = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAudit = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAudit = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta2/codec.go b/go/node/audit/v1beta2/codec.go new file mode 100644 index 00000000..2969ac8c --- /dev/null +++ b/go/node/audit/v1beta2/codec.go @@ -0,0 +1,43 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgSignProviderAttributes{}, ModuleName+"/"+MsgTypeSignProviderAttributes, nil) + cdc.RegisterConcrete(&MsgDeleteProviderAttributes{}, ModuleName+"/"+MsgTypeDeleteProviderAttributes, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgSignProviderAttributes{}, + &MsgDeleteProviderAttributes{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/audit/v1beta2/errors.go b/go/node/audit/v1beta2/errors.go new file mode 100644 index 00000000..16357253 --- /dev/null +++ b/go/node/audit/v1beta2/errors.go @@ -0,0 +1,16 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + // ErrProviderNotFound provider not found + ErrProviderNotFound = errors.New("invalid provider: address not found") + + // ErrInvalidAddress invalid trusted auditor address + ErrInvalidAddress = errors.New("invalid address") + + // ErrAttributeNotFound invalid trusted auditor address + ErrAttributeNotFound = errors.New("attribute not found") +) diff --git a/go/node/audit/v1beta2/event.go b/go/node/audit/v1beta2/event.go new file mode 100644 index 00000000..d279b69c --- /dev/null +++ b/go/node/audit/v1beta2/event.go @@ -0,0 +1,118 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/akash-network/node/sdkutil" +) + +const ( + evActionTrustedAuditorCreated = "audit-trusted-auditor-created" + evActionTrustedAuditorDeleted = "audit-trusted-auditor-deleted" + evOwnerKey = "owner" + evAuditorKey = "auditor" +) + +// EventTrustedAuditorCreated struct +type EventTrustedAuditorCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.Address `json:"owner"` + Auditor sdk.Address `json:"auditor"` +} + +func NewEventTrustedAuditorCreated(owner sdk.Address, auditor sdk.Address) EventTrustedAuditorCreated { + return EventTrustedAuditorCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionTrustedAuditorCreated, + }, + Owner: owner, + Auditor: auditor, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventTrustedAuditorCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionTrustedAuditorCreated), + }, TrustedAuditorEVAttributes(ev.Owner, ev.Auditor)...)..., + ) +} + +// TrustedAuditorEVAttributes returns event attributes for given Provider +func TrustedAuditorEVAttributes(owner sdk.Address, auditor sdk.Address) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evOwnerKey, owner.String()), + sdk.NewAttribute(evAuditorKey, auditor.String()), + } +} + +// ParseEVTTrustedAuditor returns provider details for given event attributes +func ParseEVTTrustedAuditor(attrs []sdk.Attribute) (sdk.Address, sdk.Address, error) { + owner, err := sdkutil.GetAccAddress(attrs, evOwnerKey) + if err != nil { + return nil, nil, err + } + + auditor, err := sdkutil.GetAccAddress(attrs, evAuditorKey) + if err != nil { + return nil, nil, err + } + + return owner, auditor, nil +} + +type EventTrustedAuditorDeleted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.Address `json:"owner"` + Auditor sdk.Address `json:"auditor"` +} + +func NewEventTrustedAuditorDeleted(owner sdk.Address, auditor sdk.Address) EventTrustedAuditorDeleted { + return EventTrustedAuditorDeleted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionTrustedAuditorDeleted, + }, + Owner: owner, + Auditor: auditor, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventTrustedAuditorDeleted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionTrustedAuditorDeleted), + }, TrustedAuditorEVAttributes(ev.Owner, ev.Auditor)...)..., + ) +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case evActionTrustedAuditorCreated: + owner, auditor, err := ParseEVTTrustedAuditor(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventTrustedAuditorCreated(owner, auditor), nil + case evActionTrustedAuditorDeleted: + owner, auditor, err := ParseEVTTrustedAuditor(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventTrustedAuditorDeleted(owner, auditor), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/audit/v1beta2/genesis.pb.go b/go/node/audit/v1beta2/genesis.pb.go new file mode 100644 index 00000000..5f4c6114 --- /dev/null +++ b/go/node/audit/v1beta2/genesis.pb.go @@ -0,0 +1,332 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by audit module +type GenesisState struct { + Attributes []AuditedAttributes `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_5e38933397b76ee4, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAttributes() []AuditedAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.audit.v1beta2.GenesisState") +} + +func init() { proto.RegisterFile("akash/audit/v1beta2/genesis.proto", fileDescriptor_5e38933397b76ee4) } + +var fileDescriptor_5e38933397b76ee4 = []byte{ + // 235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd2, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, + 0x2b, 0xd1, 0x03, 0x2b, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, + 0x83, 0x58, 0x10, 0xa5, 0x52, 0xf2, 0xd8, 0x4c, 0x83, 0x68, 0x04, 0x2b, 0x50, 0xaa, 0xe7, 0xe2, + 0x71, 0x87, 0x18, 0x1e, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x94, 0xcf, 0xc5, 0x95, 0x58, 0x52, 0x52, + 0x94, 0x99, 0x54, 0x5a, 0x92, 0x5a, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa6, 0x87, + 0xc5, 0x42, 0x3d, 0x47, 0x10, 0x2f, 0x35, 0xc5, 0x11, 0xae, 0xda, 0x49, 0xfd, 0xc4, 0x3d, 0x79, + 0x86, 0x57, 0xf7, 0xe4, 0x91, 0x4c, 0xf8, 0x74, 0x4f, 0x5e, 0xb0, 0x32, 0x31, 0x37, 0xc7, 0x4a, + 0x09, 0x21, 0xa6, 0x14, 0x84, 0xa4, 0xc0, 0x29, 0xe8, 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, 0x2c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, + 0x0e, 0xd0, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0x86, 0xf2, 0x12, 0x0b, 0x32, 0xf5, 0xd3, + 0xf3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x51, 0x3d, 0x98, 0xc4, 0x06, 0xf6, 0x9b, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0x00, 0xd9, 0x21, 0x07, 0x4c, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", 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.Attributes = append(m.Attributes, AuditedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta2/key.go b/go/node/audit/v1beta2/key.go new file mode 100644 index 00000000..43cbb76e --- /dev/null +++ b/go/node/audit/v1beta2/key.go @@ -0,0 +1,16 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "audit" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) + +func PrefixProviderID() []byte { + return []byte{0x01} +} diff --git a/go/node/audit/v1beta2/msgs.go b/go/node/audit/v1beta2/msgs.go new file mode 100644 index 00000000..2940f9e3 --- /dev/null +++ b/go/node/audit/v1beta2/msgs.go @@ -0,0 +1,94 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + MsgTypeSignProviderAttributes = "audit-sign-provider-attributes" + MsgTypeDeleteProviderAttributes = "audit-delete-provider-attributes" +) + +var ( + _ sdk.Msg = &MsgSignProviderAttributes{} + _ sdk.Msg = &MsgDeleteProviderAttributes{} +) + +// ====MsgSignProviderAttributes==== +// Route implements the sdk.Msg interface +func (m MsgSignProviderAttributes) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgSignProviderAttributes) Type() string { + return MsgTypeSignProviderAttributes +} + +// ValidateBasic does basic validation +func (m MsgSignProviderAttributes) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgSignProviderAttributes) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgSignProviderAttributes) GetSigners() []sdk.AccAddress { + auditor, err := sdk.AccAddressFromBech32(m.Auditor) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{auditor} +} + +// ====MsgRevokeProviderAttributes==== +// Route implements the sdk.Msg interface +func (m MsgDeleteProviderAttributes) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgDeleteProviderAttributes) Type() string { + return MsgTypeDeleteProviderAttributes +} + +// ValidateBasic does basic validation +func (m MsgDeleteProviderAttributes) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgDeleteProviderAttributes) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgDeleteProviderAttributes) GetSigners() []sdk.AccAddress { + auditor, err := sdk.AccAddressFromBech32(m.Auditor) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{auditor} +} diff --git a/go/node/audit/v1beta2/query.pb.go b/go/node/audit/v1beta2/query.pb.go new file mode 100644 index 00000000..422572f4 --- /dev/null +++ b/go/node/audit/v1beta2/query.pb.go @@ -0,0 +1,1718 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryProvidersResponse struct { + Providers Providers `protobuf:"bytes,1,rep,name=providers,proto3,castrepeated=Providers" json:"providers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersResponse) Reset() { *m = QueryProvidersResponse{} } +func (m *QueryProvidersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersResponse) ProtoMessage() {} +func (*QueryProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{0} +} +func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersResponse.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 *QueryProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersResponse.Merge(m, src) +} +func (m *QueryProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo + +func (m *QueryProvidersResponse) GetProviders() Providers { + if m != nil { + return m.Providers + } + return nil +} + +func (m *QueryProvidersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +type QueryProviderRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderRequest) Reset() { *m = QueryProviderRequest{} } +func (m *QueryProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderRequest) ProtoMessage() {} +func (*QueryProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{1} +} +func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderRequest.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 *QueryProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderRequest.Merge(m, src) +} +func (m *QueryProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo + +func (m *QueryProviderRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryProviderRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method +type QueryAllProvidersAttributesRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProvidersAttributesRequest) Reset() { *m = QueryAllProvidersAttributesRequest{} } +func (m *QueryAllProvidersAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllProvidersAttributesRequest) ProtoMessage() {} +func (*QueryAllProvidersAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{2} +} +func (m *QueryAllProvidersAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProvidersAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProvidersAttributesRequest.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 *QueryAllProvidersAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProvidersAttributesRequest.Merge(m, src) +} +func (m *QueryAllProvidersAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProvidersAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProvidersAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProvidersAttributesRequest proto.InternalMessageInfo + +func (m *QueryAllProvidersAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderAttributesRequest is request type for the Query/Provider RPC method +type QueryProviderAttributesRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProviderAttributesRequest) Reset() { *m = QueryProviderAttributesRequest{} } +func (m *QueryProviderAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderAttributesRequest) ProtoMessage() {} +func (*QueryProviderAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{3} +} +func (m *QueryProviderAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderAttributesRequest.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 *QueryProviderAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderAttributesRequest.Merge(m, src) +} +func (m *QueryProviderAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderAttributesRequest proto.InternalMessageInfo + +func (m *QueryProviderAttributesRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryProviderAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderAuditorRequest is request type for the Query/Providers RPC method +type QueryProviderAuditorRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderAuditorRequest) Reset() { *m = QueryProviderAuditorRequest{} } +func (m *QueryProviderAuditorRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderAuditorRequest) ProtoMessage() {} +func (*QueryProviderAuditorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{4} +} +func (m *QueryProviderAuditorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderAuditorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderAuditorRequest.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 *QueryProviderAuditorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderAuditorRequest.Merge(m, src) +} +func (m *QueryProviderAuditorRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderAuditorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderAuditorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderAuditorRequest proto.InternalMessageInfo + +func (m *QueryProviderAuditorRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryProviderAuditorRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryAuditorAttributesRequest is request type for the Query/Providers RPC method +type QueryAuditorAttributesRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAuditorAttributesRequest) Reset() { *m = QueryAuditorAttributesRequest{} } +func (m *QueryAuditorAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuditorAttributesRequest) ProtoMessage() {} +func (*QueryAuditorAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_27fc582ee70c7c99, []int{5} +} +func (m *QueryAuditorAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuditorAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuditorAttributesRequest.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 *QueryAuditorAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuditorAttributesRequest.Merge(m, src) +} +func (m *QueryAuditorAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuditorAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuditorAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuditorAttributesRequest proto.InternalMessageInfo + +func (m *QueryAuditorAttributesRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryAuditorAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryProvidersResponse)(nil), "akash.audit.v1beta2.QueryProvidersResponse") + proto.RegisterType((*QueryProviderRequest)(nil), "akash.audit.v1beta2.QueryProviderRequest") + proto.RegisterType((*QueryAllProvidersAttributesRequest)(nil), "akash.audit.v1beta2.QueryAllProvidersAttributesRequest") + proto.RegisterType((*QueryProviderAttributesRequest)(nil), "akash.audit.v1beta2.QueryProviderAttributesRequest") + proto.RegisterType((*QueryProviderAuditorRequest)(nil), "akash.audit.v1beta2.QueryProviderAuditorRequest") + proto.RegisterType((*QueryAuditorAttributesRequest)(nil), "akash.audit.v1beta2.QueryAuditorAttributesRequest") +} + +func init() { proto.RegisterFile("akash/audit/v1beta2/query.proto", fileDescriptor_27fc582ee70c7c99) } + +var fileDescriptor_27fc582ee70c7c99 = []byte{ + // 566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xa1, 0x82, 0xea, 0x9d, 0x66, 0xaa, 0xa9, 0x14, 0x96, 0x56, 0x3d, 0x40, 0x35, + 0xc0, 0xde, 0x32, 0xc4, 0x80, 0x0b, 0xda, 0x0e, 0xe3, 0x04, 0x1a, 0x39, 0x72, 0x73, 0x57, 0x2b, + 0x8b, 0x96, 0xe5, 0x65, 0xb1, 0xb3, 0x09, 0xa1, 0x21, 0xc1, 0x27, 0x40, 0xe2, 0x5b, 0x20, 0x2e, + 0x70, 0xe5, 0x0b, 0xec, 0x38, 0x89, 0x0b, 0xa7, 0x81, 0x5a, 0x3e, 0x08, 0x8a, 0x9d, 0xb4, 0xcd, + 0xd2, 0xd2, 0x6e, 0x70, 0xab, 0xeb, 0xff, 0x7b, 0xff, 0xdf, 0x7b, 0x7e, 0x76, 0x70, 0x83, 0xef, + 0x71, 0xb9, 0xcb, 0x78, 0xdc, 0xf5, 0x14, 0x3b, 0x5c, 0xed, 0x08, 0xc5, 0x6d, 0x76, 0x10, 0x8b, + 0xe8, 0x35, 0x0d, 0x23, 0x50, 0x40, 0xae, 0x6b, 0x01, 0xd5, 0x02, 0x9a, 0x0a, 0xea, 0x55, 0x17, + 0x5c, 0xd0, 0xfb, 0x2c, 0xf9, 0x65, 0xa4, 0xf5, 0x5b, 0x2e, 0x80, 0xeb, 0x0b, 0xc6, 0x43, 0x8f, + 0xf1, 0x20, 0x00, 0xc5, 0x95, 0x07, 0x81, 0x4c, 0x77, 0x97, 0x77, 0x40, 0xee, 0x83, 0x64, 0x1d, + 0x2e, 0x85, 0x71, 0x48, 0xfd, 0x56, 0x59, 0xc8, 0x5d, 0x2f, 0xd0, 0xe2, 0x54, 0x3b, 0x96, 0xca, + 0x20, 0x68, 0x41, 0xeb, 0x0b, 0xc2, 0x8b, 0x2f, 0x93, 0x1c, 0xdb, 0x11, 0x1c, 0x7a, 0x5d, 0x11, + 0x49, 0x47, 0xc8, 0x10, 0x02, 0x29, 0xc8, 0x0b, 0x5c, 0x09, 0xb3, 0x3f, 0x6b, 0xa8, 0x79, 0xa5, + 0x3d, 0x6f, 0x2f, 0xd1, 0x31, 0x45, 0xd0, 0x2c, 0x74, 0x73, 0xe1, 0xe4, 0xac, 0x51, 0xfa, 0xf4, + 0xb3, 0x51, 0x19, 0x26, 0x1b, 0xa6, 0x20, 0xcf, 0x30, 0x1e, 0xf2, 0xd5, 0xe6, 0x9a, 0xa8, 0x3d, + 0x6f, 0xdf, 0xa1, 0xa6, 0x18, 0x9a, 0x14, 0x43, 0x4d, 0xbb, 0xd2, 0x62, 0xe8, 0x36, 0x77, 0x45, + 0x06, 0xe3, 0x8c, 0x84, 0xb6, 0xb6, 0x70, 0x35, 0x87, 0xec, 0x88, 0x83, 0x58, 0x48, 0x45, 0x6a, + 0xf8, 0x9a, 0x06, 0x83, 0xa8, 0x86, 0x9a, 0xa8, 0x5d, 0x71, 0xb2, 0x25, 0xa9, 0xe2, 0x32, 0x1c, + 0x05, 0x22, 0xd2, 0xae, 0x15, 0xc7, 0x2c, 0x5a, 0x3e, 0x6e, 0xe9, 0x3c, 0x1b, 0xbe, 0x3f, 0x00, + 0xde, 0x50, 0x2a, 0xf2, 0x3a, 0xb1, 0x12, 0x32, 0xcb, 0xba, 0x95, 0xc3, 0x46, 0x1a, 0xfb, 0xf6, + 0x54, 0x6c, 0x1d, 0x9b, 0xa3, 0x7e, 0x8b, 0xad, 0x1c, 0x75, 0xd1, 0x69, 0x40, 0x89, 0x46, 0x28, + 0xcf, 0xf9, 0xcf, 0x5d, 0xda, 0xff, 0x39, 0xbe, 0x99, 0xf7, 0x37, 0xbd, 0xb9, 0x6c, 0xf3, 0xde, + 0x21, 0xbc, 0x64, 0xba, 0x67, 0x64, 0xc5, 0x72, 0x26, 0x67, 0xfc, 0x4f, 0x25, 0xd9, 0x67, 0x65, + 0x5c, 0xd6, 0x0c, 0xe4, 0x2b, 0xc2, 0x8b, 0xe3, 0x8f, 0x91, 0xac, 0x8f, 0x9d, 0xd9, 0xe9, 0x07, + 0x5f, 0xbf, 0x3b, 0x39, 0xb0, 0x70, 0x59, 0x5a, 0xf6, 0xfb, 0xef, 0xbf, 0x3f, 0xce, 0xdd, 0x23, + 0xcb, 0x6c, 0xe2, 0x8d, 0x63, 0x7c, 0x60, 0xc1, 0x7c, 0x4f, 0xaa, 0x04, 0x9a, 0x14, 0xa7, 0x81, + 0xac, 0x4d, 0xf7, 0xfd, 0x47, 0xd8, 0x27, 0x1a, 0xf6, 0x01, 0xb1, 0x67, 0x83, 0x7d, 0xa3, 0x4f, + 0xfc, 0xd8, 0x40, 0x7f, 0x43, 0xf8, 0xc6, 0xb9, 0x11, 0x1a, 0x61, 0x5f, 0x99, 0x81, 0x3d, 0x37, + 0x77, 0x17, 0x03, 0x7f, 0xaa, 0xc1, 0x1f, 0x93, 0xf5, 0x19, 0xc1, 0xd3, 0x81, 0x3b, 0xce, 0x4a, + 0x20, 0x9f, 0x11, 0x5e, 0x28, 0x52, 0xdb, 0x7f, 0x19, 0x91, 0x09, 0xd3, 0x7d, 0x31, 0xee, 0x87, + 0x9a, 0x7b, 0x85, 0xd0, 0x94, 0x3b, 0x7b, 0x14, 0xf3, 0xe8, 0x10, 0x8d, 0x10, 0x27, 0xcd, 0xde, + 0x74, 0x4e, 0x7a, 0x16, 0x3a, 0xed, 0x59, 0xe8, 0x57, 0xcf, 0x42, 0x1f, 0xfa, 0x56, 0xe9, 0xb4, + 0x6f, 0x95, 0x7e, 0xf4, 0xad, 0xd2, 0xab, 0x47, 0xae, 0xa7, 0x76, 0xe3, 0x0e, 0xdd, 0x81, 0x7d, + 0x93, 0xf3, 0x7e, 0x20, 0xd4, 0x11, 0x44, 0x7b, 0xe9, 0x2a, 0xf9, 0x74, 0xb8, 0xc0, 0x02, 0xe8, + 0x8a, 0x7c, 0x97, 0x3a, 0x57, 0xf5, 0xc3, 0xbf, 0xf6, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xe5, + 0xcf, 0xfd, 0xb1, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AllProvidersAttributes(ctx context.Context, in *QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAttributes(ctx context.Context, in *QueryProviderAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAuditorAttributes(ctx context.Context, in *QueryProviderAuditorRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AuditorAttributes(ctx context.Context, in *QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AllProvidersAttributes(ctx context.Context, in *QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Query/AllProvidersAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProviderAttributes(ctx context.Context, in *QueryProviderAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Query/ProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProviderAuditorAttributes(ctx context.Context, in *QueryProviderAuditorRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Query/ProviderAuditorAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AuditorAttributes(ctx context.Context, in *QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta2.Query/AuditorAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AllProvidersAttributes(context.Context, *QueryAllProvidersAttributesRequest) (*QueryProvidersResponse, error) + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAttributes(context.Context, *QueryProviderAttributesRequest) (*QueryProvidersResponse, error) + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAuditorAttributes(context.Context, *QueryProviderAuditorRequest) (*QueryProvidersResponse, error) + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AuditorAttributes(context.Context, *QueryAuditorAttributesRequest) (*QueryProvidersResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) AllProvidersAttributes(ctx context.Context, req *QueryAllProvidersAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProvidersAttributes not implemented") +} +func (*UnimplementedQueryServer) ProviderAttributes(ctx context.Context, req *QueryProviderAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProviderAttributes not implemented") +} +func (*UnimplementedQueryServer) ProviderAuditorAttributes(ctx context.Context, req *QueryProviderAuditorRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProviderAuditorAttributes not implemented") +} +func (*UnimplementedQueryServer) AuditorAttributes(ctx context.Context, req *QueryAuditorAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuditorAttributes not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_AllProvidersAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProvidersAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProvidersAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Query/AllProvidersAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProvidersAttributes(ctx, req.(*QueryAllProvidersAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Query/ProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProviderAttributes(ctx, req.(*QueryProviderAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProviderAuditorAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderAuditorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProviderAuditorAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Query/ProviderAuditorAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProviderAuditorAttributes(ctx, req.(*QueryProviderAuditorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AuditorAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuditorAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuditorAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta2.Query/AuditorAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuditorAttributes(ctx, req.(*QueryAuditorAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.audit.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AllProvidersAttributes", + Handler: _Query_AllProvidersAttributes_Handler, + }, + { + MethodName: "ProviderAttributes", + Handler: _Query_ProviderAttributes_Handler, + }, + { + MethodName: "ProviderAuditorAttributes", + Handler: _Query_ProviderAuditorAttributes_Handler, + }, + { + MethodName: "AuditorAttributes", + Handler: _Query_AuditorAttributes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/audit/v1beta2/query.proto", +} + +func (m *QueryProvidersResponse) 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 *QueryProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersResponse) 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.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[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 (m *QueryProviderRequest) 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 *QueryProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryAllProvidersAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryProviderAttributesRequest) 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 *QueryProviderAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderAttributesRequest) 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.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderAuditorRequest) 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 *QueryProviderAuditorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderAuditorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAuditorAttributesRequest) 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 *QueryAuditorAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuditorAttributesRequest) 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.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + 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 *QueryProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + 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 (m *QueryProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryProviderAttributesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProviderAuditorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAuditorAttributesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryProvidersResponse) 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: QueryProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-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) + } + 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.PageResponse{} + } + 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 *QueryProviderRequest) 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: QueryProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = 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 *QueryAllProvidersAttributesRequest) 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: QueryAllProvidersAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProvidersAttributesRequest: 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 *QueryProviderAttributesRequest) 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: QueryProviderAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderAttributesRequest: 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) + } + 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 *QueryProviderAuditorRequest) 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: QueryProviderAuditorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderAuditorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = 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 *QueryAuditorAttributesRequest) 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: QueryAuditorAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuditorAttributesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta2/query.pb.gw.go b/go/node/audit/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..5b247ef7 --- /dev/null +++ b/go/node/audit/v1beta2/query.pb.gw.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/audit/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_AllProvidersAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllProvidersAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProvidersAttributesRequest + 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_AllProvidersAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllProvidersAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllProvidersAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProvidersAttributesRequest + 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_AllProvidersAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllProvidersAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ProviderAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{"owner": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProviderAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ProviderAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProviderAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ProviderAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAuditorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := client.ProviderAuditorAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAuditorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := server.ProviderAuditorAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AuditorAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{"auditor": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuditorAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuditorAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AuditorAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuditorAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuditorAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AuditorAttributes(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_AllProvidersAttributes_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_AllProvidersAttributes_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_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAttributes_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_ProviderAttributes_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_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAuditorAttributes_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_ProviderAuditorAttributes_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_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuditorAttributes_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_AuditorAttributes_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_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_AllProvidersAttributes_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_AllProvidersAttributes_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_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAttributes_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_ProviderAttributes_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_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAuditorAttributes_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_ProviderAuditorAttributes_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_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuditorAttributes_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_AuditorAttributes_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_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta2", "attributes", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta2", "attributes", "owner", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta2", "attributes", "auditor", "owner"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta2", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_AllProvidersAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_ProviderAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_ProviderAuditorAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_AuditorAttributes_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/audit/v1beta2/types.go b/go/node/audit/v1beta2/types.go new file mode 100644 index 00000000..698e8605 --- /dev/null +++ b/go/node/audit/v1beta2/types.go @@ -0,0 +1,33 @@ +package v1beta2 + +import ( + "bytes" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ProviderID struct { + Owner sdk.Address + Auditor sdk.Address +} + +// Providers is the collection of Provider +type Providers []Provider + +// String implements the Stringer interface for a Providers object. +func (obj Providers) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} diff --git a/go/node/audit/v1beta3/audit.pb.go b/go/node/audit/v1beta3/audit.pb.go new file mode 100644 index 00000000..3334c8aa --- /dev/null +++ b/go/node/audit/v1beta3/audit.pb.go @@ -0,0 +1,2079 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta3/audit.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// Provider stores owner auditor and attributes details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,4,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (m *Provider) String() string { return proto.CompactTextString(m) } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{0} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// Attributes +type AuditedAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *AuditedAttributes) Reset() { *m = AuditedAttributes{} } +func (m *AuditedAttributes) String() string { return proto.CompactTextString(m) } +func (*AuditedAttributes) ProtoMessage() {} +func (*AuditedAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{1} +} +func (m *AuditedAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuditedAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AuditedAttributes.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 *AuditedAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuditedAttributes.Merge(m, src) +} +func (m *AuditedAttributes) XXX_Size() int { + return m.Size() +} +func (m *AuditedAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_AuditedAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_AuditedAttributes proto.InternalMessageInfo + +func (m *AuditedAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *AuditedAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *AuditedAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesResponse represents details of deployment along with group details +type AttributesResponse struct { + Attributes []AuditedAttributes `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *AttributesResponse) Reset() { *m = AttributesResponse{} } +func (m *AttributesResponse) String() string { return proto.CompactTextString(m) } +func (*AttributesResponse) ProtoMessage() {} +func (*AttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{2} +} +func (m *AttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesResponse.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 *AttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesResponse.Merge(m, src) +} +func (m *AttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *AttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesResponse proto.InternalMessageInfo + +func (m *AttributesResponse) GetAttributes() []AuditedAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +// AttributesFilters defines filters used to filter deployments +type AttributesFilters struct { + Auditors []string `protobuf:"bytes,1,rep,name=auditors,proto3" json:"auditors" yaml:"auditors"` + Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners" yaml:"owners"` +} + +func (m *AttributesFilters) Reset() { *m = AttributesFilters{} } +func (m *AttributesFilters) String() string { return proto.CompactTextString(m) } +func (*AttributesFilters) ProtoMessage() {} +func (*AttributesFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{3} +} +func (m *AttributesFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributesFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributesFilters.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 *AttributesFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributesFilters.Merge(m, src) +} +func (m *AttributesFilters) XXX_Size() int { + return m.Size() +} +func (m *AttributesFilters) XXX_DiscardUnknown() { + xxx_messageInfo_AttributesFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributesFilters proto.InternalMessageInfo + +func (m *AttributesFilters) GetAuditors() []string { + if m != nil { + return m.Auditors + } + return nil +} + +func (m *AttributesFilters) GetOwners() []string { + if m != nil { + return m.Owners + } + return nil +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +type MsgSignProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *MsgSignProviderAttributes) Reset() { *m = MsgSignProviderAttributes{} } +func (m *MsgSignProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributes) ProtoMessage() {} +func (*MsgSignProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{4} +} +func (m *MsgSignProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributes.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 *MsgSignProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributes.Merge(m, src) +} +func (m *MsgSignProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributes proto.InternalMessageInfo + +func (m *MsgSignProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgSignProviderAttributes) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +type MsgSignProviderAttributesResponse struct { +} + +func (m *MsgSignProviderAttributesResponse) Reset() { *m = MsgSignProviderAttributesResponse{} } +func (m *MsgSignProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSignProviderAttributesResponse) ProtoMessage() {} +func (*MsgSignProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{5} +} +func (m *MsgSignProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSignProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSignProviderAttributesResponse.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 *MsgSignProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSignProviderAttributesResponse.Merge(m, src) +} +func (m *MsgSignProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSignProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSignProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSignProviderAttributesResponse proto.InternalMessageInfo + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +type MsgDeleteProviderAttributes struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Auditor string `protobuf:"bytes,2,opt,name=auditor,proto3" json:"auditor" yaml:"auditor"` + Keys []string `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys" yaml:"keys"` +} + +func (m *MsgDeleteProviderAttributes) Reset() { *m = MsgDeleteProviderAttributes{} } +func (m *MsgDeleteProviderAttributes) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributes) ProtoMessage() {} +func (*MsgDeleteProviderAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{6} +} +func (m *MsgDeleteProviderAttributes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributes.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 *MsgDeleteProviderAttributes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributes.Merge(m, src) +} +func (m *MsgDeleteProviderAttributes) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributes proto.InternalMessageInfo + +func (m *MsgDeleteProviderAttributes) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *MsgDeleteProviderAttributes) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +type MsgDeleteProviderAttributesResponse struct { +} + +func (m *MsgDeleteProviderAttributesResponse) Reset() { *m = MsgDeleteProviderAttributesResponse{} } +func (m *MsgDeleteProviderAttributesResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderAttributesResponse) ProtoMessage() {} +func (*MsgDeleteProviderAttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_56975f549b197e6e, []int{7} +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderAttributesResponse.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 *MsgDeleteProviderAttributesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.Merge(m, src) +} +func (m *MsgDeleteProviderAttributesResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderAttributesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderAttributesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderAttributesResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Provider)(nil), "akash.audit.v1beta3.Provider") + proto.RegisterType((*AuditedAttributes)(nil), "akash.audit.v1beta3.AuditedAttributes") + proto.RegisterType((*AttributesResponse)(nil), "akash.audit.v1beta3.AttributesResponse") + proto.RegisterType((*AttributesFilters)(nil), "akash.audit.v1beta3.AttributesFilters") + proto.RegisterType((*MsgSignProviderAttributes)(nil), "akash.audit.v1beta3.MsgSignProviderAttributes") + proto.RegisterType((*MsgSignProviderAttributesResponse)(nil), "akash.audit.v1beta3.MsgSignProviderAttributesResponse") + proto.RegisterType((*MsgDeleteProviderAttributes)(nil), "akash.audit.v1beta3.MsgDeleteProviderAttributes") + proto.RegisterType((*MsgDeleteProviderAttributesResponse)(nil), "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse") +} + +func init() { proto.RegisterFile("akash/audit/v1beta3/audit.proto", fileDescriptor_56975f549b197e6e) } + +var fileDescriptor_56975f549b197e6e = []byte{ + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0xb9, 0xa1, 0x24, 0x57, 0x7e, 0x28, 0x06, 0x41, 0x9a, 0xaa, 0xbe, 0x72, 0x15, 0x50, + 0x09, 0x61, 0x43, 0x23, 0x41, 0x55, 0xa6, 0x1a, 0xc4, 0x16, 0x09, 0x99, 0x8d, 0xcd, 0x21, 0x27, + 0xd7, 0x4a, 0xea, 0x8b, 0x7c, 0x97, 0x56, 0xd9, 0x98, 0x58, 0x81, 0x8d, 0xb1, 0x03, 0x13, 0x12, + 0x33, 0x12, 0xfc, 0x03, 0x1d, 0x3b, 0x32, 0x1d, 0x28, 0x59, 0x90, 0x47, 0xff, 0x05, 0x28, 0x77, + 0xb6, 0xe3, 0xa8, 0x35, 0x6a, 0xa6, 0x32, 0xb0, 0xf9, 0x7d, 0xef, 0x7b, 0xef, 0xbe, 0xf7, 0xf9, + 0x9d, 0x0e, 0x22, 0xb7, 0xeb, 0xb2, 0x5d, 0xcb, 0x1d, 0x74, 0x7c, 0x6e, 0xed, 0x3f, 0x6c, 0x13, + 0xee, 0x36, 0x55, 0x64, 0xf6, 0x43, 0xca, 0xa9, 0x7e, 0x4d, 0x12, 0x4c, 0x05, 0x25, 0x84, 0xc6, + 0x75, 0x8f, 0x7a, 0x54, 0xe6, 0xad, 0xc9, 0x97, 0xa2, 0x36, 0xb0, 0xea, 0xd5, 0x76, 0x19, 0x99, + 0xb6, 0xe2, 0x3c, 0xf4, 0xdb, 0x03, 0x4e, 0x14, 0x07, 0x7f, 0xd2, 0x60, 0xe5, 0x45, 0x48, 0xf7, + 0xfd, 0x0e, 0x09, 0x75, 0x0b, 0x5e, 0xa0, 0x07, 0x01, 0x09, 0xeb, 0x60, 0x0d, 0x6c, 0x54, 0xed, + 0xe5, 0x48, 0x20, 0x05, 0xc4, 0x02, 0x5d, 0x1a, 0xba, 0x7b, 0xbd, 0x6d, 0x2c, 0x43, 0xec, 0x28, + 0x58, 0x7f, 0x0c, 0x2f, 0x4a, 0x21, 0x34, 0xac, 0x6b, 0xb2, 0x64, 0x35, 0x12, 0x28, 0x85, 0x62, + 0x81, 0xae, 0xa8, 0xa2, 0x04, 0xc0, 0x4e, 0x9a, 0xd2, 0xbf, 0x00, 0x08, 0x33, 0x29, 0xac, 0x5e, + 0x5e, 0x5b, 0xd8, 0x58, 0xda, 0x5c, 0x35, 0xd5, 0x6c, 0x13, 0xc1, 0xe9, 0x68, 0xe6, 0x4e, 0xca, + 0xb2, 0x83, 0x23, 0x81, 0x4a, 0x91, 0x40, 0xb9, 0xc2, 0x58, 0xa0, 0x5a, 0x72, 0x44, 0x86, 0xe1, + 0xcf, 0x3f, 0xd1, 0x53, 0xcf, 0xe7, 0xbb, 0x83, 0xb6, 0xf9, 0x9a, 0xee, 0x59, 0xb2, 0xe7, 0xfd, + 0x80, 0xf0, 0x03, 0x1a, 0x76, 0x93, 0xc8, 0xed, 0xfb, 0x96, 0x47, 0xad, 0x80, 0x76, 0x88, 0xc5, + 0x87, 0x7d, 0xc2, 0xac, 0x13, 0xc7, 0x31, 0x27, 0x77, 0x0e, 0xfe, 0xaa, 0xc1, 0xda, 0xce, 0x44, + 0x3b, 0xe9, 0x4c, 0x19, 0xe7, 0xe7, 0xd7, 0xc2, 0x3f, 0xee, 0xd7, 0x76, 0xe5, 0xe3, 0x21, 0x02, + 0xbf, 0x0f, 0x51, 0x09, 0xbf, 0x03, 0x50, 0xcf, 0x91, 0x08, 0xeb, 0xd3, 0x80, 0x11, 0x9d, 0xce, + 0xcc, 0x03, 0xe4, 0x3c, 0x77, 0xcc, 0x53, 0x76, 0xdb, 0x3c, 0x61, 0xbb, 0x7d, 0xf7, 0x8c, 0x83, + 0x15, 0x2b, 0xaa, 0x4d, 0xbb, 0x3d, 0xf7, 0x7b, 0x9c, 0x84, 0x4c, 0x7f, 0x02, 0x2b, 0x89, 0xd9, + 0x4a, 0x4e, 0xd5, 0x46, 0x91, 0x40, 0x19, 0x16, 0x0b, 0x74, 0x75, 0xe6, 0xe7, 0x30, 0xec, 0x64, + 0x49, 0xbd, 0x09, 0x17, 0xe5, 0x0f, 0x66, 0x75, 0x4d, 0x96, 0xae, 0x44, 0x02, 0x25, 0x48, 0x2c, + 0xd0, 0xe5, 0xdc, 0x2a, 0x30, 0xec, 0x24, 0x89, 0x9c, 0xa2, 0xef, 0x1a, 0x5c, 0x6e, 0x31, 0xef, + 0xa5, 0xef, 0x05, 0xe9, 0x5d, 0xfc, 0xbf, 0x65, 0x67, 0xd8, 0xb2, 0xb2, 0x74, 0x6f, 0x1d, 0xde, + 0x2a, 0x34, 0x2f, 0xdd, 0x37, 0xfc, 0x0d, 0xc0, 0x95, 0x16, 0xf3, 0x9e, 0x91, 0x1e, 0xe1, 0xe4, + 0x5c, 0x4d, 0xbe, 0x07, 0xcb, 0x5d, 0x32, 0x54, 0xee, 0x56, 0xed, 0x9b, 0x91, 0x40, 0x32, 0x8e, + 0x05, 0x5a, 0x52, 0x25, 0x93, 0x08, 0x3b, 0x12, 0x4c, 0x26, 0xbc, 0x0d, 0xd7, 0xff, 0xa2, 0x3d, + 0x9d, 0x71, 0xf3, 0x83, 0x06, 0x17, 0x5a, 0xcc, 0xd3, 0xdf, 0x00, 0x78, 0xa3, 0x60, 0x97, 0xcc, + 0x53, 0xaf, 0x58, 0xa1, 0x7d, 0x8d, 0x47, 0xf3, 0xf1, 0xb3, 0xeb, 0xfd, 0x16, 0xc0, 0x7a, 0xa1, + 0xd7, 0x0f, 0x8a, 0x9a, 0x16, 0x55, 0x34, 0xb6, 0xe6, 0xad, 0x48, 0x85, 0xd8, 0xce, 0xd1, 0xc8, + 0x00, 0xc7, 0x23, 0x03, 0xfc, 0x1a, 0x19, 0xe0, 0xfd, 0xd8, 0x28, 0x1d, 0x8f, 0x8d, 0xd2, 0x8f, + 0xb1, 0x51, 0x7a, 0xb5, 0x35, 0xc7, 0x36, 0xce, 0x3c, 0xc7, 0xed, 0x45, 0xf9, 0x74, 0x36, 0xff, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x10, 0x5f, 0x78, 0xee, 0xac, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SignProviderAttributes(ctx context.Context, in *MsgSignProviderAttributes, opts ...grpc.CallOption) (*MsgSignProviderAttributesResponse, error) { + out := new(MsgSignProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Msg/SignProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProviderAttributes(ctx context.Context, in *MsgDeleteProviderAttributes, opts ...grpc.CallOption) (*MsgDeleteProviderAttributesResponse, error) { + out := new(MsgDeleteProviderAttributesResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Msg/DeleteProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SignProviderAttributes defines a method that signs provider attributes + SignProviderAttributes(context.Context, *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) + // DeleteProviderAttributes defines a method that deletes provider attributes + DeleteProviderAttributes(context.Context, *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SignProviderAttributes(ctx context.Context, req *MsgSignProviderAttributes) (*MsgSignProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignProviderAttributes not implemented") +} +func (*UnimplementedMsgServer) DeleteProviderAttributes(ctx context.Context, req *MsgDeleteProviderAttributes) (*MsgDeleteProviderAttributesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProviderAttributes not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SignProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSignProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SignProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Msg/SignProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SignProviderAttributes(ctx, req.(*MsgSignProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProviderAttributes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Msg/DeleteProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProviderAttributes(ctx, req.(*MsgDeleteProviderAttributes)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.audit.v1beta3.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SignProviderAttributes", + Handler: _Msg_SignProviderAttributes_Handler, + }, + { + MethodName: "DeleteProviderAttributes", + Handler: _Msg_DeleteProviderAttributes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/audit/v1beta3/audit.proto", +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AuditedAttributes) 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 *AuditedAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuditedAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AttributesResponse) 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 *AttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AttributesFilters) 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 *AttributesFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributesFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owners) > 0 { + for iNdEx := len(m.Owners) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Owners[iNdEx]) + copy(dAtA[i:], m.Owners[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owners[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Auditors) > 0 { + for iNdEx := len(m.Auditors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Auditors[iNdEx]) + copy(dAtA[i:], m.Auditors[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditors[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributes) 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 *MsgSignProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSignProviderAttributesResponse) 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 *MsgSignProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSignProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributes) 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 *MsgDeleteProviderAttributes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Keys[iNdEx]) + copy(dAtA[i:], m.Keys[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Keys[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderAttributesResponse) 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 *MsgDeleteProviderAttributesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderAttributesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintAudit(dAtA []byte, offset int, v uint64) int { + offset -= sovAudit(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AuditedAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *AttributesFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Auditors) > 0 { + for _, s := range m.Auditors { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + if len(m.Owners) > 0 { + for _, s := range m.Owners { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgSignProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProviderAttributes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func (m *MsgDeleteProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovAudit(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAudit(x uint64) (n int) { + return sovAudit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Provider) 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 ErrIntOverflowAudit + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuditedAttributes) 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 ErrIntOverflowAudit + } + 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: AuditedAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditedAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesResponse) 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 ErrIntOverflowAudit + } + 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: AttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, AuditedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributesFilters) 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 ErrIntOverflowAudit + } + 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: AttributesFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributesFilters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditors = append(m.Auditors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owners = append(m.Owners, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSignProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgSignProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSignProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributes) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributes: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + 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 ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderAttributesResponse) 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 ErrIntOverflowAudit + } + 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: MsgDeleteProviderAttributesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderAttributesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAudit(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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrIntOverflowAudit + } + 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, ErrInvalidLengthAudit + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAudit + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAudit + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAudit = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAudit = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAudit = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta3/codec.go b/go/node/audit/v1beta3/codec.go new file mode 100644 index 00000000..b13ccd93 --- /dev/null +++ b/go/node/audit/v1beta3/codec.go @@ -0,0 +1,43 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgSignProviderAttributes{}, ModuleName+"/"+MsgTypeSignProviderAttributes, nil) + cdc.RegisterConcrete(&MsgDeleteProviderAttributes{}, ModuleName+"/"+MsgTypeDeleteProviderAttributes, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgSignProviderAttributes{}, + &MsgDeleteProviderAttributes{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/audit/v1beta3/errors.go b/go/node/audit/v1beta3/errors.go new file mode 100644 index 00000000..dd551e72 --- /dev/null +++ b/go/node/audit/v1beta3/errors.go @@ -0,0 +1,22 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errProviderNotFound uint32 = iota + 1 + errInvalidAddress + errAttributeNotFound +) + +var ( + // ErrProviderNotFound provider not found + ErrProviderNotFound = sdkerrors.Register(ModuleName, errProviderNotFound, "invalid provider: address not found") + + // ErrInvalidAddress invalid trusted auditor address + ErrInvalidAddress = sdkerrors.Register(ModuleName, errInvalidAddress, "invalid address") + + // ErrAttributeNotFound invalid trusted auditor address + ErrAttributeNotFound = sdkerrors.Register(ModuleName, errAttributeNotFound, "attribute not found") +) diff --git a/go/node/audit/v1beta3/event.go b/go/node/audit/v1beta3/event.go new file mode 100644 index 00000000..25ade977 --- /dev/null +++ b/go/node/audit/v1beta3/event.go @@ -0,0 +1,118 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/akash-network/node/sdkutil" +) + +const ( + evActionTrustedAuditorCreated = "audit-trusted-auditor-created" + evActionTrustedAuditorDeleted = "audit-trusted-auditor-deleted" + evOwnerKey = "owner" + evAuditorKey = "auditor" +) + +// EventTrustedAuditorCreated struct +type EventTrustedAuditorCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.Address `json:"owner"` + Auditor sdk.Address `json:"auditor"` +} + +func NewEventTrustedAuditorCreated(owner sdk.Address, auditor sdk.Address) EventTrustedAuditorCreated { + return EventTrustedAuditorCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionTrustedAuditorCreated, + }, + Owner: owner, + Auditor: auditor, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventTrustedAuditorCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionTrustedAuditorCreated), + }, TrustedAuditorEVAttributes(ev.Owner, ev.Auditor)...)..., + ) +} + +// TrustedAuditorEVAttributes returns event attributes for given Provider +func TrustedAuditorEVAttributes(owner sdk.Address, auditor sdk.Address) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evOwnerKey, owner.String()), + sdk.NewAttribute(evAuditorKey, auditor.String()), + } +} + +// ParseEVTTrustedAuditor returns provider details for given event attributes +func ParseEVTTrustedAuditor(attrs []sdk.Attribute) (sdk.Address, sdk.Address, error) { + owner, err := sdkutil.GetAccAddress(attrs, evOwnerKey) + if err != nil { + return nil, nil, err + } + + auditor, err := sdkutil.GetAccAddress(attrs, evAuditorKey) + if err != nil { + return nil, nil, err + } + + return owner, auditor, nil +} + +type EventTrustedAuditorDeleted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.Address `json:"owner"` + Auditor sdk.Address `json:"auditor"` +} + +func NewEventTrustedAuditorDeleted(owner sdk.Address, auditor sdk.Address) EventTrustedAuditorDeleted { + return EventTrustedAuditorDeleted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionTrustedAuditorDeleted, + }, + Owner: owner, + Auditor: auditor, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventTrustedAuditorDeleted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionTrustedAuditorDeleted), + }, TrustedAuditorEVAttributes(ev.Owner, ev.Auditor)...)..., + ) +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case evActionTrustedAuditorCreated: + owner, auditor, err := ParseEVTTrustedAuditor(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventTrustedAuditorCreated(owner, auditor), nil + case evActionTrustedAuditorDeleted: + owner, auditor, err := ParseEVTTrustedAuditor(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventTrustedAuditorDeleted(owner, auditor), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/audit/v1beta3/genesis.pb.go b/go/node/audit/v1beta3/genesis.pb.go new file mode 100644 index 00000000..d38ca891 --- /dev/null +++ b/go/node/audit/v1beta3/genesis.pb.go @@ -0,0 +1,332 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by audit module +type GenesisState struct { + Attributes []AuditedAttributes `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_74163cc28cdac025, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAttributes() []AuditedAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.audit.v1beta3.GenesisState") +} + +func init() { proto.RegisterFile("akash/audit/v1beta3/genesis.proto", fileDescriptor_74163cc28cdac025) } + +var fileDescriptor_74163cc28cdac025 = []byte{ + // 235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, + 0x2b, 0xd1, 0x03, 0x2b, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, + 0x83, 0x58, 0x10, 0xa5, 0x52, 0xf2, 0xd8, 0x4c, 0x83, 0x68, 0x04, 0x2b, 0x50, 0xaa, 0xe7, 0xe2, + 0x71, 0x87, 0x18, 0x1e, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x94, 0xcf, 0xc5, 0x95, 0x58, 0x52, 0x52, + 0x94, 0x99, 0x54, 0x5a, 0x92, 0x5a, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa6, 0x87, + 0xc5, 0x42, 0x3d, 0x47, 0x10, 0x2f, 0x35, 0xc5, 0x11, 0xae, 0xda, 0x49, 0xfd, 0xc4, 0x3d, 0x79, + 0x86, 0x57, 0xf7, 0xe4, 0x91, 0x4c, 0xf8, 0x74, 0x4f, 0x5e, 0xb0, 0x32, 0x31, 0x37, 0xc7, 0x4a, + 0x09, 0x21, 0xa6, 0x14, 0x84, 0xa4, 0xc0, 0x29, 0xe8, 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, 0x2c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, + 0x0e, 0xd0, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0x86, 0xf2, 0x12, 0x0b, 0x32, 0xf5, 0xd3, + 0xf3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x51, 0x3d, 0x98, 0xc4, 0x06, 0xf6, 0x9b, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0x54, 0x65, 0x08, 0x68, 0x4c, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", 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.Attributes = append(m.Attributes, AuditedAttributes{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta3/key.go b/go/node/audit/v1beta3/key.go new file mode 100644 index 00000000..390ed084 --- /dev/null +++ b/go/node/audit/v1beta3/key.go @@ -0,0 +1,16 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "audit" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) + +func PrefixProviderID() []byte { + return []byte{0x01} +} diff --git a/go/node/audit/v1beta3/msgs.go b/go/node/audit/v1beta3/msgs.go new file mode 100644 index 00000000..4a501915 --- /dev/null +++ b/go/node/audit/v1beta3/msgs.go @@ -0,0 +1,94 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + MsgTypeSignProviderAttributes = "audit-sign-provider-attributes" + MsgTypeDeleteProviderAttributes = "audit-delete-provider-attributes" +) + +var ( + _ sdk.Msg = &MsgSignProviderAttributes{} + _ sdk.Msg = &MsgDeleteProviderAttributes{} +) + +// ====MsgSignProviderAttributes==== +// Route implements the sdk.Msg interface +func (m MsgSignProviderAttributes) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgSignProviderAttributes) Type() string { + return MsgTypeSignProviderAttributes +} + +// ValidateBasic does basic validation +func (m MsgSignProviderAttributes) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgSignProviderAttributes) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgSignProviderAttributes) GetSigners() []sdk.AccAddress { + auditor, err := sdk.AccAddressFromBech32(m.Auditor) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{auditor} +} + +// ====MsgRevokeProviderAttributes==== +// Route implements the sdk.Msg interface +func (m MsgDeleteProviderAttributes) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgDeleteProviderAttributes) Type() string { + return MsgTypeDeleteProviderAttributes +} + +// ValidateBasic does basic validation +func (m MsgDeleteProviderAttributes) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgDeleteProviderAttributes) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgDeleteProviderAttributes) GetSigners() []sdk.AccAddress { + auditor, err := sdk.AccAddressFromBech32(m.Auditor) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{auditor} +} diff --git a/go/node/audit/v1beta3/query.pb.go b/go/node/audit/v1beta3/query.pb.go new file mode 100644 index 00000000..e63ac0ba --- /dev/null +++ b/go/node/audit/v1beta3/query.pb.go @@ -0,0 +1,1718 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryProvidersResponse struct { + Providers Providers `protobuf:"bytes,1,rep,name=providers,proto3,castrepeated=Providers" json:"providers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersResponse) Reset() { *m = QueryProvidersResponse{} } +func (m *QueryProvidersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersResponse) ProtoMessage() {} +func (*QueryProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{0} +} +func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersResponse.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 *QueryProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersResponse.Merge(m, src) +} +func (m *QueryProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo + +func (m *QueryProvidersResponse) GetProviders() Providers { + if m != nil { + return m.Providers + } + return nil +} + +func (m *QueryProvidersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +type QueryProviderRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderRequest) Reset() { *m = QueryProviderRequest{} } +func (m *QueryProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderRequest) ProtoMessage() {} +func (*QueryProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{1} +} +func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderRequest.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 *QueryProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderRequest.Merge(m, src) +} +func (m *QueryProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo + +func (m *QueryProviderRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryProviderRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method +type QueryAllProvidersAttributesRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProvidersAttributesRequest) Reset() { *m = QueryAllProvidersAttributesRequest{} } +func (m *QueryAllProvidersAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllProvidersAttributesRequest) ProtoMessage() {} +func (*QueryAllProvidersAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{2} +} +func (m *QueryAllProvidersAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProvidersAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProvidersAttributesRequest.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 *QueryAllProvidersAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProvidersAttributesRequest.Merge(m, src) +} +func (m *QueryAllProvidersAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProvidersAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProvidersAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProvidersAttributesRequest proto.InternalMessageInfo + +func (m *QueryAllProvidersAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderAttributesRequest is request type for the Query/Provider RPC method +type QueryProviderAttributesRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProviderAttributesRequest) Reset() { *m = QueryProviderAttributesRequest{} } +func (m *QueryProviderAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderAttributesRequest) ProtoMessage() {} +func (*QueryProviderAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{3} +} +func (m *QueryProviderAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderAttributesRequest.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 *QueryProviderAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderAttributesRequest.Merge(m, src) +} +func (m *QueryProviderAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderAttributesRequest proto.InternalMessageInfo + +func (m *QueryProviderAttributesRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryProviderAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderAuditorRequest is request type for the Query/Providers RPC method +type QueryProviderAuditorRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderAuditorRequest) Reset() { *m = QueryProviderAuditorRequest{} } +func (m *QueryProviderAuditorRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderAuditorRequest) ProtoMessage() {} +func (*QueryProviderAuditorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{4} +} +func (m *QueryProviderAuditorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderAuditorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderAuditorRequest.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 *QueryProviderAuditorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderAuditorRequest.Merge(m, src) +} +func (m *QueryProviderAuditorRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderAuditorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderAuditorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderAuditorRequest proto.InternalMessageInfo + +func (m *QueryProviderAuditorRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryProviderAuditorRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryAuditorAttributesRequest is request type for the Query/Providers RPC method +type QueryAuditorAttributesRequest struct { + Auditor string `protobuf:"bytes,1,opt,name=auditor,proto3" json:"auditor,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAuditorAttributesRequest) Reset() { *m = QueryAuditorAttributesRequest{} } +func (m *QueryAuditorAttributesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuditorAttributesRequest) ProtoMessage() {} +func (*QueryAuditorAttributesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9dd51717cd9dc5fd, []int{5} +} +func (m *QueryAuditorAttributesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuditorAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuditorAttributesRequest.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 *QueryAuditorAttributesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuditorAttributesRequest.Merge(m, src) +} +func (m *QueryAuditorAttributesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuditorAttributesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuditorAttributesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuditorAttributesRequest proto.InternalMessageInfo + +func (m *QueryAuditorAttributesRequest) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func (m *QueryAuditorAttributesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryProvidersResponse)(nil), "akash.audit.v1beta3.QueryProvidersResponse") + proto.RegisterType((*QueryProviderRequest)(nil), "akash.audit.v1beta3.QueryProviderRequest") + proto.RegisterType((*QueryAllProvidersAttributesRequest)(nil), "akash.audit.v1beta3.QueryAllProvidersAttributesRequest") + proto.RegisterType((*QueryProviderAttributesRequest)(nil), "akash.audit.v1beta3.QueryProviderAttributesRequest") + proto.RegisterType((*QueryProviderAuditorRequest)(nil), "akash.audit.v1beta3.QueryProviderAuditorRequest") + proto.RegisterType((*QueryAuditorAttributesRequest)(nil), "akash.audit.v1beta3.QueryAuditorAttributesRequest") +} + +func init() { proto.RegisterFile("akash/audit/v1beta3/query.proto", fileDescriptor_9dd51717cd9dc5fd) } + +var fileDescriptor_9dd51717cd9dc5fd = []byte{ + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xa2, 0x82, 0xea, 0x9d, 0x66, 0xaa, 0xa9, 0x14, 0x96, 0x56, 0x3d, 0x40, 0x35, + 0xc0, 0xde, 0x52, 0xc4, 0x80, 0x0b, 0xda, 0x0e, 0xe3, 0x04, 0x1a, 0x39, 0x72, 0x73, 0x57, 0x2b, + 0x8b, 0xd6, 0xe5, 0x65, 0xb1, 0xb3, 0x09, 0xa1, 0x21, 0xc1, 0x27, 0x40, 0xe2, 0x5b, 0x20, 0x2e, + 0x70, 0xe5, 0x0b, 0xec, 0x38, 0x89, 0x0b, 0xa7, 0x81, 0x5a, 0x3e, 0x08, 0x8a, 0x9d, 0xb4, 0xcd, + 0xd2, 0xd2, 0x6e, 0x70, 0xab, 0xeb, 0xff, 0x7b, 0xff, 0xdf, 0x7b, 0x7e, 0x76, 0x70, 0x9d, 0xef, + 0x71, 0xb9, 0xcb, 0x78, 0xd4, 0xf5, 0x14, 0x3b, 0x5c, 0xeb, 0x08, 0xc5, 0xdb, 0xec, 0x20, 0x12, + 0xe1, 0x6b, 0x1a, 0x84, 0xa0, 0x80, 0x5c, 0xd7, 0x02, 0xaa, 0x05, 0x34, 0x11, 0xd4, 0x2a, 0x2e, + 0xb8, 0xa0, 0xf7, 0x59, 0xfc, 0xcb, 0x48, 0x6b, 0xb7, 0x5c, 0x00, 0xb7, 0x27, 0x18, 0x0f, 0x3c, + 0xc6, 0x7d, 0x1f, 0x14, 0x57, 0x1e, 0xf8, 0x32, 0xd9, 0x5d, 0xd9, 0x01, 0xb9, 0x0f, 0x92, 0x75, + 0xb8, 0x14, 0xc6, 0x21, 0xf1, 0x5b, 0x63, 0x01, 0x77, 0x3d, 0x5f, 0x8b, 0x13, 0xed, 0x44, 0x2a, + 0x83, 0xa0, 0x05, 0xcd, 0x2f, 0x08, 0x2f, 0xbd, 0x8c, 0x73, 0x6c, 0x87, 0x70, 0xe8, 0x75, 0x45, + 0x28, 0x1d, 0x21, 0x03, 0xf0, 0xa5, 0x20, 0x2f, 0x70, 0x39, 0x48, 0xff, 0xac, 0xa2, 0xc6, 0x95, + 0xd6, 0x82, 0xbd, 0x4c, 0x27, 0x14, 0x41, 0xd3, 0xd0, 0xcd, 0xc5, 0x93, 0xb3, 0x7a, 0xe1, 0xd3, + 0xcf, 0x7a, 0x79, 0x94, 0x6c, 0x94, 0x82, 0x3c, 0xc3, 0x78, 0xc4, 0x57, 0x2d, 0x36, 0x50, 0x6b, + 0xc1, 0xbe, 0x43, 0x4d, 0x31, 0x34, 0x2e, 0x86, 0x9a, 0x76, 0x25, 0xc5, 0xd0, 0x6d, 0xee, 0x8a, + 0x14, 0xc6, 0x19, 0x0b, 0x6d, 0x6e, 0xe1, 0x4a, 0x06, 0xd9, 0x11, 0x07, 0x91, 0x90, 0x8a, 0x54, + 0xf1, 0x35, 0x0d, 0x06, 0x61, 0x15, 0x35, 0x50, 0xab, 0xec, 0xa4, 0x4b, 0x52, 0xc1, 0x25, 0x38, + 0xf2, 0x45, 0xa8, 0x5d, 0xcb, 0x8e, 0x59, 0x34, 0x7b, 0xb8, 0xa9, 0xf3, 0x6c, 0xf4, 0x7a, 0x43, + 0xe0, 0x0d, 0xa5, 0x42, 0xaf, 0x13, 0x29, 0x21, 0xd3, 0xac, 0x5b, 0x19, 0x6c, 0xa4, 0xb1, 0x6f, + 0xcf, 0xc4, 0xd6, 0xb1, 0x19, 0xea, 0xb7, 0xd8, 0xca, 0x50, 0xe7, 0x9d, 0x86, 0x94, 0x68, 0x8c, + 0xf2, 0x9c, 0x7f, 0xf1, 0xd2, 0xfe, 0xcf, 0xf1, 0xcd, 0xac, 0xbf, 0xe9, 0xcd, 0x65, 0x9b, 0xf7, + 0x0e, 0xe1, 0x65, 0xd3, 0x3d, 0x23, 0xcb, 0x97, 0x33, 0x3d, 0xe3, 0x7f, 0x2a, 0xc9, 0x3e, 0x2b, + 0xe1, 0x92, 0x66, 0x20, 0x5f, 0x11, 0x5e, 0x9a, 0x7c, 0x8c, 0x64, 0x7d, 0xe2, 0xcc, 0xce, 0x3e, + 0xf8, 0xda, 0xdd, 0xe9, 0x81, 0xb9, 0xcb, 0xd2, 0xb4, 0xdf, 0x7f, 0xff, 0xfd, 0xb1, 0x78, 0x8f, + 0xac, 0xb0, 0xa9, 0x37, 0x8e, 0xf1, 0xa1, 0x05, 0xeb, 0x79, 0x52, 0xc5, 0xd0, 0x24, 0x3f, 0x0d, + 0xa4, 0x3d, 0xdb, 0xf7, 0x1f, 0x61, 0x9f, 0x68, 0xd8, 0x07, 0xc4, 0x9e, 0x0f, 0xf6, 0x8d, 0x3e, + 0xf1, 0x63, 0x03, 0xfd, 0x0d, 0xe1, 0x1b, 0xe7, 0x46, 0x68, 0x8c, 0x7d, 0x75, 0x0e, 0xf6, 0xcc, + 0xdc, 0x5d, 0x0c, 0xfc, 0xa9, 0x06, 0x7f, 0x4c, 0xd6, 0xe7, 0x04, 0x4f, 0x06, 0xee, 0x38, 0x2d, + 0x81, 0x7c, 0x46, 0x78, 0x31, 0x4f, 0x6d, 0xff, 0x65, 0x44, 0xa6, 0x4c, 0xf7, 0xc5, 0xb8, 0x1f, + 0x6a, 0xee, 0x55, 0x42, 0x13, 0xee, 0xf4, 0x51, 0xcc, 0xa2, 0x43, 0x38, 0x46, 0x1c, 0x37, 0x7b, + 0xd3, 0x39, 0xe9, 0x5b, 0xe8, 0xb4, 0x6f, 0xa1, 0x5f, 0x7d, 0x0b, 0x7d, 0x18, 0x58, 0x85, 0xd3, + 0x81, 0x55, 0xf8, 0x31, 0xb0, 0x0a, 0xaf, 0x1e, 0xb9, 0x9e, 0xda, 0x8d, 0x3a, 0x74, 0x07, 0xf6, + 0x4d, 0xce, 0xfb, 0xbe, 0x50, 0x47, 0x10, 0xee, 0x25, 0xab, 0xf8, 0xd3, 0xe1, 0x02, 0xf3, 0xa1, + 0x2b, 0xb2, 0x5d, 0xea, 0x5c, 0xd5, 0x0f, 0x7f, 0xfb, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5c, + 0x61, 0xaf, 0x79, 0xb1, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AllProvidersAttributes(ctx context.Context, in *QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAttributes(ctx context.Context, in *QueryProviderAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAuditorAttributes(ctx context.Context, in *QueryProviderAuditorRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AuditorAttributes(ctx context.Context, in *QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AllProvidersAttributes(ctx context.Context, in *QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Query/AllProvidersAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProviderAttributes(ctx context.Context, in *QueryProviderAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Query/ProviderAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProviderAuditorAttributes(ctx context.Context, in *QueryProviderAuditorRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Query/ProviderAuditorAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AuditorAttributes(ctx context.Context, in *QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.audit.v1beta3.Query/AuditorAttributes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AllProvidersAttributes(context.Context, *QueryAllProvidersAttributesRequest) (*QueryProvidersResponse, error) + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAttributes(context.Context, *QueryProviderAttributesRequest) (*QueryProvidersResponse, error) + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + ProviderAuditorAttributes(context.Context, *QueryProviderAuditorRequest) (*QueryProvidersResponse, error) + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + AuditorAttributes(context.Context, *QueryAuditorAttributesRequest) (*QueryProvidersResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) AllProvidersAttributes(ctx context.Context, req *QueryAllProvidersAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProvidersAttributes not implemented") +} +func (*UnimplementedQueryServer) ProviderAttributes(ctx context.Context, req *QueryProviderAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProviderAttributes not implemented") +} +func (*UnimplementedQueryServer) ProviderAuditorAttributes(ctx context.Context, req *QueryProviderAuditorRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProviderAuditorAttributes not implemented") +} +func (*UnimplementedQueryServer) AuditorAttributes(ctx context.Context, req *QueryAuditorAttributesRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuditorAttributes not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_AllProvidersAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProvidersAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProvidersAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Query/AllProvidersAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProvidersAttributes(ctx, req.(*QueryAllProvidersAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProviderAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProviderAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Query/ProviderAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProviderAttributes(ctx, req.(*QueryProviderAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProviderAuditorAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderAuditorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProviderAuditorAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Query/ProviderAuditorAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProviderAuditorAttributes(ctx, req.(*QueryProviderAuditorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AuditorAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuditorAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuditorAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.audit.v1beta3.Query/AuditorAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuditorAttributes(ctx, req.(*QueryAuditorAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.audit.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AllProvidersAttributes", + Handler: _Query_AllProvidersAttributes_Handler, + }, + { + MethodName: "ProviderAttributes", + Handler: _Query_ProviderAttributes_Handler, + }, + { + MethodName: "ProviderAuditorAttributes", + Handler: _Query_ProviderAuditorAttributes_Handler, + }, + { + MethodName: "AuditorAttributes", + Handler: _Query_AuditorAttributes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/audit/v1beta3/query.proto", +} + +func (m *QueryProvidersResponse) 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 *QueryProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersResponse) 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.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[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 (m *QueryProviderRequest) 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 *QueryProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryAllProvidersAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryProviderAttributesRequest) 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 *QueryProviderAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderAttributesRequest) 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.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderAuditorRequest) 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 *QueryProviderAuditorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderAuditorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAuditorAttributesRequest) 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 *QueryAuditorAttributesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuditorAttributesRequest) 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.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Auditor))) + 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 *QueryProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + 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 (m *QueryProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProvidersAttributesRequest) 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 *QueryProviderAttributesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProviderAuditorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAuditorAttributesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Auditor) + if l > 0 { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryProvidersResponse) 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: QueryProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-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) + } + 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.PageResponse{} + } + 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 *QueryProviderRequest) 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: QueryProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = 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 *QueryAllProvidersAttributesRequest) 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: QueryAllProvidersAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProvidersAttributesRequest: 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 *QueryProviderAttributesRequest) 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: QueryProviderAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderAttributesRequest: 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) + } + 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 *QueryProviderAuditorRequest) 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: QueryProviderAuditorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderAuditorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = 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 *QueryAuditorAttributesRequest) 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: QueryAuditorAttributesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuditorAttributesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auditor", 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.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta3/query.pb.gw.go b/go/node/audit/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..48dca1f8 --- /dev/null +++ b/go/node/audit/v1beta3/query.pb.gw.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/audit/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_AllProvidersAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllProvidersAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProvidersAttributesRequest + 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_AllProvidersAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllProvidersAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllProvidersAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProvidersAttributesRequest + 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_AllProvidersAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllProvidersAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ProviderAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{"owner": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProviderAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ProviderAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ProviderAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ProviderAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAuditorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := client.ProviderAuditorAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderAuditorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := server.ProviderAuditorAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AuditorAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{"auditor": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuditorAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuditorAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AuditorAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuditorAttributesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["auditor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auditor") + } + + protoReq.Auditor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuditorAttributes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AuditorAttributes(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_AllProvidersAttributes_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_AllProvidersAttributes_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_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAttributes_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_ProviderAttributes_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_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAuditorAttributes_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_ProviderAuditorAttributes_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_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuditorAttributes_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_AuditorAttributes_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_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_AllProvidersAttributes_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_AllProvidersAttributes_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_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAttributes_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_ProviderAttributes_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_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProviderAuditorAttributes_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_ProviderAuditorAttributes_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_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuditorAttributes_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_AuditorAttributes_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_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta3", "attributes", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta3", "attributes", "owner", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta3", "attributes", "auditor", "owner"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta3", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_AllProvidersAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_ProviderAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_ProviderAuditorAttributes_0 = runtime.ForwardResponseMessage + + forward_Query_AuditorAttributes_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/audit/v1beta3/types.go b/go/node/audit/v1beta3/types.go new file mode 100644 index 00000000..afd5ba14 --- /dev/null +++ b/go/node/audit/v1beta3/types.go @@ -0,0 +1,33 @@ +package v1beta3 + +import ( + "bytes" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ProviderID struct { + Owner sdk.Address + Auditor sdk.Address +} + +// Providers is the collection of Provider +type Providers []Provider + +// String implements the Stringer interface for a Providers object. +func (obj Providers) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} diff --git a/go/node/cert/v1beta2/cert.go b/go/node/cert/v1beta2/cert.go new file mode 100644 index 00000000..adbc6aca --- /dev/null +++ b/go/node/cert/v1beta2/cert.go @@ -0,0 +1,71 @@ +package v1beta2 + +import ( + "crypto/x509" + "encoding/pem" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +func ParseAndValidateCertificate(owner sdk.Address, crt, pub []byte) (*x509.Certificate, error) { + blk, rest := pem.Decode(pub) + if blk == nil || len(rest) > 0 { + return nil, ErrInvalidPubkeyValue + } + + if blk.Type != PemBlkTypeECPublicKey { + return nil, errors.Wrap(ErrInvalidPubkeyValue, "invalid pem block type") + } + + blk, rest = pem.Decode(crt) + if blk == nil || len(rest) > 0 { + return nil, ErrInvalidCertificateValue + } + + if blk.Type != PemBlkTypeCertificate { + return nil, errors.Wrap(ErrInvalidCertificateValue, "invalid pem block type") + } + + cert, err := x509.ParseCertificate(blk.Bytes) + if err != nil { + return nil, err + } + + cowner, err := sdk.AccAddressFromBech32(cert.Subject.CommonName) + if err != nil { + return nil, errors.Wrap(ErrInvalidCertificateValue, err.Error()) + } + + if !owner.Equals(cowner) { + return nil, errors.Wrap(ErrInvalidCertificateValue, "CommonName does not match owner") + } + + return cert, nil +} + +func (m *CertificateID) String() string { + return fmt.Sprintf("%s/%s", m.Owner, m.Serial) +} + +func (m *CertificateID) Equals(val CertificateID) bool { + return (m.Owner == val.Owner) && (m.Serial == val.Serial) +} + +func (m Certificate) Validate(owner sdk.Address) error { + if val, exists := Certificate_State_name[int32(m.State)]; !exists || val == "invalid" { + return ErrInvalidState + } + + _, err := ParseAndValidateCertificate(owner, m.Cert, m.Pubkey) + if err != nil { + return err + } + + return nil +} + +func (m Certificate) IsState(state Certificate_State) bool { + return m.State == state +} diff --git a/go/node/cert/v1beta2/cert.pb.go b/go/node/cert/v1beta2/cert.pb.go new file mode 100644 index 00000000..79128992 --- /dev/null +++ b/go/node/cert/v1beta2/cert.pb.go @@ -0,0 +1,1775 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta2/cert.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// State is an enum which refers to state of deployment +type Certificate_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + CertificateStateInvalid Certificate_State = 0 + // CertificateValid denotes state for deployment active + CertificateValid Certificate_State = 1 + // CertificateRevoked denotes state for deployment closed + CertificateRevoked Certificate_State = 2 +) + +var Certificate_State_name = map[int32]string{ + 0: "invalid", + 1: "valid", + 2: "revoked", +} + +var Certificate_State_value = map[string]int32{ + "invalid": 0, + "valid": 1, + "revoked": 2, +} + +func (x Certificate_State) String() string { + return proto.EnumName(Certificate_State_name, int32(x)) +} + +func (Certificate_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{1, 0} +} + +// CertificateID stores owner and sequence number +type CertificateID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` +} + +func (m *CertificateID) Reset() { *m = CertificateID{} } +func (*CertificateID) ProtoMessage() {} +func (*CertificateID) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{0} +} +func (m *CertificateID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateID.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 *CertificateID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateID.Merge(m, src) +} +func (m *CertificateID) XXX_Size() int { + return m.Size() +} +func (m *CertificateID) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateID.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateID proto.InternalMessageInfo + +func (m *CertificateID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *CertificateID) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +// Certificate stores state, certificate and it's public key +type Certificate struct { + State Certificate_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.cert.v1beta2.Certificate_State" json:"state" yaml:"state"` + Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert" yaml:"cert"` + Pubkey []byte `protobuf:"bytes,4,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` +} + +func (m *Certificate) Reset() { *m = Certificate{} } +func (m *Certificate) String() string { return proto.CompactTextString(m) } +func (*Certificate) ProtoMessage() {} +func (*Certificate) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{1} +} +func (m *Certificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Certificate.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 *Certificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Certificate.Merge(m, src) +} +func (m *Certificate) XXX_Size() int { + return m.Size() +} +func (m *Certificate) XXX_DiscardUnknown() { + xxx_messageInfo_Certificate.DiscardUnknown(m) +} + +var xxx_messageInfo_Certificate proto.InternalMessageInfo + +func (m *Certificate) GetState() Certificate_State { + if m != nil { + return m.State + } + return CertificateStateInvalid +} + +func (m *Certificate) GetCert() []byte { + if m != nil { + return m.Cert + } + return nil +} + +func (m *Certificate) GetPubkey() []byte { + if m != nil { + return m.Pubkey + } + return nil +} + +// CertificateFilter defines filters used to filter certificates +type CertificateFilter struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *CertificateFilter) Reset() { *m = CertificateFilter{} } +func (m *CertificateFilter) String() string { return proto.CompactTextString(m) } +func (*CertificateFilter) ProtoMessage() {} +func (*CertificateFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{2} +} +func (m *CertificateFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateFilter.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 *CertificateFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateFilter.Merge(m, src) +} +func (m *CertificateFilter) XXX_Size() int { + return m.Size() +} +func (m *CertificateFilter) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateFilter proto.InternalMessageInfo + +func (m *CertificateFilter) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *CertificateFilter) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +func (m *CertificateFilter) GetState() string { + if m != nil { + return m.State + } + return "" +} + +// MsgCreateCertificate defines an SDK message for creating certificate +type MsgCreateCertificate struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Cert []byte `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert" yaml:"cert"` + Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` +} + +func (m *MsgCreateCertificate) Reset() { *m = MsgCreateCertificate{} } +func (m *MsgCreateCertificate) String() string { return proto.CompactTextString(m) } +func (*MsgCreateCertificate) ProtoMessage() {} +func (*MsgCreateCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{3} +} +func (m *MsgCreateCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateCertificate.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 *MsgCreateCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateCertificate.Merge(m, src) +} +func (m *MsgCreateCertificate) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateCertificate proto.InternalMessageInfo + +func (m *MsgCreateCertificate) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgCreateCertificate) GetCert() []byte { + if m != nil { + return m.Cert + } + return nil +} + +func (m *MsgCreateCertificate) GetPubkey() []byte { + if m != nil { + return m.Pubkey + } + return nil +} + +// MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. +type MsgCreateCertificateResponse struct { +} + +func (m *MsgCreateCertificateResponse) Reset() { *m = MsgCreateCertificateResponse{} } +func (m *MsgCreateCertificateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateCertificateResponse) ProtoMessage() {} +func (*MsgCreateCertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{4} +} +func (m *MsgCreateCertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateCertificateResponse.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 *MsgCreateCertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateCertificateResponse.Merge(m, src) +} +func (m *MsgCreateCertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateCertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateCertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateCertificateResponse proto.InternalMessageInfo + +// MsgRevokeCertificate defines an SDK message for revoking certificate +type MsgRevokeCertificate struct { + ID CertificateID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgRevokeCertificate) Reset() { *m = MsgRevokeCertificate{} } +func (m *MsgRevokeCertificate) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeCertificate) ProtoMessage() {} +func (*MsgRevokeCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{5} +} +func (m *MsgRevokeCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeCertificate.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 *MsgRevokeCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeCertificate.Merge(m, src) +} +func (m *MsgRevokeCertificate) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeCertificate proto.InternalMessageInfo + +func (m *MsgRevokeCertificate) GetID() CertificateID { + if m != nil { + return m.ID + } + return CertificateID{} +} + +// MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. +type MsgRevokeCertificateResponse struct { +} + +func (m *MsgRevokeCertificateResponse) Reset() { *m = MsgRevokeCertificateResponse{} } +func (m *MsgRevokeCertificateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeCertificateResponse) ProtoMessage() {} +func (*MsgRevokeCertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1bfc773547637d6c, []int{6} +} +func (m *MsgRevokeCertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeCertificateResponse.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 *MsgRevokeCertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeCertificateResponse.Merge(m, src) +} +func (m *MsgRevokeCertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeCertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeCertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeCertificateResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("akash.cert.v1beta2.Certificate_State", Certificate_State_name, Certificate_State_value) + proto.RegisterType((*CertificateID)(nil), "akash.cert.v1beta2.CertificateID") + proto.RegisterType((*Certificate)(nil), "akash.cert.v1beta2.Certificate") + proto.RegisterType((*CertificateFilter)(nil), "akash.cert.v1beta2.CertificateFilter") + proto.RegisterType((*MsgCreateCertificate)(nil), "akash.cert.v1beta2.MsgCreateCertificate") + proto.RegisterType((*MsgCreateCertificateResponse)(nil), "akash.cert.v1beta2.MsgCreateCertificateResponse") + proto.RegisterType((*MsgRevokeCertificate)(nil), "akash.cert.v1beta2.MsgRevokeCertificate") + proto.RegisterType((*MsgRevokeCertificateResponse)(nil), "akash.cert.v1beta2.MsgRevokeCertificateResponse") +} + +func init() { proto.RegisterFile("akash/cert/v1beta2/cert.proto", fileDescriptor_1bfc773547637d6c) } + +var fileDescriptor_1bfc773547637d6c = []byte{ + // 581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0xb5, 0x9d, 0xa4, 0xa5, 0x97, 0x16, 0xa5, 0x56, 0x44, 0x83, 0x4b, 0x7d, 0xe1, 0x10, 0x52, + 0x24, 0x84, 0x0d, 0xe9, 0x80, 0x94, 0x31, 0x8d, 0x90, 0x32, 0x54, 0x02, 0x23, 0x75, 0x60, 0x73, + 0xe2, 0xc3, 0x3d, 0x25, 0xf5, 0x45, 0xb6, 0x9b, 0xaa, 0x03, 0x62, 0x45, 0x99, 0x18, 0x59, 0x22, + 0x55, 0xe2, 0x07, 0xc0, 0xaf, 0x40, 0x1d, 0x3b, 0x32, 0x59, 0x28, 0x19, 0x40, 0x19, 0xf3, 0x0b, + 0x90, 0xbf, 0x73, 0x14, 0x57, 0x49, 0xa0, 0x5d, 0xd8, 0xfc, 0xbe, 0xf7, 0xee, 0xbe, 0xf7, 0xfc, + 0x2c, 0xa3, 0x3d, 0xbb, 0x63, 0x07, 0xc7, 0x66, 0x9b, 0xfa, 0xa1, 0xd9, 0x7f, 0xde, 0xa2, 0xa1, + 0x5d, 0x05, 0x60, 0xf4, 0x7c, 0x1e, 0x72, 0x55, 0x05, 0xda, 0x80, 0x49, 0x42, 0x6b, 0x45, 0x97, + 0xbb, 0x1c, 0x68, 0x33, 0x7e, 0x12, 0x4a, 0xf2, 0x01, 0x6d, 0x1d, 0x50, 0x3f, 0x64, 0xef, 0x58, + 0xdb, 0x0e, 0x69, 0xb3, 0xa1, 0x9a, 0x28, 0xc7, 0xcf, 0x3c, 0xea, 0x97, 0xe4, 0xb2, 0x5c, 0xd9, + 0xa8, 0xdf, 0x9f, 0x44, 0x58, 0x0c, 0xa6, 0x11, 0xde, 0x3c, 0xb7, 0x4f, 0xba, 0x35, 0x02, 0x90, + 0x58, 0x62, 0xac, 0xee, 0xa3, 0xb5, 0x80, 0xfa, 0xcc, 0xee, 0x96, 0x14, 0x38, 0xb1, 0x3b, 0x89, + 0x70, 0x32, 0x99, 0x46, 0x78, 0x4b, 0x1c, 0x11, 0x98, 0x58, 0x09, 0x51, 0xbb, 0xf3, 0xf9, 0x02, + 0x4b, 0xbf, 0x2f, 0xb0, 0x44, 0xbe, 0x2b, 0x28, 0x9f, 0x72, 0xa0, 0x1e, 0xa1, 0x5c, 0x10, 0xda, + 0x21, 0x85, 0xdb, 0xee, 0x56, 0x1f, 0x1b, 0x8b, 0x51, 0x8c, 0x94, 0xde, 0x78, 0x13, 0x8b, 0x85, + 0x4d, 0x38, 0x37, 0xb7, 0x09, 0x90, 0x58, 0x62, 0xac, 0x3e, 0x41, 0xd9, 0xf8, 0x8e, 0x52, 0xa6, + 0x2c, 0x57, 0x36, 0xeb, 0x3b, 0x93, 0x08, 0x03, 0x9e, 0x46, 0x38, 0x2f, 0xe4, 0x31, 0x22, 0x16, + 0x0c, 0xe3, 0x4c, 0xbd, 0xd3, 0x56, 0x87, 0x9e, 0x97, 0xb2, 0x20, 0x87, 0x4c, 0x62, 0x32, 0xcf, + 0x24, 0x30, 0xb1, 0x12, 0x82, 0xbc, 0x47, 0x39, 0x30, 0xa3, 0x56, 0xd0, 0x3a, 0xf3, 0xfa, 0x76, + 0x97, 0x39, 0x05, 0x49, 0xdb, 0x1d, 0x0c, 0xcb, 0x3b, 0x29, 0xc3, 0x20, 0x69, 0x0a, 0x5a, 0xc5, + 0x28, 0x27, 0x74, 0xb2, 0x56, 0x1c, 0x0c, 0xcb, 0x85, 0x94, 0xee, 0x08, 0x04, 0x8f, 0xd0, 0xba, + 0x4f, 0xfb, 0xbc, 0x43, 0x9d, 0x82, 0xa2, 0xdd, 0x1b, 0x0c, 0xcb, 0x6a, 0x4a, 0x62, 0x09, 0x46, + 0xcb, 0x7e, 0xfc, 0xa2, 0x4b, 0xe4, 0x9b, 0x8c, 0xb6, 0x53, 0xe4, 0x4b, 0xd6, 0x0d, 0xa9, 0xff, + 0x7f, 0xea, 0x8c, 0xb7, 0x88, 0xd2, 0x32, 0xf3, 0x2d, 0x7f, 0x6b, 0xa3, 0x96, 0x85, 0xee, 0xbf, + 0xca, 0xa8, 0x78, 0x18, 0xb8, 0x07, 0x3e, 0xb5, 0x43, 0x9a, 0xfe, 0x08, 0x6e, 0xed, 0x7a, 0xd6, + 0xae, 0x72, 0xbb, 0x76, 0x33, 0x37, 0x6e, 0x37, 0x71, 0xac, 0xa3, 0x07, 0xcb, 0x0c, 0x5b, 0x34, + 0xe8, 0x71, 0x2f, 0xa0, 0xc4, 0x83, 0x40, 0xa2, 0x98, 0x74, 0xa0, 0x57, 0x48, 0x61, 0x0e, 0xa4, + 0xc9, 0x57, 0x1f, 0xfe, 0xe3, 0x93, 0x6e, 0x36, 0xea, 0x7b, 0x97, 0x11, 0x96, 0x46, 0x11, 0x56, + 0x9a, 0x8d, 0x49, 0x84, 0x15, 0xe6, 0x4c, 0x23, 0xbc, 0x21, 0x7c, 0x31, 0x87, 0x58, 0x0a, 0x73, + 0xae, 0xf9, 0x59, 0xd8, 0x37, 0xf3, 0x53, 0xfd, 0x25, 0xa3, 0xcc, 0x61, 0xe0, 0xaa, 0x1c, 0x6d, + 0x2f, 0xbe, 0xe5, 0xca, 0x32, 0x23, 0xcb, 0xe2, 0x69, 0xcf, 0x6e, 0xaa, 0x9c, 0x2d, 0x8e, 0x17, + 0x2e, 0xbe, 0x85, 0x55, 0x0b, 0x17, 0x94, 0x2b, 0x17, 0xae, 0x4c, 0x5a, 0x7f, 0x7d, 0x39, 0xd2, + 0xe5, 0xab, 0x91, 0x2e, 0xff, 0x1c, 0xe9, 0xf2, 0xa7, 0xb1, 0x2e, 0x5d, 0x8d, 0x75, 0xe9, 0xc7, + 0x58, 0x97, 0xde, 0xbe, 0x70, 0x59, 0x78, 0x7c, 0xda, 0x32, 0xda, 0xfc, 0xc4, 0x84, 0x5b, 0x9f, + 0x7a, 0x34, 0x3c, 0xe3, 0x7e, 0x27, 0x41, 0x76, 0x8f, 0x99, 0x2e, 0x37, 0x3d, 0xee, 0xd0, 0x6b, + 0x3f, 0xd4, 0xd6, 0x1a, 0xfc, 0x22, 0xf7, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xac, 0xf1, 0x22, + 0xfa, 0x6d, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateCertificate defines a method to create new certificate given proper inputs. + CreateCertificate(ctx context.Context, in *MsgCreateCertificate, opts ...grpc.CallOption) (*MsgCreateCertificateResponse, error) + // RevokeCertificate defines a method to revoke the certificate + RevokeCertificate(ctx context.Context, in *MsgRevokeCertificate, opts ...grpc.CallOption) (*MsgRevokeCertificateResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateCertificate(ctx context.Context, in *MsgCreateCertificate, opts ...grpc.CallOption) (*MsgCreateCertificateResponse, error) { + out := new(MsgCreateCertificateResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta2.Msg/CreateCertificate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RevokeCertificate(ctx context.Context, in *MsgRevokeCertificate, opts ...grpc.CallOption) (*MsgRevokeCertificateResponse, error) { + out := new(MsgRevokeCertificateResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta2.Msg/RevokeCertificate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateCertificate defines a method to create new certificate given proper inputs. + CreateCertificate(context.Context, *MsgCreateCertificate) (*MsgCreateCertificateResponse, error) + // RevokeCertificate defines a method to revoke the certificate + RevokeCertificate(context.Context, *MsgRevokeCertificate) (*MsgRevokeCertificateResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateCertificate(ctx context.Context, req *MsgCreateCertificate) (*MsgCreateCertificateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented") +} +func (*UnimplementedMsgServer) RevokeCertificate(ctx context.Context, req *MsgRevokeCertificate) (*MsgRevokeCertificateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeCertificate not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateCertificate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta2.Msg/CreateCertificate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateCertificate(ctx, req.(*MsgCreateCertificate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RevokeCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevokeCertificate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RevokeCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta2.Msg/RevokeCertificate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RevokeCertificate(ctx, req.(*MsgRevokeCertificate)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.cert.v1beta2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateCertificate", + Handler: _Msg_CreateCertificate_Handler, + }, + { + MethodName: "RevokeCertificate", + Handler: _Msg_RevokeCertificate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/cert/v1beta2/cert.proto", +} + +func (m *CertificateID) 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 *CertificateID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintCert(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Certificate) 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 *Certificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Certificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintCert(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x22 + } + if len(m.Cert) > 0 { + i -= len(m.Cert) + copy(dAtA[i:], m.Cert) + i = encodeVarintCert(dAtA, i, uint64(len(m.Cert))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintCert(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func (m *CertificateFilter) 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 *CertificateFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintCert(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintCert(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateCertificate) 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 *MsgCreateCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintCert(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } + if len(m.Cert) > 0 { + i -= len(m.Cert) + copy(dAtA[i:], m.Cert) + i = encodeVarintCert(dAtA, i, uint64(len(m.Cert))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateCertificateResponse) 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 *MsgCreateCertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRevokeCertificate) 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 *MsgRevokeCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCert(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgRevokeCertificateResponse) 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 *MsgRevokeCertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintCert(dAtA []byte, offset int, v uint64) int { + offset -= sovCert(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CertificateID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *Certificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != 0 { + n += 1 + sovCert(uint64(m.State)) + } + l = len(m.Cert) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *CertificateFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *MsgCreateCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Cert) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *MsgCreateCertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRevokeCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovCert(uint64(l)) + return n +} + +func (m *MsgRevokeCertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovCert(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCert(x uint64) (n int) { + return sovCert(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CertificateID) 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 ErrIntOverflowCert + } + 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: CertificateID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Serial = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Certificate) 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 ErrIntOverflowCert + } + 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: Certificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Certificate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Certificate_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...) + if m.Cert == nil { + m.Cert = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateFilter) 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 ErrIntOverflowCert + } + 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: CertificateFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateFilter: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Serial = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateCertificate) 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 ErrIntOverflowCert + } + 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: MsgCreateCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateCertificate: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...) + if m.Cert == nil { + m.Cert = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateCertificateResponse) 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 ErrIntOverflowCert + } + 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: MsgCreateCertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeCertificate) 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 ErrIntOverflowCert + } + 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: MsgRevokeCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeCertificate: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeCertificateResponse) 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 ErrIntOverflowCert + } + 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: MsgRevokeCertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCert(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, ErrIntOverflowCert + } + 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, ErrIntOverflowCert + } + 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, ErrIntOverflowCert + } + 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, ErrInvalidLengthCert + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCert + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCert + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCert = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCert = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCert = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta2/codec.go b/go/node/cert/v1beta2/codec.go new file mode 100644 index 00000000..0689b574 --- /dev/null +++ b/go/node/cert/v1beta2/codec.go @@ -0,0 +1,43 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateCertificate{}, ModuleName+"/"+MsgTypeCreateCertificate, nil) + cdc.RegisterConcrete(&MsgRevokeCertificate{}, ModuleName+"/"+MsgTypeRevokeCertificate, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateCertificate{}, + &MsgRevokeCertificate{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/cert/v1beta2/errors.go b/go/node/cert/v1beta2/errors.go new file mode 100644 index 00000000..a8a76ce3 --- /dev/null +++ b/go/node/cert/v1beta2/errors.go @@ -0,0 +1,34 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + // ErrCertificateNotFound certificate not found + ErrCertificateNotFound = errors.New("certificate not found") + + // ErrInvalidAddress invalid trusted auditor address + ErrInvalidAddress = errors.New("invalid address") + + // ErrCertificateExists certificate already exists + ErrCertificateExists = errors.New("certificate exists") + + // ErrCertificateAlreadyRevoked certificate already revoked + ErrCertificateAlreadyRevoked = errors.New("certificate already revoked") + + // ErrInvalidSerialNumber invalid serial number + ErrInvalidSerialNumber = errors.New("invalid serial number") + + // ErrInvalidCertificateValue certificate content is not valid + ErrInvalidCertificateValue = errors.New("invalid certificate value") + + // ErrInvalidPubkeyValue public key is not valid + ErrInvalidPubkeyValue = errors.New("invalid pubkey value") + + // ErrInvalidState invalid certificate state + ErrInvalidState = errors.New("invalid state") + + // ErrInvalidKeySize invalid certificate state + ErrInvalidKeySize = errors.New("invalid key size") +) diff --git a/go/node/cert/v1beta2/genesis.go b/go/node/cert/v1beta2/genesis.go new file mode 100644 index 00000000..fb866daf --- /dev/null +++ b/go/node/cert/v1beta2/genesis.go @@ -0,0 +1,58 @@ +package v1beta2 + +import ( + "bytes" + "encoding/json" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type GenesisCertificates []GenesisCertificate + +func (obj GenesisCertificates) Contains(cert GenesisCertificate) bool { + for _, c := range obj { + if c.Owner == cert.Owner { + return true + } + + if bytes.Equal(c.Certificate.Cert, cert.Certificate.Cert) { + return true + } + } + + return false +} + +func (m GenesisCertificate) Validate() error { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + return err + } + if err := m.Certificate.Validate(owner); err != nil { + return err + } + + return nil +} + +func (m *GenesisState) Validate() error { + for _, cert := range m.Certificates { + if err := cert.Validate(); err != nil { + return err + } + } + return nil +} + +// GetGenesisStateFromAppState returns x/cert GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { + var genesisState GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return &genesisState +} diff --git a/go/node/cert/v1beta2/genesis.pb.go b/go/node/cert/v1beta2/genesis.pb.go new file mode 100644 index 00000000..07dc877f --- /dev/null +++ b/go/node/cert/v1beta2/genesis.pb.go @@ -0,0 +1,561 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisCertificate defines certificate entry at genesis +type GenesisCertificate struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Certificate Certificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate" yaml:"certificate"` +} + +func (m *GenesisCertificate) Reset() { *m = GenesisCertificate{} } +func (m *GenesisCertificate) String() string { return proto.CompactTextString(m) } +func (*GenesisCertificate) ProtoMessage() {} +func (*GenesisCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_1cd7023feaa22f4a, []int{0} +} +func (m *GenesisCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisCertificate.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 *GenesisCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisCertificate.Merge(m, src) +} +func (m *GenesisCertificate) XXX_Size() int { + return m.Size() +} +func (m *GenesisCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisCertificate proto.InternalMessageInfo + +func (m *GenesisCertificate) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *GenesisCertificate) GetCertificate() Certificate { + if m != nil { + return m.Certificate + } + return Certificate{} +} + +// GenesisState defines the basic genesis state used by cert module +type GenesisState struct { + Certificates GenesisCertificates `protobuf:"bytes,1,rep,name=certificates,proto3,castrepeated=GenesisCertificates" json:"certificates" yaml:"certificates"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_1cd7023feaa22f4a, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetCertificates() GenesisCertificates { + if m != nil { + return m.Certificates + } + return nil +} + +func init() { + proto.RegisterType((*GenesisCertificate)(nil), "akash.cert.v1beta2.GenesisCertificate") + proto.RegisterType((*GenesisState)(nil), "akash.cert.v1beta2.GenesisState") +} + +func init() { proto.RegisterFile("akash/cert/v1beta2/genesis.proto", fileDescriptor_1cd7023feaa22f4a) } + +var fileDescriptor_1cd7023feaa22f4a = []byte{ + // 320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4e, 0x2d, 0x2a, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x4f, + 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, + 0xd0, 0x03, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x92, 0xc5, 0xa2, 0x0b, 0xac, 0x00, 0xac, 0x45, 0x4a, + 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xcc, 0xd4, 0x07, 0xb1, 0x20, 0xa2, 0x4a, 0x9b, 0x19, 0xb9, 0x84, + 0xdc, 0x21, 0x46, 0x3b, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x0a, 0xe9, + 0x73, 0xb1, 0xe6, 0x97, 0xe7, 0xa5, 0x16, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x49, 0xbe, + 0xba, 0x27, 0x0f, 0x11, 0xf8, 0x74, 0x4f, 0x9e, 0xa7, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0xcc, + 0x55, 0x0a, 0x82, 0x08, 0x0b, 0xe5, 0x70, 0x71, 0x27, 0x23, 0xf4, 0x4b, 0x30, 0x29, 0x30, 0x6a, + 0x70, 0x1b, 0xc9, 0xeb, 0x61, 0x3a, 0x53, 0x0f, 0xc9, 0x1a, 0x27, 0xcd, 0x13, 0xf7, 0xe4, 0x19, + 0x5e, 0xdd, 0x93, 0x47, 0xd6, 0xfb, 0xe9, 0x9e, 0xbc, 0x10, 0xc4, 0x06, 0x24, 0x41, 0xa5, 0x20, + 0x64, 0x25, 0x4a, 0xf3, 0x19, 0xb9, 0x78, 0xa0, 0xae, 0x0e, 0x2e, 0x01, 0xb9, 0xb7, 0x8f, 0x91, + 0x8b, 0x07, 0x49, 0x41, 0xb1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x1a, 0x36, 0x07, 0x60, + 0x7a, 0xd7, 0xc9, 0x09, 0xea, 0x0e, 0x14, 0x33, 0x3e, 0xdd, 0x93, 0x17, 0xc6, 0x70, 0x48, 0xb1, + 0xd2, 0xaa, 0xfb, 0xf2, 0xc2, 0x98, 0x46, 0x14, 0x07, 0xa1, 0xe8, 0x75, 0x0a, 0x3c, 0xf1, 0x48, + 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, + 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xf3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, + 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xeb, 0x74, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, 0xbc, + 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0x94, 0xb8, 0x4c, 0x62, 0x03, + 0xc7, 0x98, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xfa, 0xf6, 0xbf, 0x38, 0x1e, 0x02, 0x00, 0x00, +} + +func (m *GenesisCertificate) 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 *GenesisCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Certificate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Certificates) > 0 { + for iNdEx := len(m.Certificates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Certificates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Certificate.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Certificates) > 0 { + for _, e := range m.Certificates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisCertificate) 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 ErrIntOverflowGenesis + } + 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: GenesisCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisCertificate: 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) + } + 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", 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 + } + if err := m.Certificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificates", 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.Certificates = append(m.Certificates, GenesisCertificate{}) + if err := m.Certificates[len(m.Certificates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta2/key.go b/go/node/cert/v1beta2/key.go new file mode 100644 index 00000000..97f23e3b --- /dev/null +++ b/go/node/cert/v1beta2/key.go @@ -0,0 +1,16 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "cert" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) + +func PrefixCertificateID() []byte { + return []byte{0x01} +} diff --git a/go/node/cert/v1beta2/msgs.go b/go/node/cert/v1beta2/msgs.go new file mode 100644 index 00000000..de1abb2f --- /dev/null +++ b/go/node/cert/v1beta2/msgs.go @@ -0,0 +1,98 @@ +package v1beta2 + +import ( + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + MsgTypeCreateCertificate = "cert-create-certificate" + MsgTypeRevokeCertificate = "cert-revoke-certificate" +) + +var ( + _ sdk.Msg = &MsgCreateCertificate{} + _ sdk.Msg = &MsgRevokeCertificate{} +) + +// ====MsgCreateCertificate==== +// Route implements the sdk.Msg interface +func (m MsgCreateCertificate) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgCreateCertificate) Type() string { + return MsgTypeCreateCertificate +} + +// ValidateBasic does basic validation +func (m MsgCreateCertificate) ValidateBasic() error { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + _, err = ParseAndValidateCertificate(owner, m.Cert, m.Pubkey) + if err != nil { + return err + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgCreateCertificate) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgCreateCertificate) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ====MsgRevokeCertificate==== +// Route implements the sdk.Msg interface +func (m MsgRevokeCertificate) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgRevokeCertificate) Type() string { + return MsgTypeRevokeCertificate +} + +// ValidateBasic does basic validation +func (m MsgRevokeCertificate) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.ID.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgRevoke: Invalid Owner Address") + } + + if _, valid := new(big.Int).SetString(m.ID.Serial, 10); !valid { + return ErrInvalidSerialNumber + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgRevokeCertificate) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgRevokeCertificate) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(m.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} diff --git a/go/node/cert/v1beta2/query.pb.go b/go/node/cert/v1beta2/query.pb.go new file mode 100644 index 00000000..ef2d3ea0 --- /dev/null +++ b/go/node/cert/v1beta2/query.pb.go @@ -0,0 +1,954 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// CertificateResponse contains a single X509 certificate and its serial number +type CertificateResponse struct { + Certificate Certificate `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate" yaml:"certificate"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` +} + +func (m *CertificateResponse) Reset() { *m = CertificateResponse{} } +func (m *CertificateResponse) String() string { return proto.CompactTextString(m) } +func (*CertificateResponse) ProtoMessage() {} +func (*CertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_56dee19acb66f387, []int{0} +} +func (m *CertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateResponse.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 *CertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateResponse.Merge(m, src) +} +func (m *CertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *CertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateResponse proto.InternalMessageInfo + +func (m *CertificateResponse) GetCertificate() Certificate { + if m != nil { + return m.Certificate + } + return Certificate{} +} + +func (m *CertificateResponse) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +type QueryCertificatesRequest struct { + Filter CertificateFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCertificatesRequest) Reset() { *m = QueryCertificatesRequest{} } +func (m *QueryCertificatesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCertificatesRequest) ProtoMessage() {} +func (*QueryCertificatesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_56dee19acb66f387, []int{1} +} +func (m *QueryCertificatesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCertificatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCertificatesRequest.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 *QueryCertificatesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCertificatesRequest.Merge(m, src) +} +func (m *QueryCertificatesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCertificatesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCertificatesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCertificatesRequest proto.InternalMessageInfo + +func (m *QueryCertificatesRequest) GetFilter() CertificateFilter { + if m != nil { + return m.Filter + } + return CertificateFilter{} +} + +func (m *QueryCertificatesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryCertificatesResponse is response type for the Query/Certificates RPC method +type QueryCertificatesResponse struct { + Certificates CertificatesResponse `protobuf:"bytes,1,rep,name=certificates,proto3,castrepeated=CertificatesResponse" json:"certificates"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCertificatesResponse) Reset() { *m = QueryCertificatesResponse{} } +func (m *QueryCertificatesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCertificatesResponse) ProtoMessage() {} +func (*QueryCertificatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_56dee19acb66f387, []int{2} +} +func (m *QueryCertificatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCertificatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCertificatesResponse.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 *QueryCertificatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCertificatesResponse.Merge(m, src) +} +func (m *QueryCertificatesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCertificatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCertificatesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCertificatesResponse proto.InternalMessageInfo + +func (m *QueryCertificatesResponse) GetCertificates() CertificatesResponse { + if m != nil { + return m.Certificates + } + return nil +} + +func (m *QueryCertificatesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*CertificateResponse)(nil), "akash.cert.v1beta2.CertificateResponse") + proto.RegisterType((*QueryCertificatesRequest)(nil), "akash.cert.v1beta2.QueryCertificatesRequest") + proto.RegisterType((*QueryCertificatesResponse)(nil), "akash.cert.v1beta2.QueryCertificatesResponse") +} + +func init() { proto.RegisterFile("akash/cert/v1beta2/query.proto", fileDescriptor_56dee19acb66f387) } + +var fileDescriptor_56dee19acb66f387 = []byte{ + // 486 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0xc7, 0xeb, 0x01, 0x95, 0x70, 0xc7, 0xc5, 0xec, 0x50, 0xca, 0x48, 0xaa, 0x48, 0xa3, 0x05, + 0x51, 0x5b, 0x4b, 0x0f, 0x48, 0x1c, 0x33, 0x69, 0x5c, 0x59, 0x8e, 0xdc, 0xdc, 0xf0, 0x2d, 0xb3, + 0x96, 0xc6, 0x5d, 0xec, 0x82, 0x76, 0xe5, 0x09, 0x90, 0xb8, 0x71, 0x46, 0x42, 0xe2, 0x09, 0x78, + 0x84, 0xdd, 0x98, 0xc4, 0x85, 0x53, 0x40, 0x2d, 0xa7, 0x1d, 0xf7, 0x04, 0x28, 0x8e, 0xd1, 0x3c, + 0x35, 0xa8, 0xbb, 0xc5, 0xfe, 0x7f, 0xff, 0xcf, 0xbf, 0xff, 0xe7, 0x18, 0x7b, 0xfc, 0x98, 0xab, + 0x23, 0x96, 0x40, 0xa1, 0xd9, 0xdb, 0xdd, 0x09, 0x68, 0x1e, 0xb2, 0x93, 0x39, 0x14, 0xa7, 0x74, + 0x56, 0x48, 0x2d, 0x09, 0x31, 0x3a, 0xad, 0x74, 0x6a, 0xf5, 0xde, 0x56, 0x2a, 0x53, 0x69, 0x64, + 0x56, 0x7d, 0xd5, 0x95, 0xbd, 0xed, 0x54, 0xca, 0x34, 0x03, 0xc6, 0x67, 0x82, 0xf1, 0x3c, 0x97, + 0x9a, 0x6b, 0x21, 0x73, 0x65, 0xd5, 0xa7, 0x89, 0x54, 0x53, 0xa9, 0xd8, 0x84, 0x2b, 0xa8, 0x0f, + 0xb0, 0xc7, 0xed, 0xb2, 0x19, 0x4f, 0x45, 0x6e, 0x8a, 0x6d, 0xed, 0xa3, 0x06, 0x26, 0x03, 0x60, + 0xe4, 0xe0, 0x1b, 0xc2, 0xf7, 0xf7, 0xa0, 0xd0, 0xe2, 0x50, 0x24, 0x5c, 0x43, 0x0c, 0x6a, 0x26, + 0x73, 0x05, 0x24, 0xc3, 0x9d, 0xe4, 0x6a, 0xbb, 0x8b, 0xfa, 0x68, 0xd8, 0x09, 0x7d, 0xba, 0x1a, + 0x80, 0x3a, 0xee, 0xe8, 0xc9, 0x59, 0xe9, 0xb7, 0x2e, 0x4a, 0xdf, 0xf5, 0x5e, 0x96, 0x3e, 0x39, + 0xe5, 0xd3, 0xec, 0x45, 0xe0, 0x6c, 0x06, 0xb1, 0x5b, 0x42, 0xc6, 0xb8, 0xad, 0xa0, 0x10, 0x3c, + 0xeb, 0x6e, 0xf4, 0xd1, 0xf0, 0x6e, 0xf4, 0xf0, 0xa2, 0xf4, 0xed, 0xce, 0x65, 0xe9, 0xdf, 0xab, + 0xed, 0xf5, 0x3a, 0x88, 0xad, 0x10, 0x7c, 0x41, 0xb8, 0x7b, 0x50, 0x85, 0x77, 0x08, 0x54, 0x0c, + 0x27, 0x73, 0x50, 0x9a, 0xec, 0xe1, 0xf6, 0xa1, 0xc8, 0x34, 0x14, 0x16, 0x7d, 0x67, 0x0d, 0xfa, + 0xbe, 0x29, 0x8e, 0x6e, 0x57, 0x01, 0x62, 0x6b, 0x25, 0xfb, 0x18, 0x5f, 0xcd, 0xd3, 0xa0, 0x75, + 0xc2, 0xc7, 0xb4, 0x1e, 0x3e, 0xad, 0x86, 0x4f, 0xeb, 0xdb, 0xb5, 0xc3, 0xa7, 0xaf, 0x78, 0x0a, + 0x16, 0x20, 0x76, 0x9c, 0xc1, 0x77, 0x84, 0x1f, 0x34, 0x90, 0xda, 0x51, 0x0b, 0xbc, 0xe9, 0xcc, + 0x42, 0x75, 0x51, 0xff, 0xd6, 0xb0, 0x13, 0x0e, 0xd6, 0x00, 0xff, 0xb3, 0x47, 0xdb, 0x15, 0xf2, + 0xd7, 0x5f, 0xfe, 0x56, 0x53, 0xf3, 0xf8, 0x5a, 0x6b, 0xf2, 0xb2, 0x21, 0xd0, 0x60, 0x6d, 0x20, + 0xdb, 0xca, 0xb1, 0x86, 0x9f, 0x11, 0xbe, 0x63, 0x12, 0x91, 0x4f, 0x08, 0x6f, 0xba, 0x27, 0x93, + 0x67, 0x4d, 0xe0, 0xff, 0xbb, 0xa7, 0xde, 0xe8, 0x86, 0xd5, 0x35, 0x43, 0x30, 0x7a, 0xff, 0xe3, + 0xcf, 0xc7, 0x8d, 0x01, 0xd9, 0x61, 0x2b, 0xbf, 0xf5, 0x98, 0xb9, 0x51, 0x59, 0x26, 0x94, 0x8e, + 0x0e, 0xce, 0x16, 0x1e, 0x3a, 0x5f, 0x78, 0xe8, 0xf7, 0xc2, 0x43, 0x1f, 0x96, 0x5e, 0xeb, 0x7c, + 0xe9, 0xb5, 0x7e, 0x2e, 0xbd, 0xd6, 0xeb, 0xe7, 0xa9, 0xd0, 0x47, 0xf3, 0x09, 0x4d, 0xe4, 0xb4, + 0x6e, 0x35, 0xca, 0x41, 0xbf, 0x93, 0xc5, 0xb1, 0x5d, 0x55, 0x0f, 0x2f, 0x95, 0x2c, 0x97, 0x6f, + 0xe0, 0xda, 0xdb, 0x99, 0xb4, 0xcd, 0xbb, 0x19, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xf4, + 0xa0, 0xc2, 0xec, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Certificates queries certificates + Certificates(ctx context.Context, in *QueryCertificatesRequest, opts ...grpc.CallOption) (*QueryCertificatesResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Certificates(ctx context.Context, in *QueryCertificatesRequest, opts ...grpc.CallOption) (*QueryCertificatesResponse, error) { + out := new(QueryCertificatesResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta2.Query/Certificates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Certificates queries certificates + Certificates(context.Context, *QueryCertificatesRequest) (*QueryCertificatesResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Certificates(ctx context.Context, req *QueryCertificatesRequest) (*QueryCertificatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Certificates not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Certificates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCertificatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Certificates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta2.Query/Certificates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Certificates(ctx, req.(*QueryCertificatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.cert.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Certificates", + Handler: _Query_Certificates_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/cert/v1beta2/query.proto", +} + +func (m *CertificateResponse) 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 *CertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Certificate.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 *QueryCertificatesRequest) 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 *QueryCertificatesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCertificatesRequest) 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 + } + { + size, err := m.Filter.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 *QueryCertificatesResponse) 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 *QueryCertificatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCertificatesResponse) 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.Certificates) > 0 { + for iNdEx := len(m.Certificates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Certificates[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 *CertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Certificate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCertificatesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filter.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCertificatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Certificates) > 0 { + for _, e := range m.Certificates { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CertificateResponse) 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: CertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", 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.Certificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", 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.Serial = 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 *QueryCertificatesRequest) 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: QueryCertificatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCertificatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", 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.Filter.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) + } + 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 *QueryCertificatesResponse) 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: QueryCertificatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCertificatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificates", 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.Certificates = append(m.Certificates, CertificateResponse{}) + if err := m.Certificates[len(m.Certificates)-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) + } + 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.PageResponse{} + } + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta2/query.pb.gw.go b/go/node/cert/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..7db88065 --- /dev/null +++ b/go/node/cert/v1beta2/query.pb.gw.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/cert/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Certificates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCertificatesRequest + 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_Certificates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Certificates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCertificatesRequest + 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_Certificates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Certificates(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Certificates_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_Certificates_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_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Certificates_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_Certificates_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_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Certificates_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/cert/v1beta2/types.go b/go/node/cert/v1beta2/types.go new file mode 100644 index 00000000..38b541f7 --- /dev/null +++ b/go/node/cert/v1beta2/types.go @@ -0,0 +1,70 @@ +package v1beta2 + +import ( + "bytes" + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + PemBlkTypeCertificate = "CERTIFICATE" + PemBlkTypeECPrivateKey = "EC PRIVATE KEY" + PemBlkTypeECPublicKey = "EC PUBLIC KEY" +) + +type CertID struct { + Owner sdk.Address + Serial big.Int +} + +func ToCertID(id CertificateID) (CertID, error) { + addr, err := sdk.AccAddressFromBech32(id.Owner) + if err != nil { + return CertID{}, err + } + + serial, valid := new(big.Int).SetString(id.Serial, 10) + if !valid { + return CertID{}, ErrInvalidSerialNumber + } + + return CertID{ + Owner: addr, + Serial: *serial, + }, nil +} + +// Certificates is the collection of Certificate +type Certificates []Certificate + +type CertificatesResponse []CertificateResponse + +// String implements the Stringer interface for a Certificates object. +func (obj Certificates) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +func (obj Certificates) Contains(cert Certificate) bool { + for _, c := range obj { + // fixme is bytes.Equal right way to do it? + if bytes.Equal(c.Cert, cert.Cert) { + return true + } + } + + return false +} diff --git a/go/node/cert/v1beta3/cert.go b/go/node/cert/v1beta3/cert.go new file mode 100644 index 00000000..404d14f7 --- /dev/null +++ b/go/node/cert/v1beta3/cert.go @@ -0,0 +1,71 @@ +package v1beta3 + +import ( + "crypto/x509" + "encoding/pem" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +func ParseAndValidateCertificate(owner sdk.Address, crt, pub []byte) (*x509.Certificate, error) { + blk, rest := pem.Decode(pub) + if blk == nil || len(rest) > 0 { + return nil, ErrInvalidPubkeyValue + } + + if blk.Type != PemBlkTypeECPublicKey { + return nil, errors.Wrap(ErrInvalidPubkeyValue, "invalid pem block type") + } + + blk, rest = pem.Decode(crt) + if blk == nil || len(rest) > 0 { + return nil, ErrInvalidCertificateValue + } + + if blk.Type != PemBlkTypeCertificate { + return nil, errors.Wrap(ErrInvalidCertificateValue, "invalid pem block type") + } + + cert, err := x509.ParseCertificate(blk.Bytes) + if err != nil { + return nil, err + } + + cowner, err := sdk.AccAddressFromBech32(cert.Subject.CommonName) + if err != nil { + return nil, errors.Wrap(ErrInvalidCertificateValue, err.Error()) + } + + if !owner.Equals(cowner) { + return nil, errors.Wrap(ErrInvalidCertificateValue, "CommonName does not match owner") + } + + return cert, nil +} + +func (m *CertificateID) String() string { + return fmt.Sprintf("%s/%s", m.Owner, m.Serial) +} + +func (m *CertificateID) Equals(val CertificateID) bool { + return (m.Owner == val.Owner) && (m.Serial == val.Serial) +} + +func (m Certificate) Validate(owner sdk.Address) error { + if val, exists := Certificate_State_name[int32(m.State)]; !exists || val == "invalid" { + return ErrInvalidState + } + + _, err := ParseAndValidateCertificate(owner, m.Cert, m.Pubkey) + if err != nil { + return err + } + + return nil +} + +func (m Certificate) IsState(state Certificate_State) bool { + return m.State == state +} diff --git a/go/node/cert/v1beta3/cert.pb.go b/go/node/cert/v1beta3/cert.pb.go new file mode 100644 index 00000000..4e1493c5 --- /dev/null +++ b/go/node/cert/v1beta3/cert.pb.go @@ -0,0 +1,1775 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta3/cert.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// State is an enum which refers to state of deployment +type Certificate_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + CertificateStateInvalid Certificate_State = 0 + // CertificateValid denotes state for deployment active + CertificateValid Certificate_State = 1 + // CertificateRevoked denotes state for deployment closed + CertificateRevoked Certificate_State = 2 +) + +var Certificate_State_name = map[int32]string{ + 0: "invalid", + 1: "valid", + 2: "revoked", +} + +var Certificate_State_value = map[string]int32{ + "invalid": 0, + "valid": 1, + "revoked": 2, +} + +func (x Certificate_State) String() string { + return proto.EnumName(Certificate_State_name, int32(x)) +} + +func (Certificate_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{1, 0} +} + +// CertificateID stores owner and sequence number +type CertificateID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` +} + +func (m *CertificateID) Reset() { *m = CertificateID{} } +func (*CertificateID) ProtoMessage() {} +func (*CertificateID) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{0} +} +func (m *CertificateID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateID.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 *CertificateID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateID.Merge(m, src) +} +func (m *CertificateID) XXX_Size() int { + return m.Size() +} +func (m *CertificateID) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateID.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateID proto.InternalMessageInfo + +func (m *CertificateID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *CertificateID) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +// Certificate stores state, certificate and it's public key +type Certificate struct { + State Certificate_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.cert.v1beta3.Certificate_State" json:"state" yaml:"state"` + Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert" yaml:"cert"` + Pubkey []byte `protobuf:"bytes,4,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` +} + +func (m *Certificate) Reset() { *m = Certificate{} } +func (m *Certificate) String() string { return proto.CompactTextString(m) } +func (*Certificate) ProtoMessage() {} +func (*Certificate) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{1} +} +func (m *Certificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Certificate.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 *Certificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_Certificate.Merge(m, src) +} +func (m *Certificate) XXX_Size() int { + return m.Size() +} +func (m *Certificate) XXX_DiscardUnknown() { + xxx_messageInfo_Certificate.DiscardUnknown(m) +} + +var xxx_messageInfo_Certificate proto.InternalMessageInfo + +func (m *Certificate) GetState() Certificate_State { + if m != nil { + return m.State + } + return CertificateStateInvalid +} + +func (m *Certificate) GetCert() []byte { + if m != nil { + return m.Cert + } + return nil +} + +func (m *Certificate) GetPubkey() []byte { + if m != nil { + return m.Pubkey + } + return nil +} + +// CertificateFilter defines filters used to filter certificates +type CertificateFilter struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *CertificateFilter) Reset() { *m = CertificateFilter{} } +func (m *CertificateFilter) String() string { return proto.CompactTextString(m) } +func (*CertificateFilter) ProtoMessage() {} +func (*CertificateFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{2} +} +func (m *CertificateFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateFilter.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 *CertificateFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateFilter.Merge(m, src) +} +func (m *CertificateFilter) XXX_Size() int { + return m.Size() +} +func (m *CertificateFilter) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateFilter proto.InternalMessageInfo + +func (m *CertificateFilter) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *CertificateFilter) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +func (m *CertificateFilter) GetState() string { + if m != nil { + return m.State + } + return "" +} + +// MsgCreateCertificate defines an SDK message for creating certificate +type MsgCreateCertificate struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Cert []byte `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert" yaml:"cert"` + Pubkey []byte `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` +} + +func (m *MsgCreateCertificate) Reset() { *m = MsgCreateCertificate{} } +func (m *MsgCreateCertificate) String() string { return proto.CompactTextString(m) } +func (*MsgCreateCertificate) ProtoMessage() {} +func (*MsgCreateCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{3} +} +func (m *MsgCreateCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateCertificate.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 *MsgCreateCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateCertificate.Merge(m, src) +} +func (m *MsgCreateCertificate) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateCertificate proto.InternalMessageInfo + +func (m *MsgCreateCertificate) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgCreateCertificate) GetCert() []byte { + if m != nil { + return m.Cert + } + return nil +} + +func (m *MsgCreateCertificate) GetPubkey() []byte { + if m != nil { + return m.Pubkey + } + return nil +} + +// MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. +type MsgCreateCertificateResponse struct { +} + +func (m *MsgCreateCertificateResponse) Reset() { *m = MsgCreateCertificateResponse{} } +func (m *MsgCreateCertificateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateCertificateResponse) ProtoMessage() {} +func (*MsgCreateCertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{4} +} +func (m *MsgCreateCertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateCertificateResponse.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 *MsgCreateCertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateCertificateResponse.Merge(m, src) +} +func (m *MsgCreateCertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateCertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateCertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateCertificateResponse proto.InternalMessageInfo + +// MsgRevokeCertificate defines an SDK message for revoking certificate +type MsgRevokeCertificate struct { + ID CertificateID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgRevokeCertificate) Reset() { *m = MsgRevokeCertificate{} } +func (m *MsgRevokeCertificate) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeCertificate) ProtoMessage() {} +func (*MsgRevokeCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{5} +} +func (m *MsgRevokeCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeCertificate.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 *MsgRevokeCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeCertificate.Merge(m, src) +} +func (m *MsgRevokeCertificate) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeCertificate proto.InternalMessageInfo + +func (m *MsgRevokeCertificate) GetID() CertificateID { + if m != nil { + return m.ID + } + return CertificateID{} +} + +// MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. +type MsgRevokeCertificateResponse struct { +} + +func (m *MsgRevokeCertificateResponse) Reset() { *m = MsgRevokeCertificateResponse{} } +func (m *MsgRevokeCertificateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRevokeCertificateResponse) ProtoMessage() {} +func (*MsgRevokeCertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a906cf3717502e3d, []int{6} +} +func (m *MsgRevokeCertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRevokeCertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRevokeCertificateResponse.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 *MsgRevokeCertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRevokeCertificateResponse.Merge(m, src) +} +func (m *MsgRevokeCertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRevokeCertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRevokeCertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRevokeCertificateResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("akash.cert.v1beta3.Certificate_State", Certificate_State_name, Certificate_State_value) + proto.RegisterType((*CertificateID)(nil), "akash.cert.v1beta3.CertificateID") + proto.RegisterType((*Certificate)(nil), "akash.cert.v1beta3.Certificate") + proto.RegisterType((*CertificateFilter)(nil), "akash.cert.v1beta3.CertificateFilter") + proto.RegisterType((*MsgCreateCertificate)(nil), "akash.cert.v1beta3.MsgCreateCertificate") + proto.RegisterType((*MsgCreateCertificateResponse)(nil), "akash.cert.v1beta3.MsgCreateCertificateResponse") + proto.RegisterType((*MsgRevokeCertificate)(nil), "akash.cert.v1beta3.MsgRevokeCertificate") + proto.RegisterType((*MsgRevokeCertificateResponse)(nil), "akash.cert.v1beta3.MsgRevokeCertificateResponse") +} + +func init() { proto.RegisterFile("akash/cert/v1beta3/cert.proto", fileDescriptor_a906cf3717502e3d) } + +var fileDescriptor_a906cf3717502e3d = []byte{ + // 581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0xb5, 0x9d, 0xa4, 0xa5, 0xd7, 0x16, 0xa5, 0x56, 0x44, 0x83, 0x4b, 0x7d, 0xe1, 0x10, 0x52, + 0x24, 0x84, 0x0d, 0xc9, 0x80, 0x94, 0x31, 0x8d, 0x90, 0x32, 0x54, 0x02, 0x23, 0x75, 0x60, 0x73, + 0xe2, 0xc3, 0x3d, 0x25, 0xf5, 0x45, 0xb6, 0x9b, 0xaa, 0x03, 0x62, 0x45, 0x99, 0x18, 0x59, 0x22, + 0x55, 0xe2, 0x07, 0xc0, 0xaf, 0x40, 0x1d, 0x3b, 0x32, 0x59, 0x28, 0x19, 0x40, 0x19, 0xf3, 0x0b, + 0x90, 0xbf, 0x73, 0x14, 0x57, 0x49, 0xa0, 0x5d, 0xd8, 0xfc, 0xbe, 0xf7, 0xee, 0xbe, 0xf7, 0xfc, + 0x2c, 0xa3, 0x7d, 0xbb, 0x63, 0x07, 0xc7, 0x66, 0x9b, 0xfa, 0xa1, 0xd9, 0x7f, 0xde, 0xa2, 0xa1, + 0x5d, 0x05, 0x60, 0xf4, 0x7c, 0x1e, 0x72, 0x55, 0x05, 0xda, 0x80, 0x49, 0x42, 0x6b, 0x05, 0x97, + 0xbb, 0x1c, 0x68, 0x33, 0x7e, 0x12, 0x4a, 0xf2, 0x01, 0x6d, 0x1f, 0x50, 0x3f, 0x64, 0xef, 0x58, + 0xdb, 0x0e, 0x69, 0xb3, 0xa1, 0x9a, 0x28, 0xc7, 0xcf, 0x3c, 0xea, 0x17, 0xe5, 0x92, 0x5c, 0xde, + 0xa8, 0xdf, 0x9f, 0x44, 0x58, 0x0c, 0xa6, 0x11, 0xde, 0x3a, 0xb7, 0x4f, 0xba, 0x35, 0x02, 0x90, + 0x58, 0x62, 0xac, 0x56, 0xd1, 0x5a, 0x40, 0x7d, 0x66, 0x77, 0x8b, 0x0a, 0x9c, 0xd8, 0x9b, 0x44, + 0x38, 0x99, 0x4c, 0x23, 0xbc, 0x2d, 0x8e, 0x08, 0x4c, 0xac, 0x84, 0xa8, 0xdd, 0xf9, 0x7c, 0x81, + 0xa5, 0xdf, 0x17, 0x58, 0x22, 0xdf, 0x15, 0xb4, 0x99, 0x72, 0xa0, 0x1e, 0xa1, 0x5c, 0x10, 0xda, + 0x21, 0x85, 0xdb, 0xee, 0x56, 0x1e, 0x1b, 0x8b, 0x51, 0x8c, 0x94, 0xde, 0x78, 0x13, 0x8b, 0x85, + 0x4d, 0x38, 0x37, 0xb7, 0x09, 0x90, 0x58, 0x62, 0xac, 0x3e, 0x41, 0xd9, 0xf8, 0x8e, 0x62, 0xa6, + 0x24, 0x97, 0xb7, 0xea, 0xbb, 0x93, 0x08, 0x03, 0x9e, 0x46, 0x78, 0x53, 0xc8, 0x63, 0x44, 0x2c, + 0x18, 0xc6, 0x99, 0x7a, 0xa7, 0xad, 0x0e, 0x3d, 0x2f, 0x66, 0x41, 0x0e, 0x99, 0xc4, 0x64, 0x9e, + 0x49, 0x60, 0x62, 0x25, 0x04, 0x79, 0x8f, 0x72, 0x60, 0x46, 0x2d, 0xa3, 0x75, 0xe6, 0xf5, 0xed, + 0x2e, 0x73, 0xf2, 0x92, 0xb6, 0x37, 0x18, 0x96, 0x76, 0x53, 0x86, 0x41, 0xd2, 0x14, 0xb4, 0x8a, + 0x51, 0x4e, 0xe8, 0x64, 0xad, 0x30, 0x18, 0x96, 0xf2, 0x29, 0xdd, 0x11, 0x08, 0x1e, 0xa1, 0x75, + 0x9f, 0xf6, 0x79, 0x87, 0x3a, 0x79, 0x45, 0xbb, 0x37, 0x18, 0x96, 0xd4, 0x94, 0xc4, 0x12, 0x8c, + 0x96, 0xfd, 0xf8, 0x45, 0x97, 0xc8, 0x37, 0x19, 0xed, 0xa4, 0xc8, 0x97, 0xac, 0x1b, 0x52, 0xff, + 0xff, 0xd4, 0x19, 0x6f, 0x11, 0xa5, 0x65, 0xe6, 0x5b, 0xfe, 0xd6, 0x46, 0x2d, 0x0b, 0xdd, 0x7f, + 0x95, 0x51, 0xe1, 0x30, 0x70, 0x0f, 0x7c, 0x6a, 0x87, 0x34, 0xfd, 0x11, 0xdc, 0xda, 0xf5, 0xac, + 0x5d, 0xe5, 0x76, 0xed, 0x66, 0x6e, 0xdc, 0x6e, 0xe2, 0x58, 0x47, 0x0f, 0x96, 0x19, 0xb6, 0x68, + 0xd0, 0xe3, 0x5e, 0x40, 0x89, 0x07, 0x81, 0x44, 0x31, 0xe9, 0x40, 0xaf, 0x90, 0xc2, 0x1c, 0x48, + 0xb3, 0x59, 0x79, 0xf8, 0x8f, 0x4f, 0xba, 0xd9, 0xa8, 0xef, 0x5f, 0x46, 0x58, 0x1a, 0x45, 0x58, + 0x69, 0x36, 0x26, 0x11, 0x56, 0x98, 0x33, 0x8d, 0xf0, 0x86, 0xf0, 0xc5, 0x1c, 0x62, 0x29, 0xcc, + 0xb9, 0xe6, 0x67, 0x61, 0xdf, 0xcc, 0x4f, 0xe5, 0x97, 0x8c, 0x32, 0x87, 0x81, 0xab, 0x72, 0xb4, + 0xb3, 0xf8, 0x96, 0xcb, 0xcb, 0x8c, 0x2c, 0x8b, 0xa7, 0x3d, 0xbb, 0xa9, 0x72, 0xb6, 0x38, 0x5e, + 0xb8, 0xf8, 0x16, 0x56, 0x2d, 0x5c, 0x50, 0xae, 0x5c, 0xb8, 0x32, 0x69, 0xfd, 0xf5, 0xe5, 0x48, + 0x97, 0xaf, 0x46, 0xba, 0xfc, 0x73, 0xa4, 0xcb, 0x9f, 0xc6, 0xba, 0x74, 0x35, 0xd6, 0xa5, 0x1f, + 0x63, 0x5d, 0x7a, 0xfb, 0xc2, 0x65, 0xe1, 0xf1, 0x69, 0xcb, 0x68, 0xf3, 0x13, 0x13, 0x6e, 0x7d, + 0xea, 0xd1, 0xf0, 0x8c, 0xfb, 0x9d, 0x04, 0xd9, 0x3d, 0x66, 0xba, 0xdc, 0xf4, 0xb8, 0x43, 0xaf, + 0xfd, 0x50, 0x5b, 0x6b, 0xf0, 0x8b, 0xac, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x35, 0x32, + 0x11, 0x6d, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateCertificate defines a method to create new certificate given proper inputs. + CreateCertificate(ctx context.Context, in *MsgCreateCertificate, opts ...grpc.CallOption) (*MsgCreateCertificateResponse, error) + // RevokeCertificate defines a method to revoke the certificate + RevokeCertificate(ctx context.Context, in *MsgRevokeCertificate, opts ...grpc.CallOption) (*MsgRevokeCertificateResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateCertificate(ctx context.Context, in *MsgCreateCertificate, opts ...grpc.CallOption) (*MsgCreateCertificateResponse, error) { + out := new(MsgCreateCertificateResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta3.Msg/CreateCertificate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RevokeCertificate(ctx context.Context, in *MsgRevokeCertificate, opts ...grpc.CallOption) (*MsgRevokeCertificateResponse, error) { + out := new(MsgRevokeCertificateResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta3.Msg/RevokeCertificate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateCertificate defines a method to create new certificate given proper inputs. + CreateCertificate(context.Context, *MsgCreateCertificate) (*MsgCreateCertificateResponse, error) + // RevokeCertificate defines a method to revoke the certificate + RevokeCertificate(context.Context, *MsgRevokeCertificate) (*MsgRevokeCertificateResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateCertificate(ctx context.Context, req *MsgCreateCertificate) (*MsgCreateCertificateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented") +} +func (*UnimplementedMsgServer) RevokeCertificate(ctx context.Context, req *MsgRevokeCertificate) (*MsgRevokeCertificateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeCertificate not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateCertificate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta3.Msg/CreateCertificate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateCertificate(ctx, req.(*MsgCreateCertificate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RevokeCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRevokeCertificate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RevokeCertificate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta3.Msg/RevokeCertificate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RevokeCertificate(ctx, req.(*MsgRevokeCertificate)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.cert.v1beta3.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateCertificate", + Handler: _Msg_CreateCertificate_Handler, + }, + { + MethodName: "RevokeCertificate", + Handler: _Msg_RevokeCertificate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/cert/v1beta3/cert.proto", +} + +func (m *CertificateID) 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 *CertificateID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintCert(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Certificate) 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 *Certificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Certificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintCert(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x22 + } + if len(m.Cert) > 0 { + i -= len(m.Cert) + copy(dAtA[i:], m.Cert) + i = encodeVarintCert(dAtA, i, uint64(len(m.Cert))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintCert(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func (m *CertificateFilter) 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 *CertificateFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintCert(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintCert(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateCertificate) 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 *MsgCreateCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintCert(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } + if len(m.Cert) > 0 { + i -= len(m.Cert) + copy(dAtA[i:], m.Cert) + i = encodeVarintCert(dAtA, i, uint64(len(m.Cert))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintCert(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateCertificateResponse) 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 *MsgCreateCertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRevokeCertificate) 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 *MsgRevokeCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCert(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgRevokeCertificateResponse) 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 *MsgRevokeCertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRevokeCertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintCert(dAtA []byte, offset int, v uint64) int { + offset -= sovCert(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CertificateID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *Certificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != 0 { + n += 1 + sovCert(uint64(m.State)) + } + l = len(m.Cert) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *CertificateFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *MsgCreateCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Cert) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovCert(uint64(l)) + } + return n +} + +func (m *MsgCreateCertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRevokeCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovCert(uint64(l)) + return n +} + +func (m *MsgRevokeCertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovCert(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCert(x uint64) (n int) { + return sovCert(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CertificateID) 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 ErrIntOverflowCert + } + 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: CertificateID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Serial = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Certificate) 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 ErrIntOverflowCert + } + 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: Certificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Certificate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Certificate_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...) + if m.Cert == nil { + m.Cert = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateFilter) 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 ErrIntOverflowCert + } + 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: CertificateFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateFilter: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Serial = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateCertificate) 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 ErrIntOverflowCert + } + 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: MsgCreateCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateCertificate: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + 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 ErrInvalidLengthCert + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...) + if m.Cert == nil { + m.Cert = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = append(m.Pubkey[:0], dAtA[iNdEx:postIndex]...) + if m.Pubkey == nil { + m.Pubkey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateCertificateResponse) 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 ErrIntOverflowCert + } + 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: MsgCreateCertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeCertificate) 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 ErrIntOverflowCert + } + 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: MsgRevokeCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeCertificate: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCert + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCert + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCert + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRevokeCertificateResponse) 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 ErrIntOverflowCert + } + 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: MsgRevokeCertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRevokeCertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCert(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCert + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCert(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, ErrIntOverflowCert + } + 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, ErrIntOverflowCert + } + 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, ErrIntOverflowCert + } + 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, ErrInvalidLengthCert + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCert + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCert + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCert = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCert = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCert = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta3/codec.go b/go/node/cert/v1beta3/codec.go new file mode 100644 index 00000000..faef3ce3 --- /dev/null +++ b/go/node/cert/v1beta3/codec.go @@ -0,0 +1,43 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateCertificate{}, ModuleName+"/"+MsgTypeCreateCertificate, nil) + cdc.RegisterConcrete(&MsgRevokeCertificate{}, ModuleName+"/"+MsgTypeRevokeCertificate, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateCertificate{}, + &MsgRevokeCertificate{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/cert/v1beta3/errors.go b/go/node/cert/v1beta3/errors.go new file mode 100644 index 00000000..16142033 --- /dev/null +++ b/go/node/cert/v1beta3/errors.go @@ -0,0 +1,46 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errCertificateNotFound uint32 = iota + 1 + errInvalidAddress + errCertificateExists + errCertificateAlreadyRevoked + errInvalidSerialNumber + errInvalidCertificateValue + errInvalidPubkeyValue + errInvalidState + errInvalidKeySize +) + +var ( + // ErrCertificateNotFound certificate not found + ErrCertificateNotFound = sdkerrors.Register(ModuleName, errCertificateNotFound, "certificate not found") + + // ErrInvalidAddress invalid trusted auditor address + ErrInvalidAddress = sdkerrors.Register(ModuleName, errInvalidAddress, "invalid address") + + // ErrCertificateExists certificate already exists + ErrCertificateExists = sdkerrors.Register(ModuleName, errCertificateExists, "certificate exists") + + // ErrCertificateAlreadyRevoked certificate already revoked + ErrCertificateAlreadyRevoked = sdkerrors.Register(ModuleName, errCertificateAlreadyRevoked, "certificate already revoked") + + // ErrInvalidSerialNumber invalid serial number + ErrInvalidSerialNumber = sdkerrors.Register(ModuleName, errInvalidSerialNumber, "invalid serial number") + + // ErrInvalidCertificateValue certificate content is not valid + ErrInvalidCertificateValue = sdkerrors.Register(ModuleName, errInvalidCertificateValue, "invalid certificate value") + + // ErrInvalidPubkeyValue public key is not valid + ErrInvalidPubkeyValue = sdkerrors.Register(ModuleName, errInvalidPubkeyValue, "invalid pubkey value") + + // ErrInvalidState invalid certificate state + ErrInvalidState = sdkerrors.Register(ModuleName, errInvalidState, "invalid state") + + // ErrInvalidKeySize invalid certificate state + ErrInvalidKeySize = sdkerrors.Register(ModuleName, errInvalidKeySize, "invalid key size") +) diff --git a/go/node/cert/v1beta3/genesis.go b/go/node/cert/v1beta3/genesis.go new file mode 100644 index 00000000..9b49f8cc --- /dev/null +++ b/go/node/cert/v1beta3/genesis.go @@ -0,0 +1,58 @@ +package v1beta3 + +import ( + "bytes" + "encoding/json" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type GenesisCertificates []GenesisCertificate + +func (obj GenesisCertificates) Contains(cert GenesisCertificate) bool { + for _, c := range obj { + if c.Owner == cert.Owner { + return true + } + + if bytes.Equal(c.Certificate.Cert, cert.Certificate.Cert) { + return true + } + } + + return false +} + +func (m GenesisCertificate) Validate() error { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + return err + } + if err := m.Certificate.Validate(owner); err != nil { + return err + } + + return nil +} + +func (m *GenesisState) Validate() error { + for _, cert := range m.Certificates { + if err := cert.Validate(); err != nil { + return err + } + } + return nil +} + +// GetGenesisStateFromAppState returns x/cert GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { + var genesisState GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return &genesisState +} diff --git a/go/node/cert/v1beta3/genesis.pb.go b/go/node/cert/v1beta3/genesis.pb.go new file mode 100644 index 00000000..1fb482a8 --- /dev/null +++ b/go/node/cert/v1beta3/genesis.pb.go @@ -0,0 +1,561 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisCertificate defines certificate entry at genesis +type GenesisCertificate struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + Certificate Certificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate" yaml:"certificate"` +} + +func (m *GenesisCertificate) Reset() { *m = GenesisCertificate{} } +func (m *GenesisCertificate) String() string { return proto.CompactTextString(m) } +func (*GenesisCertificate) ProtoMessage() {} +func (*GenesisCertificate) Descriptor() ([]byte, []int) { + return fileDescriptor_b9698bf259a960a0, []int{0} +} +func (m *GenesisCertificate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisCertificate.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 *GenesisCertificate) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisCertificate.Merge(m, src) +} +func (m *GenesisCertificate) XXX_Size() int { + return m.Size() +} +func (m *GenesisCertificate) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisCertificate.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisCertificate proto.InternalMessageInfo + +func (m *GenesisCertificate) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *GenesisCertificate) GetCertificate() Certificate { + if m != nil { + return m.Certificate + } + return Certificate{} +} + +// GenesisState defines the basic genesis state used by cert module +type GenesisState struct { + Certificates GenesisCertificates `protobuf:"bytes,1,rep,name=certificates,proto3,castrepeated=GenesisCertificates" json:"certificates" yaml:"certificates"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_b9698bf259a960a0, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetCertificates() GenesisCertificates { + if m != nil { + return m.Certificates + } + return nil +} + +func init() { + proto.RegisterType((*GenesisCertificate)(nil), "akash.cert.v1beta3.GenesisCertificate") + proto.RegisterType((*GenesisState)(nil), "akash.cert.v1beta3.GenesisState") +} + +func init() { proto.RegisterFile("akash/cert/v1beta3/genesis.proto", fileDescriptor_b9698bf259a960a0) } + +var fileDescriptor_b9698bf259a960a0 = []byte{ + // 320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0x63, 0x10, 0x48, 0xb8, 0x9d, 0x5c, 0x86, 0x52, 0x09, 0x3b, 0xf2, 0x80, 0xca, 0x80, + 0x2d, 0xda, 0x01, 0x89, 0x31, 0x0c, 0xcc, 0x94, 0x8d, 0xcd, 0x0d, 0x26, 0x8d, 0xda, 0xc6, 0x55, + 0x6c, 0xa8, 0xb8, 0x04, 0xe2, 0x06, 0xec, 0xac, 0x5c, 0xa2, 0x63, 0x47, 0x26, 0x83, 0xda, 0xad, + 0x63, 0x4f, 0x80, 0xe2, 0x44, 0x22, 0x51, 0xba, 0xf9, 0x7f, 0x7a, 0xef, 0xfd, 0x9f, 0xf5, 0x43, + 0x5f, 0x8c, 0x85, 0x1e, 0xf1, 0x50, 0xa6, 0x86, 0xbf, 0x5c, 0x0e, 0xa5, 0x11, 0x7d, 0x1e, 0xc9, + 0x44, 0xea, 0x58, 0xb3, 0x59, 0xaa, 0x8c, 0x42, 0xc8, 0x39, 0x58, 0xe6, 0x60, 0x85, 0xa3, 0x73, + 0xba, 0x23, 0xe5, 0x0c, 0x2e, 0xd2, 0x39, 0x8e, 0x54, 0xa4, 0xdc, 0x93, 0x67, 0xaf, 0x5c, 0xa5, + 0x5f, 0x00, 0xa2, 0xdb, 0xbc, 0xfa, 0x46, 0xa6, 0x26, 0x7e, 0x8a, 0x43, 0x61, 0x24, 0xe2, 0xf0, + 0x40, 0xcd, 0x13, 0x99, 0xb6, 0x81, 0x0f, 0xba, 0x47, 0xc1, 0xc9, 0xc6, 0x92, 0x5c, 0xd8, 0x5a, + 0xd2, 0x7c, 0x15, 0xd3, 0xc9, 0x35, 0x75, 0x23, 0x1d, 0xe4, 0x32, 0x9a, 0xc0, 0x46, 0xf8, 0x9f, + 0x6f, 0xef, 0xf9, 0xa0, 0xdb, 0xe8, 0x11, 0x56, 0xc7, 0x64, 0xa5, 0x35, 0xc1, 0xf9, 0xc2, 0x12, + 0x6f, 0x63, 0x49, 0x39, 0xbb, 0xb5, 0x04, 0xe5, 0x1b, 0x4a, 0x22, 0x1d, 0x94, 0x2d, 0xf4, 0x03, + 0xc0, 0x66, 0x41, 0x7d, 0x6f, 0x32, 0xde, 0x37, 0x00, 0x9b, 0x25, 0x83, 0x6e, 0x03, 0x7f, 0xbf, + 0xdb, 0xe8, 0x9d, 0xed, 0x02, 0xa8, 0x7f, 0x37, 0x08, 0x0a, 0x8e, 0x4a, 0xc7, 0xd6, 0x92, 0x56, + 0x0d, 0x44, 0xd3, 0xcf, 0x1f, 0xd2, 0xaa, 0x57, 0xe8, 0x41, 0x25, 0x1b, 0xdc, 0x2d, 0x56, 0x18, + 0x2c, 0x57, 0x18, 0xfc, 0xae, 0x30, 0x78, 0x5f, 0x63, 0x6f, 0xb9, 0xc6, 0xde, 0xf7, 0x1a, 0x7b, + 0x0f, 0x57, 0x51, 0x6c, 0x46, 0xcf, 0x43, 0x16, 0xaa, 0x29, 0x77, 0x74, 0x17, 0x89, 0x34, 0x73, + 0x95, 0x8e, 0x8b, 0x49, 0xcc, 0x62, 0x1e, 0x29, 0x9e, 0xa8, 0x47, 0x59, 0xb9, 0xe5, 0xf0, 0xd0, + 0x5d, 0xac, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x86, 0x5f, 0x41, 0xfe, 0x1e, 0x02, 0x00, 0x00, +} + +func (m *GenesisCertificate) 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 *GenesisCertificate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Certificate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Certificates) > 0 { + for iNdEx := len(m.Certificates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Certificates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisCertificate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Certificate.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Certificates) > 0 { + for _, e := range m.Certificates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisCertificate) 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 ErrIntOverflowGenesis + } + 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: GenesisCertificate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisCertificate: 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) + } + 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", 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 + } + if err := m.Certificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificates", 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.Certificates = append(m.Certificates, GenesisCertificate{}) + if err := m.Certificates[len(m.Certificates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta3/key.go b/go/node/cert/v1beta3/key.go new file mode 100644 index 00000000..ace5bb82 --- /dev/null +++ b/go/node/cert/v1beta3/key.go @@ -0,0 +1,16 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "cert" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) + +func PrefixCertificateID() []byte { + return []byte{0x01} +} diff --git a/go/node/cert/v1beta3/msgs.go b/go/node/cert/v1beta3/msgs.go new file mode 100644 index 00000000..86dd0d94 --- /dev/null +++ b/go/node/cert/v1beta3/msgs.go @@ -0,0 +1,98 @@ +package v1beta3 + +import ( + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + MsgTypeCreateCertificate = "cert-create-certificate" + MsgTypeRevokeCertificate = "cert-revoke-certificate" +) + +var ( + _ sdk.Msg = &MsgCreateCertificate{} + _ sdk.Msg = &MsgRevokeCertificate{} +) + +// ====MsgCreateCertificate==== +// Route implements the sdk.Msg interface +func (m MsgCreateCertificate) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgCreateCertificate) Type() string { + return MsgTypeCreateCertificate +} + +// ValidateBasic does basic validation +func (m MsgCreateCertificate) ValidateBasic() error { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + } + + _, err = ParseAndValidateCertificate(owner, m.Cert, m.Pubkey) + if err != nil { + return err + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgCreateCertificate) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgCreateCertificate) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(m.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ====MsgRevokeCertificate==== +// Route implements the sdk.Msg interface +func (m MsgRevokeCertificate) Route() string { + return RouterKey +} + +// Type implements the sdk.Msg interface +func (m MsgRevokeCertificate) Type() string { + return MsgTypeRevokeCertificate +} + +// ValidateBasic does basic validation +func (m MsgRevokeCertificate) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.ID.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgRevoke: Invalid Owner Address") + } + + if _, valid := new(big.Int).SetString(m.ID.Serial, 10); !valid { + return ErrInvalidSerialNumber + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (m MsgRevokeCertificate) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners defines whose signature is required +func (m MsgRevokeCertificate) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(m.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} diff --git a/go/node/cert/v1beta3/query.pb.go b/go/node/cert/v1beta3/query.pb.go new file mode 100644 index 00000000..98b0aa8f --- /dev/null +++ b/go/node/cert/v1beta3/query.pb.go @@ -0,0 +1,954 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// CertificateResponse contains a single X509 certificate and its serial number +type CertificateResponse struct { + Certificate Certificate `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate" yaml:"certificate"` + Serial string `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial" yaml:"serial"` +} + +func (m *CertificateResponse) Reset() { *m = CertificateResponse{} } +func (m *CertificateResponse) String() string { return proto.CompactTextString(m) } +func (*CertificateResponse) ProtoMessage() {} +func (*CertificateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bbd23f37f87a8be, []int{0} +} +func (m *CertificateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CertificateResponse.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 *CertificateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateResponse.Merge(m, src) +} +func (m *CertificateResponse) XXX_Size() int { + return m.Size() +} +func (m *CertificateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateResponse proto.InternalMessageInfo + +func (m *CertificateResponse) GetCertificate() Certificate { + if m != nil { + return m.Certificate + } + return Certificate{} +} + +func (m *CertificateResponse) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +type QueryCertificatesRequest struct { + Filter CertificateFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCertificatesRequest) Reset() { *m = QueryCertificatesRequest{} } +func (m *QueryCertificatesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCertificatesRequest) ProtoMessage() {} +func (*QueryCertificatesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bbd23f37f87a8be, []int{1} +} +func (m *QueryCertificatesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCertificatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCertificatesRequest.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 *QueryCertificatesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCertificatesRequest.Merge(m, src) +} +func (m *QueryCertificatesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCertificatesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCertificatesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCertificatesRequest proto.InternalMessageInfo + +func (m *QueryCertificatesRequest) GetFilter() CertificateFilter { + if m != nil { + return m.Filter + } + return CertificateFilter{} +} + +func (m *QueryCertificatesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryCertificatesResponse is response type for the Query/Certificates RPC method +type QueryCertificatesResponse struct { + Certificates CertificatesResponse `protobuf:"bytes,1,rep,name=certificates,proto3,castrepeated=CertificatesResponse" json:"certificates"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCertificatesResponse) Reset() { *m = QueryCertificatesResponse{} } +func (m *QueryCertificatesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCertificatesResponse) ProtoMessage() {} +func (*QueryCertificatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bbd23f37f87a8be, []int{2} +} +func (m *QueryCertificatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCertificatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCertificatesResponse.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 *QueryCertificatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCertificatesResponse.Merge(m, src) +} +func (m *QueryCertificatesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCertificatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCertificatesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCertificatesResponse proto.InternalMessageInfo + +func (m *QueryCertificatesResponse) GetCertificates() CertificatesResponse { + if m != nil { + return m.Certificates + } + return nil +} + +func (m *QueryCertificatesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*CertificateResponse)(nil), "akash.cert.v1beta3.CertificateResponse") + proto.RegisterType((*QueryCertificatesRequest)(nil), "akash.cert.v1beta3.QueryCertificatesRequest") + proto.RegisterType((*QueryCertificatesResponse)(nil), "akash.cert.v1beta3.QueryCertificatesResponse") +} + +func init() { proto.RegisterFile("akash/cert/v1beta3/query.proto", fileDescriptor_2bbd23f37f87a8be) } + +var fileDescriptor_2bbd23f37f87a8be = []byte{ + // 485 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0x05, 0x22, 0x71, 0x29, 0xcb, 0xd1, 0x21, 0x84, 0x62, 0x47, 0x96, 0x4a, 0x02, + 0x22, 0x77, 0x6a, 0x32, 0x20, 0x31, 0xba, 0x52, 0x59, 0xa9, 0x47, 0xb6, 0x8b, 0x79, 0x75, 0x4f, + 0x75, 0x7c, 0xae, 0xef, 0x02, 0xea, 0xca, 0x27, 0x40, 0x62, 0x63, 0x46, 0x42, 0xe2, 0x13, 0xf0, + 0x11, 0xba, 0x51, 0x89, 0x85, 0xc9, 0xa0, 0x84, 0xa9, 0x63, 0x3f, 0x01, 0xf2, 0xf9, 0xaa, 0x5e, + 0x85, 0xa3, 0xb0, 0xf9, 0xde, 0xff, 0xfd, 0xdf, 0xfb, 0xbd, 0x77, 0x3e, 0xec, 0xf1, 0x63, 0xae, + 0x8e, 0x58, 0x0c, 0x85, 0x66, 0x6f, 0x77, 0xa7, 0xa0, 0xf9, 0x84, 0x9d, 0xcc, 0xa1, 0x38, 0xa5, + 0x79, 0x21, 0xb5, 0x24, 0xc4, 0xe8, 0xb4, 0xd2, 0xa9, 0xd5, 0x7b, 0x5b, 0x89, 0x4c, 0xa4, 0x91, + 0x59, 0xf5, 0x55, 0x67, 0xf6, 0xb6, 0x13, 0x29, 0x93, 0x14, 0x18, 0xcf, 0x05, 0xe3, 0x59, 0x26, + 0x35, 0xd7, 0x42, 0x66, 0xca, 0xaa, 0x4f, 0x63, 0xa9, 0x66, 0x52, 0xb1, 0x29, 0x57, 0x50, 0x37, + 0xb0, 0xed, 0x76, 0x59, 0xce, 0x13, 0x91, 0x99, 0x64, 0x9b, 0xfb, 0xa8, 0x81, 0xc9, 0x00, 0x18, + 0x39, 0xf8, 0x86, 0xf0, 0xfd, 0x3d, 0x28, 0xb4, 0x38, 0x14, 0x31, 0xd7, 0x10, 0x81, 0xca, 0x65, + 0xa6, 0x80, 0xa4, 0xb8, 0x13, 0x5f, 0x87, 0xbb, 0xa8, 0x8f, 0x86, 0x9d, 0xb1, 0x4f, 0xff, 0x1d, + 0x80, 0x3a, 0xee, 0xf0, 0xc9, 0x59, 0xe9, 0xb7, 0x2e, 0x4a, 0xdf, 0xf5, 0x5e, 0x96, 0x3e, 0x39, + 0xe5, 0xb3, 0xf4, 0x45, 0xe0, 0x04, 0x83, 0xc8, 0x4d, 0x21, 0x13, 0xdc, 0x56, 0x50, 0x08, 0x9e, + 0x76, 0x37, 0xfa, 0x68, 0x78, 0x37, 0x7c, 0x78, 0x51, 0xfa, 0x36, 0x72, 0x59, 0xfa, 0xf7, 0x6a, + 0x7b, 0x7d, 0x0e, 0x22, 0x2b, 0x04, 0x5f, 0x10, 0xee, 0x1e, 0x54, 0xc3, 0x3b, 0x04, 0x2a, 0x82, + 0x93, 0x39, 0x28, 0x4d, 0xf6, 0x70, 0xfb, 0x50, 0xa4, 0x1a, 0x0a, 0x8b, 0xbe, 0xb3, 0x06, 0x7d, + 0xdf, 0x24, 0x87, 0xb7, 0xab, 0x01, 0x22, 0x6b, 0x25, 0xfb, 0x18, 0x5f, 0xef, 0xd3, 0xa0, 0x75, + 0xc6, 0x8f, 0x69, 0xbd, 0x7c, 0x5a, 0x2d, 0x9f, 0xd6, 0xb7, 0x6b, 0x97, 0x4f, 0x5f, 0xf1, 0x04, + 0x2c, 0x40, 0xe4, 0x38, 0x83, 0xef, 0x08, 0x3f, 0x68, 0x20, 0xb5, 0xab, 0x16, 0x78, 0xd3, 0xd9, + 0x85, 0xea, 0xa2, 0xfe, 0xad, 0x61, 0x67, 0x3c, 0x58, 0x03, 0x7c, 0x65, 0x0f, 0xb7, 0x2b, 0xe4, + 0xaf, 0xbf, 0xfc, 0xad, 0xa6, 0xe2, 0xd1, 0x8d, 0xd2, 0xe4, 0x65, 0xc3, 0x40, 0x83, 0xb5, 0x03, + 0xd9, 0x52, 0x8e, 0x75, 0xfc, 0x19, 0xe1, 0x3b, 0x66, 0x22, 0xf2, 0x09, 0xe1, 0x4d, 0xb7, 0x33, + 0x79, 0xd6, 0x04, 0xbe, 0xea, 0x9e, 0x7a, 0xa3, 0xff, 0xcc, 0xae, 0x19, 0x82, 0xd1, 0xfb, 0x1f, + 0x7f, 0x3e, 0x6e, 0x0c, 0xc8, 0x0e, 0x5b, 0xf1, 0x5b, 0x5f, 0x39, 0x58, 0x2a, 0x94, 0x0e, 0x0f, + 0xce, 0x16, 0x1e, 0x3a, 0x5f, 0x78, 0xe8, 0xf7, 0xc2, 0x43, 0x1f, 0x96, 0x5e, 0xeb, 0x7c, 0xe9, + 0xb5, 0x7e, 0x2e, 0xbd, 0xd6, 0xeb, 0xe7, 0x89, 0xd0, 0x47, 0xf3, 0x29, 0x8d, 0xe5, 0xac, 0x2e, + 0x35, 0xca, 0x40, 0xbf, 0x93, 0xc5, 0xb1, 0x3d, 0x55, 0x0f, 0x2f, 0x91, 0x2c, 0x93, 0x6f, 0xe0, + 0x46, 0x93, 0x69, 0xdb, 0xbc, 0x9b, 0xc9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x57, 0xec, + 0x65, 0xec, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Certificates queries certificates + Certificates(ctx context.Context, in *QueryCertificatesRequest, opts ...grpc.CallOption) (*QueryCertificatesResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Certificates(ctx context.Context, in *QueryCertificatesRequest, opts ...grpc.CallOption) (*QueryCertificatesResponse, error) { + out := new(QueryCertificatesResponse) + err := c.cc.Invoke(ctx, "/akash.cert.v1beta3.Query/Certificates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Certificates queries certificates + Certificates(context.Context, *QueryCertificatesRequest) (*QueryCertificatesResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Certificates(ctx context.Context, req *QueryCertificatesRequest) (*QueryCertificatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Certificates not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Certificates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCertificatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Certificates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.cert.v1beta3.Query/Certificates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Certificates(ctx, req.(*QueryCertificatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.cert.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Certificates", + Handler: _Query_Certificates_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/cert/v1beta3/query.proto", +} + +func (m *CertificateResponse) 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 *CertificateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Serial) > 0 { + i -= len(m.Serial) + copy(dAtA[i:], m.Serial) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Serial))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Certificate.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 *QueryCertificatesRequest) 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 *QueryCertificatesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCertificatesRequest) 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 + } + { + size, err := m.Filter.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 *QueryCertificatesResponse) 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 *QueryCertificatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCertificatesResponse) 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.Certificates) > 0 { + for iNdEx := len(m.Certificates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Certificates[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 *CertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Certificate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCertificatesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filter.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCertificatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Certificates) > 0 { + for _, e := range m.Certificates { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CertificateResponse) 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: CertificateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", 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.Certificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Serial", 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.Serial = 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 *QueryCertificatesRequest) 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: QueryCertificatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCertificatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", 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.Filter.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) + } + 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 *QueryCertificatesResponse) 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: QueryCertificatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCertificatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificates", 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.Certificates = append(m.Certificates, CertificateResponse{}) + if err := m.Certificates[len(m.Certificates)-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) + } + 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.PageResponse{} + } + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta3/query.pb.gw.go b/go/node/cert/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..0eb1a94b --- /dev/null +++ b/go/node/cert/v1beta3/query.pb.gw.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/cert/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Certificates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCertificatesRequest + 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_Certificates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Certificates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Certificates_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCertificatesRequest + 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_Certificates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Certificates(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Certificates_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_Certificates_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_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Certificates_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_Certificates_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_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Certificates_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/cert/v1beta3/types.go b/go/node/cert/v1beta3/types.go new file mode 100644 index 00000000..4402f697 --- /dev/null +++ b/go/node/cert/v1beta3/types.go @@ -0,0 +1,70 @@ +package v1beta3 + +import ( + "bytes" + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + PemBlkTypeCertificate = "CERTIFICATE" + PemBlkTypeECPrivateKey = "EC PRIVATE KEY" + PemBlkTypeECPublicKey = "EC PUBLIC KEY" +) + +type CertID struct { + Owner sdk.Address + Serial big.Int +} + +func ToCertID(id CertificateID) (CertID, error) { + addr, err := sdk.AccAddressFromBech32(id.Owner) + if err != nil { + return CertID{}, err + } + + serial, valid := new(big.Int).SetString(id.Serial, 10) + if !valid { + return CertID{}, ErrInvalidSerialNumber + } + + return CertID{ + Owner: addr, + Serial: *serial, + }, nil +} + +// Certificates is the collection of Certificate +type Certificates []Certificate + +type CertificatesResponse []CertificateResponse + +// String implements the Stringer interface for a Certificates object. +func (obj Certificates) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +func (obj Certificates) Contains(cert Certificate) bool { + for _, c := range obj { + // fixme is bytes.Equal right way to do it? + if bytes.Equal(c.Cert, cert.Cert) { + return true + } + } + + return false +} diff --git a/go/node/deployment/v1beta1/authz.pb.go b/go/node/deployment/v1beta1/authz.pb.go new file mode 100644 index 00000000..76c6f345 --- /dev/null +++ b/go/node/deployment/v1beta1/authz.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/authz.proto + +package v1beta1 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/regen-network/cosmos-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 + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +type DepositDeploymentAuthorization struct { + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + SpendLimit types.Coin `protobuf:"bytes,1,opt,name=spend_limit,json=spendLimit,proto3" json:"spend_limit"` +} + +func (m *DepositDeploymentAuthorization) Reset() { *m = DepositDeploymentAuthorization{} } +func (m *DepositDeploymentAuthorization) String() string { return proto.CompactTextString(m) } +func (*DepositDeploymentAuthorization) ProtoMessage() {} +func (*DepositDeploymentAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_a27e07d58aa17308, []int{0} +} +func (m *DepositDeploymentAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DepositDeploymentAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DepositDeploymentAuthorization.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 *DepositDeploymentAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositDeploymentAuthorization.Merge(m, src) +} +func (m *DepositDeploymentAuthorization) XXX_Size() int { + return m.Size() +} +func (m *DepositDeploymentAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_DepositDeploymentAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_DepositDeploymentAuthorization proto.InternalMessageInfo + +func (m *DepositDeploymentAuthorization) GetSpendLimit() types.Coin { + if m != nil { + return m.SpendLimit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*DepositDeploymentAuthorization)(nil), "akash.deployment.v1beta1.DepositDeploymentAuthorization") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/authz.proto", fileDescriptor_a27e07d58aa17308) +} + +var fileDescriptor_a27e07d58aa17308 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x92, 0x00, 0xab, 0xd2, 0x43, 0xa8, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, + 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x0e, 0xc2, 0xd3, 0x4f, 0x4a, 0x2c, 0x4e, 0x85, 0xdb, 0x95, + 0x9c, 0x9f, 0x99, 0x07, 0x91, 0x57, 0x6a, 0x61, 0xe4, 0x92, 0x73, 0x49, 0x2d, 0xc8, 0x2f, 0xce, + 0x2c, 0x71, 0x81, 0x5b, 0xe7, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x95, 0x58, 0x92, 0x99, + 0x9f, 0x27, 0xe4, 0xcf, 0xc5, 0x5d, 0x5c, 0x90, 0x9a, 0x97, 0x12, 0x9f, 0x93, 0x99, 0x9b, 0x59, + 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa9, 0x07, 0xb5, 0x06, 0x64, 0x30, 0xcc, 0x79, + 0x7a, 0xce, 0xf9, 0x99, 0x79, 0x4e, 0xc2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x8f, 0xac, + 0x2b, 0x88, 0x0b, 0xcc, 0xf1, 0x01, 0xb1, 0xad, 0x04, 0x2f, 0x6d, 0xd1, 0xe5, 0x45, 0xb1, 0xc3, + 0x29, 0xfc, 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, 0x6c, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0xc1, 0xa2, 0x9b, 0x97, 0x5a, 0x52, 0x9e, + 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, 0xa7, 0xa4, 0x62, + 0x09, 0xd6, 0x24, 0x36, 0xb0, 0x37, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x1e, 0xa4, + 0x62, 0x79, 0x01, 0x00, 0x00, +} + +func (m *DepositDeploymentAuthorization) 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 *DepositDeploymentAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DepositDeploymentAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SpendLimit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuthz(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthz(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DepositDeploymentAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SpendLimit.Size() + n += 1 + l + sovAuthz(uint64(l)) + return n +} + +func sovAuthz(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthz(x uint64) (n int) { + return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DepositDeploymentAuthorization) 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 ErrIntOverflowAuthz + } + 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: DepositDeploymentAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositDeploymentAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpendLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthz(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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrInvalidLengthAuthz + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthz + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthz + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/deployment.pb.go b/go/node/deployment/v1beta1/deployment.pb.go new file mode 100644 index 00000000..f9823d13 --- /dev/null +++ b/go/node/deployment/v1beta1/deployment.pb.go @@ -0,0 +1,2806 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/deployment.proto + +package v1beta1 + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// State is an enum which refers to state of deployment +type Deployment_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + DeploymentStateInvalid Deployment_State = 0 + // DeploymentActive denotes state for deployment active + DeploymentActive Deployment_State = 1 + // DeploymentClosed denotes state for deployment closed + DeploymentClosed Deployment_State = 2 +) + +var Deployment_State_name = map[int32]string{ + 0: "invalid", + 1: "active", + 2: "closed", +} + +var Deployment_State_value = map[string]int32{ + "invalid": 0, + "active": 1, + "closed": 2, +} + +func (x Deployment_State) String() string { + return proto.EnumName(Deployment_State_name, int32(x)) +} + +func (Deployment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{9, 0} +} + +// MsgCreateDeployment defines an SDK message for creating deployment +type MsgCreateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Groups []GroupSpec `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + Deposit types.Coin `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit" yaml:"deposit"` +} + +func (m *MsgCreateDeployment) Reset() { *m = MsgCreateDeployment{} } +func (m *MsgCreateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeployment) ProtoMessage() {} +func (*MsgCreateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{0} +} +func (m *MsgCreateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeployment.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 *MsgCreateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeployment.Merge(m, src) +} +func (m *MsgCreateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeployment proto.InternalMessageInfo + +func (m *MsgCreateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgCreateDeployment) GetGroups() []GroupSpec { + if m != nil { + return m.Groups + } + return nil +} + +func (m *MsgCreateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *MsgCreateDeployment) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgCreateDeploymentResponse struct { +} + +func (m *MsgCreateDeploymentResponse) Reset() { *m = MsgCreateDeploymentResponse{} } +func (m *MsgCreateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeploymentResponse) ProtoMessage() {} +func (*MsgCreateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{1} +} +func (m *MsgCreateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeploymentResponse.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 *MsgCreateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeploymentResponse.Merge(m, src) +} +func (m *MsgCreateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeploymentResponse proto.InternalMessageInfo + +// MsgDepositDeployment deposits more funds into the deposit account +type MsgDepositDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount" yaml:"amount"` +} + +func (m *MsgDepositDeployment) Reset() { *m = MsgDepositDeployment{} } +func (m *MsgDepositDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeployment) ProtoMessage() {} +func (*MsgDepositDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{2} +} +func (m *MsgDepositDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeployment.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 *MsgDepositDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeployment.Merge(m, src) +} +func (m *MsgDepositDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeployment proto.InternalMessageInfo + +func (m *MsgDepositDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgDepositDeployment) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgDepositDeploymentResponse struct { +} + +func (m *MsgDepositDeploymentResponse) Reset() { *m = MsgDepositDeploymentResponse{} } +func (m *MsgDepositDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeploymentResponse) ProtoMessage() {} +func (*MsgDepositDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{3} +} +func (m *MsgDepositDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeploymentResponse.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 *MsgDepositDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeploymentResponse.Merge(m, src) +} +func (m *MsgDepositDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeploymentResponse proto.InternalMessageInfo + +// MsgUpdateDeployment defines an SDK message for updating deployment +type MsgUpdateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Groups []GroupSpec `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` +} + +func (m *MsgUpdateDeployment) Reset() { *m = MsgUpdateDeployment{} } +func (m *MsgUpdateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeployment) ProtoMessage() {} +func (*MsgUpdateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{4} +} +func (m *MsgUpdateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeployment.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 *MsgUpdateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeployment.Merge(m, src) +} +func (m *MsgUpdateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeployment proto.InternalMessageInfo + +func (m *MsgUpdateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgUpdateDeployment) GetGroups() []GroupSpec { + if m != nil { + return m.Groups + } + return nil +} + +func (m *MsgUpdateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +type MsgUpdateDeploymentResponse struct { +} + +func (m *MsgUpdateDeploymentResponse) Reset() { *m = MsgUpdateDeploymentResponse{} } +func (m *MsgUpdateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeploymentResponse) ProtoMessage() {} +func (*MsgUpdateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{5} +} +func (m *MsgUpdateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeploymentResponse.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 *MsgUpdateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeploymentResponse.Merge(m, src) +} +func (m *MsgUpdateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeploymentResponse proto.InternalMessageInfo + +// MsgCloseDeployment defines an SDK message for closing deployment +type MsgCloseDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseDeployment) Reset() { *m = MsgCloseDeployment{} } +func (m *MsgCloseDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeployment) ProtoMessage() {} +func (*MsgCloseDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{6} +} +func (m *MsgCloseDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeployment.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 *MsgCloseDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeployment.Merge(m, src) +} +func (m *MsgCloseDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeployment proto.InternalMessageInfo + +func (m *MsgCloseDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +type MsgCloseDeploymentResponse struct { +} + +func (m *MsgCloseDeploymentResponse) Reset() { *m = MsgCloseDeploymentResponse{} } +func (m *MsgCloseDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeploymentResponse) ProtoMessage() {} +func (*MsgCloseDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{7} +} +func (m *MsgCloseDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeploymentResponse.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 *MsgCloseDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeploymentResponse.Merge(m, src) +} +func (m *MsgCloseDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeploymentResponse proto.InternalMessageInfo + +// DeploymentID stores owner and sequence number +type DeploymentID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` +} + +func (m *DeploymentID) Reset() { *m = DeploymentID{} } +func (*DeploymentID) ProtoMessage() {} +func (*DeploymentID) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{8} +} +func (m *DeploymentID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentID.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 *DeploymentID) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentID.Merge(m, src) +} +func (m *DeploymentID) XXX_Size() int { + return m.Size() +} +func (m *DeploymentID) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentID.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentID proto.InternalMessageInfo + +func (m *DeploymentID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +// Deployment stores deploymentID, state and version details +type Deployment struct { + DeploymentID DeploymentID `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"id" yaml:"id"` + State Deployment_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta1.Deployment_State" json:"state" yaml:"state"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Deployment) Reset() { *m = Deployment{} } +func (m *Deployment) String() string { return proto.CompactTextString(m) } +func (*Deployment) ProtoMessage() {} +func (*Deployment) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{9} +} +func (m *Deployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Deployment.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 *Deployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deployment.Merge(m, src) +} +func (m *Deployment) XXX_Size() int { + return m.Size() +} +func (m *Deployment) XXX_DiscardUnknown() { + xxx_messageInfo_Deployment.DiscardUnknown(m) +} + +var xxx_messageInfo_Deployment proto.InternalMessageInfo + +func (m *Deployment) GetDeploymentID() DeploymentID { + if m != nil { + return m.DeploymentID + } + return DeploymentID{} +} + +func (m *Deployment) GetState() Deployment_State { + if m != nil { + return m.State + } + return DeploymentStateInvalid +} + +func (m *Deployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *Deployment) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// DeploymentFilters defines filters used to filter deployments +type DeploymentFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *DeploymentFilters) Reset() { *m = DeploymentFilters{} } +func (m *DeploymentFilters) String() string { return proto.CompactTextString(m) } +func (*DeploymentFilters) ProtoMessage() {} +func (*DeploymentFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_bfe50ba12f1404bf, []int{10} +} +func (m *DeploymentFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentFilters.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 *DeploymentFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentFilters.Merge(m, src) +} +func (m *DeploymentFilters) XXX_Size() int { + return m.Size() +} +func (m *DeploymentFilters) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentFilters proto.InternalMessageInfo + +func (m *DeploymentFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *DeploymentFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta1.Deployment_State", Deployment_State_name, Deployment_State_value) + proto.RegisterType((*MsgCreateDeployment)(nil), "akash.deployment.v1beta1.MsgCreateDeployment") + proto.RegisterType((*MsgCreateDeploymentResponse)(nil), "akash.deployment.v1beta1.MsgCreateDeploymentResponse") + proto.RegisterType((*MsgDepositDeployment)(nil), "akash.deployment.v1beta1.MsgDepositDeployment") + proto.RegisterType((*MsgDepositDeploymentResponse)(nil), "akash.deployment.v1beta1.MsgDepositDeploymentResponse") + proto.RegisterType((*MsgUpdateDeployment)(nil), "akash.deployment.v1beta1.MsgUpdateDeployment") + proto.RegisterType((*MsgUpdateDeploymentResponse)(nil), "akash.deployment.v1beta1.MsgUpdateDeploymentResponse") + proto.RegisterType((*MsgCloseDeployment)(nil), "akash.deployment.v1beta1.MsgCloseDeployment") + proto.RegisterType((*MsgCloseDeploymentResponse)(nil), "akash.deployment.v1beta1.MsgCloseDeploymentResponse") + proto.RegisterType((*DeploymentID)(nil), "akash.deployment.v1beta1.DeploymentID") + proto.RegisterType((*Deployment)(nil), "akash.deployment.v1beta1.Deployment") + proto.RegisterType((*DeploymentFilters)(nil), "akash.deployment.v1beta1.DeploymentFilters") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/deployment.proto", fileDescriptor_bfe50ba12f1404bf) +} + +var fileDescriptor_bfe50ba12f1404bf = []byte{ + // 863 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xb6, 0x9d, 0x34, 0xa5, 0xd3, 0xec, 0x12, 0x4c, 0x85, 0xb2, 0x66, 0xe3, 0x09, 0x06, 0xd1, + 0x82, 0x58, 0x5b, 0x9b, 0xe5, 0x87, 0x54, 0x89, 0xc3, 0x66, 0x23, 0x50, 0x0e, 0x95, 0x90, 0xa3, + 0x05, 0x09, 0x90, 0x56, 0x4e, 0x3c, 0x78, 0xad, 0x4d, 0x3c, 0x8e, 0x67, 0x92, 0x6d, 0x41, 0xe2, + 0x0c, 0x3d, 0x71, 0xe4, 0x52, 0xa9, 0x12, 0xe2, 0xce, 0x95, 0xbf, 0x80, 0x1e, 0x7b, 0xe4, 0x64, + 0x41, 0x7a, 0x41, 0x39, 0xe6, 0x2f, 0x40, 0x9e, 0x71, 0xec, 0x34, 0xbf, 0x83, 0x54, 0x2e, 0x7b, + 0xcb, 0xbc, 0xf7, 0xbd, 0xf7, 0xbd, 0xf7, 0xcd, 0xcb, 0x1b, 0x83, 0x77, 0xac, 0x67, 0x16, 0x79, + 0x6a, 0xd8, 0xc8, 0x6f, 0xe3, 0x93, 0x0e, 0xf2, 0xa8, 0xd1, 0xbf, 0xdf, 0x44, 0xd4, 0xba, 0x3f, + 0x61, 0xd2, 0xfd, 0x00, 0x53, 0x2c, 0x17, 0x19, 0x54, 0x9f, 0xb0, 0xc7, 0x50, 0x65, 0xcf, 0xc1, + 0x0e, 0x66, 0x20, 0x23, 0xfa, 0xc5, 0xf1, 0xca, 0x5b, 0x0b, 0x53, 0x3b, 0x01, 0xee, 0xf9, 0x31, + 0x4a, 0x6d, 0x61, 0xd2, 0xc1, 0xc4, 0x68, 0x5a, 0x04, 0x25, 0x80, 0x16, 0x76, 0x3d, 0xee, 0xd7, + 0xfe, 0x96, 0xc0, 0xab, 0x47, 0xc4, 0x79, 0x14, 0x20, 0x8b, 0xa2, 0x5a, 0x92, 0x4b, 0x7e, 0x0c, + 0x24, 0xd7, 0x2e, 0x8a, 0x65, 0xf1, 0x60, 0xb7, 0xf2, 0xb6, 0xbe, 0xa8, 0x34, 0x3d, 0x8d, 0xa8, + 0xd7, 0xaa, 0xa5, 0x8b, 0x10, 0x0a, 0x83, 0x10, 0x4a, 0xf5, 0xda, 0x30, 0x84, 0x92, 0x6b, 0x8f, + 0x42, 0xb8, 0x73, 0x62, 0x75, 0xda, 0x87, 0x9a, 0x6b, 0x6b, 0xa6, 0xe4, 0xda, 0xf2, 0xd7, 0x20, + 0xc7, 0xaa, 0x23, 0x45, 0xa9, 0x9c, 0x39, 0xd8, 0xad, 0xbc, 0xb9, 0x38, 0xf5, 0xa7, 0x11, 0xae, + 0xe1, 0xa3, 0x56, 0x15, 0x46, 0x79, 0x87, 0x21, 0x8c, 0x43, 0x47, 0x21, 0xbc, 0xc5, 0xb3, 0xf2, + 0xb3, 0x66, 0xc6, 0x0e, 0xf9, 0x23, 0xb0, 0xdd, 0x47, 0x01, 0x71, 0xb1, 0x57, 0xcc, 0x94, 0xc5, + 0x83, 0x7c, 0xb5, 0x34, 0x0c, 0xe1, 0xd8, 0x34, 0x0a, 0xe1, 0x6d, 0x1e, 0x16, 0x1b, 0x34, 0x73, + 0xec, 0x92, 0x3f, 0x07, 0xdb, 0x36, 0xf2, 0x31, 0x71, 0x69, 0x31, 0xcb, 0x5a, 0xbe, 0xa3, 0x73, + 0xdd, 0xf4, 0x48, 0xb7, 0xa4, 0xa4, 0x47, 0xd8, 0xf5, 0xaa, 0x6f, 0xc4, 0xd5, 0x8c, 0x23, 0xd2, + 0xbc, 0xb1, 0x41, 0x33, 0xc7, 0xae, 0xc3, 0xec, 0x3f, 0xe7, 0x50, 0xd0, 0x4a, 0xe0, 0xf5, 0x39, + 0x12, 0x9b, 0x88, 0xf8, 0xd8, 0x23, 0x48, 0xfb, 0x43, 0x04, 0x7b, 0x47, 0xc4, 0xa9, 0xf1, 0x98, + 0x9b, 0xbf, 0x03, 0x13, 0xe4, 0xac, 0x0e, 0xee, 0x79, 0xb4, 0x28, 0xad, 0xea, 0x35, 0x51, 0x9e, + 0x07, 0xa4, 0xca, 0xf3, 0xb3, 0x66, 0xc6, 0x8e, 0xb8, 0x51, 0x15, 0xdc, 0x9d, 0xd7, 0x48, 0xd2, + 0xe9, 0x8f, 0x7c, 0xd8, 0x1e, 0xfb, 0xf6, 0x0b, 0x3c, 0x6c, 0xd7, 0x86, 0x62, 0x5a, 0x8a, 0x44, + 0xaa, 0x2e, 0x90, 0xa3, 0x99, 0x69, 0x63, 0x72, 0xf3, 0x42, 0xc5, 0x15, 0xdd, 0x05, 0xca, 0x2c, + 0x65, 0x52, 0xd0, 0xf7, 0x20, 0x3f, 0x99, 0x56, 0x36, 0xc0, 0x16, 0x7e, 0xee, 0xa1, 0x80, 0x55, + 0xb3, 0x53, 0xbd, 0x33, 0x0c, 0x21, 0x37, 0x8c, 0x42, 0x98, 0xe7, 0xe9, 0xd9, 0x51, 0x33, 0xb9, + 0x59, 0x7e, 0x00, 0xb2, 0x36, 0x41, 0x5d, 0x36, 0x74, 0xd9, 0x2a, 0x1c, 0x84, 0x30, 0x5b, 0x6b, + 0xa0, 0xee, 0x30, 0x84, 0xcc, 0x3e, 0x0a, 0xe1, 0x6e, 0xfc, 0x37, 0x22, 0xa8, 0xab, 0x99, 0xcc, + 0x78, 0xf8, 0xd2, 0xcf, 0xe7, 0x50, 0x60, 0xd5, 0xfd, 0x9e, 0x01, 0x60, 0x42, 0x09, 0x0a, 0x6e, + 0xa5, 0x8d, 0x3f, 0xd9, 0x58, 0x94, 0xfd, 0x58, 0x94, 0x6b, 0x3d, 0xcd, 0x93, 0x27, 0x9f, 0x66, + 0xaa, 0xdb, 0xf2, 0x57, 0x60, 0x8b, 0x50, 0x8b, 0x22, 0xd6, 0xc4, 0xed, 0xca, 0xbb, 0xeb, 0xb0, + 0xe9, 0x8d, 0x28, 0x82, 0x0b, 0xc4, 0x82, 0x53, 0x81, 0xd8, 0x51, 0x33, 0xb9, 0xf9, 0xbf, 0x6f, + 0xaf, 0x12, 0x00, 0x2d, 0xb6, 0x5c, 0xec, 0x27, 0x16, 0x5f, 0x60, 0x19, 0x73, 0x27, 0xb6, 0x3c, + 0xa4, 0xda, 0xb7, 0x60, 0x8b, 0x95, 0x20, 0xef, 0x83, 0x6d, 0xd7, 0xeb, 0x5b, 0x6d, 0xd7, 0x2e, + 0x08, 0x8a, 0x72, 0x7a, 0x56, 0x7e, 0x2d, 0xad, 0x92, 0x21, 0xea, 0xdc, 0x2b, 0x97, 0x41, 0xce, + 0x6a, 0x51, 0xb7, 0x8f, 0x0a, 0xa2, 0xb2, 0x77, 0x7a, 0x56, 0x2e, 0xa4, 0xb8, 0x87, 0xcc, 0x1e, + 0x21, 0x5a, 0xd1, 0xa0, 0xd8, 0x05, 0x69, 0x1a, 0xc1, 0x06, 0xc8, 0x56, 0xb2, 0x3f, 0xfc, 0xa2, + 0x0a, 0xf1, 0x64, 0xfd, 0x26, 0x82, 0x57, 0x52, 0xc0, 0x27, 0x6e, 0x9b, 0xa2, 0x80, 0xfc, 0x3f, + 0x13, 0x14, 0xb1, 0xf0, 0x2b, 0xcb, 0xa4, 0x2c, 0xcb, 0xae, 0x81, 0x97, 0x5c, 0xf9, 0x35, 0x07, + 0x32, 0x47, 0xc4, 0x91, 0x8f, 0x41, 0x61, 0xe6, 0x6d, 0xbc, 0xb7, 0xf8, 0xda, 0xe7, 0xec, 0x79, + 0xe5, 0x83, 0x8d, 0xe0, 0xe3, 0x3f, 0x9c, 0xfc, 0x1d, 0xd3, 0x6c, 0xea, 0x49, 0xd0, 0x97, 0xe6, + 0x9a, 0xc1, 0x2b, 0x1f, 0x6e, 0x86, 0x4f, 0xc8, 0x8f, 0x41, 0x61, 0x66, 0x4b, 0x2f, 0x6f, 0x7b, + 0x1a, 0xbe, 0xa2, 0xed, 0x45, 0x8b, 0x4f, 0xee, 0x81, 0x97, 0xa7, 0xb7, 0xde, 0x7b, 0xcb, 0x05, + 0xbc, 0x8e, 0x56, 0xde, 0xdf, 0x04, 0x9d, 0xd0, 0x7e, 0x03, 0x00, 0x73, 0xb1, 0x87, 0x40, 0xde, + 0x5f, 0x9d, 0x83, 0x01, 0x15, 0x63, 0x4d, 0xe0, 0x24, 0xcf, 0x67, 0x56, 0x6f, 0x3d, 0x9e, 0x14, + 0xb8, 0x82, 0x27, 0x05, 0x4e, 0xf2, 0x34, 0xa8, 0x15, 0xd0, 0x75, 0x78, 0x52, 0xe0, 0x0a, 0x9e, + 0x14, 0x38, 0xe6, 0xa9, 0x7e, 0x71, 0x31, 0x50, 0xc5, 0xcb, 0x81, 0x2a, 0xfe, 0x35, 0x50, 0xc5, + 0x9f, 0xae, 0x54, 0xe1, 0xf2, 0x4a, 0x15, 0xfe, 0xbc, 0x52, 0x85, 0x2f, 0x3f, 0x76, 0x5c, 0xfa, + 0xb4, 0xd7, 0xd4, 0x5b, 0xb8, 0x63, 0xb0, 0xa4, 0xf7, 0x3c, 0x44, 0x9f, 0xe3, 0xe0, 0x59, 0x7c, + 0xb2, 0x7c, 0xd7, 0x70, 0xb0, 0xe1, 0x61, 0x1b, 0xcd, 0xf9, 0x88, 0x6d, 0xe6, 0xd8, 0xf7, 0xe9, + 0x83, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xe4, 0x9d, 0x81, 0x42, 0x0b, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) { + out := new(MsgCreateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/CreateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) { + out := new(MsgDepositDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/DepositDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) { + out := new(MsgUpdateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/UpdateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) { + out := new(MsgCloseDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/CloseDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) { + out := new(MsgCloseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/CloseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) { + out := new(MsgPauseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/PauseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) { + out := new(MsgStartGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Msg/StartGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(context.Context, *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(context.Context, *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(context.Context, *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(context.Context, *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(context.Context, *MsgCloseGroup) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(context.Context, *MsgPauseGroup) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(context.Context, *MsgStartGroup) (*MsgStartGroupResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateDeployment(ctx context.Context, req *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDeployment not implemented") +} +func (*UnimplementedMsgServer) DepositDeployment(ctx context.Context, req *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositDeployment not implemented") +} +func (*UnimplementedMsgServer) UpdateDeployment(ctx context.Context, req *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseDeployment(ctx context.Context, req *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseGroup(ctx context.Context, req *MsgCloseGroup) (*MsgCloseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseGroup not implemented") +} +func (*UnimplementedMsgServer) PauseGroup(ctx context.Context, req *MsgPauseGroup) (*MsgPauseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseGroup not implemented") +} +func (*UnimplementedMsgServer) StartGroup(ctx context.Context, req *MsgStartGroup) (*MsgStartGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartGroup not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/CreateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDeployment(ctx, req.(*MsgCreateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/DepositDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositDeployment(ctx, req.(*MsgDepositDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/UpdateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDeployment(ctx, req.(*MsgUpdateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/CloseDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseDeployment(ctx, req.(*MsgCloseDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/CloseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseGroup(ctx, req.(*MsgCloseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PauseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPauseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PauseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/PauseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PauseGroup(ctx, req.(*MsgPauseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StartGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStartGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StartGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Msg/StartGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StartGroup(ctx, req.(*MsgStartGroup)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDeployment", + Handler: _Msg_CreateDeployment_Handler, + }, + { + MethodName: "DepositDeployment", + Handler: _Msg_DepositDeployment_Handler, + }, + { + MethodName: "UpdateDeployment", + Handler: _Msg_UpdateDeployment_Handler, + }, + { + MethodName: "CloseDeployment", + Handler: _Msg_CloseDeployment_Handler, + }, + { + MethodName: "CloseGroup", + Handler: _Msg_CloseGroup_Handler, + }, + { + MethodName: "PauseGroup", + Handler: _Msg_PauseGroup_Handler, + }, + { + MethodName: "StartGroup", + Handler: _Msg_StartGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta1/deployment.proto", +} + +func (m *MsgCreateDeployment) 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 *MsgCreateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateDeploymentResponse) 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 *MsgCreateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeployment) 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 *MsgDepositDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeploymentResponse) 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 *MsgDepositDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeployment) 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 *MsgUpdateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeploymentResponse) 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 *MsgUpdateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeployment) 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 *MsgCloseDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeploymentResponse) 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 *MsgCloseDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *DeploymentID) 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 *DeploymentID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Deployment) 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 *Deployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.DeploymentID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeploymentFilters) 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 *DeploymentFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDeployment(dAtA []byte, offset int, v uint64) int { + offset -= sovDeployment(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeployment(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovDeployment(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovDeployment(uint64(l)) + return n +} + +func (m *MsgCreateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDepositDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeployment(uint64(l)) + l = m.Amount.Size() + n += 1 + l + sovDeployment(uint64(l)) + return n +} + +func (m *MsgDepositDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeployment(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovDeployment(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + return n +} + +func (m *MsgUpdateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeployment(uint64(l)) + return n +} + +func (m *MsgCloseDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *DeploymentID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + return n +} + +func (m *Deployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentID.Size() + n += 1 + l + sovDeployment(uint64(l)) + if m.State != 0 { + n += 1 + sovDeployment(uint64(m.State)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.CreatedAt != 0 { + n += 1 + sovDeployment(uint64(m.CreatedAt)) + } + return n +} + +func (m *DeploymentFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + return n +} + +func sovDeployment(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDeployment(x uint64) (n int) { + return sovDeployment(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateDeployment) 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 ErrIntOverflowDeployment + } + 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: MsgCreateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, GroupSpec{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDeploymentResponse) 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 ErrIntOverflowDeployment + } + 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: MsgCreateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeployment) 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 ErrIntOverflowDeployment + } + 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: MsgDepositDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeploymentResponse) 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 ErrIntOverflowDeployment + } + 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: MsgDepositDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeployment) 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 ErrIntOverflowDeployment + } + 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: MsgUpdateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, GroupSpec{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeploymentResponse) 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 ErrIntOverflowDeployment + } + 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: MsgUpdateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeployment) 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 ErrIntOverflowDeployment + } + 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: MsgCloseDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeploymentResponse) 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 ErrIntOverflowDeployment + } + 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: MsgCloseDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentID) 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 ErrIntOverflowDeployment + } + 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: DeploymentID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Deployment) 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 ErrIntOverflowDeployment + } + 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: Deployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Deployment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentFilters) 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 ErrIntOverflowDeployment + } + 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: DeploymentFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDeployment(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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrInvalidLengthDeployment + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDeployment + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDeployment + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDeployment = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDeployment = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDeployment = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/genesis.pb.go b/go/node/deployment/v1beta1/genesis.pb.go new file mode 100644 index 00000000..3b175409 --- /dev/null +++ b/go/node/deployment/v1beta1/genesis.pb.go @@ -0,0 +1,630 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/genesis.proto + +package v1beta1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisDeployment defines the basic genesis state used by deployment module +type GenesisDeployment struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` +} + +func (m *GenesisDeployment) Reset() { *m = GenesisDeployment{} } +func (m *GenesisDeployment) String() string { return proto.CompactTextString(m) } +func (*GenesisDeployment) ProtoMessage() {} +func (*GenesisDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea837e5a570e958, []int{0} +} +func (m *GenesisDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisDeployment.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 *GenesisDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDeployment.Merge(m, src) +} +func (m *GenesisDeployment) XXX_Size() int { + return m.Size() +} +func (m *GenesisDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDeployment proto.InternalMessageInfo + +func (m *GenesisDeployment) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *GenesisDeployment) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Deployments []GenesisDeployment `protobuf:"bytes,1,rep,name=deployments,proto3" json:"deployments" yaml:"deployments"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_8ea837e5a570e958, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetDeployments() []GenesisDeployment { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisDeployment)(nil), "akash.deployment.v1beta1.GenesisDeployment") + proto.RegisterType((*GenesisState)(nil), "akash.deployment.v1beta1.GenesisState") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/genesis.proto", fileDescriptor_8ea837e5a570e958) +} + +var fileDescriptor_8ea837e5a570e958 = []byte{ + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x4e, 0xc3, 0x30, + 0x10, 0xc6, 0xe3, 0x22, 0x75, 0x70, 0x61, 0x68, 0xc4, 0x10, 0x75, 0x88, 0x2b, 0xab, 0x40, 0x2b, + 0x44, 0xac, 0x96, 0x0d, 0x89, 0x25, 0x42, 0xea, 0x8a, 0xc2, 0xc0, 0x9f, 0xcd, 0xa5, 0x56, 0x5a, + 0xb5, 0x89, 0xa3, 0xc4, 0x05, 0xfa, 0x16, 0x3c, 0x56, 0xc7, 0x8e, 0x0c, 0x28, 0x42, 0xcd, 0xc6, + 0xd8, 0x27, 0x40, 0xb5, 0x2d, 0x1c, 0x55, 0x84, 0x2d, 0x17, 0xff, 0xbe, 0xfb, 0xee, 0x3b, 0x1d, + 0x3c, 0xa5, 0x33, 0x9a, 0x4d, 0xc8, 0x98, 0x25, 0x73, 0xbe, 0x8c, 0x58, 0x2c, 0xc8, 0x4b, 0x7f, + 0xc4, 0x04, 0xed, 0x93, 0x90, 0xc5, 0x2c, 0x9b, 0x66, 0x5e, 0x92, 0x72, 0xc1, 0x6d, 0x47, 0x72, + 0x9e, 0xe1, 0x3c, 0xcd, 0xb5, 0x8e, 0x43, 0x1e, 0x72, 0x09, 0x91, 0xdd, 0x97, 0xe2, 0x5b, 0xbd, + 0xca, 0xbe, 0xa5, 0x16, 0x0a, 0xed, 0x54, 0x8f, 0x90, 0xf2, 0x45, 0xa2, 0xa9, 0x93, 0x4a, 0x2a, + 0xa1, 0x29, 0x8d, 0xf4, 0x9c, 0xf8, 0x13, 0xc0, 0xe6, 0x50, 0x4d, 0x7e, 0xf3, 0x8b, 0xda, 0x11, + 0x84, 0x46, 0xe8, 0x80, 0x36, 0xe8, 0x36, 0x06, 0x1d, 0xaf, 0x2a, 0x92, 0x67, 0x94, 0xfe, 0xd9, + 0x2a, 0x47, 0xd6, 0x77, 0x8e, 0x4a, 0xfa, 0x6d, 0x8e, 0x9a, 0x4b, 0x1a, 0xcd, 0xaf, 0xb0, 0xf9, + 0x87, 0x83, 0x12, 0x60, 0x3f, 0xc0, 0xba, 0x1c, 0x3d, 0x73, 0x6a, 0xed, 0x83, 0x6e, 0x63, 0x80, + 0xaa, 0xad, 0x86, 0x3b, 0xce, 0x47, 0xda, 0x45, 0xcb, 0xb6, 0x39, 0x3a, 0x52, 0x0e, 0xaa, 0xc6, + 0x81, 0x7e, 0xc0, 0x05, 0x80, 0x87, 0x3a, 0xde, 0x9d, 0xa0, 0x82, 0xd9, 0x6f, 0xb0, 0x61, 0xba, + 0x66, 0x0e, 0x90, 0x7e, 0xe7, 0xff, 0xf8, 0xed, 0xef, 0xc6, 0xef, 0x69, 0xef, 0x72, 0x9f, 0x6d, + 0x8e, 0xec, 0xfd, 0x88, 0x19, 0x0e, 0xca, 0x88, 0xfd, 0x08, 0xeb, 0x6a, 0xf3, 0x4e, 0x4d, 0xee, + 0xb3, 0x5d, 0x6d, 0x7a, 0x2b, 0x39, 0x93, 0x52, 0xe9, 0x4c, 0x4a, 0x55, 0xe3, 0x40, 0x3f, 0xf8, + 0xf7, 0xab, 0x8d, 0x0b, 0xd6, 0x1b, 0x17, 0x7c, 0x6d, 0x5c, 0xf0, 0x5e, 0xb8, 0xd6, 0xba, 0x70, + 0xad, 0x8f, 0xc2, 0xb5, 0x9e, 0xae, 0xc3, 0xa9, 0x98, 0x2c, 0x46, 0xde, 0x33, 0x8f, 0x88, 0xb4, + 0xbb, 0x88, 0x99, 0x78, 0xe5, 0xe9, 0x4c, 0x57, 0x34, 0x99, 0x92, 0x90, 0x93, 0x98, 0x8f, 0xd9, + 0x1f, 0xa7, 0x32, 0xaa, 0xcb, 0x23, 0xb9, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x93, 0x31, + 0x9c, 0xf6, 0x02, 0x00, 0x00, +} + +func (m *GenesisDeployment) 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 *GenesisDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisDeployment) 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 ErrIntOverflowGenesis + } + 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: GenesisDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisDeployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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 + } + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, GenesisDeployment{}) + if err := m.Deployments[len(m.Deployments)-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 Params", 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/group.pb.go b/go/node/deployment/v1beta1/group.pb.go new file mode 100644 index 00000000..10c7f324 --- /dev/null +++ b/go/node/deployment/v1beta1/group.pb.go @@ -0,0 +1,2176 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/group.proto + +package v1beta1 + +import ( + fmt "fmt" + v1beta1 "github.com/akash-network/akash-api/go/node/types/v1beta1" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of group +type Group_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + GroupStateInvalid Group_State = 0 + // GroupOpen denotes state for group open + GroupOpen Group_State = 1 + // GroupOrdered denotes state for group ordered + GroupPaused Group_State = 2 + // GroupInsufficientFunds denotes state for group insufficient_funds + GroupInsufficientFunds Group_State = 3 + // GroupClosed denotes state for group closed + GroupClosed Group_State = 4 +) + +var Group_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "paused", + 3: "insufficient_funds", + 4: "closed", +} + +var Group_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "paused": 2, + "insufficient_funds": 3, + "closed": 4, +} + +func (x Group_State) String() string { + return proto.EnumName(Group_State_name, int32(x)) +} + +func (Group_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{8, 0} +} + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +type MsgCloseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseGroup) Reset() { *m = MsgCloseGroup{} } +func (m *MsgCloseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroup) ProtoMessage() {} +func (*MsgCloseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{0} +} +func (m *MsgCloseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroup.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 *MsgCloseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroup.Merge(m, src) +} +func (m *MsgCloseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroup proto.InternalMessageInfo + +func (m *MsgCloseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +type MsgCloseGroupResponse struct { +} + +func (m *MsgCloseGroupResponse) Reset() { *m = MsgCloseGroupResponse{} } +func (m *MsgCloseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroupResponse) ProtoMessage() {} +func (*MsgCloseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{1} +} +func (m *MsgCloseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroupResponse.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 *MsgCloseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroupResponse.Merge(m, src) +} +func (m *MsgCloseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroupResponse proto.InternalMessageInfo + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +type MsgPauseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgPauseGroup) Reset() { *m = MsgPauseGroup{} } +func (m *MsgPauseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroup) ProtoMessage() {} +func (*MsgPauseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{2} +} +func (m *MsgPauseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroup.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 *MsgPauseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroup.Merge(m, src) +} +func (m *MsgPauseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroup proto.InternalMessageInfo + +func (m *MsgPauseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +type MsgPauseGroupResponse struct { +} + +func (m *MsgPauseGroupResponse) Reset() { *m = MsgPauseGroupResponse{} } +func (m *MsgPauseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroupResponse) ProtoMessage() {} +func (*MsgPauseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{3} +} +func (m *MsgPauseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroupResponse.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 *MsgPauseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroupResponse.Merge(m, src) +} +func (m *MsgPauseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroupResponse proto.InternalMessageInfo + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +type MsgStartGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgStartGroup) Reset() { *m = MsgStartGroup{} } +func (m *MsgStartGroup) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroup) ProtoMessage() {} +func (*MsgStartGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{4} +} +func (m *MsgStartGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroup.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 *MsgStartGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroup.Merge(m, src) +} +func (m *MsgStartGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroup proto.InternalMessageInfo + +func (m *MsgStartGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +type MsgStartGroupResponse struct { +} + +func (m *MsgStartGroupResponse) Reset() { *m = MsgStartGroupResponse{} } +func (m *MsgStartGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroupResponse) ProtoMessage() {} +func (*MsgStartGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{5} +} +func (m *MsgStartGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroupResponse.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 *MsgStartGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroupResponse.Merge(m, src) +} +func (m *MsgStartGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroupResponse proto.InternalMessageInfo + +// GroupID stores owner, deployment sequence number and group sequence number +type GroupID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` +} + +func (m *GroupID) Reset() { *m = GroupID{} } +func (*GroupID) ProtoMessage() {} +func (*GroupID) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{6} +} +func (m *GroupID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupID.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 *GroupID) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupID.Merge(m, src) +} +func (m *GroupID) XXX_Size() int { + return m.Size() +} +func (m *GroupID) XXX_DiscardUnknown() { + xxx_messageInfo_GroupID.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupID proto.InternalMessageInfo + +func (m *GroupID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *GroupID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *GroupID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +// GroupSpec stores group specifications +type GroupSpec struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Requirements v1beta1.PlacementRequirements `protobuf:"bytes,2,opt,name=requirements,proto3" json:"requirements" yaml:"requirements"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources" yaml:"resources"` +} + +func (m *GroupSpec) Reset() { *m = GroupSpec{} } +func (m *GroupSpec) String() string { return proto.CompactTextString(m) } +func (*GroupSpec) ProtoMessage() {} +func (*GroupSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{7} +} +func (m *GroupSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupSpec.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 *GroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupSpec.Merge(m, src) +} +func (m *GroupSpec) XXX_Size() int { + return m.Size() +} +func (m *GroupSpec) XXX_DiscardUnknown() { + xxx_messageInfo_GroupSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupSpec proto.InternalMessageInfo + +// Group stores group id, state and specifications of group +type Group struct { + GroupID GroupID `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"id" yaml:"id"` + State Group_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta1.Group_State" json:"state" yaml:"state"` + GroupSpec GroupSpec `protobuf:"bytes,3,opt,name=group_spec,json=groupSpec,proto3" json:"spec" yaml:"spec"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Group) Reset() { *m = Group{} } +func (m *Group) String() string { return proto.CompactTextString(m) } +func (*Group) ProtoMessage() {} +func (*Group) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{8} +} +func (m *Group) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Group.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 *Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Group.Merge(m, src) +} +func (m *Group) XXX_Size() int { + return m.Size() +} +func (m *Group) XXX_DiscardUnknown() { + xxx_messageInfo_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Group proto.InternalMessageInfo + +func (m *Group) GetGroupID() GroupID { + if m != nil { + return m.GroupID + } + return GroupID{} +} + +func (m *Group) GetState() Group_State { + if m != nil { + return m.State + } + return GroupStateInvalid +} + +func (m *Group) GetGroupSpec() GroupSpec { + if m != nil { + return m.GroupSpec + } + return GroupSpec{} +} + +func (m *Group) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// Resource stores unit, total count and price of resource +type Resource struct { + Resources v1beta1.ResourceUnits `protobuf:"bytes,1,opt,name=resources,proto3" json:"unit" yaml:"unit"` + Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` + Price types.Coin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { + return fileDescriptor_92581ef27257da99, []int{9} +} +func (m *Resource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Resource.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 *Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *Resource) XXX_Size() int { + return m.Size() +} +func (m *Resource) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func (m *Resource) GetResources() v1beta1.ResourceUnits { + if m != nil { + return m.Resources + } + return v1beta1.ResourceUnits{} +} + +func (m *Resource) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *Resource) GetPrice() types.Coin { + if m != nil { + return m.Price + } + return types.Coin{} +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta1.Group_State", Group_State_name, Group_State_value) + proto.RegisterType((*MsgCloseGroup)(nil), "akash.deployment.v1beta1.MsgCloseGroup") + proto.RegisterType((*MsgCloseGroupResponse)(nil), "akash.deployment.v1beta1.MsgCloseGroupResponse") + proto.RegisterType((*MsgPauseGroup)(nil), "akash.deployment.v1beta1.MsgPauseGroup") + proto.RegisterType((*MsgPauseGroupResponse)(nil), "akash.deployment.v1beta1.MsgPauseGroupResponse") + proto.RegisterType((*MsgStartGroup)(nil), "akash.deployment.v1beta1.MsgStartGroup") + proto.RegisterType((*MsgStartGroupResponse)(nil), "akash.deployment.v1beta1.MsgStartGroupResponse") + proto.RegisterType((*GroupID)(nil), "akash.deployment.v1beta1.GroupID") + proto.RegisterType((*GroupSpec)(nil), "akash.deployment.v1beta1.GroupSpec") + proto.RegisterType((*Group)(nil), "akash.deployment.v1beta1.Group") + proto.RegisterType((*Resource)(nil), "akash.deployment.v1beta1.Resource") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/group.proto", fileDescriptor_92581ef27257da99) +} + +var fileDescriptor_92581ef27257da99 = []byte{ + // 869 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x8e, 0x13, 0xa7, 0xbb, 0x99, 0x74, 0x21, 0x0c, 0x94, 0x4d, 0x5d, 0xd5, 0x76, 0x07, 0x2a, + 0x05, 0x55, 0xd8, 0x6a, 0x7a, 0x5b, 0x89, 0x03, 0xe9, 0x8a, 0x6a, 0x0f, 0xc0, 0xca, 0x2b, 0x40, + 0x42, 0x48, 0x8b, 0x63, 0xcf, 0xba, 0xa3, 0x26, 0x33, 0x5e, 0xcf, 0xb8, 0x55, 0x39, 0x72, 0xaa, + 0xf6, 0xc4, 0x91, 0xcb, 0x4a, 0x95, 0x38, 0x70, 0xe3, 0xcc, 0x9f, 0xd0, 0x63, 0x8f, 0x9c, 0x2c, + 0x94, 0xbd, 0xa0, 0xbd, 0x20, 0xe5, 0x2f, 0x40, 0xf3, 0x23, 0xeb, 0x18, 0x6d, 0x55, 0xf5, 0xd2, + 0x53, 0xf2, 0xde, 0xfb, 0xde, 0xf7, 0x3e, 0xbf, 0xf9, 0x3c, 0x06, 0x1f, 0xc7, 0x8f, 0x62, 0xfe, + 0x30, 0x4c, 0x71, 0x3e, 0x63, 0x4f, 0xe7, 0x98, 0x8a, 0xf0, 0xf1, 0xdd, 0x29, 0x16, 0xf1, 0xdd, + 0x30, 0x2b, 0x58, 0x99, 0x07, 0x79, 0xc1, 0x04, 0x83, 0x43, 0x85, 0x0a, 0x6a, 0x54, 0x60, 0x50, + 0xce, 0x07, 0x19, 0xcb, 0x98, 0x02, 0x85, 0xf2, 0x9f, 0xc6, 0x3b, 0xb7, 0x34, 0xeb, 0x34, 0xe6, + 0xf8, 0x82, 0xaf, 0xc0, 0x9c, 0x95, 0x45, 0x82, 0x0d, 0x04, 0x5d, 0x02, 0x89, 0x85, 0x28, 0xc8, + 0xb4, 0x14, 0x2b, 0x8c, 0x9b, 0x30, 0x3e, 0x67, 0xbc, 0x09, 0x4a, 0x18, 0xa1, 0xba, 0x8e, 0x32, + 0xb0, 0xf5, 0x25, 0xcf, 0xee, 0xcf, 0x18, 0xc7, 0x0f, 0xa4, 0x5a, 0xb8, 0x0f, 0xda, 0x24, 0x1d, + 0x5a, 0xbe, 0x35, 0xea, 0x8f, 0x6f, 0x05, 0xaf, 0x12, 0x1d, 0x28, 0xf0, 0xde, 0xee, 0xe4, 0xe6, + 0x8b, 0xca, 0x6b, 0x2d, 0x2a, 0xaf, 0xbd, 0xb7, 0x7b, 0x5e, 0x79, 0x6d, 0x92, 0x2e, 0x2b, 0xaf, + 0xf7, 0x34, 0x9e, 0xcf, 0x76, 0x10, 0x49, 0x51, 0xd4, 0x26, 0xe9, 0x8e, 0xfd, 0xcf, 0x73, 0xaf, + 0x85, 0xb6, 0xc1, 0xb5, 0xc6, 0xa0, 0x08, 0xf3, 0x9c, 0x51, 0x8e, 0x8d, 0x82, 0xfd, 0xb8, 0x7c, + 0x3b, 0x0a, 0xea, 0x41, 0xff, 0x53, 0x70, 0x20, 0xe2, 0x42, 0xbc, 0x0d, 0x05, 0xf5, 0xa0, 0x0b, + 0x05, 0x7f, 0x58, 0x60, 0xc3, 0xb0, 0xc1, 0x10, 0x74, 0xd9, 0x13, 0x8a, 0x0b, 0x35, 0xbf, 0x37, + 0xb9, 0x7e, 0x5e, 0x79, 0x3a, 0xb1, 0xac, 0xbc, 0xab, 0x9a, 0x55, 0x85, 0x28, 0xd2, 0x69, 0x78, + 0x0f, 0xd8, 0x29, 0xc7, 0xc7, 0xc3, 0xb6, 0x6f, 0x8d, 0xec, 0x89, 0xb7, 0xa8, 0x3c, 0x7b, 0xf7, + 0x00, 0x1f, 0x9f, 0x57, 0x9e, 0xca, 0x2f, 0x2b, 0xaf, 0xaf, 0xdb, 0x64, 0x84, 0x22, 0x95, 0x94, + 0x4d, 0x99, 0x6c, 0xea, 0xf8, 0xd6, 0x68, 0x4b, 0x37, 0x3d, 0x30, 0x4d, 0x59, 0xa3, 0x29, 0xd3, + 0x4d, 0xf2, 0x67, 0x67, 0xf3, 0xd7, 0xe7, 0x5e, 0x4b, 0x3d, 0xc9, 0xef, 0x6d, 0xd0, 0x53, 0x82, + 0x0f, 0x72, 0x9c, 0xc0, 0x3b, 0xc0, 0xa6, 0xf1, 0x1c, 0x1b, 0xc5, 0xdb, 0x92, 0x44, 0xc6, 0x35, + 0x89, 0x8c, 0x50, 0xa4, 0x92, 0xf0, 0x27, 0x70, 0xb5, 0xc0, 0xc7, 0x25, 0x29, 0xb0, 0x5c, 0x26, + 0x57, 0xb2, 0xfb, 0xe3, 0x4f, 0xcc, 0x9a, 0xa5, 0x4f, 0x2f, 0x16, 0xbc, 0x3f, 0x8b, 0x13, 0x85, + 0x8a, 0xd6, 0x1a, 0x26, 0x77, 0xe4, 0xba, 0xcf, 0x2b, 0xaf, 0x41, 0xb3, 0xac, 0xbc, 0xf7, 0xf5, + 0xac, 0xf5, 0x2c, 0x8a, 0x1a, 0x20, 0x98, 0x81, 0xde, 0xea, 0x1d, 0xe2, 0xc3, 0x8e, 0xdf, 0x19, + 0xf5, 0xc7, 0xe8, 0xd5, 0xe7, 0x1b, 0x19, 0xe8, 0xe4, 0xb6, 0x99, 0x58, 0x37, 0x2f, 0x2b, 0x6f, + 0xb0, 0x1a, 0x67, 0x52, 0x28, 0xaa, 0xcb, 0x3b, 0x9b, 0xcf, 0x56, 0x9b, 0xfa, 0xd9, 0x06, 0x5d, + 0xed, 0xaa, 0x1f, 0xc1, 0xa6, 0xba, 0x10, 0x0e, 0xdf, 0xc4, 0x5b, 0xc8, 0x78, 0x6b, 0x65, 0x8f, + 0xcb, 0x0c, 0xb6, 0xa1, 0x68, 0xf7, 0x52, 0xf8, 0x2d, 0xe8, 0x72, 0x11, 0x0b, 0xac, 0x76, 0xfa, + 0xce, 0xf8, 0xf6, 0x6b, 0xe8, 0x83, 0x03, 0x09, 0xd6, 0x0e, 0x53, 0x7d, 0xb5, 0xc3, 0x54, 0x88, + 0x22, 0x9d, 0x86, 0x87, 0x00, 0x68, 0xe5, 0x3c, 0xc7, 0x89, 0xb2, 0x4c, 0x7f, 0xfc, 0xd1, 0x6b, + 0xc8, 0xa5, 0x31, 0x26, 0x37, 0xcc, 0xe2, 0x6c, 0xd9, 0x58, 0xdb, 0x41, 0x46, 0x28, 0xea, 0x65, + 0x17, 0x06, 0xba, 0x09, 0x40, 0x52, 0xe0, 0x58, 0xe0, 0xf4, 0x30, 0x16, 0x43, 0xdb, 0xb7, 0x46, + 0x9d, 0xa8, 0x67, 0x32, 0x9f, 0x0b, 0xf4, 0xa7, 0x05, 0xba, 0x4a, 0x2b, 0x44, 0x60, 0x83, 0xd0, + 0xc7, 0xf1, 0x8c, 0xa4, 0x83, 0x96, 0x73, 0xed, 0xe4, 0xd4, 0x7f, 0x4f, 0x0f, 0x93, 0xc5, 0x3d, + 0x5d, 0x80, 0xdb, 0xc0, 0x66, 0x39, 0xa6, 0x03, 0xcb, 0xd9, 0x3a, 0x39, 0xf5, 0xb5, 0x4d, 0xbf, + 0xce, 0x31, 0x85, 0x37, 0xc0, 0x95, 0x5c, 0xbe, 0xfd, 0xe9, 0xa0, 0xed, 0xbc, 0x7b, 0x72, 0xea, + 0xf7, 0x55, 0x49, 0x5d, 0x08, 0x29, 0x1c, 0x03, 0x48, 0x28, 0x2f, 0x8f, 0x8e, 0x48, 0x42, 0x30, + 0x15, 0x87, 0x47, 0x25, 0x4d, 0xf9, 0xa0, 0xe3, 0x38, 0x27, 0xa7, 0xfe, 0x87, 0x7a, 0xf9, 0x6b, + 0xe5, 0x2f, 0x64, 0x55, 0x12, 0x26, 0xf2, 0x42, 0x4b, 0x07, 0xf6, 0x1a, 0xa1, 0xba, 0xe3, 0x52, + 0xc7, 0x7e, 0xf6, 0x9b, 0xdb, 0x32, 0x2f, 0xfe, 0xbf, 0x16, 0xd8, 0x5c, 0xb9, 0x09, 0xfe, 0xb0, + 0x6e, 0xc2, 0xa6, 0x11, 0x1a, 0xee, 0x5f, 0x35, 0x7c, 0x43, 0x89, 0xe0, 0xf5, 0x2a, 0x4b, 0x4a, + 0x44, 0xbd, 0x4a, 0x19, 0xad, 0x3b, 0x4f, 0x5e, 0x1f, 0x09, 0x2b, 0xa9, 0x50, 0x1e, 0xd8, 0xd2, + 0x87, 0xab, 0x12, 0xf5, 0xe1, 0xaa, 0x10, 0x45, 0x3a, 0x0d, 0xbf, 0x02, 0xdd, 0xbc, 0x20, 0x09, + 0x36, 0xe7, 0x7a, 0x3d, 0xd0, 0x5f, 0x8c, 0xa6, 0x96, 0xfb, 0x8c, 0x50, 0x7d, 0xcf, 0x49, 0x3e, + 0x85, 0xaf, 0xf9, 0x54, 0x88, 0x22, 0x9d, 0xd6, 0x4f, 0x3c, 0xf9, 0xee, 0xc5, 0xc2, 0xb5, 0x5e, + 0x2e, 0x5c, 0xeb, 0xef, 0x85, 0x6b, 0xfd, 0x72, 0xe6, 0xb6, 0x5e, 0x9e, 0xb9, 0xad, 0xbf, 0xce, + 0xdc, 0xd6, 0xf7, 0x9f, 0x65, 0x44, 0x3c, 0x2c, 0xa7, 0x41, 0xc2, 0xe6, 0xa1, 0x7a, 0xea, 0x4f, + 0x29, 0x16, 0x4f, 0x58, 0xf1, 0xc8, 0x44, 0x71, 0x4e, 0xc2, 0x8c, 0x85, 0x94, 0xa5, 0xf8, 0x92, + 0x6f, 0xea, 0xf4, 0x8a, 0xfa, 0x6e, 0xdd, 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xb6, 0xc2, + 0x82, 0x76, 0x07, 0x00, 0x00, +} + +func (m *MsgCloseGroup) 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 *MsgCloseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseGroupResponse) 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 *MsgCloseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroup) 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 *MsgPauseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroupResponse) 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 *MsgPauseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStartGroup) 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 *MsgStartGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgStartGroupResponse) 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 *MsgStartGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GroupID) 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 *GroupID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GSeq != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GroupSpec) 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 *GroupSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Requirements.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Group) 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 *Group) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.GroupSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.GroupID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Resource) 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 *Resource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Count != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCloseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroup(uint64(l)) + return n +} + +func (m *MsgCloseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPauseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroup(uint64(l)) + return n +} + +func (m *MsgPauseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStartGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroup(uint64(l)) + return n +} + +func (m *MsgStartGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GroupID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovGroup(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovGroup(uint64(m.GSeq)) + } + return n +} + +func (m *GroupSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = m.Requirements.Size() + n += 1 + l + sovGroup(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *Group) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.GroupID.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.State != 0 { + n += 1 + sovGroup(uint64(m.State)) + } + l = m.GroupSpec.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovGroup(uint64(m.CreatedAt)) + } + return n +} + +func (m *Resource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resources.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.Count != 0 { + n += 1 + sovGroup(uint64(m.Count)) + } + l = m.Price.Size() + n += 1 + l + sovGroup(uint64(l)) + return n +} + +func sovGroup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCloseGroup) 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 ErrIntOverflowGroup + } + 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: MsgCloseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseGroupResponse) 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 ErrIntOverflowGroup + } + 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: MsgCloseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroup) 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 ErrIntOverflowGroup + } + 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: MsgPauseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroupResponse) 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 ErrIntOverflowGroup + } + 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: MsgPauseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroup) 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 ErrIntOverflowGroup + } + 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: MsgStartGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroupResponse) 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 ErrIntOverflowGroup + } + 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: MsgStartGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupID) 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 ErrIntOverflowGroup + } + 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: GroupID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + 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 ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupSpec) 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 ErrIntOverflowGroup + } + 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: GroupSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowGroup + } + 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 ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requirements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Requirements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Group) 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 ErrIntOverflowGroup + } + 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: Group: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Group_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) 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 ErrIntOverflowGroup + } + 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: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroup(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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrInvalidLengthGroup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/params.pb.go b/go/node/deployment/v1beta1/params.pb.go new file mode 100644 index 00000000..8de89d92 --- /dev/null +++ b/go/node/deployment/v1beta1/params.pb.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/params.proto + +package v1beta1 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params defines the parameters for the x/deployment package +type Params struct { + DeploymentMinDeposit types.Coin `protobuf:"bytes,1,opt,name=deployment_min_deposit,json=deploymentMinDeposit,proto3" json:"deployment_min_deposit" yaml:"deployment_min_deposit"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_fe50954b0fed1b39, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDeploymentMinDeposit() types.Coin { + if m != nil { + return m.DeploymentMinDeposit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*Params)(nil), "akash.deployment.v1beta1.Params") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/params.proto", fileDescriptor_fe50954b0fed1b39) +} + +var fileDescriptor_fe50954b0fed1b39 = []byte{ + // 271 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x00, 0x2b, 0xd3, 0x43, 0x28, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xe4, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x93, 0x12, 0x8b, 0x53, 0xe1, 0x26, 0x26, 0xe7, 0x67, 0xe6, 0x41, 0xe4, 0x95, 0x36, 0x33, + 0x72, 0xb1, 0x05, 0x80, 0x2d, 0x10, 0x5a, 0xc1, 0xc8, 0x25, 0x86, 0x30, 0x37, 0x3e, 0x37, 0x33, + 0x2f, 0x3e, 0x25, 0xb5, 0x20, 0xbf, 0x38, 0xb3, 0x44, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, + 0x52, 0x0f, 0x62, 0x98, 0x1e, 0xc8, 0x30, 0x98, 0xbd, 0x7a, 0xce, 0xf9, 0x99, 0x79, 0x4e, 0xe1, + 0x27, 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0x2f, 0xe2, 0x02, 0x37, 0xc0, 0x37, 0x33, 0xcf, 0x05, + 0xa2, 0xfd, 0xd5, 0x3d, 0x79, 0x1c, 0x06, 0x7f, 0xba, 0x27, 0x2f, 0x5b, 0x99, 0x98, 0x9b, 0x63, + 0xa5, 0x84, 0x5d, 0x5e, 0x29, 0x48, 0x24, 0x05, 0x8b, 0x81, 0x4e, 0xe1, 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, 0x65, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0x0f, 0x0e, 0x2a, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, 0x28, 0x2f, 0xb1, + 0x20, 0x53, 0x3f, 0x3d, 0x5f, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0x4b, 0x58, 0x27, 0xb1, 0x81, 0x43, + 0xc5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x10, 0x3c, 0x27, 0x8e, 0x01, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeploymentMinDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentMinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentMinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/query.pb.go b/go/node/deployment/v1beta1/query.pb.go new file mode 100644 index 00000000..eaff10e1 --- /dev/null +++ b/go/node/deployment/v1beta1/query.pb.go @@ -0,0 +1,1627 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta1/query.proto + +package v1beta1 + +import ( + context "context" + fmt "fmt" + v1beta1 "github.com/akash-network/akash-api/go/node/escrow/v1beta1" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +type QueryDeploymentsRequest struct { + Filters DeploymentFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsRequest) Reset() { *m = QueryDeploymentsRequest{} } +func (m *QueryDeploymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsRequest) ProtoMessage() {} +func (*QueryDeploymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{0} +} +func (m *QueryDeploymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsRequest.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 *QueryDeploymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsRequest.Merge(m, src) +} +func (m *QueryDeploymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsRequest proto.InternalMessageInfo + +func (m *QueryDeploymentsRequest) GetFilters() DeploymentFilters { + if m != nil { + return m.Filters + } + return DeploymentFilters{} +} + +func (m *QueryDeploymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +type QueryDeploymentsResponse struct { + Deployments DeploymentResponses `protobuf:"bytes,1,rep,name=deployments,proto3,castrepeated=DeploymentResponses" json:"deployments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsResponse) Reset() { *m = QueryDeploymentsResponse{} } +func (m *QueryDeploymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsResponse) ProtoMessage() {} +func (*QueryDeploymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{1} +} +func (m *QueryDeploymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsResponse.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 *QueryDeploymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsResponse.Merge(m, src) +} +func (m *QueryDeploymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsResponse proto.InternalMessageInfo + +func (m *QueryDeploymentsResponse) GetDeployments() DeploymentResponses { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *QueryDeploymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +type QueryDeploymentRequest struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryDeploymentRequest) Reset() { *m = QueryDeploymentRequest{} } +func (m *QueryDeploymentRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentRequest) ProtoMessage() {} +func (*QueryDeploymentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{2} +} +func (m *QueryDeploymentRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentRequest.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 *QueryDeploymentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentRequest.Merge(m, src) +} +func (m *QueryDeploymentRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentRequest proto.InternalMessageInfo + +func (m *QueryDeploymentRequest) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +type QueryDeploymentResponse struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + EscrowAccount v1beta1.Account `protobuf:"bytes,3,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` +} + +func (m *QueryDeploymentResponse) Reset() { *m = QueryDeploymentResponse{} } +func (m *QueryDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentResponse) ProtoMessage() {} +func (*QueryDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{3} +} +func (m *QueryDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentResponse.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 *QueryDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentResponse.Merge(m, src) +} +func (m *QueryDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentResponse proto.InternalMessageInfo + +func (m *QueryDeploymentResponse) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *QueryDeploymentResponse) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +func (m *QueryDeploymentResponse) GetEscrowAccount() v1beta1.Account { + if m != nil { + return m.EscrowAccount + } + return v1beta1.Account{} +} + +// QueryGroupRequest is request type for the Query/Group RPC method +type QueryGroupRequest struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryGroupRequest) Reset() { *m = QueryGroupRequest{} } +func (m *QueryGroupRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupRequest) ProtoMessage() {} +func (*QueryGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{4} +} +func (m *QueryGroupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupRequest.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 *QueryGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupRequest.Merge(m, src) +} +func (m *QueryGroupRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupRequest proto.InternalMessageInfo + +func (m *QueryGroupRequest) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// QueryGroupResponse is response type for the Query/Group RPC method +type QueryGroupResponse struct { + Group Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` +} + +func (m *QueryGroupResponse) Reset() { *m = QueryGroupResponse{} } +func (m *QueryGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupResponse) ProtoMessage() {} +func (*QueryGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e9d5676377f9641, []int{5} +} +func (m *QueryGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupResponse.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 *QueryGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupResponse.Merge(m, src) +} +func (m *QueryGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupResponse proto.InternalMessageInfo + +func (m *QueryGroupResponse) GetGroup() Group { + if m != nil { + return m.Group + } + return Group{} +} + +func init() { + proto.RegisterType((*QueryDeploymentsRequest)(nil), "akash.deployment.v1beta1.QueryDeploymentsRequest") + proto.RegisterType((*QueryDeploymentsResponse)(nil), "akash.deployment.v1beta1.QueryDeploymentsResponse") + proto.RegisterType((*QueryDeploymentRequest)(nil), "akash.deployment.v1beta1.QueryDeploymentRequest") + proto.RegisterType((*QueryDeploymentResponse)(nil), "akash.deployment.v1beta1.QueryDeploymentResponse") + proto.RegisterType((*QueryGroupRequest)(nil), "akash.deployment.v1beta1.QueryGroupRequest") + proto.RegisterType((*QueryGroupResponse)(nil), "akash.deployment.v1beta1.QueryGroupResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta1/query.proto", fileDescriptor_5e9d5676377f9641) +} + +var fileDescriptor_5e9d5676377f9641 = []byte{ + // 671 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x3f, 0x6f, 0xd3, 0x40, + 0x1c, 0x8d, 0x9d, 0xa6, 0x48, 0x17, 0x15, 0xa9, 0x07, 0x02, 0x2b, 0x80, 0x5d, 0xac, 0xd2, 0x94, + 0xfe, 0xb1, 0x49, 0xd8, 0x8a, 0x3a, 0x60, 0x45, 0xad, 0x0a, 0x0b, 0xf5, 0x02, 0x42, 0x48, 0xe8, + 0x92, 0x5c, 0x5d, 0xab, 0x89, 0xcf, 0xf5, 0x5d, 0xa8, 0xb2, 0xf2, 0x09, 0x40, 0x7c, 0x01, 0x16, + 0x24, 0xc4, 0xc0, 0xc4, 0x87, 0xe8, 0x58, 0x09, 0x21, 0x31, 0x05, 0x94, 0x30, 0x20, 0x06, 0x86, + 0x7e, 0x02, 0xe4, 0xbb, 0x4b, 0x6c, 0x48, 0x42, 0x92, 0x2d, 0xf1, 0xbd, 0xdf, 0x7b, 0xef, 0xf7, + 0x7b, 0xbf, 0xb3, 0xc1, 0x32, 0x3a, 0x42, 0xf4, 0xd0, 0xae, 0xe3, 0xb0, 0x41, 0xda, 0x4d, 0x1c, + 0x30, 0xfb, 0x45, 0xa9, 0x8a, 0x19, 0x2a, 0xd9, 0xc7, 0x2d, 0x1c, 0xb5, 0xad, 0x30, 0x22, 0x8c, + 0x40, 0x8d, 0xa3, 0xac, 0x04, 0x65, 0x49, 0x54, 0xe1, 0xb2, 0x47, 0x3c, 0xc2, 0x41, 0x76, 0xfc, + 0x4b, 0xe0, 0x0b, 0xd7, 0x3d, 0x42, 0xbc, 0x06, 0xb6, 0x51, 0xe8, 0xdb, 0x28, 0x08, 0x08, 0x43, + 0xcc, 0x27, 0x01, 0x95, 0xa7, 0x6b, 0x35, 0x42, 0x9b, 0x84, 0xda, 0x55, 0x44, 0xb1, 0x90, 0x19, + 0x88, 0x86, 0xc8, 0xf3, 0x03, 0x0e, 0x96, 0xd8, 0xdb, 0x63, 0xfd, 0xa5, 0xcc, 0x08, 0xe8, 0xf8, + 0x56, 0xbc, 0x88, 0xb4, 0x42, 0x89, 0x5a, 0x12, 0x28, 0x4c, 0x6b, 0x11, 0x39, 0x19, 0x20, 0x58, + 0x3b, 0xc4, 0xd2, 0x9e, 0xf9, 0x51, 0x01, 0x57, 0xf7, 0x63, 0x57, 0x95, 0x01, 0x13, 0x75, 0xf1, + 0x71, 0x0b, 0x53, 0x06, 0x1f, 0x82, 0x0b, 0x07, 0x7e, 0x83, 0xe1, 0x88, 0x6a, 0xca, 0x92, 0xb2, + 0x9a, 0x2f, 0xaf, 0x5b, 0xe3, 0x46, 0x63, 0x25, 0xe5, 0x3b, 0xa2, 0xc4, 0x99, 0x3b, 0xed, 0x18, + 0x19, 0xb7, 0xcf, 0x00, 0x77, 0x00, 0x48, 0xfa, 0xd5, 0x54, 0xce, 0xb7, 0x62, 0x89, 0xe1, 0x58, + 0xf1, 0x70, 0x2c, 0x91, 0x41, 0x9f, 0xf0, 0x11, 0xf2, 0xb0, 0x34, 0xe2, 0xa6, 0x2a, 0xcd, 0x2f, + 0x0a, 0xd0, 0x86, 0x0d, 0xd3, 0x90, 0x04, 0x14, 0xc3, 0x10, 0xe4, 0x13, 0x6f, 0xb1, 0xeb, 0xec, + 0x6a, 0xbe, 0x5c, 0x1a, 0xef, 0xfa, 0x1f, 0xa2, 0x3e, 0x8f, 0x73, 0x2d, 0xf6, 0xfe, 0xe1, 0x9b, + 0x71, 0x69, 0xf8, 0x8c, 0xba, 0x69, 0x09, 0xb8, 0x3b, 0xa2, 0xad, 0xe2, 0xc4, 0xb6, 0x04, 0xd5, + 0x5f, 0x7d, 0x3d, 0x03, 0x57, 0x86, 0xdc, 0x88, 0x18, 0x1c, 0xa0, 0xfa, 0x75, 0x99, 0xc0, 0xca, + 0x34, 0x09, 0xec, 0x55, 0x1c, 0x10, 0x37, 0xd0, 0xed, 0x18, 0xea, 0x5e, 0xc5, 0x55, 0xfd, 0xba, + 0xf9, 0x49, 0x1d, 0x8a, 0x79, 0x30, 0xb4, 0x26, 0x00, 0x09, 0x9d, 0xd4, 0x59, 0x9e, 0x46, 0xc7, + 0x29, 0xc6, 0x2a, 0xbf, 0x3a, 0x46, 0xaa, 0xfe, 0xbc, 0x63, 0x2c, 0xb6, 0x51, 0xb3, 0xb1, 0x65, + 0x26, 0xcf, 0x4c, 0x37, 0x05, 0x80, 0x4f, 0xc0, 0x3c, 0x5f, 0x51, 0xaa, 0xa9, 0x3c, 0x1e, 0x63, + 0xbc, 0xd4, 0x6e, 0x8c, 0x73, 0x0c, 0xa9, 0x22, 0xcb, 0xce, 0x3b, 0xc6, 0x82, 0x50, 0x10, 0xff, + 0x4d, 0x57, 0x1e, 0xc0, 0x07, 0xe0, 0xa2, 0xd8, 0xf4, 0xe7, 0xa8, 0x56, 0x23, 0xad, 0x80, 0x69, + 0x59, 0xde, 0xcc, 0x0d, 0xa9, 0x20, 0x0e, 0x07, 0xec, 0xf7, 0x05, 0x48, 0x2e, 0xea, 0x82, 0x38, + 0x95, 0x0f, 0xb7, 0xe6, 0x7e, 0xbe, 0x35, 0x32, 0xa6, 0x0b, 0x16, 0xf9, 0xd4, 0xb8, 0x91, 0x7e, + 0x1e, 0xdb, 0xa9, 0x3c, 0x6e, 0x4e, 0x30, 0x3f, 0x22, 0x8a, 0x7d, 0x00, 0xd3, 0x9c, 0x32, 0x84, + 0x7b, 0x20, 0xc7, 0xbb, 0x90, 0xbc, 0x13, 0x87, 0x22, 0x4c, 0x8b, 0x9a, 0xf2, 0xef, 0x2c, 0xc8, + 0x71, 0x4e, 0xf8, 0x5e, 0x01, 0xf9, 0xd4, 0xc5, 0x80, 0xd3, 0xef, 0x7e, 0xff, 0xd6, 0x17, 0xca, + 0xb3, 0x94, 0x08, 0xf7, 0x66, 0xf9, 0xe5, 0xe7, 0x1f, 0x6f, 0xd4, 0x0d, 0xb8, 0x66, 0x4f, 0xf1, + 0x06, 0xa3, 0x76, 0xc3, 0xa7, 0x0c, 0xbe, 0x53, 0x00, 0x48, 0xb8, 0xe0, 0x9d, 0x19, 0x6e, 0xa9, + 0x30, 0x3a, 0xfb, 0xbd, 0x9e, 0xd5, 0xa7, 0x1f, 0x1c, 0x10, 0xf8, 0x5a, 0x01, 0x39, 0x3e, 0x73, + 0xb8, 0x3e, 0x41, 0x30, 0xbd, 0x25, 0x85, 0x8d, 0xe9, 0xc0, 0xd2, 0xd8, 0x26, 0x37, 0x56, 0x84, + 0xb7, 0xec, 0xff, 0xbf, 0xd7, 0x85, 0x27, 0xe7, 0xf1, 0x69, 0x57, 0x57, 0xce, 0xba, 0xba, 0xf2, + 0xbd, 0xab, 0x2b, 0xaf, 0x7a, 0x7a, 0xe6, 0xac, 0xa7, 0x67, 0xbe, 0xf6, 0xf4, 0xcc, 0xd3, 0x6d, + 0xcf, 0x67, 0x87, 0xad, 0xaa, 0x55, 0x23, 0x4d, 0x41, 0xb5, 0x19, 0x60, 0x76, 0x42, 0xa2, 0x23, + 0xf9, 0x2f, 0xfe, 0x48, 0x79, 0xc4, 0x0e, 0x48, 0x1d, 0x8f, 0x10, 0xa9, 0xce, 0xf3, 0xaf, 0xc2, + 0xdd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xb5, 0x31, 0x38, 0x2a, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Deployments queries deployments + Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) + // Group queries group details + Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) { + out := new(QueryDeploymentsResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Query/Deployments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) { + out := new(QueryDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Query/Deployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) { + out := new(QueryGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta1.Query/Group", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Deployments queries deployments + Deployments(context.Context, *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(context.Context, *QueryDeploymentRequest) (*QueryDeploymentResponse, error) + // Group queries group details + Group(context.Context, *QueryGroupRequest) (*QueryGroupResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Deployments(ctx context.Context, req *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployments not implemented") +} +func (*UnimplementedQueryServer) Deployment(ctx context.Context, req *QueryDeploymentRequest) (*QueryDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployment not implemented") +} +func (*UnimplementedQueryServer) Group(ctx context.Context, req *QueryGroupRequest) (*QueryGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Group not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Deployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Query/Deployments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployments(ctx, req.(*QueryDeploymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Query/Deployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployment(ctx, req.(*QueryDeploymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Group_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Group(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta1.Query/Group", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Group(ctx, req.(*QueryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Deployments", + Handler: _Query_Deployments_Handler, + }, + { + MethodName: "Deployment", + Handler: _Query_Deployment_Handler, + }, + { + MethodName: "Group", + Handler: _Query_Group_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta1/query.proto", +} + +func (m *QueryDeploymentsRequest) 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 *QueryDeploymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsRequest) 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 + } + { + size, err := m.Filters.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 *QueryDeploymentsResponse) 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 *QueryDeploymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsResponse) 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.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[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 (m *QueryDeploymentRequest) 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 *QueryDeploymentRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryDeploymentResponse) 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 *QueryDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + 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)) + } + i-- + dAtA[i] = 0x1a + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.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 *QueryGroupRequest) 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 *QueryGroupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryGroupResponse) 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 *QueryGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Group.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 *QueryDeploymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDeploymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + 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 (m *QueryDeploymentRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.EscrowAccount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Group.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryDeploymentsRequest) 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: QueryDeploymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryDeploymentsResponse) 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: QueryDeploymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, QueryDeploymentResponse{}) + if err := m.Deployments[len(m.Deployments)-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) + } + 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.PageResponse{} + } + 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 *QueryDeploymentRequest) 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: QueryDeploymentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentRequest: 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 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.ID.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 *QueryDeploymentResponse) 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: QueryDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", 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.EscrowAccount.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 *QueryGroupRequest) 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: QueryGroupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupRequest: 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 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.ID.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 *QueryGroupResponse) 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: QueryGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", 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.Group.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/query.pb.gw.go b/go/node/deployment/v1beta1/query.pb.gw.go new file mode 100644 index 00000000..183c2681 --- /dev/null +++ b/go/node/deployment/v1beta1/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/deployment/v1beta1/query.proto + +/* +Package v1beta1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Deployments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployments(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Deployment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployment(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Group_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Group(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Group(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "groups", "info"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Deployments_0 = runtime.ForwardResponseMessage + + forward_Query_Deployment_0 = runtime.ForwardResponseMessage + + forward_Query_Group_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/deployment/v1beta2/authz.pb.go b/go/node/deployment/v1beta2/authz.pb.go new file mode 100644 index 00000000..9bdd41e7 --- /dev/null +++ b/go/node/deployment/v1beta2/authz.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/authz.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/regen-network/cosmos-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 + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +type DepositDeploymentAuthorization struct { + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + SpendLimit types.Coin `protobuf:"bytes,1,opt,name=spend_limit,json=spendLimit,proto3" json:"spend_limit"` +} + +func (m *DepositDeploymentAuthorization) Reset() { *m = DepositDeploymentAuthorization{} } +func (m *DepositDeploymentAuthorization) String() string { return proto.CompactTextString(m) } +func (*DepositDeploymentAuthorization) ProtoMessage() {} +func (*DepositDeploymentAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_7ce8076728f4c483, []int{0} +} +func (m *DepositDeploymentAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DepositDeploymentAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DepositDeploymentAuthorization.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 *DepositDeploymentAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositDeploymentAuthorization.Merge(m, src) +} +func (m *DepositDeploymentAuthorization) XXX_Size() int { + return m.Size() +} +func (m *DepositDeploymentAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_DepositDeploymentAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_DepositDeploymentAuthorization proto.InternalMessageInfo + +func (m *DepositDeploymentAuthorization) GetSpendLimit() types.Coin { + if m != nil { + return m.SpendLimit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*DepositDeploymentAuthorization)(nil), "akash.deployment.v1beta2.DepositDeploymentAuthorization") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/authz.proto", fileDescriptor_7ce8076728f4c483) +} + +var fileDescriptor_7ce8076728f4c483 = []byte{ + // 280 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x92, 0x00, 0xab, 0xd2, 0x43, 0xa8, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, + 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x0e, 0xc2, 0xd3, 0x4f, 0x4a, 0x2c, 0x4e, 0x85, 0xda, 0x65, + 0xa8, 0x9f, 0x9c, 0x9f, 0x99, 0x07, 0x91, 0x57, 0x6a, 0x61, 0xe4, 0x92, 0x73, 0x49, 0x2d, 0xc8, + 0x2f, 0xce, 0x2c, 0x71, 0x81, 0x5b, 0xe7, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x95, 0x58, + 0x92, 0x99, 0x9f, 0x27, 0xe4, 0xcf, 0xc5, 0x5d, 0x5c, 0x90, 0x9a, 0x97, 0x12, 0x9f, 0x93, 0x99, + 0x9b, 0x59, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa9, 0x07, 0xb5, 0x06, 0x64, 0x30, + 0xd4, 0x79, 0x86, 0x7a, 0xce, 0xf9, 0x99, 0x79, 0x4e, 0xc2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, + 0x27, 0x8f, 0xac, 0x2b, 0x88, 0x0b, 0xcc, 0xf1, 0x01, 0xb1, 0xad, 0x04, 0x2f, 0x6d, 0xd1, 0xe5, + 0x45, 0xb1, 0xc3, 0x29, 0xfc, 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, 0x6c, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0xc1, 0xa2, 0x9b, 0x97, + 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, + 0xa7, 0xa4, 0x62, 0x09, 0xd6, 0x24, 0x36, 0xb0, 0x37, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x4d, 0x91, 0x48, 0x38, 0x79, 0x01, 0x00, 0x00, +} + +func (m *DepositDeploymentAuthorization) 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 *DepositDeploymentAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DepositDeploymentAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SpendLimit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuthz(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthz(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DepositDeploymentAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SpendLimit.Size() + n += 1 + l + sovAuthz(uint64(l)) + return n +} + +func sovAuthz(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthz(x uint64) (n int) { + return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DepositDeploymentAuthorization) 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 ErrIntOverflowAuthz + } + 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: DepositDeploymentAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositDeploymentAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpendLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthz(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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrInvalidLengthAuthz + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthz + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthz + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/codec.go b/go/node/deployment/v1beta2/codec.go new file mode 100644 index 00000000..cd1e21d3 --- /dev/null +++ b/go/node/deployment/v1beta2/codec.go @@ -0,0 +1,58 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/deployment module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/deployment and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterLegacyAminoCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateDeployment{}, ModuleName+"/"+MsgTypeCreateDeployment, nil) + cdc.RegisterConcrete(&MsgUpdateDeployment{}, ModuleName+"/"+MsgTypeUpdateDeployment, nil) + cdc.RegisterConcrete(&MsgDepositDeployment{}, ModuleName+"/"+MsgTypeDepositDeployment, nil) + cdc.RegisterConcrete(&MsgCloseDeployment{}, ModuleName+"/"+MsgTypeCloseDeployment, nil) + cdc.RegisterConcrete(&MsgCloseGroup{}, ModuleName+"/"+MsgTypeCloseGroup, nil) + cdc.RegisterConcrete(&MsgPauseGroup{}, ModuleName+"/"+MsgTypePauseGroup, nil) + cdc.RegisterConcrete(&MsgStartGroup{}, ModuleName+"/"+MsgTypeStartGroup, nil) +} + +// RegisterInterfaces registers the x/deployment interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateDeployment{}, + &MsgUpdateDeployment{}, + &MsgDepositDeployment{}, + &MsgCloseDeployment{}, + &MsgCloseGroup{}, + &MsgPauseGroup{}, + &MsgStartGroup{}, + ) + registry.RegisterImplementations( + (*authz.Authorization)(nil), + &DepositDeploymentAuthorization{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/deployment/v1beta2/deployment.pb.go b/go/node/deployment/v1beta2/deployment.pb.go new file mode 100644 index 00000000..e42cb4ae --- /dev/null +++ b/go/node/deployment/v1beta2/deployment.pb.go @@ -0,0 +1,960 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/deployment.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of deployment +type Deployment_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + DeploymentStateInvalid Deployment_State = 0 + // DeploymentActive denotes state for deployment active + DeploymentActive Deployment_State = 1 + // DeploymentClosed denotes state for deployment closed + DeploymentClosed Deployment_State = 2 +) + +var Deployment_State_name = map[int32]string{ + 0: "invalid", + 1: "active", + 2: "closed", +} + +var Deployment_State_value = map[string]int32{ + "invalid": 0, + "active": 1, + "closed": 2, +} + +func (x Deployment_State) String() string { + return proto.EnumName(Deployment_State_name, int32(x)) +} + +func (Deployment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_897ec42830b2cbac, []int{1, 0} +} + +// DeploymentID stores owner and sequence number +type DeploymentID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` +} + +func (m *DeploymentID) Reset() { *m = DeploymentID{} } +func (*DeploymentID) ProtoMessage() {} +func (*DeploymentID) Descriptor() ([]byte, []int) { + return fileDescriptor_897ec42830b2cbac, []int{0} +} +func (m *DeploymentID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentID.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 *DeploymentID) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentID.Merge(m, src) +} +func (m *DeploymentID) XXX_Size() int { + return m.Size() +} +func (m *DeploymentID) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentID.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentID proto.InternalMessageInfo + +func (m *DeploymentID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +// Deployment stores deploymentID, state and version details +type Deployment struct { + DeploymentID DeploymentID `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"id" yaml:"id"` + State Deployment_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta2.Deployment_State" json:"state" yaml:"state"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Deployment) Reset() { *m = Deployment{} } +func (m *Deployment) String() string { return proto.CompactTextString(m) } +func (*Deployment) ProtoMessage() {} +func (*Deployment) Descriptor() ([]byte, []int) { + return fileDescriptor_897ec42830b2cbac, []int{1} +} +func (m *Deployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Deployment.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 *Deployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deployment.Merge(m, src) +} +func (m *Deployment) XXX_Size() int { + return m.Size() +} +func (m *Deployment) XXX_DiscardUnknown() { + xxx_messageInfo_Deployment.DiscardUnknown(m) +} + +var xxx_messageInfo_Deployment proto.InternalMessageInfo + +func (m *Deployment) GetDeploymentID() DeploymentID { + if m != nil { + return m.DeploymentID + } + return DeploymentID{} +} + +func (m *Deployment) GetState() Deployment_State { + if m != nil { + return m.State + } + return DeploymentStateInvalid +} + +func (m *Deployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *Deployment) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// DeploymentFilters defines filters used to filter deployments +type DeploymentFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *DeploymentFilters) Reset() { *m = DeploymentFilters{} } +func (m *DeploymentFilters) String() string { return proto.CompactTextString(m) } +func (*DeploymentFilters) ProtoMessage() {} +func (*DeploymentFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_897ec42830b2cbac, []int{2} +} +func (m *DeploymentFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentFilters.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 *DeploymentFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentFilters.Merge(m, src) +} +func (m *DeploymentFilters) XXX_Size() int { + return m.Size() +} +func (m *DeploymentFilters) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentFilters proto.InternalMessageInfo + +func (m *DeploymentFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *DeploymentFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta2.Deployment_State", Deployment_State_name, Deployment_State_value) + proto.RegisterType((*DeploymentID)(nil), "akash.deployment.v1beta2.DeploymentID") + proto.RegisterType((*Deployment)(nil), "akash.deployment.v1beta2.Deployment") + proto.RegisterType((*DeploymentFilters)(nil), "akash.deployment.v1beta2.DeploymentFilters") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/deployment.proto", fileDescriptor_897ec42830b2cbac) +} + +var fileDescriptor_897ec42830b2cbac = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x8d, 0xd3, 0x92, 0x6b, 0xa8, 0x82, 0x55, 0x21, 0x63, 0xa9, 0x3e, 0xcb, 0x03, + 0x0d, 0x48, 0xd8, 0x22, 0x1d, 0x90, 0x22, 0x31, 0xd4, 0x44, 0x48, 0x59, 0xdd, 0x01, 0x09, 0x86, + 0xea, 0x92, 0x3b, 0xa5, 0xa7, 0x3a, 0xbe, 0xd4, 0x3e, 0x52, 0x95, 0x81, 0x19, 0x75, 0x62, 0x64, + 0xa9, 0x54, 0x89, 0x2f, 0xc0, 0xca, 0x37, 0xe8, 0xd8, 0x91, 0xe9, 0x84, 0x9c, 0x05, 0x65, 0xcc, + 0x27, 0x40, 0xbe, 0x4b, 0x71, 0x40, 0x80, 0x98, 0xd8, 0xfc, 0x7e, 0xf7, 0x7f, 0x7e, 0xff, 0x77, + 0xef, 0x1e, 0x7c, 0x80, 0x8f, 0x71, 0x7e, 0x14, 0x12, 0x3a, 0x49, 0xf8, 0xd9, 0x98, 0xa6, 0x22, + 0x9c, 0x3e, 0x1e, 0x50, 0x81, 0x3b, 0x2b, 0x28, 0x98, 0x64, 0x5c, 0x70, 0xcb, 0x56, 0xd2, 0x60, + 0x85, 0x2f, 0xa5, 0xce, 0xf6, 0x88, 0x8f, 0xb8, 0x12, 0x85, 0xe5, 0x97, 0xd6, 0xfb, 0x6f, 0x61, + 0xb3, 0xf7, 0x43, 0xdb, 0xef, 0x59, 0x21, 0xac, 0xf3, 0xd3, 0x94, 0x66, 0x36, 0xf0, 0x40, 0xbb, + 0x11, 0xdd, 0x9b, 0x4b, 0xa4, 0xc1, 0x42, 0xa2, 0xe6, 0x19, 0x1e, 0x27, 0x5d, 0x5f, 0x85, 0x7e, + 0xac, 0xb1, 0xb5, 0x07, 0x4d, 0x92, 0xd3, 0x13, 0x7b, 0xcd, 0x03, 0x6d, 0x33, 0x42, 0x85, 0x44, + 0x66, 0xef, 0x80, 0x9e, 0xcc, 0x25, 0x52, 0x7c, 0x21, 0xd1, 0xa6, 0x4e, 0x2b, 0x23, 0x3f, 0x56, + 0xb0, 0x7b, 0xeb, 0xc3, 0x25, 0x32, 0xbe, 0x5d, 0x22, 0xc3, 0xff, 0x5c, 0x83, 0xb0, 0x32, 0x60, + 0x09, 0x78, 0xbb, 0xb2, 0x7e, 0xc8, 0x88, 0xb2, 0xb1, 0xd9, 0xb9, 0x1f, 0xfc, 0xa9, 0xad, 0x60, + 0xd5, 0x7d, 0xb4, 0x7b, 0x25, 0x91, 0x51, 0x48, 0xf4, 0x53, 0x4f, 0x73, 0x89, 0xd6, 0x18, 0x59, + 0x48, 0xd4, 0xd0, 0x46, 0x18, 0xf1, 0xe3, 0x66, 0xf5, 0xa7, 0x3e, 0xb1, 0x5e, 0xc1, 0x7a, 0x2e, + 0xb0, 0xa0, 0xaa, 0x89, 0xad, 0xce, 0xc3, 0x7f, 0xa9, 0x16, 0x1c, 0x94, 0x19, 0xfa, 0x82, 0x54, + 0x72, 0x75, 0x41, 0x2a, 0xf4, 0x63, 0x8d, 0xad, 0x27, 0x70, 0x63, 0x4a, 0xb3, 0x9c, 0xf1, 0xd4, + 0xae, 0x79, 0xa0, 0xdd, 0x8c, 0x76, 0xe6, 0x12, 0xdd, 0xa0, 0x85, 0x44, 0x5b, 0x3a, 0x69, 0x09, + 0xfc, 0xf8, 0xe6, 0xc8, 0xda, 0x81, 0x70, 0x98, 0x51, 0x2c, 0x28, 0x39, 0xc4, 0xc2, 0x36, 0x3d, + 0xd0, 0xae, 0xc5, 0x8d, 0x25, 0xd9, 0x17, 0xfe, 0x1b, 0x58, 0x57, 0x16, 0xac, 0x5d, 0xb8, 0xc1, + 0xd2, 0x29, 0x4e, 0x18, 0x69, 0x19, 0x8e, 0x73, 0x7e, 0xe1, 0xdd, 0xad, 0x5c, 0x2a, 0x45, 0x5f, + 0x9f, 0x5a, 0x1e, 0x5c, 0xc7, 0x43, 0xc1, 0xa6, 0xb4, 0x05, 0x9c, 0xed, 0xf3, 0x0b, 0xaf, 0x55, + 0xe9, 0xf6, 0x15, 0x2f, 0x15, 0xc3, 0x84, 0xe7, 0x94, 0xb4, 0xd6, 0x7e, 0x55, 0x3c, 0x53, 0xdc, + 0x31, 0xdf, 0x7d, 0x74, 0x8d, 0xae, 0xa9, 0x66, 0xf7, 0x09, 0xc0, 0x3b, 0x95, 0xe0, 0x39, 0x4b, + 0x04, 0xcd, 0xf2, 0xff, 0xf3, 0x82, 0xca, 0x2a, 0x7a, 0x64, 0xb5, 0xaa, 0xca, 0xdf, 0xc6, 0xa0, + 0x2d, 0x47, 0x2f, 0xae, 0x0a, 0x17, 0x5c, 0x17, 0x2e, 0xf8, 0x5a, 0xb8, 0xe0, 0xfd, 0xcc, 0x35, + 0xae, 0x67, 0xae, 0xf1, 0x65, 0xe6, 0x1a, 0x2f, 0x9f, 0x8e, 0x98, 0x38, 0x7a, 0x3d, 0x08, 0x86, + 0x7c, 0x1c, 0xaa, 0xf1, 0x3f, 0x4a, 0xa9, 0x38, 0xe5, 0xd9, 0xf1, 0x32, 0xc2, 0x13, 0x16, 0x8e, + 0x78, 0x98, 0x72, 0x42, 0x7f, 0xb3, 0x88, 0x83, 0x75, 0xb5, 0x4e, 0x7b, 0xdf, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x1b, 0x82, 0x2a, 0xa8, 0xab, 0x03, 0x00, 0x00, +} + +func (m *DeploymentID) 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 *DeploymentID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Deployment) 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 *Deployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.DeploymentID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeploymentFilters) 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 *DeploymentFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDeployment(dAtA []byte, offset int, v uint64) int { + offset -= sovDeployment(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DeploymentID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + return n +} + +func (m *Deployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentID.Size() + n += 1 + l + sovDeployment(uint64(l)) + if m.State != 0 { + n += 1 + sovDeployment(uint64(m.State)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.CreatedAt != 0 { + n += 1 + sovDeployment(uint64(m.CreatedAt)) + } + return n +} + +func (m *DeploymentFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + return n +} + +func sovDeployment(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDeployment(x uint64) (n int) { + return sovDeployment(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DeploymentID) 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 ErrIntOverflowDeployment + } + 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: DeploymentID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Deployment) 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 ErrIntOverflowDeployment + } + 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: Deployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Deployment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentFilters) 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 ErrIntOverflowDeployment + } + 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: DeploymentFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDeployment(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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrInvalidLengthDeployment + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDeployment + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDeployment + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDeployment = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDeployment = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDeployment = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/deploymentmsg.pb.go b/go/node/deployment/v1beta2/deploymentmsg.pb.go new file mode 100644 index 00000000..d369f03c --- /dev/null +++ b/go/node/deployment/v1beta2/deploymentmsg.pb.go @@ -0,0 +1,1722 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/deploymentmsg.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// MsgCreateDeployment defines an SDK message for creating deployment +type MsgCreateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Groups []GroupSpec `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + Deposit types.Coin `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit" yaml:"deposit"` + // Depositor pays for the deposit + Depositor string `protobuf:"bytes,5,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` +} + +func (m *MsgCreateDeployment) Reset() { *m = MsgCreateDeployment{} } +func (m *MsgCreateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeployment) ProtoMessage() {} +func (*MsgCreateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{0} +} +func (m *MsgCreateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeployment.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 *MsgCreateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeployment.Merge(m, src) +} +func (m *MsgCreateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeployment proto.InternalMessageInfo + +func (m *MsgCreateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgCreateDeployment) GetGroups() []GroupSpec { + if m != nil { + return m.Groups + } + return nil +} + +func (m *MsgCreateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *MsgCreateDeployment) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +func (m *MsgCreateDeployment) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgCreateDeploymentResponse struct { +} + +func (m *MsgCreateDeploymentResponse) Reset() { *m = MsgCreateDeploymentResponse{} } +func (m *MsgCreateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeploymentResponse) ProtoMessage() {} +func (*MsgCreateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{1} +} +func (m *MsgCreateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeploymentResponse.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 *MsgCreateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeploymentResponse.Merge(m, src) +} +func (m *MsgCreateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeploymentResponse proto.InternalMessageInfo + +// MsgDepositDeployment deposits more funds into the deposit account +type MsgDepositDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount" yaml:"amount"` + // Depositor pays for the deposit + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` +} + +func (m *MsgDepositDeployment) Reset() { *m = MsgDepositDeployment{} } +func (m *MsgDepositDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeployment) ProtoMessage() {} +func (*MsgDepositDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{2} +} +func (m *MsgDepositDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeployment.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 *MsgDepositDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeployment.Merge(m, src) +} +func (m *MsgDepositDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeployment proto.InternalMessageInfo + +func (m *MsgDepositDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgDepositDeployment) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func (m *MsgDepositDeployment) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgDepositDeploymentResponse struct { +} + +func (m *MsgDepositDeploymentResponse) Reset() { *m = MsgDepositDeploymentResponse{} } +func (m *MsgDepositDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeploymentResponse) ProtoMessage() {} +func (*MsgDepositDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{3} +} +func (m *MsgDepositDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeploymentResponse.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 *MsgDepositDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeploymentResponse.Merge(m, src) +} +func (m *MsgDepositDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeploymentResponse proto.InternalMessageInfo + +// MsgUpdateDeployment defines an SDK message for updating deployment +type MsgUpdateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` +} + +func (m *MsgUpdateDeployment) Reset() { *m = MsgUpdateDeployment{} } +func (m *MsgUpdateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeployment) ProtoMessage() {} +func (*MsgUpdateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{4} +} +func (m *MsgUpdateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeployment.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 *MsgUpdateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeployment.Merge(m, src) +} +func (m *MsgUpdateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeployment proto.InternalMessageInfo + +func (m *MsgUpdateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgUpdateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +type MsgUpdateDeploymentResponse struct { +} + +func (m *MsgUpdateDeploymentResponse) Reset() { *m = MsgUpdateDeploymentResponse{} } +func (m *MsgUpdateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeploymentResponse) ProtoMessage() {} +func (*MsgUpdateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{5} +} +func (m *MsgUpdateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeploymentResponse.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 *MsgUpdateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeploymentResponse.Merge(m, src) +} +func (m *MsgUpdateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeploymentResponse proto.InternalMessageInfo + +// MsgCloseDeployment defines an SDK message for closing deployment +type MsgCloseDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseDeployment) Reset() { *m = MsgCloseDeployment{} } +func (m *MsgCloseDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeployment) ProtoMessage() {} +func (*MsgCloseDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{6} +} +func (m *MsgCloseDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeployment.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 *MsgCloseDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeployment.Merge(m, src) +} +func (m *MsgCloseDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeployment proto.InternalMessageInfo + +func (m *MsgCloseDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +type MsgCloseDeploymentResponse struct { +} + +func (m *MsgCloseDeploymentResponse) Reset() { *m = MsgCloseDeploymentResponse{} } +func (m *MsgCloseDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeploymentResponse) ProtoMessage() {} +func (*MsgCloseDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5e09213efb52c240, []int{7} +} +func (m *MsgCloseDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeploymentResponse.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 *MsgCloseDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeploymentResponse.Merge(m, src) +} +func (m *MsgCloseDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeploymentResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateDeployment)(nil), "akash.deployment.v1beta2.MsgCreateDeployment") + proto.RegisterType((*MsgCreateDeploymentResponse)(nil), "akash.deployment.v1beta2.MsgCreateDeploymentResponse") + proto.RegisterType((*MsgDepositDeployment)(nil), "akash.deployment.v1beta2.MsgDepositDeployment") + proto.RegisterType((*MsgDepositDeploymentResponse)(nil), "akash.deployment.v1beta2.MsgDepositDeploymentResponse") + proto.RegisterType((*MsgUpdateDeployment)(nil), "akash.deployment.v1beta2.MsgUpdateDeployment") + proto.RegisterType((*MsgUpdateDeploymentResponse)(nil), "akash.deployment.v1beta2.MsgUpdateDeploymentResponse") + proto.RegisterType((*MsgCloseDeployment)(nil), "akash.deployment.v1beta2.MsgCloseDeployment") + proto.RegisterType((*MsgCloseDeploymentResponse)(nil), "akash.deployment.v1beta2.MsgCloseDeploymentResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/deploymentmsg.proto", fileDescriptor_5e09213efb52c240) +} + +var fileDescriptor_5e09213efb52c240 = []byte{ + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0x6e, 0xd2, 0x75, 0x97, 0xce, 0xaa, 0x48, 0xdc, 0x43, 0xac, 0xdb, 0x4c, 0x77, 0x04, 0xa9, + 0xa0, 0x09, 0xad, 0x07, 0x61, 0x41, 0x84, 0x6c, 0x41, 0xf6, 0xb0, 0x97, 0xc8, 0x2a, 0x88, 0x97, + 0xb4, 0x19, 0xb2, 0xc3, 0x36, 0x79, 0x31, 0x93, 0xae, 0xec, 0x3f, 0xf0, 0xe8, 0x4f, 0x10, 0xaf, + 0xfe, 0x91, 0x3d, 0xee, 0xd1, 0xd3, 0x20, 0xed, 0x45, 0x7a, 0xec, 0x2f, 0x90, 0x64, 0x26, 0x8d, + 0xd5, 0x16, 0x65, 0x61, 0xbd, 0x65, 0xde, 0xf7, 0x7d, 0x2f, 0xdf, 0x7c, 0xef, 0x31, 0xe8, 0xb1, + 0x7f, 0xea, 0xf3, 0x13, 0x27, 0xa0, 0xc9, 0x08, 0xce, 0x23, 0x1a, 0x67, 0xce, 0x59, 0x77, 0x40, + 0x33, 0xbf, 0xf7, 0x4b, 0x29, 0xe2, 0xa1, 0x9d, 0xa4, 0x90, 0x81, 0x61, 0x16, 0x6c, 0xbb, 0x82, + 0x6c, 0xc5, 0x6e, 0xee, 0x84, 0x10, 0x42, 0x41, 0x72, 0xf2, 0x2f, 0xc9, 0x6f, 0x3e, 0xfa, 0x87, + 0xee, 0x8a, 0xda, 0x59, 0x4b, 0x0d, 0x53, 0x18, 0x27, 0x3c, 0xa1, 0x43, 0xc5, 0xb4, 0x86, 0xc0, + 0x23, 0xe0, 0xce, 0xc0, 0xe7, 0x54, 0x91, 0xba, 0xce, 0x10, 0x58, 0x2c, 0x71, 0xf2, 0xa5, 0x8e, + 0xee, 0x1e, 0xf1, 0xf0, 0x20, 0xa5, 0x7e, 0x46, 0xfb, 0x8b, 0x7e, 0xc6, 0x31, 0xd2, 0x59, 0x60, + 0x6a, 0x6d, 0xad, 0xb3, 0xdd, 0x7b, 0x68, 0xaf, 0xbb, 0x89, 0x5d, 0x29, 0x0e, 0xfb, 0x6e, 0xeb, + 0x42, 0xe0, 0xda, 0x44, 0x60, 0xfd, 0xb0, 0x3f, 0x13, 0x58, 0x67, 0xc1, 0x5c, 0xe0, 0xc6, 0xb9, + 0x1f, 0x8d, 0xf6, 0x09, 0x0b, 0x88, 0xa7, 0xb3, 0xc0, 0x78, 0x87, 0x36, 0xa5, 0x43, 0x53, 0x6f, + 0xd7, 0x3b, 0xdb, 0xbd, 0x07, 0xeb, 0x5b, 0xbf, 0xcc, 0x79, 0xaf, 0x12, 0x3a, 0x74, 0x71, 0xde, + 0x77, 0x26, 0xb0, 0x92, 0xce, 0x05, 0xbe, 0x25, 0xbb, 0xca, 0x33, 0xf1, 0x14, 0x60, 0x3c, 0x43, + 0x5b, 0x67, 0x34, 0xe5, 0x0c, 0x62, 0xb3, 0xde, 0xd6, 0x3a, 0x37, 0xdd, 0xd6, 0x4c, 0xe0, 0xb2, + 0x34, 0x17, 0xf8, 0xb6, 0x94, 0xa9, 0x02, 0xf1, 0x4a, 0xc8, 0x78, 0x8d, 0xb6, 0x02, 0x9a, 0x00, + 0x67, 0x99, 0xb9, 0x51, 0x5c, 0xf9, 0x9e, 0x2d, 0x73, 0xb3, 0xf3, 0xdc, 0x94, 0xa5, 0xae, 0x7d, + 0x00, 0x2c, 0x76, 0xf7, 0x94, 0x9b, 0x52, 0x51, 0xf5, 0x55, 0x05, 0xe2, 0x95, 0x90, 0xf1, 0x02, + 0x35, 0xd4, 0x27, 0xa4, 0xe6, 0x8d, 0xb6, 0xd6, 0x69, 0xb8, 0x7b, 0x33, 0x81, 0xab, 0xe2, 0x5c, + 0xe0, 0x3b, 0x4b, 0x62, 0x48, 0x89, 0x57, 0xc1, 0xfb, 0x1b, 0x3f, 0x3e, 0xe3, 0x1a, 0x69, 0xa1, + 0xfb, 0x2b, 0x66, 0xe4, 0x51, 0x9e, 0x40, 0xcc, 0x29, 0xf9, 0xa8, 0xa3, 0x9d, 0x23, 0x1e, 0xf6, + 0xa5, 0xea, 0xfa, 0x87, 0xe8, 0xa1, 0x4d, 0x3f, 0x82, 0x71, 0x9c, 0x99, 0xfa, 0xdf, 0xc2, 0x5a, + 0x8c, 0x4e, 0x0a, 0xaa, 0xd1, 0xc9, 0x33, 0xf1, 0x14, 0xb0, 0x9c, 0x54, 0xfd, 0xca, 0x49, 0x59, + 0x68, 0x77, 0x55, 0x12, 0x8b, 0xa8, 0xbe, 0x6a, 0xc5, 0xba, 0x1f, 0x27, 0xc1, 0x7f, 0x59, 0xf7, + 0xab, 0x2e, 0xe4, 0xd2, 0xdc, 0x7f, 0x37, 0xbb, 0xb8, 0xcc, 0x7b, 0x64, 0xe4, 0x6b, 0x31, 0x02, + 0x7e, 0xfd, 0x57, 0x51, 0x8e, 0x76, 0x51, 0xf3, 0xcf, 0x5f, 0x96, 0x86, 0xdc, 0x37, 0x17, 0x13, + 0x4b, 0xbb, 0x9c, 0x58, 0xda, 0xf7, 0x89, 0xa5, 0x7d, 0x9a, 0x5a, 0xb5, 0xcb, 0xa9, 0x55, 0xfb, + 0x36, 0xb5, 0x6a, 0x6f, 0x9f, 0x87, 0x2c, 0x3b, 0x19, 0x0f, 0xec, 0x21, 0x44, 0x4e, 0x61, 0xe9, + 0x49, 0x4c, 0xb3, 0x0f, 0x90, 0x9e, 0xaa, 0x93, 0x9f, 0x30, 0x27, 0x04, 0x27, 0x86, 0x80, 0xae, + 0x78, 0xd5, 0x06, 0x9b, 0xc5, 0x63, 0xf5, 0xf4, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0xa1, + 0x02, 0x3a, 0x81, 0x05, 0x00, 0x00, +} + +func (m *MsgCreateDeployment) 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 *MsgCreateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x2a + } + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateDeploymentResponse) 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 *MsgCreateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeployment) 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 *MsgDepositDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeploymentResponse) 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 *MsgDepositDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeployment) 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 *MsgUpdateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeploymentResponse) 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 *MsgUpdateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeployment) 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 *MsgCloseDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeploymentResponse) 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 *MsgCloseDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintDeploymentmsg(dAtA []byte, offset int, v uint64) int { + offset -= sovDeploymentmsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgCreateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDepositDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = m.Amount.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgDepositDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgUpdateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + return n +} + +func (m *MsgCloseDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovDeploymentmsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDeploymentmsg(x uint64) (n int) { + return sovDeploymentmsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCreateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, GroupSpec{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + 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 ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCreateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgDepositDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + 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 ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgDepositDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgUpdateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgUpdateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCloseDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCloseDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDeploymentmsg(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, ErrIntOverflowDeploymentmsg + } + 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, ErrIntOverflowDeploymentmsg + } + 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, ErrIntOverflowDeploymentmsg + } + 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, ErrInvalidLengthDeploymentmsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDeploymentmsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDeploymentmsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDeploymentmsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDeploymentmsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDeploymentmsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/deposit_deployment_authorization.go b/go/node/deployment/v1beta2/deposit_deployment_authorization.go new file mode 100644 index 00000000..53399448 --- /dev/null +++ b/go/node/deployment/v1beta2/deposit_deployment_authorization.go @@ -0,0 +1,48 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +var ( + _ authz.Authorization = &DepositDeploymentAuthorization{} +) + +// NewDepositDeploymentAuthorization creates a new DepositDeploymentAuthorization object. +func NewDepositDeploymentAuthorization(spendLimit sdk.Coin) *DepositDeploymentAuthorization { + return &DepositDeploymentAuthorization{ + SpendLimit: spendLimit, + } +} + +// MsgTypeURL implements Authorization.MsgTypeURL. +func (m DepositDeploymentAuthorization) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgDepositDeployment{}) +} + +// Accept implements Authorization.Accept. +func (m DepositDeploymentAuthorization) Accept(_ sdk.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + mDepositDeployment, ok := msg.(*MsgDepositDeployment) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + if m.SpendLimit.IsLT(mDepositDeployment.Amount) { + return authz.AcceptResponse{}, sdkerrors.ErrInsufficientFunds.Wrapf("requested amount is more than spend limit") + } + limitLeft := m.SpendLimit.Sub(mDepositDeployment.Amount) + if limitLeft.IsZero() { + return authz.AcceptResponse{Accept: true, Delete: true}, nil + } + + return authz.AcceptResponse{Accept: true, Delete: false, Updated: &DepositDeploymentAuthorization{SpendLimit: limitLeft}}, nil +} + +// ValidateBasic implements Authorization.ValidateBasic. +func (m DepositDeploymentAuthorization) ValidateBasic() error { + if !m.SpendLimit.IsPositive() { + return sdkerrors.ErrInvalidCoins.Wrapf("spend limit cannot be negative") + } + return nil +} diff --git a/go/node/deployment/v1beta2/errors.go b/go/node/deployment/v1beta2/errors.go new file mode 100644 index 00000000..a6865e9b --- /dev/null +++ b/go/node/deployment/v1beta2/errors.go @@ -0,0 +1,53 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + // ErrNameDoesNotExist is the error when name does not exist + ErrNameDoesNotExist = errors.New("Name does not exist") + // ErrInvalidRequest is the error for invalid request + ErrInvalidRequest = errors.New("Invalid request") + // ErrDeploymentExists is the error when already deployment exists + ErrDeploymentExists = errors.New("Deployment exists") + // ErrDeploymentNotFound is the error when deployment not found + ErrDeploymentNotFound = errors.New("Deployment not found") + // ErrDeploymentClosed is the error when deployment is closed + ErrDeploymentClosed = errors.New("Deployment closed") + // ErrOwnerAcctMissing is the error for owner account missing + ErrOwnerAcctMissing = errors.New("Owner account missing") + // ErrInvalidGroups is the error when groups are empty + ErrInvalidGroups = errors.New("Invalid groups") + // ErrInvalidDeploymentID is the error for invalid deployment id + ErrInvalidDeploymentID = errors.New("Invalid: deployment id") + // ErrEmptyVersion is the error when version is empty + ErrEmptyVersion = errors.New("Invalid: empty version") + // ErrInvalidVersion is the error when version is invalid + ErrInvalidVersion = errors.New("Invalid: deployment version") + // ErrInternal is the error for internal error + ErrInternal = errors.New("internal error") + // ErrInvalidDeployment = is the error when deployment does not pass validation + ErrInvalidDeployment = errors.New("Invalid deployment") + // ErrInvalidGroupID is the error when already deployment exists + ErrInvalidGroupID = errors.New("Deployment exists") + // ErrGroupNotFound is the keeper's error for not finding a group + ErrGroupNotFound = errors.New("Group not found") + // ErrGroupClosed is the error when deployment is closed + ErrGroupClosed = errors.New("Group already closed") + // ErrGroupOpen is the error when deployment is closed + ErrGroupOpen = errors.New("Group open") + // ErrGroupPaused is the error when deployment is closed + ErrGroupPaused = errors.New("Group paused") + // ErrGroupNotOpen indicates the Group state has progressed beyond initial Open. + ErrGroupNotOpen = errors.New("Group not open") + // ErrGroupSpecInvalid indicates a GroupSpec has invalid configuration + ErrGroupSpecInvalid = errors.New("GroupSpec invalid") + + // ErrInvalidDeposit indicates an invalid deposit + ErrInvalidDeposit = errors.New("Deposit invalid") + // ErrInvalidIDPath indicates an invalid ID path + ErrInvalidIDPath = errors.New("ID path invalid") + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = errors.New("parameter invalid") +) diff --git a/go/node/deployment/v1beta2/escrow.go b/go/node/deployment/v1beta2/escrow.go new file mode 100644 index 00000000..4ef8261f --- /dev/null +++ b/go/node/deployment/v1beta2/escrow.go @@ -0,0 +1,25 @@ +package v1beta2 + +import ( + etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta2" +) + +const ( + EscrowScope = "deployment" +) + +func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID { + return etypes.AccountID{ + Scope: EscrowScope, + XID: id.String(), + } +} + +func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) { + if id.Scope != EscrowScope { + return DeploymentID{}, false + } + + did, err := ParseDeploymentID(id.XID) + return did, err == nil +} diff --git a/go/node/deployment/v1beta2/event.go b/go/node/deployment/v1beta2/event.go new file mode 100644 index 00000000..27cb7aa8 --- /dev/null +++ b/go/node/deployment/v1beta2/event.go @@ -0,0 +1,308 @@ +package v1beta2 + +import ( + "encoding/hex" + "strconv" + + "github.com/akash-network/node/sdkutil" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + evActionDeploymentCreated = "deployment-created" + evActionDeploymentUpdated = "deployment-updated" + evActionDeploymentClosed = "deployment-closed" + evActionGroupClosed = "group-closed" + evActionGroupPaused = "group-paused" + evActionGroupStarted = "group-started" + evOwnerKey = "owner" + evDSeqKey = "dseq" + evGSeqKey = "gseq" + evVersionKey = "version" + encodedVersionHexLen = 64 +) + +// EventDeploymentCreated struct +type EventDeploymentCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` + Version []byte `json:"version"` +} + +// NewEventDeploymentCreated initializes creation event. +func NewEventDeploymentCreated(id DeploymentID, version []byte) EventDeploymentCreated { + return EventDeploymentCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentCreated, + }, + ID: id, + Version: version, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentCreated struct +func (ev EventDeploymentCreated) ToSDKEvent() sdk.Event { + version := encodeHex(ev.Version) + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentCreated), + sdk.NewAttribute(evVersionKey, string(version)), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// EventDeploymentUpdated struct +type EventDeploymentUpdated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` + Version []byte `json:"version"` +} + +// NewEventDeploymentUpdated initializes SDK type +func NewEventDeploymentUpdated(id DeploymentID, version []byte) EventDeploymentUpdated { + return EventDeploymentUpdated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentUpdated, + }, + ID: id, + Version: version, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentUpdated struct +func (ev EventDeploymentUpdated) ToSDKEvent() sdk.Event { + version := encodeHex(ev.Version) + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentUpdated), + sdk.NewAttribute(evVersionKey, string(version)), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// EventDeploymentClosed struct +type EventDeploymentClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` +} + +func NewEventDeploymentClosed(id DeploymentID) EventDeploymentClosed { + return EventDeploymentClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentClosed, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentClosed struct +func (ev EventDeploymentClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentClosed), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// DeploymentIDEVAttributes returns event attribues for given DeploymentID +func DeploymentIDEVAttributes(id DeploymentID) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evOwnerKey, id.Owner), + sdk.NewAttribute(evDSeqKey, strconv.FormatUint(id.DSeq, 10)), + } +} + +// ParseEVDeploymentID returns deploymentID details for given event attributes +func ParseEVDeploymentID(attrs []sdk.Attribute) (DeploymentID, error) { + owner, err := sdkutil.GetAccAddress(attrs, evOwnerKey) + if err != nil { + return DeploymentID{}, err + } + dseq, err := sdkutil.GetUint64(attrs, evDSeqKey) + if err != nil { + return DeploymentID{}, err + } + + return DeploymentID{ + Owner: owner.String(), + DSeq: dseq, + }, nil +} + +// ParseEVDeploymentVersion returns the Deployment's SDL sha256 sum +func ParseEVDeploymentVersion(attrs []sdk.Attribute) ([]byte, error) { + v, err := sdkutil.GetString(attrs, evVersionKey) + if err != nil { + return nil, err + } + return decodeHex([]byte(v)) +} + +func encodeHex(src []byte) []byte { + dst := make([]byte, hex.EncodedLen(len(src))) + hex.Encode(dst, src) + return dst +} + +func decodeHex(src []byte) ([]byte, error) { + dst := make([]byte, hex.DecodedLen(len(src))) + if _, err := hex.Decode(dst, src); err != nil { + return []byte{}, err + } + return dst, nil +} + +// EventGroupClosed provides SDK event to signal group termination +type EventGroupClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupClosed(id GroupID) EventGroupClosed { + return EventGroupClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupClosed, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupClosed), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// EventGroupPaused provides SDK event to signal group termination +type EventGroupPaused struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupPaused(id GroupID) EventGroupPaused { + return EventGroupPaused{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupPaused, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupPaused) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupPaused), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// EventGroupStarted provides SDK event to signal group termination +type EventGroupStarted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupStarted(id GroupID) EventGroupStarted { + return EventGroupStarted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupStarted, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupStarted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupStarted), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// GroupIDEVAttributes returns event attribues for given GroupID +func GroupIDEVAttributes(id GroupID) []sdk.Attribute { + return append(DeploymentIDEVAttributes(id.DeploymentID()), + sdk.NewAttribute(evGSeqKey, strconv.FormatUint(uint64(id.GSeq), 10))) +} + +// ParseEVGroupID returns GroupID details for given event attributes +func ParseEVGroupID(attrs []sdk.Attribute) (GroupID, error) { + did, err := ParseEVDeploymentID(attrs) + if err != nil { + return GroupID{}, err + } + + gseq, err := sdkutil.GetUint64(attrs, evGSeqKey) + if err != nil { + return GroupID{}, err + } + + return GroupID{ + Owner: did.Owner, + DSeq: did.DSeq, + GSeq: uint32(gseq), + }, nil +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case evActionDeploymentCreated: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + ver, err := ParseEVDeploymentVersion(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentCreated(did, ver), nil + case evActionDeploymentUpdated: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + ver, err := ParseEVDeploymentVersion(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentUpdated(did, ver), nil + case evActionDeploymentClosed: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentClosed(did), nil + case evActionGroupClosed: + gid, err := ParseEVGroupID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventGroupClosed(gid), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/deployment/v1beta2/events_test.go b/go/node/deployment/v1beta2/events_test.go new file mode 100644 index 00000000..a88b66ef --- /dev/null +++ b/go/node/deployment/v1beta2/events_test.go @@ -0,0 +1,341 @@ +package v1beta2 + +import ( + "crypto/sha256" + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/sdkutil" +) + +var ( + _ = func() string { + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(sdkutil.Bech32PrefixAccAddr, sdkutil.Bech32PrefixAccPub) + return "" + }() + + keyAcc, _ = sdk.AccAddressFromBech32("akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr") + errWildcard = errors.New("wildcard string error can't be matched") + tmpSum = sha256.Sum256([]byte(keyAcc)) + deploymentVersion = encodeHex(tmpSum[:]) +) + +type testEventParsing struct { + msg sdkutil.Event + expErr error +} + +func (tep testEventParsing) testMessageType() func(t *testing.T) { + _, err := ParseEvent(tep.msg) + return func(t *testing.T) { + // if the error expected is errWildcard to catch untyped errors, don't fail the test, the error was expected. + if errors.Is(tep.expErr, errWildcard) { + require.Error(t, err) + } else { + require.Equal(t, tep.expErr, err) + } + } +} + +var TEPS = []testEventParsing{ + { + msg: sdkutil.Event{ + Type: "nil", + }, + expErr: sdkutil.ErrUnknownType, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + }, + expErr: sdkutil.ErrUnknownAction, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: "nil", + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: "nil", + }, + expErr: sdkutil.ErrUnknownAction, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "abc", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "1", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "abc", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evGSeqKey, + Value: "1", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "neh", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + }, + }, + expErr: errWildcard, + }, +} + +func TestEventParsing(t *testing.T) { + for i, test := range TEPS { + t.Run(strconv.Itoa(i), test.testMessageType()) + } +} + +func TestVersionEncoding(t *testing.T) { + versionHex := encodeHex(tmpSum[:]) + assert.Len(t, versionHex, encodedVersionHexLen) + decodedVersion, err := decodeHex(versionHex) + assert.NoError(t, err) + assert.Equal(t, tmpSum[:], decodedVersion) +} diff --git a/go/node/deployment/v1beta2/genesis.pb.go b/go/node/deployment/v1beta2/genesis.pb.go new file mode 100644 index 00000000..1df3b70a --- /dev/null +++ b/go/node/deployment/v1beta2/genesis.pb.go @@ -0,0 +1,630 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisDeployment defines the basic genesis state used by deployment module +type GenesisDeployment struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` +} + +func (m *GenesisDeployment) Reset() { *m = GenesisDeployment{} } +func (m *GenesisDeployment) String() string { return proto.CompactTextString(m) } +func (*GenesisDeployment) ProtoMessage() {} +func (*GenesisDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_5f37856962d6010c, []int{0} +} +func (m *GenesisDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisDeployment.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 *GenesisDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDeployment.Merge(m, src) +} +func (m *GenesisDeployment) XXX_Size() int { + return m.Size() +} +func (m *GenesisDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDeployment proto.InternalMessageInfo + +func (m *GenesisDeployment) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *GenesisDeployment) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Deployments []GenesisDeployment `protobuf:"bytes,1,rep,name=deployments,proto3" json:"deployments" yaml:"deployments"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_5f37856962d6010c, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetDeployments() []GenesisDeployment { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisDeployment)(nil), "akash.deployment.v1beta2.GenesisDeployment") + proto.RegisterType((*GenesisState)(nil), "akash.deployment.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/genesis.proto", fileDescriptor_5f37856962d6010c) +} + +var fileDescriptor_5f37856962d6010c = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x4e, 0xf3, 0x30, + 0x14, 0xc5, 0xe3, 0x7e, 0x52, 0x07, 0xf7, 0x63, 0x68, 0xc4, 0x10, 0x75, 0x88, 0x2b, 0xab, 0x40, + 0x2b, 0x44, 0x2c, 0xca, 0x86, 0xc4, 0x12, 0x21, 0x75, 0x45, 0x61, 0xe0, 0xcf, 0xe6, 0x52, 0x2b, + 0xad, 0xda, 0xc4, 0x51, 0xe2, 0x02, 0x7d, 0x0b, 0x1e, 0xab, 0x63, 0x47, 0x06, 0x14, 0xa1, 0x66, + 0x63, 0xcc, 0x13, 0xa0, 0xda, 0x16, 0x8e, 0x2a, 0xc2, 0x96, 0x1b, 0xff, 0xce, 0x3d, 0xf7, 0x5c, + 0x5d, 0x78, 0x4c, 0xe7, 0x34, 0x9b, 0x92, 0x09, 0x4b, 0x16, 0x7c, 0x15, 0xb1, 0x58, 0x90, 0xe7, + 0xf3, 0x31, 0x13, 0x74, 0x48, 0x42, 0x16, 0xb3, 0x6c, 0x96, 0x79, 0x49, 0xca, 0x05, 0xb7, 0x1d, + 0xc9, 0x79, 0x86, 0xf3, 0x34, 0xd7, 0x39, 0x0c, 0x79, 0xc8, 0x25, 0x44, 0x76, 0x5f, 0x8a, 0xef, + 0x0c, 0x6a, 0xfb, 0x56, 0x5a, 0x28, 0xb4, 0x57, 0x3f, 0x42, 0xca, 0x97, 0x89, 0xa6, 0x8e, 0x6a, + 0xa9, 0x84, 0xa6, 0x34, 0xd2, 0x73, 0xe2, 0x0f, 0x00, 0xdb, 0x23, 0x35, 0xf9, 0xf5, 0x0f, 0x6a, + 0x47, 0x10, 0x1a, 0xa1, 0x03, 0xba, 0xa0, 0xdf, 0x1a, 0xf6, 0xbc, 0xba, 0x48, 0x9e, 0x51, 0xfa, + 0x27, 0xeb, 0x1c, 0x59, 0x5f, 0x39, 0xaa, 0xe8, 0xcb, 0x1c, 0xb5, 0x57, 0x34, 0x5a, 0x5c, 0x62, + 0xf3, 0x0f, 0x07, 0x15, 0xc0, 0xbe, 0x87, 0x4d, 0x39, 0x7a, 0xe6, 0x34, 0xba, 0xff, 0xfa, 0xad, + 0x21, 0xaa, 0xb7, 0x1a, 0xed, 0x38, 0x1f, 0x69, 0x17, 0x2d, 0x2b, 0x73, 0x74, 0xa0, 0x1c, 0x54, + 0x8d, 0x03, 0xfd, 0x80, 0x0b, 0x00, 0xff, 0xeb, 0x78, 0xb7, 0x82, 0x0a, 0x66, 0xbf, 0xc2, 0x96, + 0xe9, 0x9a, 0x39, 0x40, 0xfa, 0x9d, 0xfe, 0xe1, 0xb7, 0xbf, 0x1b, 0x7f, 0xa0, 0xbd, 0xab, 0x7d, + 0xca, 0x1c, 0xd9, 0xfb, 0x11, 0x33, 0x1c, 0x54, 0x11, 0xfb, 0x01, 0x36, 0xd5, 0xe6, 0x9d, 0x86, + 0xdc, 0x67, 0xb7, 0xde, 0xf4, 0x46, 0x72, 0x26, 0xa5, 0xd2, 0x99, 0x94, 0xaa, 0xc6, 0x81, 0x7e, + 0xf0, 0xef, 0xd6, 0x5b, 0x17, 0x6c, 0xb6, 0x2e, 0xf8, 0xdc, 0xba, 0xe0, 0xad, 0x70, 0xad, 0x4d, + 0xe1, 0x5a, 0xef, 0x85, 0x6b, 0x3d, 0x5e, 0x85, 0x33, 0x31, 0x5d, 0x8e, 0xbd, 0x27, 0x1e, 0x11, + 0x69, 0x77, 0x16, 0x33, 0xf1, 0xc2, 0xd3, 0xb9, 0xae, 0x68, 0x32, 0x23, 0x21, 0x27, 0x31, 0x9f, + 0xb0, 0x5f, 0x4e, 0x65, 0xdc, 0x94, 0x47, 0x72, 0xf1, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x83, 0x7c, + 0x61, 0x6c, 0xf6, 0x02, 0x00, 0x00, +} + +func (m *GenesisDeployment) 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 *GenesisDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisDeployment) 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 ErrIntOverflowGenesis + } + 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: GenesisDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisDeployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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 + } + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, GenesisDeployment{}) + if err := m.Deployments[len(m.Deployments)-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 Params", 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/group.pb.go b/go/node/deployment/v1beta2/group.pb.go new file mode 100644 index 00000000..ded9cf84 --- /dev/null +++ b/go/node/deployment/v1beta2/group.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/group.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of group +type Group_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + GroupStateInvalid Group_State = 0 + // GroupOpen denotes state for group open + GroupOpen Group_State = 1 + // GroupOrdered denotes state for group ordered + GroupPaused Group_State = 2 + // GroupInsufficientFunds denotes state for group insufficient_funds + GroupInsufficientFunds Group_State = 3 + // GroupClosed denotes state for group closed + GroupClosed Group_State = 4 +) + +var Group_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "paused", + 3: "insufficient_funds", + 4: "closed", +} + +var Group_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "paused": 2, + "insufficient_funds": 3, + "closed": 4, +} + +func (x Group_State) String() string { + return proto.EnumName(Group_State_name, int32(x)) +} + +func (Group_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_60637d8fd815b0bf, []int{0, 0} +} + +// Group stores group id, state and specifications of group +type Group struct { + GroupID GroupID `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"id" yaml:"id"` + State Group_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta2.Group_State" json:"state" yaml:"state"` + GroupSpec GroupSpec `protobuf:"bytes,3,opt,name=group_spec,json=groupSpec,proto3" json:"spec" yaml:"spec"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Group) Reset() { *m = Group{} } +func (m *Group) String() string { return proto.CompactTextString(m) } +func (*Group) ProtoMessage() {} +func (*Group) Descriptor() ([]byte, []int) { + return fileDescriptor_60637d8fd815b0bf, []int{0} +} +func (m *Group) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Group.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 *Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Group.Merge(m, src) +} +func (m *Group) XXX_Size() int { + return m.Size() +} +func (m *Group) XXX_DiscardUnknown() { + xxx_messageInfo_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Group proto.InternalMessageInfo + +func (m *Group) GetGroupID() GroupID { + if m != nil { + return m.GroupID + } + return GroupID{} +} + +func (m *Group) GetState() Group_State { + if m != nil { + return m.State + } + return GroupStateInvalid +} + +func (m *Group) GetGroupSpec() GroupSpec { + if m != nil { + return m.GroupSpec + } + return GroupSpec{} +} + +func (m *Group) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta2.Group_State", Group_State_name, Group_State_value) + proto.RegisterType((*Group)(nil), "akash.deployment.v1beta2.Group") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/group.proto", fileDescriptor_60637d8fd815b0bf) +} + +var fileDescriptor_60637d8fd815b0bf = []byte{ + // 487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x3f, 0x8f, 0xd3, 0x3e, + 0x1c, 0xc6, 0x93, 0x36, 0xbd, 0xfe, 0xea, 0xfe, 0x80, 0x62, 0xf1, 0x27, 0xe4, 0x44, 0x12, 0xc2, + 0x1f, 0x75, 0x21, 0x11, 0x65, 0x3b, 0x89, 0x81, 0x82, 0x40, 0x9d, 0x40, 0x3d, 0x09, 0x24, 0x96, + 0xe2, 0xc6, 0x6e, 0xce, 0xba, 0xd6, 0xb6, 0x1a, 0xe7, 0xd0, 0xad, 0x4c, 0xa8, 0x13, 0x6f, 0xa0, + 0x12, 0x12, 0x6f, 0x82, 0x97, 0x70, 0xe3, 0x8d, 0x4c, 0x11, 0x6a, 0x17, 0xd4, 0xb1, 0xaf, 0x00, + 0xd9, 0x0e, 0xe2, 0x06, 0xb8, 0xdb, 0xe2, 0xe7, 0xf9, 0x7c, 0x9f, 0x3c, 0xb6, 0xbe, 0xe0, 0x1e, + 0x3a, 0x44, 0xf9, 0x41, 0x82, 0x89, 0x98, 0xf2, 0xe3, 0x19, 0x61, 0x32, 0x39, 0x7a, 0x34, 0x26, + 0x12, 0xf5, 0x92, 0x6c, 0xce, 0x0b, 0x11, 0x8b, 0x39, 0x97, 0x1c, 0xba, 0x9a, 0x8a, 0xff, 0x50, + 0x71, 0x45, 0x79, 0xd7, 0x32, 0x9e, 0x71, 0x0d, 0x25, 0xea, 0xcb, 0xf0, 0xde, 0x83, 0xf3, 0x53, + 0x29, 0xae, 0xb8, 0xee, 0xf9, 0x5c, 0x2e, 0x48, 0x6a, 0xc8, 0xe8, 0xa3, 0x03, 0x1a, 0x2f, 0x95, + 0x06, 0xdf, 0x83, 0xff, 0xb4, 0x39, 0xa2, 0xd8, 0xb5, 0x43, 0xbb, 0xdb, 0xee, 0xdd, 0x89, 0xff, + 0x55, 0x2f, 0xd6, 0x23, 0x83, 0xe7, 0xfd, 0xe8, 0xa4, 0x0c, 0xac, 0x55, 0x19, 0x34, 0x2b, 0x61, + 0x53, 0x06, 0x35, 0x8a, 0xb7, 0x65, 0xd0, 0x3a, 0x46, 0xb3, 0xe9, 0x5e, 0x44, 0x71, 0x34, 0x6c, + 0xea, 0xd8, 0x01, 0x86, 0x6f, 0x40, 0x23, 0x97, 0x48, 0x12, 0xb7, 0x16, 0xda, 0xdd, 0xcb, 0xbd, + 0xfb, 0x17, 0xc4, 0xc7, 0xfb, 0x0a, 0xee, 0xdf, 0xda, 0x94, 0x81, 0x99, 0xdb, 0x96, 0xc1, 0xff, + 0x26, 0x56, 0x1f, 0xa3, 0xa1, 0x91, 0xe1, 0x08, 0x00, 0xd3, 0x5c, 0xdd, 0xcb, 0xad, 0xeb, 0xee, + 0x77, 0x2f, 0x08, 0xdf, 0x17, 0x24, 0xed, 0xef, 0xaa, 0xf6, 0x9b, 0x32, 0x70, 0xd4, 0xe0, 0xb6, + 0x0c, 0xda, 0x55, 0xba, 0x20, 0x69, 0x34, 0x6c, 0x65, 0xbf, 0x39, 0x78, 0x1b, 0x80, 0x74, 0x4e, + 0x90, 0x24, 0x78, 0x84, 0xa4, 0xeb, 0x84, 0x76, 0xb7, 0x3e, 0x6c, 0x55, 0xca, 0x53, 0x19, 0x7d, + 0xb3, 0x41, 0x43, 0x77, 0x85, 0x11, 0x68, 0x52, 0x76, 0x84, 0xa6, 0x14, 0x77, 0x2c, 0xef, 0xfa, + 0x62, 0x19, 0x5e, 0x35, 0x3f, 0x53, 0xe6, 0xc0, 0x18, 0xf0, 0x26, 0x70, 0xb8, 0x20, 0xac, 0x63, + 0x7b, 0x97, 0x16, 0xcb, 0xb0, 0xa5, 0x81, 0x57, 0x82, 0x30, 0xb8, 0x0b, 0x76, 0x04, 0x2a, 0x72, + 0x82, 0x3b, 0x35, 0xef, 0xca, 0x62, 0x19, 0xb6, 0xb5, 0xf5, 0x5a, 0x4b, 0xb0, 0x07, 0x20, 0x65, + 0x79, 0x31, 0x99, 0xd0, 0x94, 0x12, 0x26, 0x47, 0x93, 0x82, 0xe1, 0xbc, 0x53, 0xf7, 0xbc, 0xc5, + 0x32, 0xbc, 0x61, 0x1e, 0xff, 0x8c, 0xfd, 0x42, 0xb9, 0x2a, 0x30, 0x9d, 0x72, 0x15, 0xe8, 0x9c, + 0x09, 0x7c, 0xa6, 0x25, 0xcf, 0xf9, 0xf4, 0xd5, 0xb7, 0xf6, 0x9c, 0x9f, 0x5f, 0x02, 0xab, 0xff, + 0xf6, 0x64, 0xe5, 0xdb, 0xa7, 0x2b, 0xdf, 0xfe, 0xb1, 0xf2, 0xed, 0xcf, 0x6b, 0xdf, 0x3a, 0x5d, + 0xfb, 0xd6, 0xf7, 0xb5, 0x6f, 0xbd, 0x7b, 0x92, 0x51, 0x79, 0x50, 0x8c, 0xe3, 0x94, 0xcf, 0x12, + 0xfd, 0xa0, 0x0f, 0x19, 0x91, 0x1f, 0xf8, 0xfc, 0xb0, 0x3a, 0x21, 0x41, 0x93, 0x8c, 0x27, 0x8c, + 0x63, 0xf2, 0x97, 0x6d, 0x1b, 0xef, 0xe8, 0x25, 0x7b, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x40, + 0x44, 0x6a, 0xaf, 0x0e, 0x03, 0x00, 0x00, +} + +func (m *Group) 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 *Group) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.GroupSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.GroupID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Group) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.GroupID.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.State != 0 { + n += 1 + sovGroup(uint64(m.State)) + } + l = m.GroupSpec.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovGroup(uint64(m.CreatedAt)) + } + return n +} + +func sovGroup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Group) 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 ErrIntOverflowGroup + } + 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: Group: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Group_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroup(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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrInvalidLengthGroup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/group_pricing_validation.go b/go/node/deployment/v1beta2/group_pricing_validation.go new file mode 100644 index 00000000..9f505730 --- /dev/null +++ b/go/node/deployment/v1beta2/group_pricing_validation.go @@ -0,0 +1,61 @@ +package v1beta2 + +import ( + "fmt" + + "github.com/akash-network/node/validation/constants" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +func validateGroupPricing(gspec GroupSpec) error { + var price sdk.DecCoin + + mem := sdk.NewInt(0) + + for idx, resource := range gspec.Resources { + + if err := validateUnitPricing(resource); err != nil { + return fmt.Errorf("group %v: %w", gspec.GetName(), err) + } + + if resource.FullPrice().Denom != constants.AkashDenom { + return fmt.Errorf("%w: denomination must be %q", ErrInvalidDeployment, constants.AkashDenom) + } + + if idx == 0 { + price = resource.FullPrice() + } else { + rprice := resource.FullPrice() + if rprice.Denom != price.Denom { + return errors.Errorf("multi-denonimation group: (%v == %v fails)", rprice.Denom, price.Denom) + } + price = price.Add(rprice) + } + + memCount := sdk.NewInt(0) + if u := resource.Resources.Memory; u != nil { + memCount.Add(sdk.NewIntFromUint64(u.Quantity.Value())) + } + + mem = mem.Add(memCount.Mul(sdk.NewIntFromUint64(uint64(resource.Count)))) + } + + return nil +} + +func validateUnitPricing(rg Resource) error { + if !rg.GetPrice().IsValid() { + return errors.Errorf("error: invalid price object") + } + + if rg.Price.Amount.GT(sdk.NewDecFromInt(sdk.NewIntFromUint64(validationConfig.MaxUnitPrice))) { + return errors.Errorf("error: invalid unit price (%v > %v fails)", validationConfig.MaxUnitPrice, rg.Price) + } + + return nil +} + +func validateOrderBidDuration(rg GroupSpec) error { + return nil +} diff --git a/go/node/deployment/v1beta2/group_validation.go b/go/node/deployment/v1beta2/group_validation.go new file mode 100644 index 00000000..02a86342 --- /dev/null +++ b/go/node/deployment/v1beta2/group_validation.go @@ -0,0 +1,35 @@ +package v1beta2 + +import "github.com/pkg/errors" + +// ValidateDeploymentGroup does validation for provided deployment group +func validateDeploymentGroup(gspec GroupSpec) error { + if err := ValidateResourceList(gspec); err != nil { + return err + } + if err := validateGroupPricing(gspec); err != nil { + return err + } + return validateOrderBidDuration(gspec) +} + +// ValidateDeploymentGroups does validation for all deployment groups +func ValidateDeploymentGroups(gspecs []GroupSpec) error { + if len(gspecs) == 0 { + return ErrInvalidGroups + } + + names := make(map[string]int, len(gspecs)) // Used as set + for _, group := range gspecs { + if err := group.ValidateBasic(); err != nil { + return err + } + + if _, exists := names[group.GetName()]; exists { + return errors.Errorf("duplicate deployment group name %q", group.GetName()) + } + names[group.GetName()] = 0 // Value stored does not matter + } + + return nil +} diff --git a/go/node/deployment/v1beta2/groupid.pb.go b/go/node/deployment/v1beta2/groupid.pb.go new file mode 100644 index 00000000..8808ab09 --- /dev/null +++ b/go/node/deployment/v1beta2/groupid.pb.go @@ -0,0 +1,395 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/groupid.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GroupID stores owner, deployment sequence number and group sequence number +type GroupID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` +} + +func (m *GroupID) Reset() { *m = GroupID{} } +func (*GroupID) ProtoMessage() {} +func (*GroupID) Descriptor() ([]byte, []int) { + return fileDescriptor_bceb1533fce25dcc, []int{0} +} +func (m *GroupID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupID.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 *GroupID) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupID.Merge(m, src) +} +func (m *GroupID) XXX_Size() int { + return m.Size() +} +func (m *GroupID) XXX_DiscardUnknown() { + xxx_messageInfo_GroupID.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupID proto.InternalMessageInfo + +func (m *GroupID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *GroupID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *GroupID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func init() { + proto.RegisterType((*GroupID)(nil), "akash.deployment.v1beta2.GroupID") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/groupid.proto", fileDescriptor_bceb1533fce25dcc) +} + +var fileDescriptor_bceb1533fce25dcc = []byte{ + // 281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xc8, 0x4c, 0xd1, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x92, 0x00, 0xab, 0xd3, 0x43, 0xa8, 0xd3, 0x83, 0xaa, 0x93, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0x95, 0xd6, 0x31, 0x72, 0xb1, 0xbb, 0x83, + 0x4c, 0xf0, 0x74, 0x11, 0xd2, 0xe7, 0x62, 0xcd, 0x2f, 0xcf, 0x4b, 0x2d, 0x92, 0x60, 0x54, 0x60, + 0xd4, 0xe0, 0x74, 0x92, 0x7c, 0x75, 0x4f, 0x1e, 0x22, 0xf0, 0xe9, 0x9e, 0x3c, 0x4f, 0x65, 0x62, + 0x6e, 0x8e, 0x95, 0x12, 0x98, 0xab, 0x14, 0x04, 0x11, 0x16, 0x32, 0xe6, 0x62, 0x49, 0x29, 0x4e, + 0x2d, 0x94, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x71, 0x92, 0x7f, 0x74, 0x4f, 0x9e, 0xc5, 0x25, 0x38, + 0xb5, 0xf0, 0xd5, 0x3d, 0x79, 0xb0, 0xf8, 0xa7, 0x7b, 0xf2, 0xdc, 0x10, 0x6d, 0x20, 0x9e, 0x52, + 0x10, 0x58, 0x10, 0xa4, 0x29, 0x1d, 0xa4, 0x89, 0x59, 0x81, 0x51, 0x83, 0x17, 0xa2, 0xc9, 0x1d, + 0xaa, 0x29, 0x1d, 0x45, 0x53, 0x3a, 0x44, 0x13, 0x88, 0xb2, 0xe2, 0x98, 0xb1, 0x40, 0x9e, 0xe1, + 0xc5, 0x02, 0x79, 0x06, 0xa7, 0xf0, 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, + 0xb2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x87, 0x82, 0x6e, + 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, 0x58, 0x90, 0xa9, 0x9f, 0x9e, 0xaf, 0x9f, + 0x97, 0x9f, 0x92, 0x8a, 0x25, 0x1c, 0x93, 0xd8, 0xc0, 0x01, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0x41, 0x15, 0xe6, 0x58, 0x6a, 0x01, 0x00, 0x00, +} + +func (m *GroupID) 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 *GroupID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GSeq != 0 { + i = encodeVarintGroupid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintGroupid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintGroupid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGroupid(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupid(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovGroupid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovGroupid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovGroupid(uint64(m.GSeq)) + } + return n +} + +func sovGroupid(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupid(x uint64) (n int) { + return sovGroupid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GroupID) 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 ErrIntOverflowGroupid + } + 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: GroupID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + 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 ErrInvalidLengthGroupid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroupid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroupid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupid(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, ErrIntOverflowGroupid + } + 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, ErrIntOverflowGroupid + } + 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, ErrIntOverflowGroupid + } + 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, ErrInvalidLengthGroupid + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupid + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupid + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupid = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupid = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupid = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/groupmsg.pb.go b/go/node/deployment/v1beta2/groupmsg.pb.go new file mode 100644 index 00000000..76cc4cd0 --- /dev/null +++ b/go/node/deployment/v1beta2/groupmsg.pb.go @@ -0,0 +1,1034 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/groupmsg.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +type MsgCloseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseGroup) Reset() { *m = MsgCloseGroup{} } +func (m *MsgCloseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroup) ProtoMessage() {} +func (*MsgCloseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{0} +} +func (m *MsgCloseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroup.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 *MsgCloseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroup.Merge(m, src) +} +func (m *MsgCloseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroup proto.InternalMessageInfo + +func (m *MsgCloseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +type MsgCloseGroupResponse struct { +} + +func (m *MsgCloseGroupResponse) Reset() { *m = MsgCloseGroupResponse{} } +func (m *MsgCloseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroupResponse) ProtoMessage() {} +func (*MsgCloseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{1} +} +func (m *MsgCloseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroupResponse.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 *MsgCloseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroupResponse.Merge(m, src) +} +func (m *MsgCloseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroupResponse proto.InternalMessageInfo + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +type MsgPauseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgPauseGroup) Reset() { *m = MsgPauseGroup{} } +func (m *MsgPauseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroup) ProtoMessage() {} +func (*MsgPauseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{2} +} +func (m *MsgPauseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroup.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 *MsgPauseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroup.Merge(m, src) +} +func (m *MsgPauseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroup proto.InternalMessageInfo + +func (m *MsgPauseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +type MsgPauseGroupResponse struct { +} + +func (m *MsgPauseGroupResponse) Reset() { *m = MsgPauseGroupResponse{} } +func (m *MsgPauseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroupResponse) ProtoMessage() {} +func (*MsgPauseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{3} +} +func (m *MsgPauseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroupResponse.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 *MsgPauseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroupResponse.Merge(m, src) +} +func (m *MsgPauseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroupResponse proto.InternalMessageInfo + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +type MsgStartGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgStartGroup) Reset() { *m = MsgStartGroup{} } +func (m *MsgStartGroup) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroup) ProtoMessage() {} +func (*MsgStartGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{4} +} +func (m *MsgStartGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroup.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 *MsgStartGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroup.Merge(m, src) +} +func (m *MsgStartGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroup proto.InternalMessageInfo + +func (m *MsgStartGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +type MsgStartGroupResponse struct { +} + +func (m *MsgStartGroupResponse) Reset() { *m = MsgStartGroupResponse{} } +func (m *MsgStartGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroupResponse) ProtoMessage() {} +func (*MsgStartGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_28ffee979288602d, []int{5} +} +func (m *MsgStartGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroupResponse.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 *MsgStartGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroupResponse.Merge(m, src) +} +func (m *MsgStartGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroupResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCloseGroup)(nil), "akash.deployment.v1beta2.MsgCloseGroup") + proto.RegisterType((*MsgCloseGroupResponse)(nil), "akash.deployment.v1beta2.MsgCloseGroupResponse") + proto.RegisterType((*MsgPauseGroup)(nil), "akash.deployment.v1beta2.MsgPauseGroup") + proto.RegisterType((*MsgPauseGroupResponse)(nil), "akash.deployment.v1beta2.MsgPauseGroupResponse") + proto.RegisterType((*MsgStartGroup)(nil), "akash.deployment.v1beta2.MsgStartGroup") + proto.RegisterType((*MsgStartGroupResponse)(nil), "akash.deployment.v1beta2.MsgStartGroupResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/groupmsg.proto", fileDescriptor_28ffee979288602d) +} + +var fileDescriptor_28ffee979288602d = []byte{ + // 286 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xc8, 0x2d, 0x4e, 0xd7, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x00, 0x2b, 0xd4, 0x43, 0x28, 0xd4, 0x83, 0x2a, 0x94, 0x12, 0x49, + 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xd4, 0xf0, 0x1b, 0x9c, 0x99, + 0x02, 0x51, 0xa7, 0x94, 0xce, 0xc5, 0xeb, 0x5b, 0x9c, 0xee, 0x9c, 0x93, 0x5f, 0x9c, 0xea, 0x0e, + 0x92, 0x10, 0x0a, 0xe0, 0x62, 0xca, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd4, + 0xc3, 0x65, 0xab, 0x1e, 0x58, 0xb1, 0xa7, 0x8b, 0x93, 0xec, 0x89, 0x7b, 0xf2, 0x0c, 0x8f, 0xee, + 0xc9, 0x33, 0x79, 0xba, 0xbc, 0xba, 0x27, 0xcf, 0x94, 0x99, 0xf2, 0xe9, 0x9e, 0x3c, 0x67, 0x65, + 0x62, 0x6e, 0x8e, 0x95, 0x52, 0x66, 0x8a, 0x52, 0x10, 0x53, 0x66, 0x8a, 0x15, 0xcb, 0x8b, 0x05, + 0xf2, 0x0c, 0x4a, 0xe2, 0x5c, 0xa2, 0x28, 0x16, 0x05, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, + 0x42, 0x5d, 0x10, 0x90, 0x58, 0x4a, 0x1f, 0x17, 0x20, 0x2c, 0x42, 0x73, 0x41, 0x70, 0x49, 0x62, + 0x51, 0x09, 0x3d, 0x5c, 0x80, 0xb0, 0x08, 0xe6, 0x02, 0xa7, 0xf0, 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, 0xb2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x07, 0x3b, 0x44, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0x4b, 0x2c, 0xc8, + 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0xc5, 0x12, 0xd9, 0x49, 0x6c, 0xe0, 0x58, 0x36, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x19, 0xbb, 0xfa, 0x68, 0x02, 0x00, 0x00, +} + +func (m *MsgCloseGroup) 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 *MsgCloseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseGroupResponse) 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 *MsgCloseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroup) 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 *MsgPauseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroupResponse) 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 *MsgPauseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStartGroup) 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 *MsgStartGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgStartGroupResponse) 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 *MsgStartGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGroupmsg(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupmsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCloseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgCloseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPauseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgPauseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStartGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgStartGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGroupmsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupmsg(x uint64) (n int) { + return sovGroupmsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCloseGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgCloseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgCloseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgPauseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgPauseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgStartGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgStartGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupmsg(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, ErrIntOverflowGroupmsg + } + 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, ErrIntOverflowGroupmsg + } + 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, ErrIntOverflowGroupmsg + } + 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, ErrInvalidLengthGroupmsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupmsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupmsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupmsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupmsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupmsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/groupspec.go b/go/node/deployment/v1beta2/groupspec.go new file mode 100644 index 00000000..6b8a23c5 --- /dev/null +++ b/go/node/deployment/v1beta2/groupspec.go @@ -0,0 +1,108 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + types "github.com/akash-network/akash-api/go/node/types/v1beta2" + + atypes "github.com/akash-network/akash-api/go/node/audit/v1beta2" +) + +// ValidateBasic asserts non-zero values +// TODO: This is causing an import cycle. I think there is some pattern here I'm missing tho.. +func (g GroupSpec) ValidateBasic() error { + return validateDeploymentGroup(g) +} + +// GetResources method returns resources list in group +func (g GroupSpec) GetResources() []types.Resources { + resources := make([]types.Resources, 0, len(g.Resources)) + for _, r := range g.Resources { + resources = append(resources, types.Resources{ + Resources: r.Resources, + Count: r.Count, + }) + } + + return resources +} + +// GetName method returns group name +func (g GroupSpec) GetName() string { + return g.Name +} + +// Price method returns price of group +func (g GroupSpec) Price() sdk.DecCoin { + var price sdk.DecCoin + for idx, resource := range g.Resources { + if idx == 0 { + price = resource.FullPrice() + continue + } + price = price.Add(resource.FullPrice()) + } + return price +} + +// MatchResourcesRequirements check if resources attributes match provider's capabilities +func (g GroupSpec) MatchResourcesRequirements(pattr types.Attributes) bool { + for _, rgroup := range g.GetResources() { + pgroup := pattr.GetCapabilitiesGroup("storage") + for _, storage := range rgroup.Resources.Storage { + if len(storage.Attributes) == 0 { + continue + } + + if !storage.Attributes.IN(pgroup) { + return false + } + } + } + + return true +} + +// MatchRequirements method compares provided attributes with specific group attributes. +// Argument provider is a bit cumbersome. First element is attributes from x/provider store +// in case tenant does not need signed attributes at all +// rest of elements (if any) are attributes signed by various auditors +func (g GroupSpec) MatchRequirements(provider []atypes.Provider) bool { + if (len(g.Requirements.SignedBy.AnyOf) != 0) || (len(g.Requirements.SignedBy.AllOf) != 0) { + // we cannot match if there is no signed attributes + if len(provider) < 2 { + return false + } + + existingRequirements := make(attributesMatching) + + for _, existing := range provider[1:] { + existingRequirements[existing.Auditor] = existing.Attributes + } + + if len(g.Requirements.SignedBy.AllOf) != 0 { + for _, validator := range g.Requirements.SignedBy.AllOf { + // if at least one signature does not exist or no match on attributes - requirements cannot match + if existingAttr, exists := existingRequirements[validator]; !exists || + !types.AttributesSubsetOf(g.Requirements.Attributes, existingAttr) { + return false + } + } + } + + if len(g.Requirements.SignedBy.AnyOf) != 0 { + for _, validator := range g.Requirements.SignedBy.AnyOf { + if existingAttr, exists := existingRequirements[validator]; exists && + types.AttributesSubsetOf(g.Requirements.Attributes, existingAttr) { + return true + } + } + + return false + } + + return true + } + + return types.AttributesSubsetOf(g.Requirements.Attributes, provider[0].Attributes) +} diff --git a/go/node/deployment/v1beta2/groupspec.pb.go b/go/node/deployment/v1beta2/groupspec.pb.go new file mode 100644 index 00000000..6c9c370c --- /dev/null +++ b/go/node/deployment/v1beta2/groupspec.pb.go @@ -0,0 +1,426 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/groupspec.proto + +package v1beta2 + +import ( + fmt "fmt" + v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GroupSpec stores group specifications +type GroupSpec struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Requirements v1beta2.PlacementRequirements `protobuf:"bytes,2,opt,name=requirements,proto3" json:"requirements" yaml:"requirements"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources" yaml:"resources"` +} + +func (m *GroupSpec) Reset() { *m = GroupSpec{} } +func (m *GroupSpec) String() string { return proto.CompactTextString(m) } +func (*GroupSpec) ProtoMessage() {} +func (*GroupSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_8afb9070f2e843b2, []int{0} +} +func (m *GroupSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupSpec.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 *GroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupSpec.Merge(m, src) +} +func (m *GroupSpec) XXX_Size() int { + return m.Size() +} +func (m *GroupSpec) XXX_DiscardUnknown() { + xxx_messageInfo_GroupSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupSpec proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GroupSpec)(nil), "akash.deployment.v1beta2.GroupSpec") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/groupspec.proto", fileDescriptor_8afb9070f2e843b2) +} + +var fileDescriptor_8afb9070f2e843b2 = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4b, 0xfb, 0x40, + 0x18, 0xc6, 0x93, 0xf6, 0xcf, 0x1f, 0x9b, 0x3a, 0x48, 0x14, 0x0c, 0x1d, 0x72, 0xe5, 0x40, 0x8c, + 0x14, 0xef, 0xb0, 0x6e, 0x05, 0x97, 0x2c, 0xae, 0x12, 0x07, 0xc1, 0xed, 0x92, 0x1e, 0x69, 0x68, + 0x93, 0x8b, 0x97, 0x8b, 0x52, 0x3f, 0x81, 0xa3, 0x1f, 0xa1, 0x9b, 0x5f, 0xa5, 0x63, 0x47, 0xa7, + 0x20, 0xed, 0x22, 0x1d, 0xfb, 0x09, 0x24, 0x97, 0xab, 0x6d, 0xc1, 0x6e, 0x79, 0xdf, 0xfc, 0xde, + 0xf7, 0x79, 0x9e, 0x7b, 0x0d, 0x87, 0x0c, 0x49, 0x36, 0xc0, 0x7d, 0x9a, 0x8e, 0xd8, 0x38, 0xa6, + 0x89, 0xc0, 0xcf, 0x57, 0x3e, 0x15, 0xa4, 0x8b, 0x43, 0xce, 0xf2, 0x34, 0x4b, 0x69, 0x80, 0x52, + 0xce, 0x04, 0x33, 0x2d, 0x49, 0xa2, 0x0d, 0x89, 0x14, 0xd9, 0x3a, 0x09, 0x59, 0xc8, 0x24, 0x84, + 0xcb, 0xaf, 0x8a, 0x6f, 0xc1, 0x6a, 0xb3, 0x4f, 0x32, 0xfa, 0xbb, 0x93, 0x08, 0xc1, 0x23, 0x3f, + 0x17, 0x54, 0x31, 0xe7, 0x7b, 0xd5, 0x39, 0xcd, 0x58, 0xce, 0x03, 0x05, 0xc2, 0x8f, 0x9a, 0xd1, + 0xb8, 0x2d, 0x0d, 0xdd, 0xa7, 0x34, 0x30, 0x3b, 0xc6, 0xbf, 0x84, 0xc4, 0xd4, 0xd2, 0xdb, 0xba, + 0xd3, 0x70, 0x4f, 0x97, 0x05, 0x90, 0xf5, 0xaa, 0x00, 0xcd, 0x31, 0x89, 0x47, 0x3d, 0x58, 0x56, + 0xd0, 0x93, 0x4d, 0xf3, 0xd5, 0x38, 0xe4, 0xf4, 0x29, 0x8f, 0x38, 0x2d, 0x05, 0x32, 0xab, 0xd6, + 0xd6, 0x9d, 0x66, 0xf7, 0x02, 0x55, 0x71, 0x4a, 0x7b, 0xeb, 0x20, 0xe8, 0x6e, 0x44, 0x02, 0x49, + 0x79, 0x5b, 0x03, 0x6e, 0x67, 0x5a, 0x00, 0x6d, 0x59, 0x80, 0x9d, 0x35, 0xab, 0x02, 0x1c, 0x57, + 0x5a, 0xdb, 0x5d, 0xe8, 0xed, 0x40, 0x66, 0x68, 0x34, 0xd6, 0x41, 0x32, 0xab, 0xde, 0xae, 0x3b, + 0xcd, 0x2e, 0x44, 0xfb, 0xde, 0x11, 0x79, 0x0a, 0x75, 0xcf, 0x94, 0xe2, 0x66, 0x78, 0x55, 0x80, + 0xa3, 0xb5, 0x9c, 0x6a, 0x41, 0x6f, 0xf3, 0xbb, 0x77, 0xf0, 0x36, 0x01, 0xda, 0xf7, 0x04, 0x68, + 0xee, 0xc3, 0x74, 0x6e, 0xeb, 0xb3, 0xb9, 0xad, 0x7f, 0xcd, 0x6d, 0xfd, 0x7d, 0x61, 0x6b, 0xb3, + 0x85, 0xad, 0x7d, 0x2e, 0x6c, 0xed, 0xf1, 0x26, 0x8c, 0xc4, 0x20, 0xf7, 0x51, 0xc0, 0x62, 0x2c, + 0x3d, 0x5c, 0x26, 0x54, 0xbc, 0x30, 0x3e, 0x54, 0x15, 0x49, 0x23, 0x1c, 0x32, 0x9c, 0xb0, 0x3e, + 0xfd, 0xe3, 0x22, 0xfe, 0x7f, 0x79, 0x89, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x88, + 0x8d, 0xf5, 0x32, 0x02, 0x00, 0x00, +} + +func (m *GroupSpec) 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 *GroupSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupspec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Requirements.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupspec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGroupspec(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGroupspec(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupspec(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGroupspec(uint64(l)) + } + l = m.Requirements.Size() + n += 1 + l + sovGroupspec(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGroupspec(uint64(l)) + } + } + return n +} + +func sovGroupspec(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupspec(x uint64) (n int) { + return sovGroupspec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GroupSpec) 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 ErrIntOverflowGroupspec + } + 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: GroupSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowGroupspec + } + 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 ErrInvalidLengthGroupspec + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requirements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupspec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupspec + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Requirements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupspec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupspec + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupspec(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupspec + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupspec(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, ErrIntOverflowGroupspec + } + 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, ErrIntOverflowGroupspec + } + 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, ErrIntOverflowGroupspec + } + 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, ErrInvalidLengthGroupspec + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupspec + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupspec + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupspec = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupspec = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupspec = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/id.go b/go/node/deployment/v1beta2/id.go new file mode 100644 index 00000000..b499d914 --- /dev/null +++ b/go/node/deployment/v1beta2/id.go @@ -0,0 +1,103 @@ +package v1beta2 + +import ( + fmt "fmt" + "strconv" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Equals method compares specific deployment with provided deployment +func (id DeploymentID) Equals(other DeploymentID) bool { + return id.Owner == other.Owner && id.DSeq == other.DSeq +} + +// Validate method for DeploymentID and returns nil +func (id DeploymentID) Validate() error { + _, err := sdk.AccAddressFromBech32(id.Owner) + switch { + case err != nil: + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "DeploymentID: Invalid Owner Address") + case id.DSeq == 0: + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "DeploymentID: Invalid Deployment Sequence") + } + return nil +} + +// String method for deployment IDs +func (id DeploymentID) String() string { + return fmt.Sprintf("%s/%d", id.Owner, id.DSeq) +} + +func (id DeploymentID) GetOwnerAddress() (sdk.Address, error) { + return sdk.AccAddressFromBech32(id.Owner) +} + +func ParseDeploymentID(val string) (DeploymentID, error) { + parts := strings.Split(val, "/") + return ParseDeploymentPath(parts) +} + +// ParseDeploymentPath returns DeploymentID details with provided queries, and return +// error if occurred due to wrong query +func ParseDeploymentPath(parts []string) (DeploymentID, error) { + if len(parts) != 2 { + return DeploymentID{}, ErrInvalidIDPath + } + + owner, err := sdk.AccAddressFromBech32(parts[0]) + if err != nil { + return DeploymentID{}, err + } + + dseq, err := strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return DeploymentID{}, err + } + + return DeploymentID{ + Owner: owner.String(), + DSeq: dseq, + }, nil +} + +// MakeGroupID returns GroupID instance with provided deployment details +// and group sequence number. +func MakeGroupID(id DeploymentID, gseq uint32) GroupID { + return GroupID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: gseq, + } +} + +// DeploymentID method returns DeploymentID details with specific group details +func (id GroupID) DeploymentID() DeploymentID { + return DeploymentID{ + Owner: id.Owner, + DSeq: id.DSeq, + } +} + +// Equals method compares specific group with provided group +func (id GroupID) Equals(other GroupID) bool { + return id.DeploymentID().Equals(other.DeploymentID()) && id.GSeq == other.GSeq +} + +// Validate method for GroupID and returns nil +func (id GroupID) Validate() error { + if err := id.DeploymentID().Validate(); err != nil { + return sdkerrors.Wrap(err, "GroupID: Invalid DeploymentID") + } + if id.GSeq == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "GroupID: Invalid Group Sequence") + } + return nil +} + +// String method provides human readable representation of GroupID. +func (id GroupID) String() string { + return fmt.Sprintf("%s/%d", id.DeploymentID(), id.GSeq) +} diff --git a/go/node/deployment/v1beta2/key.go b/go/node/deployment/v1beta2/key.go new file mode 100644 index 00000000..c1b3e036 --- /dev/null +++ b/go/node/deployment/v1beta2/key.go @@ -0,0 +1,20 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "deployment" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) + +func DeploymentPrefix() []byte { + return []byte{0x01} +} + +func GroupPrefix() []byte { + return []byte{0x02} +} diff --git a/go/node/deployment/v1beta2/msgs.go b/go/node/deployment/v1beta2/msgs.go new file mode 100644 index 00000000..dd1bc1bb --- /dev/null +++ b/go/node/deployment/v1beta2/msgs.go @@ -0,0 +1,324 @@ +package v1beta2 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + MsgTypeCreateDeployment = "create-deployment" + MsgTypeDepositDeployment = "deposit-deployment" + MsgTypeUpdateDeployment = "update-deployment" + MsgTypeCloseDeployment = "close-deployment" + MsgTypeCloseGroup = "close-group" + MsgTypePauseGroup = "pause-group" + MsgTypeStartGroup = "start-group" +) + +var ( + _, _, _, _ sdk.Msg = &MsgCreateDeployment{}, &MsgUpdateDeployment{}, &MsgCloseDeployment{}, &MsgCloseGroup{} +) + +// NewMsgCreateDeployment creates a new MsgCreateDeployment instance +func NewMsgCreateDeployment(id DeploymentID, groups []GroupSpec, version []byte, + deposit sdk.Coin, depositor sdk.AccAddress) *MsgCreateDeployment { + return &MsgCreateDeployment{ + ID: id, + Groups: groups, + Version: version, + Deposit: deposit, + Depositor: depositor.String(), + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateDeployment) Type() string { return MsgTypeCreateDeployment } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic does basic validation like check owner and groups length +func (msg MsgCreateDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + if len(msg.Groups) == 0 { + return ErrInvalidGroups + } + + if len(msg.Version) == 0 { + return ErrEmptyVersion + } + + if len(msg.Version) != ManifestVersionLength { + return ErrInvalidVersion + } + + for _, gs := range msg.Groups { + err := gs.ValidateBasic() + if err != nil { + return err + } + } + + _, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreateDeployment: Invalid Depositor Address") + } + + return nil +} + +// NewMsgDepositDeployment creates a new MsgDepositDeployment instance +func NewMsgDepositDeployment(id DeploymentID, amount sdk.Coin, depositor string) *MsgDepositDeployment { + return &MsgDepositDeployment{ + ID: id, + Amount: amount, + Depositor: depositor, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgDepositDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgDepositDeployment) Type() string { return MsgTypeDepositDeployment } + +// GetSignBytes encodes the message for signing +func (msg MsgDepositDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgDepositDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic does basic validation like check owner and groups length +func (msg MsgDepositDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + + if msg.Amount.IsZero() { + return ErrInvalidDeposit + } + + _, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgDepositDeployment: Invalid Depositor Address") + } + + return nil +} + +// NewMsgUpdateDeployment creates a new MsgUpdateDeployment instance +func NewMsgUpdateDeployment(id DeploymentID, version []byte) *MsgUpdateDeployment { + return &MsgUpdateDeployment{ + ID: id, + Version: version, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgUpdateDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgUpdateDeployment) Type() string { return MsgTypeUpdateDeployment } + +// ValidateBasic does basic validation +func (msg MsgUpdateDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + + if len(msg.Version) == 0 { + return ErrEmptyVersion + } + + if len(msg.Version) != ManifestVersionLength { + return ErrInvalidVersion + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgUpdateDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUpdateDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgCloseDeployment creates a new MsgCloseDeployment instance +func NewMsgCloseDeployment(id DeploymentID) *MsgCloseDeployment { + return &MsgCloseDeployment{ + ID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseDeployment) Type() string { return MsgTypeCloseDeployment } + +// ValidateBasic does basic validation with deployment details +func (msg MsgCloseDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCloseDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgCloseGroup creates a new MsgCloseGroup instance +func NewMsgCloseGroup(id GroupID) *MsgCloseGroup { + return &MsgCloseGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgCloseGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgCloseGroup) Type() string { return MsgTypeCloseGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgCloseGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCloseGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgPauseGroup creates a new MsgPauseGroup instance +func NewMsgPauseGroup(id GroupID) *MsgPauseGroup { + return &MsgPauseGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgPauseGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgPauseGroup) Type() string { return MsgTypePauseGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgPauseGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgPauseGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgPauseGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgStartGroup creates a new MsgStartGroup instance +func NewMsgStartGroup(id GroupID) *MsgStartGroup { + return &MsgStartGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgStartGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgStartGroup) Type() string { return MsgTypeStartGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgStartGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgStartGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgStartGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} diff --git a/go/node/deployment/v1beta2/params.go b/go/node/deployment/v1beta2/params.go new file mode 100644 index 00000000..0144c7fa --- /dev/null +++ b/go/node/deployment/v1beta2/params.go @@ -0,0 +1,50 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +var ( + DefaultDeploymentMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000)) +) + +const ( + keyDeploymentMinDeposit = "DeploymentMinDeposit" +) + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyDeploymentMinDeposit), &p.DeploymentMinDeposit, validateCoin), + } +} + +func DefaultParams() Params { + return Params{ + DeploymentMinDeposit: DefaultDeploymentMinDeposit, + } +} + +func (p Params) Validate() error { + if err := validateCoin(p.DeploymentMinDeposit); err != nil { + return err + } + + return nil +} + +func validateCoin(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + + return nil +} diff --git a/go/node/deployment/v1beta2/params.pb.go b/go/node/deployment/v1beta2/params.pb.go new file mode 100644 index 00000000..8a422438 --- /dev/null +++ b/go/node/deployment/v1beta2/params.pb.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/params.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params defines the parameters for the x/deployment package +type Params struct { + DeploymentMinDeposit types.Coin `protobuf:"bytes,1,opt,name=deployment_min_deposit,json=deploymentMinDeposit,proto3" json:"deployment_min_deposit" yaml:"deployment_min_deposit"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_0ce4ce202971abe5, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDeploymentMinDeposit() types.Coin { + if m != nil { + return m.DeploymentMinDeposit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*Params)(nil), "akash.deployment.v1beta2.Params") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/params.proto", fileDescriptor_0ce4ce202971abe5) +} + +var fileDescriptor_0ce4ce202971abe5 = []byte{ + // 274 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x00, 0x2b, 0xd3, 0x43, 0x28, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xe4, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x93, 0x12, 0x8b, 0x53, 0xa1, 0x26, 0x1a, 0xea, 0x27, 0xe7, 0x67, 0xe6, 0x41, 0xe4, 0x95, + 0x36, 0x33, 0x72, 0xb1, 0x05, 0x80, 0x2d, 0x10, 0x5a, 0xc1, 0xc8, 0x25, 0x86, 0x30, 0x37, 0x3e, + 0x37, 0x33, 0x2f, 0x3e, 0x25, 0xb5, 0x20, 0xbf, 0x38, 0xb3, 0x44, 0x82, 0x51, 0x81, 0x51, 0x83, + 0xdb, 0x48, 0x52, 0x0f, 0x62, 0x98, 0x1e, 0xc8, 0x30, 0xa8, 0xbd, 0x86, 0x7a, 0xce, 0xf9, 0x99, + 0x79, 0x4e, 0xe1, 0x27, 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0x2f, 0xe2, 0x02, 0x37, 0xc0, 0x37, + 0x33, 0xcf, 0x05, 0xa2, 0xfd, 0xd5, 0x3d, 0x79, 0x1c, 0x06, 0x7f, 0xba, 0x27, 0x2f, 0x5b, 0x99, + 0x98, 0x9b, 0x63, 0xa5, 0x84, 0x5d, 0x5e, 0x29, 0x48, 0x24, 0x05, 0x8b, 0x81, 0x4e, 0xe1, 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, 0x65, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, + 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x0e, 0x2a, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, + 0x28, 0x2f, 0xb1, 0x20, 0x53, 0x3f, 0x3d, 0x5f, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0x4b, 0x58, 0x27, + 0xb1, 0x81, 0x43, 0xc5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x01, 0xc8, 0x38, 0xe2, 0x8e, 0x01, + 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeploymentMinDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentMinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentMinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/query.pb.go b/go/node/deployment/v1beta2/query.pb.go new file mode 100644 index 00000000..ccf6638d --- /dev/null +++ b/go/node/deployment/v1beta2/query.pb.go @@ -0,0 +1,1628 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + v1beta2 "github.com/akash-network/akash-api/go/node/escrow/v1beta2" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +type QueryDeploymentsRequest struct { + Filters DeploymentFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsRequest) Reset() { *m = QueryDeploymentsRequest{} } +func (m *QueryDeploymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsRequest) ProtoMessage() {} +func (*QueryDeploymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{0} +} +func (m *QueryDeploymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsRequest.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 *QueryDeploymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsRequest.Merge(m, src) +} +func (m *QueryDeploymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsRequest proto.InternalMessageInfo + +func (m *QueryDeploymentsRequest) GetFilters() DeploymentFilters { + if m != nil { + return m.Filters + } + return DeploymentFilters{} +} + +func (m *QueryDeploymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +type QueryDeploymentsResponse struct { + Deployments DeploymentResponses `protobuf:"bytes,1,rep,name=deployments,proto3,castrepeated=DeploymentResponses" json:"deployments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsResponse) Reset() { *m = QueryDeploymentsResponse{} } +func (m *QueryDeploymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsResponse) ProtoMessage() {} +func (*QueryDeploymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{1} +} +func (m *QueryDeploymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsResponse.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 *QueryDeploymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsResponse.Merge(m, src) +} +func (m *QueryDeploymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsResponse proto.InternalMessageInfo + +func (m *QueryDeploymentsResponse) GetDeployments() DeploymentResponses { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *QueryDeploymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +type QueryDeploymentRequest struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryDeploymentRequest) Reset() { *m = QueryDeploymentRequest{} } +func (m *QueryDeploymentRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentRequest) ProtoMessage() {} +func (*QueryDeploymentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{2} +} +func (m *QueryDeploymentRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentRequest.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 *QueryDeploymentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentRequest.Merge(m, src) +} +func (m *QueryDeploymentRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentRequest proto.InternalMessageInfo + +func (m *QueryDeploymentRequest) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +type QueryDeploymentResponse struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + EscrowAccount v1beta2.Account `protobuf:"bytes,3,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` +} + +func (m *QueryDeploymentResponse) Reset() { *m = QueryDeploymentResponse{} } +func (m *QueryDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentResponse) ProtoMessage() {} +func (*QueryDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{3} +} +func (m *QueryDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentResponse.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 *QueryDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentResponse.Merge(m, src) +} +func (m *QueryDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentResponse proto.InternalMessageInfo + +func (m *QueryDeploymentResponse) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *QueryDeploymentResponse) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +func (m *QueryDeploymentResponse) GetEscrowAccount() v1beta2.Account { + if m != nil { + return m.EscrowAccount + } + return v1beta2.Account{} +} + +// QueryGroupRequest is request type for the Query/Group RPC method +type QueryGroupRequest struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryGroupRequest) Reset() { *m = QueryGroupRequest{} } +func (m *QueryGroupRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupRequest) ProtoMessage() {} +func (*QueryGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{4} +} +func (m *QueryGroupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupRequest.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 *QueryGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupRequest.Merge(m, src) +} +func (m *QueryGroupRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupRequest proto.InternalMessageInfo + +func (m *QueryGroupRequest) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// QueryGroupResponse is response type for the Query/Group RPC method +type QueryGroupResponse struct { + Group Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` +} + +func (m *QueryGroupResponse) Reset() { *m = QueryGroupResponse{} } +func (m *QueryGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupResponse) ProtoMessage() {} +func (*QueryGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_61430a03c00e84b2, []int{5} +} +func (m *QueryGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupResponse.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 *QueryGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupResponse.Merge(m, src) +} +func (m *QueryGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupResponse proto.InternalMessageInfo + +func (m *QueryGroupResponse) GetGroup() Group { + if m != nil { + return m.Group + } + return Group{} +} + +func init() { + proto.RegisterType((*QueryDeploymentsRequest)(nil), "akash.deployment.v1beta2.QueryDeploymentsRequest") + proto.RegisterType((*QueryDeploymentsResponse)(nil), "akash.deployment.v1beta2.QueryDeploymentsResponse") + proto.RegisterType((*QueryDeploymentRequest)(nil), "akash.deployment.v1beta2.QueryDeploymentRequest") + proto.RegisterType((*QueryDeploymentResponse)(nil), "akash.deployment.v1beta2.QueryDeploymentResponse") + proto.RegisterType((*QueryGroupRequest)(nil), "akash.deployment.v1beta2.QueryGroupRequest") + proto.RegisterType((*QueryGroupResponse)(nil), "akash.deployment.v1beta2.QueryGroupResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/query.proto", fileDescriptor_61430a03c00e84b2) +} + +var fileDescriptor_61430a03c00e84b2 = []byte{ + // 681 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0xdd, 0x9f, 0x4f, 0x9a, 0xa8, 0x9f, 0xd4, 0x01, 0x81, 0x15, 0xc0, 0x2e, 0x56, 0x69, + 0x4a, 0x7f, 0x3c, 0xc4, 0xec, 0x8a, 0xba, 0xc0, 0x8a, 0x5a, 0x15, 0x36, 0xd4, 0x1b, 0x10, 0x42, + 0x42, 0x4e, 0x32, 0x75, 0xad, 0x26, 0x1e, 0xd7, 0x33, 0xa1, 0xca, 0x96, 0x27, 0x00, 0xf1, 0x02, + 0x6c, 0x90, 0x10, 0x0b, 0x56, 0x3c, 0x44, 0x97, 0x95, 0x10, 0x12, 0xab, 0x80, 0x12, 0x16, 0x88, + 0x05, 0x8b, 0x3e, 0x01, 0xf2, 0xcc, 0x24, 0x36, 0x24, 0x69, 0x92, 0x5d, 0xe2, 0x39, 0xf7, 0x9c, + 0x73, 0xef, 0xb9, 0x63, 0x83, 0x65, 0xef, 0xc8, 0xa3, 0x87, 0xa8, 0x86, 0xa3, 0x3a, 0x69, 0x35, + 0x70, 0xc8, 0xd0, 0x8b, 0x52, 0x05, 0x33, 0xcf, 0x46, 0xc7, 0x4d, 0x1c, 0xb7, 0xac, 0x28, 0x26, + 0x8c, 0x40, 0x8d, 0xa3, 0xac, 0x14, 0x65, 0x49, 0x54, 0xe1, 0xb2, 0x4f, 0x7c, 0xc2, 0x41, 0x28, + 0xf9, 0x25, 0xf0, 0x85, 0xeb, 0x3e, 0x21, 0x7e, 0x1d, 0x23, 0x2f, 0x0a, 0x90, 0x17, 0x86, 0x84, + 0x79, 0x2c, 0x20, 0x21, 0x95, 0xa7, 0x6b, 0x55, 0x42, 0x1b, 0x84, 0xa2, 0x8a, 0x47, 0xb1, 0x90, + 0x91, 0xa2, 0x25, 0x14, 0x79, 0x7e, 0x10, 0x72, 0xb0, 0xc4, 0xde, 0x1e, 0xe9, 0x2f, 0x63, 0x46, + 0x40, 0x47, 0xb7, 0xe2, 0xc7, 0xa4, 0x19, 0x49, 0xd4, 0xca, 0xc5, 0xa8, 0xa0, 0x26, 0x71, 0x4b, + 0x02, 0x87, 0x69, 0x35, 0x26, 0x27, 0x7d, 0x0c, 0x6b, 0x45, 0x58, 0xb6, 0x61, 0x7e, 0x54, 0xc0, + 0xd5, 0xfd, 0xc4, 0x7d, 0xb9, 0xcf, 0x45, 0x5d, 0x7c, 0xdc, 0xc4, 0x94, 0xc1, 0x87, 0xe0, 0xbf, + 0x83, 0xa0, 0xce, 0x70, 0x4c, 0x35, 0x65, 0x49, 0x59, 0xcd, 0xdb, 0xeb, 0xd6, 0xa8, 0x11, 0x5a, + 0x69, 0xf9, 0x8e, 0x28, 0x71, 0x66, 0x4f, 0xdb, 0x46, 0xce, 0xed, 0x31, 0xc0, 0x1d, 0x00, 0xd2, + 0xb9, 0x68, 0x2a, 0xe7, 0x5b, 0xb1, 0xc4, 0x10, 0xad, 0x64, 0x88, 0x96, 0xc8, 0x4a, 0x0e, 0xd1, + 0x7a, 0xe4, 0xf9, 0x58, 0x1a, 0x71, 0x33, 0x95, 0xe6, 0x17, 0x05, 0x68, 0x83, 0x86, 0x69, 0x44, + 0x42, 0x8a, 0x61, 0x04, 0xf2, 0xa9, 0xb7, 0xc4, 0xf5, 0xcc, 0x6a, 0xde, 0x2e, 0x8d, 0x76, 0xfd, + 0x0f, 0x51, 0x8f, 0xc7, 0xb9, 0x96, 0x78, 0xff, 0xf0, 0xcd, 0xb8, 0x34, 0x78, 0x46, 0xdd, 0xac, + 0x04, 0xdc, 0x1d, 0xd2, 0x56, 0x71, 0x6c, 0x5b, 0x82, 0xea, 0xaf, 0xbe, 0x9e, 0x81, 0x2b, 0x03, + 0x6e, 0x44, 0x0c, 0x0e, 0x50, 0x83, 0x9a, 0x4c, 0x60, 0x65, 0x92, 0x04, 0xf6, 0xca, 0x0e, 0x48, + 0x1a, 0xe8, 0xb4, 0x0d, 0x75, 0xaf, 0xec, 0xaa, 0x41, 0xcd, 0xfc, 0xa4, 0x0e, 0xc4, 0xdc, 0x1f, + 0x5a, 0x03, 0x80, 0x94, 0x4e, 0xea, 0x2c, 0x4f, 0xa2, 0xe3, 0x14, 0x13, 0x95, 0x5f, 0x6d, 0x23, + 0x53, 0x7f, 0xde, 0x36, 0x16, 0x5b, 0x5e, 0xa3, 0xbe, 0x65, 0xa6, 0xcf, 0x4c, 0x37, 0x03, 0x80, + 0x4f, 0xc0, 0x3c, 0x5f, 0x52, 0xaa, 0xa9, 0x3c, 0x1e, 0x63, 0xb4, 0xd4, 0x6e, 0x82, 0x73, 0x0c, + 0xa9, 0x22, 0xcb, 0xce, 0xdb, 0xc6, 0x82, 0x50, 0x10, 0xff, 0x4d, 0x57, 0x1e, 0xc0, 0x07, 0xe0, + 0x7f, 0xb1, 0xe9, 0xcf, 0xbd, 0x6a, 0x95, 0x34, 0x43, 0xa6, 0xcd, 0xf0, 0x66, 0x6e, 0x48, 0x05, + 0x71, 0xd8, 0x67, 0xbf, 0x2f, 0x40, 0x72, 0x51, 0x17, 0xc4, 0xa9, 0x7c, 0xb8, 0x35, 0xfb, 0xf3, + 0xad, 0x91, 0x33, 0x5d, 0xb0, 0xc8, 0xa7, 0xc6, 0x8d, 0xf4, 0xf2, 0xd8, 0xce, 0xe4, 0x71, 0x73, + 0x8c, 0xf9, 0x21, 0x51, 0xec, 0x03, 0x98, 0xe5, 0x94, 0x21, 0xdc, 0x03, 0x73, 0xbc, 0x0b, 0xc9, + 0x3b, 0x76, 0x28, 0xc2, 0xb4, 0xa8, 0xb1, 0x7f, 0xcf, 0x80, 0x39, 0xce, 0x09, 0xdf, 0x2b, 0x20, + 0x9f, 0xb9, 0x18, 0x70, 0xf2, 0xdd, 0xef, 0xdd, 0xfa, 0x82, 0x3d, 0x4d, 0x89, 0x70, 0x6f, 0xda, + 0x2f, 0x3f, 0xff, 0x78, 0xa3, 0x6e, 0xc0, 0x35, 0x34, 0xc1, 0x9b, 0x8e, 0xa2, 0x7a, 0x40, 0x19, + 0x7c, 0xa7, 0x00, 0x90, 0x72, 0xc1, 0x3b, 0x53, 0xdc, 0x52, 0x61, 0x74, 0xfa, 0x7b, 0x3d, 0xad, + 0xcf, 0x20, 0x3c, 0x20, 0xf0, 0xb5, 0x02, 0xe6, 0xf8, 0xcc, 0xe1, 0xfa, 0x18, 0xc1, 0xec, 0x96, + 0x14, 0x36, 0x26, 0x03, 0x4b, 0x63, 0x9b, 0xdc, 0x58, 0x11, 0xde, 0x42, 0x17, 0xbf, 0xd9, 0x85, + 0x27, 0xe7, 0xf1, 0x69, 0x47, 0x57, 0xce, 0x3a, 0xba, 0xf2, 0xbd, 0xa3, 0x2b, 0xaf, 0xba, 0x7a, + 0xee, 0xac, 0xab, 0xe7, 0xbe, 0x76, 0xf5, 0xdc, 0xd3, 0x6d, 0x3f, 0x60, 0x87, 0xcd, 0x8a, 0x55, + 0x25, 0x0d, 0x41, 0xb5, 0x19, 0x62, 0x76, 0x42, 0xe2, 0x23, 0xf9, 0x2f, 0xf9, 0x98, 0xf9, 0x04, + 0x85, 0xa4, 0x86, 0x87, 0x88, 0x54, 0xe6, 0xf9, 0x57, 0xe1, 0xee, 0x9f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xbc, 0xfa, 0xaa, 0xa7, 0x52, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Deployments queries deployments + Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) + // Group queries group details + Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) { + out := new(QueryDeploymentsResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Query/Deployments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) { + out := new(QueryDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Query/Deployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) { + out := new(QueryGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Query/Group", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Deployments queries deployments + Deployments(context.Context, *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(context.Context, *QueryDeploymentRequest) (*QueryDeploymentResponse, error) + // Group queries group details + Group(context.Context, *QueryGroupRequest) (*QueryGroupResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Deployments(ctx context.Context, req *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployments not implemented") +} +func (*UnimplementedQueryServer) Deployment(ctx context.Context, req *QueryDeploymentRequest) (*QueryDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployment not implemented") +} +func (*UnimplementedQueryServer) Group(ctx context.Context, req *QueryGroupRequest) (*QueryGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Group not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Deployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Query/Deployments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployments(ctx, req.(*QueryDeploymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Query/Deployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployment(ctx, req.(*QueryDeploymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Group_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Group(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Query/Group", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Group(ctx, req.(*QueryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Deployments", + Handler: _Query_Deployments_Handler, + }, + { + MethodName: "Deployment", + Handler: _Query_Deployment_Handler, + }, + { + MethodName: "Group", + Handler: _Query_Group_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta2/query.proto", +} + +func (m *QueryDeploymentsRequest) 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 *QueryDeploymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsRequest) 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 + } + { + size, err := m.Filters.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 *QueryDeploymentsResponse) 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 *QueryDeploymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsResponse) 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.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[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 (m *QueryDeploymentRequest) 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 *QueryDeploymentRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryDeploymentResponse) 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 *QueryDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + 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)) + } + i-- + dAtA[i] = 0x1a + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.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 *QueryGroupRequest) 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 *QueryGroupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryGroupResponse) 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 *QueryGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Group.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 *QueryDeploymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDeploymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + 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 (m *QueryDeploymentRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.EscrowAccount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Group.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryDeploymentsRequest) 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: QueryDeploymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryDeploymentsResponse) 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: QueryDeploymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, QueryDeploymentResponse{}) + if err := m.Deployments[len(m.Deployments)-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) + } + 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.PageResponse{} + } + 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 *QueryDeploymentRequest) 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: QueryDeploymentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentRequest: 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 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.ID.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 *QueryDeploymentResponse) 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: QueryDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", 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.EscrowAccount.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 *QueryGroupRequest) 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: QueryGroupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupRequest: 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 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.ID.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 *QueryGroupResponse) 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: QueryGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", 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.Group.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/query.pb.gw.go b/go/node/deployment/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..fb1f2b98 --- /dev/null +++ b/go/node/deployment/v1beta2/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/deployment/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Deployments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployments(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Deployment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployment(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Group_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Group(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Group(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "groups", "info"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Deployments_0 = runtime.ForwardResponseMessage + + forward_Query_Deployment_0 = runtime.ForwardResponseMessage + + forward_Query_Group_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/deployment/v1beta2/resource.pb.go b/go/node/deployment/v1beta2/resource.pb.go new file mode 100644 index 00000000..8f235480 --- /dev/null +++ b/go/node/deployment/v1beta2/resource.pb.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/resource.proto + +package v1beta2 + +import ( + fmt "fmt" + v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Resource stores unit, total count and price of resource +type Resource struct { + Resources v1beta2.ResourceUnits `protobuf:"bytes,1,opt,name=resources,proto3" json:"unit" yaml:"unit"` + Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { + return fileDescriptor_93085c4a2e404198, []int{0} +} +func (m *Resource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Resource.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 *Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *Resource) XXX_Size() int { + return m.Size() +} +func (m *Resource) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func (m *Resource) GetResources() v1beta2.ResourceUnits { + if m != nil { + return m.Resources + } + return v1beta2.ResourceUnits{} +} + +func (m *Resource) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *Resource) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func init() { + proto.RegisterType((*Resource)(nil), "akash.deployment.v1beta2.Resource") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/resource.proto", fileDescriptor_93085c4a2e404198) +} + +var fileDescriptor_93085c4a2e404198 = []byte{ + // 341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, + 0x18, 0x85, 0x93, 0x7b, 0xdb, 0xab, 0x4b, 0x0a, 0x4b, 0xc4, 0x10, 0x0a, 0x38, 0x25, 0x03, 0x74, + 0xc1, 0x56, 0xcb, 0x56, 0x89, 0x25, 0xf0, 0x02, 0x44, 0x42, 0x48, 0x88, 0x25, 0x71, 0xad, 0x34, + 0x6a, 0xe3, 0x3f, 0x8a, 0x1d, 0x50, 0xdf, 0x82, 0x47, 0xe0, 0x71, 0x3a, 0x76, 0x64, 0x8a, 0x50, + 0xbb, 0xa0, 0x8e, 0x7d, 0x02, 0x14, 0x3b, 0x55, 0x3a, 0xb0, 0xe5, 0x1c, 0x7f, 0xff, 0xf1, 0xf9, + 0x63, 0xeb, 0x2a, 0x9c, 0x86, 0x62, 0x42, 0xc6, 0x2c, 0x9b, 0xc1, 0x3c, 0x65, 0x5c, 0x92, 0xd7, + 0x41, 0xc4, 0x64, 0x38, 0x24, 0x39, 0x13, 0x50, 0xe4, 0x94, 0xe1, 0x2c, 0x07, 0x09, 0xb6, 0xa3, + 0x40, 0xdc, 0x80, 0xb8, 0x06, 0xbb, 0xc7, 0x31, 0xc4, 0xa0, 0x20, 0x52, 0x7d, 0x69, 0xbe, 0x8b, + 0x28, 0x88, 0x14, 0x04, 0x89, 0x42, 0xc1, 0xea, 0xcc, 0x01, 0xa1, 0x90, 0xf0, 0xfa, 0xfc, 0x52, + 0x5f, 0xbc, 0x77, 0xdc, 0x5c, 0x59, 0xf0, 0x44, 0x0a, 0xcd, 0x79, 0x5b, 0xd3, 0xfa, 0x1f, 0xd4, + 0xbe, 0xfd, 0x62, 0x1d, 0xec, 0x18, 0xe1, 0x98, 0x3d, 0xb3, 0xdf, 0x19, 0x5e, 0x60, 0x5d, 0xac, + 0x0a, 0xda, 0x55, 0xc2, 0xbb, 0x81, 0xc7, 0x2a, 0xc8, 0x3f, 0x5d, 0x94, 0xae, 0xb1, 0x29, 0xdd, + 0x56, 0x95, 0xbb, 0x2d, 0xdd, 0xce, 0x3c, 0x4c, 0x67, 0x23, 0xaf, 0x52, 0x5e, 0xd0, 0x04, 0xda, + 0xc4, 0x6a, 0x53, 0x28, 0xb8, 0x74, 0xfe, 0xf4, 0xcc, 0xfe, 0x91, 0x7f, 0xb2, 0x29, 0x5d, 0x6d, + 0x6c, 0x4b, 0xf7, 0x50, 0xcf, 0x28, 0xe9, 0x05, 0xda, 0xb6, 0x1f, 0xac, 0x76, 0x96, 0x27, 0x94, + 0x39, 0x7f, 0x55, 0x95, 0x33, 0xac, 0x77, 0xde, 0xef, 0x32, 0xc0, 0xf7, 0x8c, 0xde, 0x41, 0xc2, + 0xfd, 0xf3, 0xba, 0x85, 0x1e, 0x69, 0x22, 0x95, 0xf4, 0x02, 0x6d, 0x8f, 0x5a, 0xdf, 0x1f, 0xae, + 0xe1, 0x3f, 0x2d, 0x56, 0xc8, 0x5c, 0xae, 0x90, 0xf9, 0xb5, 0x42, 0xe6, 0xfb, 0x1a, 0x19, 0xcb, + 0x35, 0x32, 0x3e, 0xd7, 0xc8, 0x78, 0xbe, 0x8d, 0x13, 0x39, 0x29, 0x22, 0x4c, 0x21, 0x25, 0x6a, + 0xf1, 0x6b, 0xce, 0xe4, 0x1b, 0xe4, 0xd3, 0x5a, 0x85, 0x59, 0x42, 0x62, 0x20, 0x1c, 0xc6, 0xec, + 0x97, 0x47, 0x8d, 0xfe, 0xa9, 0x9f, 0x7a, 0xf3, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xe1, 0x47, + 0xfd, 0xf7, 0x01, 0x00, 0x00, +} + +func (m *Resource) 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 *Resource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Count != 0 { + i = encodeVarintResource(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { + offset -= sovResource(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Resource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resources.Size() + n += 1 + l + sovResource(uint64(l)) + if m.Count != 0 { + n += 1 + sovResource(uint64(m.Count)) + } + l = m.Price.Size() + n += 1 + l + sovResource(uint64(l)) + return n +} + +func sovResource(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Resource) 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 ErrIntOverflowResource + } + 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: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResource(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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrInvalidLengthResource + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResource + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResource + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta2/resource_list_validation.go b/go/node/deployment/v1beta2/resource_list_validation.go new file mode 100644 index 00000000..6440272e --- /dev/null +++ b/go/node/deployment/v1beta2/resource_list_validation.go @@ -0,0 +1,172 @@ +package v1beta2 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + + types "github.com/akash-network/node/types/v1beta2" +) + +var ( + ErrNoGroupsPresent = errors.New("validation: no groups present") + ErrGroupEmptyName = errors.New("validation: group has empty name") +) + +func ValidateResourceList(rlist types.ResourceGroup) error { + if rlist.GetName() == "" { + return ErrGroupEmptyName + } + + units := rlist.GetResources() + + if count := len(units); count > validationConfig.MaxGroupUnits { + return errors.Errorf("group %v: too many units (%v > %v)", rlist.GetName(), count, validationConfig.MaxGroupUnits) + } + + limits := newLimits() + + for _, resource := range units { + gLimits, err := validateResourceGroup(resource) + if err != nil { + return fmt.Errorf("group %v: %w", rlist.GetName(), err) + } + + gLimits.mul(resource.Count) + + limits.add(gLimits) + } + + if limits.cpu.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupCPU)) || limits.cpu.LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total CPU (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupCPU, limits.cpu, 0) + } + + if limits.memory.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupMemory)) || limits.memory.LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total memory (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupMemory, limits.memory, 0) + } + + for i := range limits.storage { + if limits.storage[i].GT(sdk.NewIntFromUint64(validationConfig.MaxGroupStorage)) || limits.storage[i].LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total storage (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupStorage, limits.storage, 0) + } + } + + return nil +} + +func validateResourceGroup(rg types.Resources) (resourceLimits, error) { + limits, err := validateResourceUnit(rg.Resources) + if err != nil { + return resourceLimits{}, err + } + + if rg.Count > uint32(validationConfig.MaxUnitCount) || rg.Count < uint32(validationConfig.MinUnitCount) { + return resourceLimits{}, errors.Errorf("error: invalid unit count (%v > %v > %v fails)", + validationConfig.MaxUnitCount, rg.Count, validationConfig.MinUnitCount) + } + + return limits, nil +} + +func validateResourceUnit(units types.ResourceUnits) (resourceLimits, error) { + limits := newLimits() + + val, err := validateCPU(units.CPU) + if err != nil { + return resourceLimits{}, err + } + limits.cpu = limits.cpu.Add(val) + + val, err = validateMemory(units.Memory) + if err != nil { + return resourceLimits{}, err + } + limits.memory = limits.memory.Add(val) + + var storage []sdk.Int + storage, err = validateStorage(units.Storage) + if err != nil { + return resourceLimits{}, err + } + + // fixme this is not actually sum for storage usecase. + // do we really need sum here? + limits.storage = storage + + return limits, nil +} + +func validateCPU(u *types.CPU) (sdk.Int, error) { + if u == nil { + return sdk.Int{}, errors.Errorf("error: invalid unit CPU, cannot be nil") + } + if (u.Units.Value() > uint64(validationConfig.MaxUnitCPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitCPU)) { + return sdk.Int{}, errors.Errorf("error: invalid unit CPU (%v > %v > %v fails)", + validationConfig.MaxUnitCPU, u.Units.Value(), validationConfig.MinUnitCPU) + } + + return u.Units.Val, nil +} + +func validateMemory(u *types.Memory) (sdk.Int, error) { + if u == nil { + return sdk.Int{}, errors.Errorf("error: invalid unit memory, cannot be nil") + } + if (u.Quantity.Value() > validationConfig.MaxUnitMemory) || (u.Quantity.Value() < validationConfig.MinUnitMemory) { + return sdk.Int{}, errors.Errorf("error: invalid unit memory (%v > %v > %v fails)", + validationConfig.MaxUnitMemory, u.Quantity.Value(), validationConfig.MinUnitMemory) + } + + return u.Quantity.Val, nil +} + +func validateStorage(u types.Volumes) ([]sdk.Int, error) { + if u == nil { + return nil, errors.Errorf("error: invalid unit storage, cannot be nil") + } + + storage := make([]sdk.Int, 0, len(u)) + + for i := range u { + if (u[i].Quantity.Value() > validationConfig.MaxUnitStorage) || (u[i].Quantity.Value() < validationConfig.MinUnitStorage) { + return nil, errors.Errorf("error: invalid unit storage (%v > %v > %v fails)", + validationConfig.MaxUnitStorage, u[i].Quantity.Value(), validationConfig.MinUnitStorage) + } + + storage = append(storage, u[i].Quantity.Val) + } + + return storage, nil +} + +type resourceLimits struct { + cpu sdk.Int + memory sdk.Int + storage []sdk.Int +} + +func newLimits() resourceLimits { + return resourceLimits{ + cpu: sdk.ZeroInt(), + memory: sdk.ZeroInt(), + } +} + +func (u *resourceLimits) add(rhs resourceLimits) { + u.cpu = u.cpu.Add(rhs.cpu) + u.memory = u.memory.Add(rhs.memory) + + // u.storage = u.storage.Add(rhs.storage) +} + +func (u *resourceLimits) mul(count uint32) { + u.cpu = u.cpu.MulRaw(int64(count)) + u.memory = u.memory.MulRaw(int64(count)) + for i := range u.storage { + u.storage[i] = u.storage[i].MulRaw(int64(count)) + } +} diff --git a/go/node/deployment/v1beta2/service.pb.go b/go/node/deployment/v1beta2/service.pb.go new file mode 100644 index 00000000..5c5afa6e --- /dev/null +++ b/go/node/deployment/v1beta2/service.pb.go @@ -0,0 +1,365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta2/service.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// 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 + +func init() { + proto.RegisterFile("akash/deployment/v1beta2/service.proto", fileDescriptor_0e37360c059968cc) +} + +var fileDescriptor_0e37360c059968cc = []byte{ + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd3, 0x3d, 0x4e, 0xf3, 0x30, + 0x18, 0xc0, 0xf1, 0x56, 0xaf, 0xd4, 0xc1, 0xcb, 0x5b, 0x32, 0x21, 0x0f, 0x1e, 0xe9, 0xd2, 0xda, + 0xa2, 0x7c, 0x6c, 0x2c, 0xb4, 0x12, 0x53, 0x25, 0x04, 0x42, 0x48, 0x6c, 0x6e, 0xfb, 0xe0, 0x46, + 0x6d, 0x63, 0xcb, 0x76, 0x4a, 0x11, 0x97, 0xe0, 0x12, 0xdc, 0x85, 0xb1, 0x23, 0x23, 0x4a, 0x2e, + 0x82, 0x08, 0x25, 0x0e, 0x81, 0x34, 0xc9, 0x98, 0xe4, 0x97, 0xe7, 0x1f, 0x47, 0x36, 0x3a, 0xe0, + 0x73, 0x6e, 0x66, 0x6c, 0x0a, 0x6a, 0x21, 0x1f, 0x97, 0x10, 0x58, 0xb6, 0x3a, 0x1c, 0x83, 0xe5, + 0x7d, 0x66, 0x40, 0xaf, 0xfc, 0x09, 0x50, 0xa5, 0xa5, 0x95, 0xde, 0x7e, 0xe2, 0xa8, 0x73, 0x74, + 0xeb, 0x70, 0xb7, 0x70, 0x82, 0xbb, 0xb5, 0x34, 0xe2, 0x6b, 0x0e, 0xee, 0x14, 0x6a, 0xa1, 0x65, + 0xa8, 0x52, 0xd8, 0x7f, 0x69, 0xa1, 0x7f, 0x23, 0x23, 0xbc, 0x35, 0x6a, 0x0f, 0x34, 0x70, 0x0b, + 0xc3, 0xf4, 0x15, 0xaf, 0x47, 0x8b, 0xbe, 0x86, 0x8e, 0x8c, 0xc8, 0x73, 0x7c, 0x52, 0x8b, 0x5f, + 0x81, 0x51, 0x32, 0x30, 0xe0, 0x3d, 0xa1, 0xbd, 0x21, 0x28, 0x69, 0x7c, 0x9b, 0x49, 0xd3, 0x9d, + 0xb3, 0x7e, 0x79, 0x7c, 0x5a, 0xcf, 0xa7, 0xf1, 0x35, 0x6a, 0xdf, 0xa8, 0x69, 0x9d, 0x65, 0xe7, + 0x79, 0xc9, 0xb2, 0xf3, 0x3c, 0x2d, 0x87, 0xe8, 0xff, 0x60, 0x21, 0x4d, 0x36, 0xdc, 0xdd, 0xfd, + 0x03, 0x7f, 0x6a, 0x7c, 0x5c, 0x47, 0xa7, 0xd9, 0x7b, 0x84, 0x92, 0x47, 0x17, 0x9f, 0xdb, 0xc0, + 0xeb, 0x94, 0xcf, 0x48, 0x20, 0x66, 0x15, 0x61, 0xb6, 0x73, 0xc9, 0xc3, 0x6a, 0x1d, 0x07, 0x4b, + 0x3a, 0x0e, 0x66, 0x3b, 0xd7, 0x96, 0x6b, 0x5b, 0xa5, 0xe3, 0x60, 0x49, 0xc7, 0xc1, 0xef, 0xce, + 0xf9, 0xed, 0x6b, 0x44, 0x9a, 0x9b, 0x88, 0x34, 0xdf, 0x23, 0xd2, 0x7c, 0x8e, 0x49, 0x63, 0x13, + 0x93, 0xc6, 0x5b, 0x4c, 0x1a, 0x77, 0x67, 0xc2, 0xb7, 0xb3, 0x70, 0x4c, 0x27, 0x72, 0xc9, 0x92, + 0xa1, 0xbd, 0x00, 0xec, 0x83, 0xd4, 0xf3, 0xed, 0x15, 0x57, 0x3e, 0x13, 0x92, 0x05, 0x72, 0x0a, + 0x7f, 0x9c, 0xc7, 0x71, 0x2b, 0x39, 0x87, 0x47, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0x3a, + 0x9a, 0x16, 0x22, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) { + out := new(MsgCreateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/CreateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) { + out := new(MsgDepositDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/DepositDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) { + out := new(MsgUpdateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/UpdateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) { + out := new(MsgCloseDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/CloseDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) { + out := new(MsgCloseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/CloseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) { + out := new(MsgPauseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/PauseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) { + out := new(MsgStartGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta2.Msg/StartGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(context.Context, *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(context.Context, *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(context.Context, *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(context.Context, *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(context.Context, *MsgCloseGroup) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(context.Context, *MsgPauseGroup) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(context.Context, *MsgStartGroup) (*MsgStartGroupResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateDeployment(ctx context.Context, req *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDeployment not implemented") +} +func (*UnimplementedMsgServer) DepositDeployment(ctx context.Context, req *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositDeployment not implemented") +} +func (*UnimplementedMsgServer) UpdateDeployment(ctx context.Context, req *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseDeployment(ctx context.Context, req *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseGroup(ctx context.Context, req *MsgCloseGroup) (*MsgCloseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseGroup not implemented") +} +func (*UnimplementedMsgServer) PauseGroup(ctx context.Context, req *MsgPauseGroup) (*MsgPauseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseGroup not implemented") +} +func (*UnimplementedMsgServer) StartGroup(ctx context.Context, req *MsgStartGroup) (*MsgStartGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartGroup not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/CreateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDeployment(ctx, req.(*MsgCreateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/DepositDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositDeployment(ctx, req.(*MsgDepositDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/UpdateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDeployment(ctx, req.(*MsgUpdateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/CloseDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseDeployment(ctx, req.(*MsgCloseDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/CloseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseGroup(ctx, req.(*MsgCloseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PauseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPauseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PauseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/PauseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PauseGroup(ctx, req.(*MsgPauseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StartGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStartGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StartGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta2.Msg/StartGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StartGroup(ctx, req.(*MsgStartGroup)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDeployment", + Handler: _Msg_CreateDeployment_Handler, + }, + { + MethodName: "DepositDeployment", + Handler: _Msg_DepositDeployment_Handler, + }, + { + MethodName: "UpdateDeployment", + Handler: _Msg_UpdateDeployment_Handler, + }, + { + MethodName: "CloseDeployment", + Handler: _Msg_CloseDeployment_Handler, + }, + { + MethodName: "CloseGroup", + Handler: _Msg_CloseGroup_Handler, + }, + { + MethodName: "PauseGroup", + Handler: _Msg_PauseGroup_Handler, + }, + { + MethodName: "StartGroup", + Handler: _Msg_StartGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta2/service.proto", +} diff --git a/go/node/deployment/v1beta2/types.go b/go/node/deployment/v1beta2/types.go new file mode 100644 index 00000000..c887cf14 --- /dev/null +++ b/go/node/deployment/v1beta2/types.go @@ -0,0 +1,129 @@ +package v1beta2 + +import ( + "bytes" + + sdk "github.com/cosmos/cosmos-sdk/types" + + types "github.com/akash-network/node/types/v1beta2" +) + +type attributesMatching map[string]types.Attributes + +const ( + // ManifestVersionLength is the length of manifest version + ManifestVersionLength = 32 + + // DefaultOrderBiddingDuration is the default time limit for an Order being active. + // After the duration, the Order is automatically closed. + // ( 24(hr) * 3600(seconds per hour) ) / 7s-Block + DefaultOrderBiddingDuration = int64(12342) + + // MaxBiddingDuration is roughly 30 days of block height + MaxBiddingDuration = DefaultOrderBiddingDuration * int64(30) +) + +// ID method returns DeploymentID details of specific deployment +func (obj Deployment) ID() DeploymentID { + return obj.DeploymentID +} + +// MatchAttributes method compares provided attributes with specific group attributes +func (g GroupSpec) MatchAttributes(attr types.Attributes) bool { + return types.AttributesSubsetOf(g.Requirements.Attributes, attr) +} + +// ID method returns GroupID details of specific group +func (g Group) ID() GroupID { + return g.GroupID +} + +// ValidateClosable provides error response if group is already closed, +// and thus should not be closed again, else nil. +func (g Group) ValidateClosable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + default: + return nil + } +} + +// ValidatePausable provides error response if group is not pausable +func (g Group) ValidatePausable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + case GroupPaused: + return ErrGroupPaused + default: + return nil + } +} + +// ValidatePausable provides error response if group is not pausable +func (g Group) ValidateStartable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + case GroupOpen: + return ErrGroupOpen + default: + return nil + } +} + +// GetName method returns group name +func (g Group) GetName() string { + return g.GroupSpec.Name +} + +// GetResources method returns resources list in group +func (g Group) GetResources() []types.Resources { + return g.GroupSpec.GetResources() +} + +// FullPrice method returns full price of resource +func (r Resource) FullPrice() sdk.DecCoin { + return sdk.NewDecCoinFromDec(r.Price.Denom, r.Price.Amount.MulInt64(int64(r.Count))) +} + +// DeploymentResponses is a collection of DeploymentResponse +type DeploymentResponses []QueryDeploymentResponse + +func (ds DeploymentResponses) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, d := range ds { + buf.WriteString(d.String()) + buf.WriteString(sep) + } + + if len(ds) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +// Accept returns whether deployment filters valid or not +func (filters DeploymentFilters) Accept(obj Deployment, stateVal Deployment_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.DeploymentID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.DeploymentID.DSeq { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} diff --git a/go/node/deployment/v1beta2/validation_config.go b/go/node/deployment/v1beta2/validation_config.go new file mode 100644 index 00000000..cffad525 --- /dev/null +++ b/go/node/deployment/v1beta2/validation_config.go @@ -0,0 +1,62 @@ +package v1beta2 + +import "github.com/akash-network/node/types/unit" + +// This is the validation configuration that acts as a hard limit +// on what the network accepts for deployments. This is never changed +// and is the same across all members of the network + +type ValidationConfig struct { + + // MaxUnitCPU is the maximum number of milli (1/1000) cpu units a unit can consume. + MaxUnitCPU uint + // MaxUnitMemory is the maximum number of bytes of memory that a unit can consume + MaxUnitMemory uint64 + // MaxUnitStorage is the maximum number of bytes of storage that a unit can consume + MaxUnitStorage uint64 + // MaxUnitCount is the maximum number of replias of a service + MaxUnitCount uint + // MaxUnitPrice is the maximum price that a unit can have + MaxUnitPrice uint64 + + MinUnitCPU uint + MinUnitMemory uint64 + MinUnitStorage uint64 + MinUnitCount uint + + // MaxGroupCount is the maximum number of groups allowed per deployment + MaxGroupCount int + // MaxGroupUnits is the maximum number services per group + MaxGroupUnits int + + // MaxGroupCPU is the maximum total amount of CPU requested per group + MaxGroupCPU uint64 + // MaxGroupMemory is the maximum total amount of memory requested per group + MaxGroupMemory uint64 + // MaxGroupStorage is the maximum total amount of storage requested per group + MaxGroupStorage uint64 +} + +var validationConfig = ValidationConfig{ + MaxUnitCPU: 256 * 1000, // 256 CPUs + MaxUnitMemory: 512 * unit.Gi, // 512 Gi + MaxUnitStorage: 32 * unit.Ti, // 32 Ti + MaxUnitCount: 50, + MaxUnitPrice: 10000000, // 10akt + + MinUnitCPU: 10, + MinUnitMemory: unit.Mi, + MinUnitStorage: 5 * unit.Mi, + MinUnitCount: 1, + + MaxGroupCount: 20, + MaxGroupUnits: 20, + + MaxGroupCPU: 512 * 1000, + MaxGroupMemory: 1024 * unit.Gi, + MaxGroupStorage: 32 * unit.Ti, +} + +func GetValidationConfig() ValidationConfig { + return validationConfig +} diff --git a/go/node/deployment/v1beta3/authz.pb.go b/go/node/deployment/v1beta3/authz.pb.go new file mode 100644 index 00000000..3e440dc7 --- /dev/null +++ b/go/node/deployment/v1beta3/authz.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/authz.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/regen-network/cosmos-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 + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +type DepositDeploymentAuthorization struct { + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + SpendLimit types.Coin `protobuf:"bytes,1,opt,name=spend_limit,json=spendLimit,proto3" json:"spend_limit"` +} + +func (m *DepositDeploymentAuthorization) Reset() { *m = DepositDeploymentAuthorization{} } +func (m *DepositDeploymentAuthorization) String() string { return proto.CompactTextString(m) } +func (*DepositDeploymentAuthorization) ProtoMessage() {} +func (*DepositDeploymentAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_7e478d3fe036c639, []int{0} +} +func (m *DepositDeploymentAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DepositDeploymentAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DepositDeploymentAuthorization.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 *DepositDeploymentAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositDeploymentAuthorization.Merge(m, src) +} +func (m *DepositDeploymentAuthorization) XXX_Size() int { + return m.Size() +} +func (m *DepositDeploymentAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_DepositDeploymentAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_DepositDeploymentAuthorization proto.InternalMessageInfo + +func (m *DepositDeploymentAuthorization) GetSpendLimit() types.Coin { + if m != nil { + return m.SpendLimit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*DepositDeploymentAuthorization)(nil), "akash.deployment.v1beta3.DepositDeploymentAuthorization") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/authz.proto", fileDescriptor_7e478d3fe036c639) +} + +var fileDescriptor_7e478d3fe036c639 = []byte{ + // 280 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x92, 0x00, 0xab, 0xd2, 0x43, 0xa8, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, + 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x0e, 0xc2, 0xd3, 0x4f, 0x4a, 0x2c, 0x4e, 0x85, 0xda, 0x65, + 0xa8, 0x9f, 0x9c, 0x9f, 0x99, 0x07, 0x91, 0x57, 0x6a, 0x61, 0xe4, 0x92, 0x73, 0x49, 0x2d, 0xc8, + 0x2f, 0xce, 0x2c, 0x71, 0x81, 0x5b, 0xe7, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x95, 0x58, + 0x92, 0x99, 0x9f, 0x27, 0xe4, 0xcf, 0xc5, 0x5d, 0x5c, 0x90, 0x9a, 0x97, 0x12, 0x9f, 0x93, 0x99, + 0x9b, 0x59, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa9, 0x07, 0xb5, 0x06, 0x64, 0x30, + 0xd4, 0x79, 0x86, 0x7a, 0xce, 0xf9, 0x99, 0x79, 0x4e, 0xc2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, + 0x27, 0x8f, 0xac, 0x2b, 0x88, 0x0b, 0xcc, 0xf1, 0x01, 0xb1, 0xad, 0x04, 0x2f, 0x6d, 0xd1, 0xe5, + 0x45, 0xb1, 0xc3, 0x29, 0xfc, 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, 0x6c, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0xc1, 0xa2, 0x9b, 0x97, + 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, + 0xa7, 0xa4, 0x62, 0x09, 0xd6, 0x24, 0x36, 0xb0, 0x37, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x97, 0xe9, 0xc3, 0xb8, 0x79, 0x01, 0x00, 0x00, +} + +func (m *DepositDeploymentAuthorization) 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 *DepositDeploymentAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DepositDeploymentAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.SpendLimit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuthz(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthz(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DepositDeploymentAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SpendLimit.Size() + n += 1 + l + sovAuthz(uint64(l)) + return n +} + +func sovAuthz(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthz(x uint64) (n int) { + return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DepositDeploymentAuthorization) 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 ErrIntOverflowAuthz + } + 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: DepositDeploymentAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositDeploymentAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuthz + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuthz + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpendLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthz(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthz(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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrIntOverflowAuthz + } + 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, ErrInvalidLengthAuthz + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthz + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthz + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/codec.go b/go/node/deployment/v1beta3/codec.go new file mode 100644 index 00000000..49f4a680 --- /dev/null +++ b/go/node/deployment/v1beta3/codec.go @@ -0,0 +1,58 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/deployment module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/deployment and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterLegacyAminoCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateDeployment{}, ModuleName+"/"+MsgTypeCreateDeployment, nil) + cdc.RegisterConcrete(&MsgUpdateDeployment{}, ModuleName+"/"+MsgTypeUpdateDeployment, nil) + cdc.RegisterConcrete(&MsgDepositDeployment{}, ModuleName+"/"+MsgTypeDepositDeployment, nil) + cdc.RegisterConcrete(&MsgCloseDeployment{}, ModuleName+"/"+MsgTypeCloseDeployment, nil) + cdc.RegisterConcrete(&MsgCloseGroup{}, ModuleName+"/"+MsgTypeCloseGroup, nil) + cdc.RegisterConcrete(&MsgPauseGroup{}, ModuleName+"/"+MsgTypePauseGroup, nil) + cdc.RegisterConcrete(&MsgStartGroup{}, ModuleName+"/"+MsgTypeStartGroup, nil) +} + +// RegisterInterfaces registers the x/deployment interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateDeployment{}, + &MsgUpdateDeployment{}, + &MsgDepositDeployment{}, + &MsgCloseDeployment{}, + &MsgCloseGroup{}, + &MsgPauseGroup{}, + &MsgStartGroup{}, + ) + registry.RegisterImplementations( + (*authz.Authorization)(nil), + &DepositDeploymentAuthorization{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/deployment/v1beta3/deployment.pb.go b/go/node/deployment/v1beta3/deployment.pb.go new file mode 100644 index 00000000..eba90596 --- /dev/null +++ b/go/node/deployment/v1beta3/deployment.pb.go @@ -0,0 +1,960 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/deployment.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of deployment +type Deployment_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + DeploymentStateInvalid Deployment_State = 0 + // DeploymentActive denotes state for deployment active + DeploymentActive Deployment_State = 1 + // DeploymentClosed denotes state for deployment closed + DeploymentClosed Deployment_State = 2 +) + +var Deployment_State_name = map[int32]string{ + 0: "invalid", + 1: "active", + 2: "closed", +} + +var Deployment_State_value = map[string]int32{ + "invalid": 0, + "active": 1, + "closed": 2, +} + +func (x Deployment_State) String() string { + return proto.EnumName(Deployment_State_name, int32(x)) +} + +func (Deployment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_16b7a55888f623cc, []int{1, 0} +} + +// DeploymentID stores owner and sequence number +type DeploymentID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` +} + +func (m *DeploymentID) Reset() { *m = DeploymentID{} } +func (*DeploymentID) ProtoMessage() {} +func (*DeploymentID) Descriptor() ([]byte, []int) { + return fileDescriptor_16b7a55888f623cc, []int{0} +} +func (m *DeploymentID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentID.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 *DeploymentID) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentID.Merge(m, src) +} +func (m *DeploymentID) XXX_Size() int { + return m.Size() +} +func (m *DeploymentID) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentID.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentID proto.InternalMessageInfo + +func (m *DeploymentID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +// Deployment stores deploymentID, state and version details +type Deployment struct { + DeploymentID DeploymentID `protobuf:"bytes,1,opt,name=deployment_id,json=deploymentId,proto3" json:"id" yaml:"id"` + State Deployment_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta3.Deployment_State" json:"state" yaml:"state"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Deployment) Reset() { *m = Deployment{} } +func (m *Deployment) String() string { return proto.CompactTextString(m) } +func (*Deployment) ProtoMessage() {} +func (*Deployment) Descriptor() ([]byte, []int) { + return fileDescriptor_16b7a55888f623cc, []int{1} +} +func (m *Deployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Deployment.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 *Deployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deployment.Merge(m, src) +} +func (m *Deployment) XXX_Size() int { + return m.Size() +} +func (m *Deployment) XXX_DiscardUnknown() { + xxx_messageInfo_Deployment.DiscardUnknown(m) +} + +var xxx_messageInfo_Deployment proto.InternalMessageInfo + +func (m *Deployment) GetDeploymentID() DeploymentID { + if m != nil { + return m.DeploymentID + } + return DeploymentID{} +} + +func (m *Deployment) GetState() Deployment_State { + if m != nil { + return m.State + } + return DeploymentStateInvalid +} + +func (m *Deployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *Deployment) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// DeploymentFilters defines filters used to filter deployments +type DeploymentFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *DeploymentFilters) Reset() { *m = DeploymentFilters{} } +func (m *DeploymentFilters) String() string { return proto.CompactTextString(m) } +func (*DeploymentFilters) ProtoMessage() {} +func (*DeploymentFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_16b7a55888f623cc, []int{2} +} +func (m *DeploymentFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeploymentFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeploymentFilters.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 *DeploymentFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeploymentFilters.Merge(m, src) +} +func (m *DeploymentFilters) XXX_Size() int { + return m.Size() +} +func (m *DeploymentFilters) XXX_DiscardUnknown() { + xxx_messageInfo_DeploymentFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_DeploymentFilters proto.InternalMessageInfo + +func (m *DeploymentFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *DeploymentFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *DeploymentFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta3.Deployment_State", Deployment_State_name, Deployment_State_value) + proto.RegisterType((*DeploymentID)(nil), "akash.deployment.v1beta3.DeploymentID") + proto.RegisterType((*Deployment)(nil), "akash.deployment.v1beta3.Deployment") + proto.RegisterType((*DeploymentFilters)(nil), "akash.deployment.v1beta3.DeploymentFilters") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/deployment.proto", fileDescriptor_16b7a55888f623cc) +} + +var fileDescriptor_16b7a55888f623cc = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x8d, 0xd3, 0x92, 0x6b, 0xa8, 0x82, 0x55, 0x21, 0x63, 0xa9, 0x3e, 0xcb, 0x03, + 0x0d, 0x48, 0xd8, 0xa2, 0x19, 0x90, 0x22, 0x31, 0xd4, 0x44, 0x48, 0x59, 0xdd, 0x01, 0x09, 0x86, + 0xea, 0x92, 0x3b, 0xa5, 0xa7, 0x3a, 0xbe, 0xd4, 0x3e, 0x52, 0x95, 0x81, 0x19, 0x75, 0x62, 0x64, + 0xa9, 0x54, 0x89, 0x2f, 0xc0, 0xca, 0x37, 0xe8, 0xd8, 0x91, 0xe9, 0x84, 0x9c, 0x05, 0x65, 0xcc, + 0x27, 0x40, 0xbe, 0x4b, 0x71, 0x40, 0x80, 0x98, 0xd8, 0xfc, 0x7e, 0xf7, 0x7f, 0x7e, 0xff, 0x77, + 0xef, 0x1e, 0x7c, 0x80, 0x8f, 0x71, 0x7e, 0x14, 0x12, 0x3a, 0x49, 0xf8, 0xd9, 0x98, 0xa6, 0x22, + 0x9c, 0x3e, 0x1e, 0x50, 0x81, 0x3b, 0x2b, 0x28, 0x98, 0x64, 0x5c, 0x70, 0xcb, 0x56, 0xd2, 0x60, + 0x85, 0x2f, 0xa5, 0xce, 0xf6, 0x88, 0x8f, 0xb8, 0x12, 0x85, 0xe5, 0x97, 0xd6, 0xfb, 0x6f, 0x61, + 0xb3, 0xf7, 0x43, 0xdb, 0xef, 0x59, 0x21, 0xac, 0xf3, 0xd3, 0x94, 0x66, 0x36, 0xf0, 0x40, 0xbb, + 0x11, 0xdd, 0x9b, 0x4b, 0xa4, 0xc1, 0x42, 0xa2, 0xe6, 0x19, 0x1e, 0x27, 0x5d, 0x5f, 0x85, 0x7e, + 0xac, 0xb1, 0xd5, 0x81, 0x26, 0xc9, 0xe9, 0x89, 0xbd, 0xe6, 0x81, 0xb6, 0x19, 0xa1, 0x42, 0x22, + 0xb3, 0x77, 0x40, 0x4f, 0xe6, 0x12, 0x29, 0xbe, 0x90, 0x68, 0x53, 0xa7, 0x95, 0x91, 0x1f, 0x2b, + 0xd8, 0xbd, 0xf5, 0xe1, 0x12, 0x19, 0xdf, 0x2e, 0x91, 0xe1, 0x7f, 0xae, 0x41, 0x58, 0x19, 0xb0, + 0x04, 0xbc, 0x5d, 0x59, 0x3f, 0x64, 0x44, 0xd9, 0xd8, 0xdc, 0xbb, 0x1f, 0xfc, 0xa9, 0xad, 0x60, + 0xd5, 0x7d, 0xb4, 0x7b, 0x25, 0x91, 0x51, 0x48, 0xf4, 0x53, 0x4f, 0x73, 0x89, 0xd6, 0x18, 0x59, + 0x48, 0xd4, 0xd0, 0x46, 0x18, 0xf1, 0xe3, 0x66, 0xf5, 0xa7, 0x3e, 0xb1, 0x5e, 0xc1, 0x7a, 0x2e, + 0xb0, 0xa0, 0xaa, 0x89, 0xad, 0xbd, 0x87, 0xff, 0x52, 0x2d, 0x38, 0x28, 0x33, 0xf4, 0x05, 0xa9, + 0xe4, 0xea, 0x82, 0x54, 0xe8, 0xc7, 0x1a, 0x5b, 0x4f, 0xe0, 0xc6, 0x94, 0x66, 0x39, 0xe3, 0xa9, + 0x5d, 0xf3, 0x40, 0xbb, 0x19, 0xed, 0xcc, 0x25, 0xba, 0x41, 0x0b, 0x89, 0xb6, 0x74, 0xd2, 0x12, + 0xf8, 0xf1, 0xcd, 0x91, 0xb5, 0x03, 0xe1, 0x30, 0xa3, 0x58, 0x50, 0x72, 0x88, 0x85, 0x6d, 0x7a, + 0xa0, 0x5d, 0x8b, 0x1b, 0x4b, 0xb2, 0x2f, 0xfc, 0x37, 0xb0, 0xae, 0x2c, 0x58, 0xbb, 0x70, 0x83, + 0xa5, 0x53, 0x9c, 0x30, 0xd2, 0x32, 0x1c, 0xe7, 0xfc, 0xc2, 0xbb, 0x5b, 0xb9, 0x54, 0x8a, 0xbe, + 0x3e, 0xb5, 0x3c, 0xb8, 0x8e, 0x87, 0x82, 0x4d, 0x69, 0x0b, 0x38, 0xdb, 0xe7, 0x17, 0x5e, 0xab, + 0xd2, 0xed, 0x2b, 0x5e, 0x2a, 0x86, 0x09, 0xcf, 0x29, 0x69, 0xad, 0xfd, 0xaa, 0x78, 0xa6, 0xb8, + 0x63, 0xbe, 0xfb, 0xe8, 0x1a, 0x5d, 0x53, 0xcd, 0xee, 0x13, 0x80, 0x77, 0x2a, 0xc1, 0x73, 0x96, + 0x08, 0x9a, 0xe5, 0xff, 0xe7, 0x05, 0x95, 0x55, 0xf4, 0xc8, 0x6a, 0x55, 0x95, 0xbf, 0x8d, 0x41, + 0x5b, 0x8e, 0x5e, 0x5c, 0x15, 0x2e, 0xb8, 0x2e, 0x5c, 0xf0, 0xb5, 0x70, 0xc1, 0xfb, 0x99, 0x6b, + 0x5c, 0xcf, 0x5c, 0xe3, 0xcb, 0xcc, 0x35, 0x5e, 0x3e, 0x1d, 0x31, 0x71, 0xf4, 0x7a, 0x10, 0x0c, + 0xf9, 0x38, 0x54, 0xe3, 0x7f, 0x94, 0x52, 0x71, 0xca, 0xb3, 0xe3, 0x65, 0x84, 0x27, 0x2c, 0x1c, + 0xf1, 0x30, 0xe5, 0x84, 0xfe, 0x66, 0x11, 0x07, 0xeb, 0x6a, 0x9d, 0x3a, 0xdf, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x7a, 0xff, 0xca, 0x08, 0xab, 0x03, 0x00, 0x00, +} + +func (m *DeploymentID) 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 *DeploymentID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Deployment) 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 *Deployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if m.State != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.DeploymentID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeployment(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeploymentFilters) 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 *DeploymentFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeploymentFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if m.DSeq != 0 { + i = encodeVarintDeployment(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDeployment(dAtA []byte, offset int, v uint64) int { + offset -= sovDeployment(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DeploymentID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + return n +} + +func (m *Deployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentID.Size() + n += 1 + l + sovDeployment(uint64(l)) + if m.State != 0 { + n += 1 + sovDeployment(uint64(m.State)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.CreatedAt != 0 { + n += 1 + sovDeployment(uint64(m.CreatedAt)) + } + return n +} + +func (m *DeploymentFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovDeployment(uint64(m.DSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovDeployment(uint64(l)) + } + return n +} + +func sovDeployment(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDeployment(x uint64) (n int) { + return sovDeployment(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DeploymentID) 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 ErrIntOverflowDeployment + } + 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: DeploymentID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Deployment) 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 ErrIntOverflowDeployment + } + 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: Deployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Deployment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeployment + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeploymentFilters) 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 ErrIntOverflowDeployment + } + 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: DeploymentFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeploymentFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeployment + } + 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 ErrInvalidLengthDeployment + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeployment + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeployment(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeployment + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDeployment(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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrIntOverflowDeployment + } + 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, ErrInvalidLengthDeployment + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDeployment + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDeployment + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDeployment = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDeployment = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDeployment = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/deployment_validation_test.go b/go/node/deployment/v1beta3/deployment_validation_test.go new file mode 100644 index 00000000..accdbd11 --- /dev/null +++ b/go/node/deployment/v1beta3/deployment_validation_test.go @@ -0,0 +1,192 @@ +package v1beta3_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/testutil" + + akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" + + types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +func TestZeroValueGroupSpec(t *testing.T) { + did := testutil.DeploymentID(t) + + dgroup := testutil.DeploymentGroup(t, did, uint32(6)) + gspec := dgroup.GroupSpec + + t.Run("assert nominal test success", func(t *testing.T) { + err := gspec.ValidateBasic() + require.NoError(t, err) + }) +} + +func TestZeroValueGroupSpecs(t *testing.T) { + did := testutil.DeploymentID(t) + dgroups := testutil.DeploymentGroups(t, did, uint32(6)) + gspecs := make([]types.GroupSpec, 0) + for _, d := range dgroups { + gspecs = append(gspecs, d.GroupSpec) + } + + t.Run("assert nominal test success", func(t *testing.T) { + err := types.ValidateDeploymentGroups(gspecs) + require.NoError(t, err) + }) + + gspecZeroed := make([]types.GroupSpec, len(gspecs)) + gspecZeroed = append(gspecZeroed, gspecs...) + t.Run("assert error for zero value bid duration", func(t *testing.T) { + err := types.ValidateDeploymentGroups(gspecZeroed) + require.Error(t, err) + }) +} + +func TestEmptyGroupSpecIsInvalid(t *testing.T) { + err := types.ValidateDeploymentGroups(make([]types.GroupSpec, 0)) + require.Equal(t, types.ErrInvalidGroups, err) +} + +func validSimpleGroupSpec() types.GroupSpec { + resources := make([]types.Resource, 1) + resources[0] = types.Resource{ + Resources: akashtypes.ResourceUnits{ + CPU: &akashtypes.CPU{ + Units: akashtypes.ResourceValue{ + Val: sdk.NewInt(10), + }, + Attributes: nil, + }, + Memory: &akashtypes.Memory{ + Quantity: akashtypes.ResourceValue{ + Val: sdk.NewIntFromUint64(types.GetValidationConfig().MinUnitMemory), + }, + Attributes: nil, + }, + Storage: akashtypes.Volumes{ + akashtypes.Storage{ + Quantity: akashtypes.ResourceValue{ + Val: sdk.NewIntFromUint64(types.GetValidationConfig().MinUnitStorage), + }, + Attributes: nil, + }, + }, + Endpoints: nil, + }, + Count: 1, + Price: sdk.NewInt64DecCoin(testutil.CoinDenom, 1), + } + return types.GroupSpec{ + Name: "testGroup", + Requirements: akashtypes.PlacementRequirements{}, + Resources: resources, + } +} + +func validSimpleGroupSpecs() []types.GroupSpec { + result := make([]types.GroupSpec, 1) + result[0] = validSimpleGroupSpec() + + return result +} + +func TestSimpleGroupSpecIsValid(t *testing.T) { + groups := validSimpleGroupSpecs() + err := types.ValidateDeploymentGroups(groups) + require.NoError(t, err) +} + +func TestDuplicateSimpleGroupSpecIsInvalid(t *testing.T) { + groups := validSimpleGroupSpecs() + groupsDuplicate := make([]types.GroupSpec, 2) + groupsDuplicate[0] = groups[0] + groupsDuplicate[1] = groups[0] + err := types.ValidateDeploymentGroups(groupsDuplicate) + require.Error(t, err) // TODO - specific error + require.Regexp(t, "^.*duplicate.*$", err) +} + +func TestGroupWithZeroCount(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Count = 0 + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit count.*$", err) +} + +func TestGroupWithZeroCPU(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.CPU.Units.Val = sdk.NewInt(0) + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit CPU.*$", err) +} + +func TestGroupWithZeroMemory(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.Memory.Quantity.Val = sdk.NewInt(0) + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit memory.*$", err) +} + +func TestGroupWithZeroStorage(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.Storage[0].Quantity.Val = sdk.NewInt(0) + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit storage.*$", err) +} + +func TestGroupWithNilCPU(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.CPU = nil + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit CPU.*$", err) +} + +func TestGroupWithNilMemory(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.Memory = nil + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit memory.*$", err) +} + +func TestGroupWithNilStorage(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Resources.Storage = nil + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid unit storage.*$", err) +} + +func TestGroupWithInvalidPrice(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Price = sdk.DecCoin{} + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid price object.*$", err) +} + +func TestGroupWithNegativePrice(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Price.Amount = sdk.NewDec(-1) + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*invalid price object.*$", err) +} + +func TestGroupWithInvalidDenom(t *testing.T) { + group := validSimpleGroupSpec() + group.Resources[0].Price.Denom = "goldenTicket" + err := group.ValidateBasic() + require.Error(t, err) + require.Regexp(t, "^.*denomination must be.*$", err) +} diff --git a/go/node/deployment/v1beta3/deploymentmsg.pb.go b/go/node/deployment/v1beta3/deploymentmsg.pb.go new file mode 100644 index 00000000..cad034c1 --- /dev/null +++ b/go/node/deployment/v1beta3/deploymentmsg.pb.go @@ -0,0 +1,1722 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/deploymentmsg.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// MsgCreateDeployment defines an SDK message for creating deployment +type MsgCreateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Groups []GroupSpec `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` + Deposit types.Coin `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit" yaml:"deposit"` + // Depositor pays for the deposit + Depositor string `protobuf:"bytes,5,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` +} + +func (m *MsgCreateDeployment) Reset() { *m = MsgCreateDeployment{} } +func (m *MsgCreateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeployment) ProtoMessage() {} +func (*MsgCreateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{0} +} +func (m *MsgCreateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeployment.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 *MsgCreateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeployment.Merge(m, src) +} +func (m *MsgCreateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeployment proto.InternalMessageInfo + +func (m *MsgCreateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgCreateDeployment) GetGroups() []GroupSpec { + if m != nil { + return m.Groups + } + return nil +} + +func (m *MsgCreateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +func (m *MsgCreateDeployment) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +func (m *MsgCreateDeployment) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgCreateDeploymentResponse struct { +} + +func (m *MsgCreateDeploymentResponse) Reset() { *m = MsgCreateDeploymentResponse{} } +func (m *MsgCreateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDeploymentResponse) ProtoMessage() {} +func (*MsgCreateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{1} +} +func (m *MsgCreateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDeploymentResponse.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 *MsgCreateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDeploymentResponse.Merge(m, src) +} +func (m *MsgCreateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDeploymentResponse proto.InternalMessageInfo + +// MsgDepositDeployment deposits more funds into the deposit account +type MsgDepositDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount" yaml:"amount"` + // Depositor pays for the deposit + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` +} + +func (m *MsgDepositDeployment) Reset() { *m = MsgDepositDeployment{} } +func (m *MsgDepositDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeployment) ProtoMessage() {} +func (*MsgDepositDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{2} +} +func (m *MsgDepositDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeployment.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 *MsgDepositDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeployment.Merge(m, src) +} +func (m *MsgDepositDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeployment proto.InternalMessageInfo + +func (m *MsgDepositDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgDepositDeployment) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func (m *MsgDepositDeployment) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +type MsgDepositDeploymentResponse struct { +} + +func (m *MsgDepositDeploymentResponse) Reset() { *m = MsgDepositDeploymentResponse{} } +func (m *MsgDepositDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositDeploymentResponse) ProtoMessage() {} +func (*MsgDepositDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{3} +} +func (m *MsgDepositDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositDeploymentResponse.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 *MsgDepositDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositDeploymentResponse.Merge(m, src) +} +func (m *MsgDepositDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositDeploymentResponse proto.InternalMessageInfo + +// MsgUpdateDeployment defines an SDK message for updating deployment +type MsgUpdateDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Version []byte `protobuf:"bytes,3,opt,name=version,proto3" json:"version" yaml:"version"` +} + +func (m *MsgUpdateDeployment) Reset() { *m = MsgUpdateDeployment{} } +func (m *MsgUpdateDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeployment) ProtoMessage() {} +func (*MsgUpdateDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{4} +} +func (m *MsgUpdateDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeployment.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 *MsgUpdateDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeployment.Merge(m, src) +} +func (m *MsgUpdateDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeployment proto.InternalMessageInfo + +func (m *MsgUpdateDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *MsgUpdateDeployment) GetVersion() []byte { + if m != nil { + return m.Version + } + return nil +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +type MsgUpdateDeploymentResponse struct { +} + +func (m *MsgUpdateDeploymentResponse) Reset() { *m = MsgUpdateDeploymentResponse{} } +func (m *MsgUpdateDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateDeploymentResponse) ProtoMessage() {} +func (*MsgUpdateDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{5} +} +func (m *MsgUpdateDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateDeploymentResponse.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 *MsgUpdateDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateDeploymentResponse.Merge(m, src) +} +func (m *MsgUpdateDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateDeploymentResponse proto.InternalMessageInfo + +// MsgCloseDeployment defines an SDK message for closing deployment +type MsgCloseDeployment struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseDeployment) Reset() { *m = MsgCloseDeployment{} } +func (m *MsgCloseDeployment) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeployment) ProtoMessage() {} +func (*MsgCloseDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{6} +} +func (m *MsgCloseDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeployment.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 *MsgCloseDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeployment.Merge(m, src) +} +func (m *MsgCloseDeployment) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeployment proto.InternalMessageInfo + +func (m *MsgCloseDeployment) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +type MsgCloseDeploymentResponse struct { +} + +func (m *MsgCloseDeploymentResponse) Reset() { *m = MsgCloseDeploymentResponse{} } +func (m *MsgCloseDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseDeploymentResponse) ProtoMessage() {} +func (*MsgCloseDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f364faefc2dcd8b7, []int{7} +} +func (m *MsgCloseDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseDeploymentResponse.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 *MsgCloseDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseDeploymentResponse.Merge(m, src) +} +func (m *MsgCloseDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseDeploymentResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateDeployment)(nil), "akash.deployment.v1beta3.MsgCreateDeployment") + proto.RegisterType((*MsgCreateDeploymentResponse)(nil), "akash.deployment.v1beta3.MsgCreateDeploymentResponse") + proto.RegisterType((*MsgDepositDeployment)(nil), "akash.deployment.v1beta3.MsgDepositDeployment") + proto.RegisterType((*MsgDepositDeploymentResponse)(nil), "akash.deployment.v1beta3.MsgDepositDeploymentResponse") + proto.RegisterType((*MsgUpdateDeployment)(nil), "akash.deployment.v1beta3.MsgUpdateDeployment") + proto.RegisterType((*MsgUpdateDeploymentResponse)(nil), "akash.deployment.v1beta3.MsgUpdateDeploymentResponse") + proto.RegisterType((*MsgCloseDeployment)(nil), "akash.deployment.v1beta3.MsgCloseDeployment") + proto.RegisterType((*MsgCloseDeploymentResponse)(nil), "akash.deployment.v1beta3.MsgCloseDeploymentResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/deploymentmsg.proto", fileDescriptor_f364faefc2dcd8b7) +} + +var fileDescriptor_f364faefc2dcd8b7 = []byte{ + // 535 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xc1, 0x6e, 0xd3, 0x4a, + 0x14, 0x8d, 0x9d, 0xbe, 0x54, 0x99, 0x3e, 0x10, 0x32, 0x5d, 0x98, 0xd0, 0x78, 0xd2, 0x41, 0x42, + 0x41, 0x02, 0x5b, 0x69, 0x17, 0x48, 0x95, 0x10, 0x92, 0x1b, 0x09, 0x75, 0xd1, 0x8d, 0x51, 0x41, + 0x42, 0x6c, 0x9c, 0x78, 0xe4, 0x8e, 0x1a, 0xfb, 0x1a, 0x8f, 0x53, 0xd4, 0x3f, 0x60, 0xc9, 0x27, + 0x20, 0xb6, 0xfc, 0x48, 0x97, 0x5d, 0xb2, 0x1a, 0xa1, 0x64, 0x83, 0xb2, 0xcc, 0x17, 0x20, 0x7b, + 0xc6, 0x31, 0x81, 0x44, 0xa0, 0x4a, 0x65, 0xe7, 0xb9, 0xe7, 0x9c, 0xeb, 0x33, 0xe7, 0x5e, 0x0d, + 0x7a, 0xec, 0x9f, 0xf9, 0xfc, 0xd4, 0x09, 0x68, 0x32, 0x82, 0x8b, 0x88, 0xc6, 0x99, 0x73, 0xde, + 0x1b, 0xd0, 0xcc, 0xdf, 0xff, 0xa9, 0x14, 0xf1, 0xd0, 0x4e, 0x52, 0xc8, 0xc0, 0x30, 0x0b, 0xb6, + 0x5d, 0x41, 0xb6, 0x62, 0xb7, 0xb6, 0x43, 0x08, 0xa1, 0x20, 0x39, 0xf9, 0x97, 0xe4, 0xb7, 0x1e, + 0xfd, 0x45, 0x77, 0x45, 0xed, 0xae, 0xa5, 0x86, 0x29, 0x8c, 0x13, 0x9e, 0xd0, 0xa1, 0x62, 0x5a, + 0x43, 0xe0, 0x11, 0x70, 0x67, 0xe0, 0x73, 0xaa, 0x48, 0x3d, 0x67, 0x08, 0x2c, 0x96, 0x38, 0xf9, + 0x5c, 0x47, 0x77, 0x8f, 0x79, 0x78, 0x98, 0x52, 0x3f, 0xa3, 0xfd, 0x45, 0x3f, 0xe3, 0x04, 0xe9, + 0x2c, 0x30, 0xb5, 0x8e, 0xd6, 0xdd, 0xda, 0x7b, 0x68, 0xaf, 0xbb, 0x89, 0x5d, 0x29, 0x8e, 0xfa, + 0x6e, 0xfb, 0x52, 0xe0, 0xda, 0x44, 0x60, 0xfd, 0xa8, 0x3f, 0x13, 0x58, 0x67, 0xc1, 0x5c, 0xe0, + 0xe6, 0x85, 0x1f, 0x8d, 0x0e, 0x08, 0x0b, 0x88, 0xa7, 0xb3, 0xc0, 0x78, 0x8b, 0x1a, 0xd2, 0xa1, + 0xa9, 0x77, 0xea, 0xdd, 0xad, 0xbd, 0x07, 0xeb, 0x5b, 0xbf, 0xc8, 0x79, 0x2f, 0x13, 0x3a, 0x74, + 0x71, 0xde, 0x77, 0x26, 0xb0, 0x92, 0xce, 0x05, 0xbe, 0x25, 0xbb, 0xca, 0x33, 0xf1, 0x14, 0x60, + 0x3c, 0x45, 0x9b, 0xe7, 0x34, 0xe5, 0x0c, 0x62, 0xb3, 0xde, 0xd1, 0xba, 0xff, 0xbb, 0xed, 0x99, + 0xc0, 0x65, 0x69, 0x2e, 0xf0, 0x6d, 0x29, 0x53, 0x05, 0xe2, 0x95, 0x90, 0xf1, 0x0a, 0x6d, 0x06, + 0x34, 0x01, 0xce, 0x32, 0x73, 0xa3, 0xb8, 0xf2, 0x3d, 0x5b, 0xe6, 0x66, 0xe7, 0xb9, 0x29, 0x4b, + 0x3d, 0xfb, 0x10, 0x58, 0xec, 0xee, 0x2a, 0x37, 0xa5, 0xa2, 0xea, 0xab, 0x0a, 0xc4, 0x2b, 0x21, + 0xe3, 0x39, 0x6a, 0xaa, 0x4f, 0x48, 0xcd, 0xff, 0x3a, 0x5a, 0xb7, 0xe9, 0xee, 0xce, 0x04, 0xae, + 0x8a, 0x73, 0x81, 0xef, 0x2c, 0x89, 0x21, 0x25, 0x5e, 0x05, 0x1f, 0x6c, 0x7c, 0xff, 0x84, 0x6b, + 0xa4, 0x8d, 0xee, 0xaf, 0x98, 0x91, 0x47, 0x79, 0x02, 0x31, 0xa7, 0xe4, 0x83, 0x8e, 0xb6, 0x8f, + 0x79, 0xd8, 0x97, 0xaa, 0x9b, 0x1f, 0xa2, 0x87, 0x1a, 0x7e, 0x04, 0xe3, 0x38, 0x33, 0xf5, 0x3f, + 0x85, 0xb5, 0x18, 0x9d, 0x14, 0x54, 0xa3, 0x93, 0x67, 0xe2, 0x29, 0x60, 0x39, 0xa9, 0xfa, 0xb5, + 0x93, 0xb2, 0xd0, 0xce, 0xaa, 0x24, 0x16, 0x51, 0x7d, 0xd1, 0x8a, 0x75, 0x3f, 0x49, 0x82, 0x7f, + 0xb2, 0xee, 0xd7, 0x5d, 0xc8, 0xa5, 0xb9, 0xff, 0x6a, 0x76, 0x71, 0x99, 0x77, 0xc8, 0xc8, 0xd7, + 0x62, 0x04, 0xfc, 0xe6, 0xaf, 0xa2, 0x1c, 0xed, 0xa0, 0xd6, 0xef, 0xbf, 0x2c, 0x0d, 0xb9, 0xaf, + 0x2f, 0x27, 0x96, 0x76, 0x35, 0xb1, 0xb4, 0x6f, 0x13, 0x4b, 0xfb, 0x38, 0xb5, 0x6a, 0x57, 0x53, + 0xab, 0xf6, 0x75, 0x6a, 0xd5, 0xde, 0x3c, 0x0b, 0x59, 0x76, 0x3a, 0x1e, 0xd8, 0x43, 0x88, 0x9c, + 0xc2, 0xd2, 0x93, 0x98, 0x66, 0xef, 0x21, 0x3d, 0x53, 0x27, 0x3f, 0x61, 0x4e, 0x08, 0x4e, 0x0c, + 0x01, 0x5d, 0xf1, 0xaa, 0x0d, 0x1a, 0xc5, 0x63, 0xb5, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x8f, + 0x5e, 0x1e, 0x24, 0x81, 0x05, 0x00, 0x00, +} + +func (m *MsgCreateDeployment) 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 *MsgCreateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x2a + } + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateDeploymentResponse) 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 *MsgCreateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeployment) 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 *MsgDepositDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgDepositDeploymentResponse) 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 *MsgDepositDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeployment) 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 *MsgUpdateDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgUpdateDeploymentResponse) 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 *MsgUpdateDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeployment) 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 *MsgCloseDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDeploymentmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseDeploymentResponse) 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 *MsgCloseDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintDeploymentmsg(dAtA []byte, offset int, v uint64) int { + offset -= sovDeploymentmsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgCreateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDepositDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = m.Amount.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgDepositDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + l = len(m.Version) + if l > 0 { + n += 1 + l + sovDeploymentmsg(uint64(l)) + } + return n +} + +func (m *MsgUpdateDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovDeploymentmsg(uint64(l)) + return n +} + +func (m *MsgCloseDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovDeploymentmsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDeploymentmsg(x uint64) (n int) { + return sovDeploymentmsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCreateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, GroupSpec{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + 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 ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCreateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgDepositDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + 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 ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgDepositDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgUpdateDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) + if m.Version == nil { + m.Version = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgUpdateDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeployment) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCloseDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeployment: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeploymentmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDeploymentmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDeploymentmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseDeploymentResponse) 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 ErrIntOverflowDeploymentmsg + } + 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: MsgCloseDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipDeploymentmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDeploymentmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDeploymentmsg(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, ErrIntOverflowDeploymentmsg + } + 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, ErrIntOverflowDeploymentmsg + } + 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, ErrIntOverflowDeploymentmsg + } + 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, ErrInvalidLengthDeploymentmsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDeploymentmsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDeploymentmsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDeploymentmsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDeploymentmsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDeploymentmsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/deposit_deployment_authorization.go b/go/node/deployment/v1beta3/deposit_deployment_authorization.go new file mode 100644 index 00000000..56febe3b --- /dev/null +++ b/go/node/deployment/v1beta3/deposit_deployment_authorization.go @@ -0,0 +1,48 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +var ( + _ authz.Authorization = &DepositDeploymentAuthorization{} +) + +// NewDepositDeploymentAuthorization creates a new DepositDeploymentAuthorization object. +func NewDepositDeploymentAuthorization(spendLimit sdk.Coin) *DepositDeploymentAuthorization { + return &DepositDeploymentAuthorization{ + SpendLimit: spendLimit, + } +} + +// MsgTypeURL implements Authorization.MsgTypeURL. +func (m DepositDeploymentAuthorization) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgDepositDeployment{}) +} + +// Accept implements Authorization.Accept. +func (m DepositDeploymentAuthorization) Accept(_ sdk.Context, msg sdk.Msg) (authz.AcceptResponse, error) { + mDepositDeployment, ok := msg.(*MsgDepositDeployment) + if !ok { + return authz.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch") + } + if m.SpendLimit.IsLT(mDepositDeployment.Amount) { + return authz.AcceptResponse{}, sdkerrors.ErrInsufficientFunds.Wrapf("requested amount is more than spend limit") + } + limitLeft := m.SpendLimit.Sub(mDepositDeployment.Amount) + if limitLeft.IsZero() { + return authz.AcceptResponse{Accept: true, Delete: true}, nil + } + + return authz.AcceptResponse{Accept: true, Delete: false, Updated: &DepositDeploymentAuthorization{SpendLimit: limitLeft}}, nil +} + +// ValidateBasic implements Authorization.ValidateBasic. +func (m DepositDeploymentAuthorization) ValidateBasic() error { + if !m.SpendLimit.IsPositive() { + return sdkerrors.ErrInvalidCoins.Wrapf("spend limit cannot be negative") + } + return nil +} diff --git a/go/node/deployment/v1beta3/errors.go b/go/node/deployment/v1beta3/errors.go new file mode 100644 index 00000000..ac9f4751 --- /dev/null +++ b/go/node/deployment/v1beta3/errors.go @@ -0,0 +1,78 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errNameDoesNotExist uint32 = iota + 1 + errInvalidRequest + errDeploymentExists + errDeploymentNotFound + errDeploymentClosed + errOwnerAcctMissing + errInvalidGroups + errInvalidDeploymentID + errEmptyVersion + errInvalidVersion + errInternal + errInvalidDeployment + errInvalidGroupID + errGroupNotFound + errGroupClosed + errGroupOpen + errGroupPaused + errGroupNotOpen + errGroupSpec + errInvalidDeposit + errInvalidIDPath + errInvalidParam +) + +var ( + // ErrNameDoesNotExist is the error when name does not exist + ErrNameDoesNotExist = sdkerrors.Register(ModuleName, errNameDoesNotExist, "Name does not exist") + // ErrInvalidRequest is the error for invalid request + ErrInvalidRequest = sdkerrors.Register(ModuleName, errInvalidRequest, "Invalid request") + // ErrDeploymentExists is the error when already deployment exists + ErrDeploymentExists = sdkerrors.Register(ModuleName, errDeploymentExists, "Deployment exists") + // ErrDeploymentNotFound is the error when deployment not found + ErrDeploymentNotFound = sdkerrors.Register(ModuleName, errDeploymentNotFound, "Deployment not found") + // ErrDeploymentClosed is the error when deployment is closed + ErrDeploymentClosed = sdkerrors.Register(ModuleName, errDeploymentClosed, "Deployment closed") + // ErrOwnerAcctMissing is the error for owner account missing + ErrOwnerAcctMissing = sdkerrors.Register(ModuleName, errOwnerAcctMissing, "Owner account missing") + // ErrInvalidGroups is the error when groups are empty + ErrInvalidGroups = sdkerrors.Register(ModuleName, errInvalidGroups, "Invalid groups") + // ErrInvalidDeploymentID is the error for invalid deployment id + ErrInvalidDeploymentID = sdkerrors.Register(ModuleName, errInvalidDeploymentID, "Invalid: deployment id") + // ErrEmptyVersion is the error when version is empty + ErrEmptyVersion = sdkerrors.Register(ModuleName, errEmptyVersion, "Invalid: empty version") + // ErrInvalidVersion is the error when version is invalid + ErrInvalidVersion = sdkerrors.Register(ModuleName, errInvalidVersion, "Invalid: deployment version") + // ErrInternal is the error for internal error + ErrInternal = sdkerrors.Register(ModuleName, errInternal, "internal error") + // ErrInvalidDeployment = is the error when deployment does not pass validation + ErrInvalidDeployment = sdkerrors.Register(ModuleName, errInvalidDeployment, "Invalid deployment") + // ErrInvalidGroupID is the error when already deployment exists + ErrInvalidGroupID = sdkerrors.Register(ModuleName, errInvalidGroupID, "Deployment exists") + // ErrGroupNotFound is the keeper's error for not finding a group + ErrGroupNotFound = sdkerrors.Register(ModuleName, errGroupNotFound, "Group not found") + // ErrGroupClosed is the error when deployment is closed + ErrGroupClosed = sdkerrors.Register(ModuleName, errGroupClosed, "Group already closed") + // ErrGroupOpen is the error when deployment is closed + ErrGroupOpen = sdkerrors.Register(ModuleName, errGroupOpen, "Group open") + // ErrGroupPaused is the error when deployment is closed + ErrGroupPaused = sdkerrors.Register(ModuleName, errGroupPaused, "Group paused") + // ErrGroupNotOpen indicates the Group state has progressed beyond initial Open. + ErrGroupNotOpen = sdkerrors.Register(ModuleName, errGroupNotOpen, "Group not open") + // ErrGroupSpecInvalid indicates a GroupSpec has invalid configuration + ErrGroupSpecInvalid = sdkerrors.Register(ModuleName, errGroupSpec, "GroupSpec invalid") + + // ErrInvalidDeposit indicates an invalid deposit + ErrInvalidDeposit = sdkerrors.Register(ModuleName, errInvalidDeposit, "Deposit invalid") + // ErrInvalidIDPath indicates an invalid ID path + ErrInvalidIDPath = sdkerrors.Register(ModuleName, errInvalidIDPath, "ID path invalid") + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = sdkerrors.Register(ModuleName, errInvalidParam, "parameter invalid") +) diff --git a/go/node/deployment/v1beta3/escrow.go b/go/node/deployment/v1beta3/escrow.go new file mode 100644 index 00000000..bda33845 --- /dev/null +++ b/go/node/deployment/v1beta3/escrow.go @@ -0,0 +1,25 @@ +package v1beta3 + +import ( + etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" +) + +const ( + EscrowScope = "deployment" +) + +func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID { + return etypes.AccountID{ + Scope: EscrowScope, + XID: id.String(), + } +} + +func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) { + if id.Scope != EscrowScope { + return DeploymentID{}, false + } + + did, err := ParseDeploymentID(id.XID) + return did, err == nil +} diff --git a/go/node/deployment/v1beta3/event.go b/go/node/deployment/v1beta3/event.go new file mode 100644 index 00000000..65741213 --- /dev/null +++ b/go/node/deployment/v1beta3/event.go @@ -0,0 +1,309 @@ +package v1beta3 + +import ( + "encoding/hex" + "strconv" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/akash-network/node/sdkutil" +) + +const ( + evActionDeploymentCreated = "deployment-created" + evActionDeploymentUpdated = "deployment-updated" + evActionDeploymentClosed = "deployment-closed" + evActionGroupClosed = "group-closed" + evActionGroupPaused = "group-paused" + evActionGroupStarted = "group-started" + evOwnerKey = "owner" + evDSeqKey = "dseq" + evGSeqKey = "gseq" + evVersionKey = "version" + encodedVersionHexLen = 64 +) + +// EventDeploymentCreated struct +type EventDeploymentCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` + Version []byte `json:"version"` +} + +// NewEventDeploymentCreated initializes creation event. +func NewEventDeploymentCreated(id DeploymentID, version []byte) EventDeploymentCreated { + return EventDeploymentCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentCreated, + }, + ID: id, + Version: version, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentCreated struct +func (ev EventDeploymentCreated) ToSDKEvent() sdk.Event { + version := encodeHex(ev.Version) + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentCreated), + sdk.NewAttribute(evVersionKey, string(version)), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// EventDeploymentUpdated struct +type EventDeploymentUpdated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` + Version []byte `json:"version"` +} + +// NewEventDeploymentUpdated initializes SDK type +func NewEventDeploymentUpdated(id DeploymentID, version []byte) EventDeploymentUpdated { + return EventDeploymentUpdated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentUpdated, + }, + ID: id, + Version: version, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentUpdated struct +func (ev EventDeploymentUpdated) ToSDKEvent() sdk.Event { + version := encodeHex(ev.Version) + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentUpdated), + sdk.NewAttribute(evVersionKey, string(version)), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// EventDeploymentClosed struct +type EventDeploymentClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID DeploymentID `json:"id"` +} + +func NewEventDeploymentClosed(id DeploymentID) EventDeploymentClosed { + return EventDeploymentClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionDeploymentClosed, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventDeploymentClosed struct +func (ev EventDeploymentClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentClosed), + }, DeploymentIDEVAttributes(ev.ID)...)..., + ) +} + +// DeploymentIDEVAttributes returns event attribues for given DeploymentID +func DeploymentIDEVAttributes(id DeploymentID) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evOwnerKey, id.Owner), + sdk.NewAttribute(evDSeqKey, strconv.FormatUint(id.DSeq, 10)), + } +} + +// ParseEVDeploymentID returns deploymentID details for given event attributes +func ParseEVDeploymentID(attrs []sdk.Attribute) (DeploymentID, error) { + owner, err := sdkutil.GetAccAddress(attrs, evOwnerKey) + if err != nil { + return DeploymentID{}, err + } + dseq, err := sdkutil.GetUint64(attrs, evDSeqKey) + if err != nil { + return DeploymentID{}, err + } + + return DeploymentID{ + Owner: owner.String(), + DSeq: dseq, + }, nil +} + +// ParseEVDeploymentVersion returns the Deployment's SDL sha256 sum +func ParseEVDeploymentVersion(attrs []sdk.Attribute) ([]byte, error) { + v, err := sdkutil.GetString(attrs, evVersionKey) + if err != nil { + return nil, err + } + return decodeHex([]byte(v)) +} + +func encodeHex(src []byte) []byte { + dst := make([]byte, hex.EncodedLen(len(src))) + hex.Encode(dst, src) + return dst +} + +func decodeHex(src []byte) ([]byte, error) { + dst := make([]byte, hex.DecodedLen(len(src))) + if _, err := hex.Decode(dst, src); err != nil { + return []byte{}, err + } + return dst, nil +} + +// EventGroupClosed provides SDK event to signal group termination +type EventGroupClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupClosed(id GroupID) EventGroupClosed { + return EventGroupClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupClosed, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupClosed), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// EventGroupPaused provides SDK event to signal group termination +type EventGroupPaused struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupPaused(id GroupID) EventGroupPaused { + return EventGroupPaused{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupPaused, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupPaused) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupPaused), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// EventGroupStarted provides SDK event to signal group termination +type EventGroupStarted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID GroupID `json:"id"` +} + +func NewEventGroupStarted(id GroupID) EventGroupStarted { + return EventGroupStarted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionGroupStarted, + }, + ID: id, + } +} + +// ToSDKEvent produces the SDK notification for Event +func (ev EventGroupStarted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupStarted), + }, GroupIDEVAttributes(ev.ID)...)..., + ) +} + +// GroupIDEVAttributes returns event attribues for given GroupID +func GroupIDEVAttributes(id GroupID) []sdk.Attribute { + return append(DeploymentIDEVAttributes(id.DeploymentID()), + sdk.NewAttribute(evGSeqKey, strconv.FormatUint(uint64(id.GSeq), 10))) +} + +// ParseEVGroupID returns GroupID details for given event attributes +func ParseEVGroupID(attrs []sdk.Attribute) (GroupID, error) { + did, err := ParseEVDeploymentID(attrs) + if err != nil { + return GroupID{}, err + } + + gseq, err := sdkutil.GetUint64(attrs, evGSeqKey) + if err != nil { + return GroupID{}, err + } + + return GroupID{ + Owner: did.Owner, + DSeq: did.DSeq, + GSeq: uint32(gseq), + }, nil +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case evActionDeploymentCreated: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + ver, err := ParseEVDeploymentVersion(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentCreated(did, ver), nil + case evActionDeploymentUpdated: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + ver, err := ParseEVDeploymentVersion(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentUpdated(did, ver), nil + case evActionDeploymentClosed: + did, err := ParseEVDeploymentID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventDeploymentClosed(did), nil + case evActionGroupClosed: + gid, err := ParseEVGroupID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventGroupClosed(gid), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/deployment/v1beta3/events_test.go b/go/node/deployment/v1beta3/events_test.go new file mode 100644 index 00000000..30304996 --- /dev/null +++ b/go/node/deployment/v1beta3/events_test.go @@ -0,0 +1,341 @@ +package v1beta3 + +import ( + "crypto/sha256" + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/sdkutil" +) + +var ( + _ = func() string { + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(sdkutil.Bech32PrefixAccAddr, sdkutil.Bech32PrefixAccPub) + return "" + }() + + keyAcc, _ = sdk.AccAddressFromBech32("akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr") + errWildcard = errors.New("wildcard string error can't be matched") + tmpSum = sha256.Sum256([]byte(keyAcc)) + deploymentVersion = encodeHex(tmpSum[:]) +) + +type testEventParsing struct { + msg sdkutil.Event + expErr error +} + +func (tep testEventParsing) testMessageType() func(t *testing.T) { + _, err := ParseEvent(tep.msg) + return func(t *testing.T) { + // if the error expected is errWildcard to catch untyped errors, don't fail the test, the error was expected. + if errors.Is(tep.expErr, errWildcard) { + require.Error(t, err) + } else { + require.Equal(t, tep.expErr, err) + } + } +} + +var TEPS = []testEventParsing{ + { + msg: sdkutil.Event{ + Type: "nil", + }, + expErr: sdkutil.ErrUnknownType, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + }, + expErr: sdkutil.ErrUnknownAction, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: "nil", + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: "nil", + }, + expErr: sdkutil.ErrUnknownAction, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "abc", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "1", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "abc", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evDSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionGroupClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + { + Key: evGSeqKey, + Value: "1", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "neh", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evVersionKey, + Value: string(deploymentVersion), + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionDeploymentUpdated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: keyAcc.String(), + }, + }, + }, + expErr: errWildcard, + }, +} + +func TestEventParsing(t *testing.T) { + for i, test := range TEPS { + t.Run(strconv.Itoa(i), test.testMessageType()) + } +} + +func TestVersionEncoding(t *testing.T) { + versionHex := encodeHex(tmpSum[:]) + assert.Len(t, versionHex, encodedVersionHexLen) + decodedVersion, err := decodeHex(versionHex) + assert.NoError(t, err) + assert.Equal(t, tmpSum[:], decodedVersion) +} diff --git a/go/node/deployment/v1beta3/genesis.pb.go b/go/node/deployment/v1beta3/genesis.pb.go new file mode 100644 index 00000000..bd48c857 --- /dev/null +++ b/go/node/deployment/v1beta3/genesis.pb.go @@ -0,0 +1,630 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisDeployment defines the basic genesis state used by deployment module +type GenesisDeployment struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` +} + +func (m *GenesisDeployment) Reset() { *m = GenesisDeployment{} } +func (m *GenesisDeployment) String() string { return proto.CompactTextString(m) } +func (*GenesisDeployment) ProtoMessage() {} +func (*GenesisDeployment) Descriptor() ([]byte, []int) { + return fileDescriptor_57b3dff44af2837c, []int{0} +} +func (m *GenesisDeployment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisDeployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisDeployment.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 *GenesisDeployment) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDeployment.Merge(m, src) +} +func (m *GenesisDeployment) XXX_Size() int { + return m.Size() +} +func (m *GenesisDeployment) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDeployment.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDeployment proto.InternalMessageInfo + +func (m *GenesisDeployment) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *GenesisDeployment) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Deployments []GenesisDeployment `protobuf:"bytes,1,rep,name=deployments,proto3" json:"deployments" yaml:"deployments"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_57b3dff44af2837c, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetDeployments() []GenesisDeployment { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisDeployment)(nil), "akash.deployment.v1beta3.GenesisDeployment") + proto.RegisterType((*GenesisState)(nil), "akash.deployment.v1beta3.GenesisState") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/genesis.proto", fileDescriptor_57b3dff44af2837c) +} + +var fileDescriptor_57b3dff44af2837c = []byte{ + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x4e, 0xc3, 0x30, + 0x10, 0xc6, 0xe3, 0x22, 0x75, 0x70, 0x61, 0x68, 0xc4, 0x10, 0x75, 0x88, 0x2b, 0xab, 0x40, 0x2b, + 0x44, 0x2c, 0xda, 0x0d, 0x89, 0x25, 0x42, 0xea, 0x8a, 0xc2, 0xc0, 0x9f, 0xcd, 0xa5, 0x56, 0x5a, + 0xb5, 0x89, 0xa3, 0xc4, 0x05, 0xfa, 0x16, 0x3c, 0x56, 0xc7, 0x8e, 0x0c, 0x28, 0x42, 0xcd, 0xc6, + 0xd8, 0x27, 0x40, 0xb5, 0x2d, 0x1c, 0x55, 0x84, 0x2d, 0x17, 0xff, 0xbe, 0xfb, 0xee, 0x3b, 0x1d, + 0x3c, 0xa5, 0x33, 0x9a, 0x4d, 0xc8, 0x98, 0x25, 0x73, 0xbe, 0x8c, 0x58, 0x2c, 0xc8, 0xcb, 0xe5, + 0x88, 0x09, 0x3a, 0x20, 0x21, 0x8b, 0x59, 0x36, 0xcd, 0xbc, 0x24, 0xe5, 0x82, 0xdb, 0x8e, 0xe4, + 0x3c, 0xc3, 0x79, 0x9a, 0x6b, 0x1d, 0x87, 0x3c, 0xe4, 0x12, 0x22, 0xbb, 0x2f, 0xc5, 0xb7, 0x7a, + 0x95, 0x7d, 0x4b, 0x2d, 0x14, 0xda, 0xa9, 0x1e, 0x21, 0xe5, 0x8b, 0x44, 0x53, 0x27, 0x95, 0x54, + 0x42, 0x53, 0x1a, 0xe9, 0x39, 0xf1, 0x27, 0x80, 0xcd, 0xa1, 0x9a, 0xfc, 0xe6, 0x17, 0xb5, 0x23, + 0x08, 0x8d, 0xd0, 0x01, 0x6d, 0xd0, 0x6d, 0xf4, 0x3b, 0x5e, 0x55, 0x24, 0xcf, 0x28, 0xfd, 0xb3, + 0x55, 0x8e, 0xac, 0xef, 0x1c, 0x95, 0xf4, 0xdb, 0x1c, 0x35, 0x97, 0x34, 0x9a, 0x5f, 0x61, 0xf3, + 0x0f, 0x07, 0x25, 0xc0, 0x7e, 0x80, 0x75, 0x39, 0x7a, 0xe6, 0xd4, 0xda, 0x07, 0xdd, 0x46, 0x1f, + 0x55, 0x5b, 0x0d, 0x77, 0x9c, 0x8f, 0xb4, 0x8b, 0x96, 0x6d, 0x73, 0x74, 0xa4, 0x1c, 0x54, 0x8d, + 0x03, 0xfd, 0x80, 0x0b, 0x00, 0x0f, 0x75, 0xbc, 0x3b, 0x41, 0x05, 0xb3, 0xdf, 0x60, 0xc3, 0x74, + 0xcd, 0x1c, 0x20, 0xfd, 0xce, 0xff, 0xf1, 0xdb, 0xdf, 0x8d, 0xdf, 0xd3, 0xde, 0xe5, 0x3e, 0xdb, + 0x1c, 0xd9, 0xfb, 0x11, 0x33, 0x1c, 0x94, 0x11, 0xfb, 0x11, 0xd6, 0xd5, 0xe6, 0x9d, 0x9a, 0xdc, + 0x67, 0xbb, 0xda, 0xf4, 0x56, 0x72, 0x26, 0xa5, 0xd2, 0x99, 0x94, 0xaa, 0xc6, 0x81, 0x7e, 0xf0, + 0xef, 0x57, 0x1b, 0x17, 0xac, 0x37, 0x2e, 0xf8, 0xda, 0xb8, 0xe0, 0xbd, 0x70, 0xad, 0x75, 0xe1, + 0x5a, 0x1f, 0x85, 0x6b, 0x3d, 0x5d, 0x87, 0x53, 0x31, 0x59, 0x8c, 0xbc, 0x67, 0x1e, 0x11, 0x69, + 0x77, 0x11, 0x33, 0xf1, 0xca, 0xd3, 0x99, 0xae, 0x68, 0x32, 0x25, 0x21, 0x27, 0x31, 0x1f, 0xb3, + 0x3f, 0x4e, 0x65, 0x54, 0x97, 0x47, 0x32, 0xf8, 0x09, 0x00, 0x00, 0xff, 0xff, 0x50, 0x26, 0x51, + 0x3c, 0xf6, 0x02, 0x00, 0x00, +} + +func (m *GenesisDeployment) 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 *GenesisDeployment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisDeployment) 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 ErrIntOverflowGenesis + } + 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: GenesisDeployment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisDeployment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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 + } + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, GenesisDeployment{}) + if err := m.Deployments[len(m.Deployments)-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 Params", 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/group.pb.go b/go/node/deployment/v1beta3/group.pb.go new file mode 100644 index 00000000..d24a7499 --- /dev/null +++ b/go/node/deployment/v1beta3/group.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/group.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of group +type Group_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + GroupStateInvalid Group_State = 0 + // GroupOpen denotes state for group open + GroupOpen Group_State = 1 + // GroupOrdered denotes state for group ordered + GroupPaused Group_State = 2 + // GroupInsufficientFunds denotes state for group insufficient_funds + GroupInsufficientFunds Group_State = 3 + // GroupClosed denotes state for group closed + GroupClosed Group_State = 4 +) + +var Group_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "paused", + 3: "insufficient_funds", + 4: "closed", +} + +var Group_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "paused": 2, + "insufficient_funds": 3, + "closed": 4, +} + +func (x Group_State) String() string { + return proto.EnumName(Group_State_name, int32(x)) +} + +func (Group_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6dcebaf6050ef7f1, []int{0, 0} +} + +// Group stores group id, state and specifications of group +type Group struct { + GroupID GroupID `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"id" yaml:"id"` + State Group_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta3.Group_State" json:"state" yaml:"state"` + GroupSpec GroupSpec `protobuf:"bytes,3,opt,name=group_spec,json=groupSpec,proto3" json:"spec" yaml:"spec"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Group) Reset() { *m = Group{} } +func (m *Group) String() string { return proto.CompactTextString(m) } +func (*Group) ProtoMessage() {} +func (*Group) Descriptor() ([]byte, []int) { + return fileDescriptor_6dcebaf6050ef7f1, []int{0} +} +func (m *Group) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Group.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 *Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Group.Merge(m, src) +} +func (m *Group) XXX_Size() int { + return m.Size() +} +func (m *Group) XXX_DiscardUnknown() { + xxx_messageInfo_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Group proto.InternalMessageInfo + +func (m *Group) GetGroupID() GroupID { + if m != nil { + return m.GroupID + } + return GroupID{} +} + +func (m *Group) GetState() Group_State { + if m != nil { + return m.State + } + return GroupStateInvalid +} + +func (m *Group) GetGroupSpec() GroupSpec { + if m != nil { + return m.GroupSpec + } + return GroupSpec{} +} + +func (m *Group) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func init() { + proto.RegisterEnum("akash.deployment.v1beta3.Group_State", Group_State_name, Group_State_value) + proto.RegisterType((*Group)(nil), "akash.deployment.v1beta3.Group") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/group.proto", fileDescriptor_6dcebaf6050ef7f1) +} + +var fileDescriptor_6dcebaf6050ef7f1 = []byte{ + // 487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x3d, 0x8f, 0xd3, 0x30, + 0x1c, 0xc6, 0x93, 0x6b, 0x7a, 0xa5, 0x2e, 0x2f, 0xc5, 0xe2, 0x25, 0xe4, 0x44, 0x12, 0xc2, 0x8b, + 0xba, 0x90, 0x88, 0xde, 0x76, 0x12, 0x03, 0x05, 0x81, 0x3a, 0x81, 0x7a, 0x12, 0x48, 0x2c, 0xc5, + 0x8d, 0xdd, 0x9c, 0x75, 0xad, 0x6d, 0x35, 0xce, 0xa1, 0x5b, 0x99, 0x50, 0x27, 0xbe, 0x40, 0x25, + 0x24, 0xbe, 0x04, 0x1f, 0xe1, 0xc6, 0x1b, 0x99, 0x22, 0xd4, 0x2e, 0xa8, 0x63, 0x3f, 0x01, 0xb2, + 0x1d, 0xc4, 0x0d, 0x70, 0xb7, 0xc5, 0xcf, 0xf3, 0xfb, 0x3f, 0x79, 0x6c, 0xfd, 0xc1, 0x03, 0x74, + 0x88, 0xf2, 0x83, 0x04, 0x13, 0x31, 0xe1, 0xc7, 0x53, 0xc2, 0x64, 0x72, 0xf4, 0x64, 0x44, 0x24, + 0xda, 0x4d, 0xb2, 0x19, 0x2f, 0x44, 0x2c, 0x66, 0x5c, 0x72, 0xe8, 0x6a, 0x2a, 0xfe, 0x4b, 0xc5, + 0x15, 0xe5, 0xdd, 0xc8, 0x78, 0xc6, 0x35, 0x94, 0xa8, 0x2f, 0xc3, 0x7b, 0x8f, 0xce, 0x4f, 0xa5, + 0xb8, 0xe2, 0x3a, 0xe7, 0x73, 0xb9, 0x20, 0xa9, 0x21, 0xa3, 0x4f, 0x0e, 0xa8, 0xbf, 0x52, 0x1a, + 0xfc, 0x00, 0x2e, 0x69, 0x73, 0x48, 0xb1, 0x6b, 0x87, 0x76, 0xa7, 0xd5, 0xbd, 0x17, 0xff, 0xaf, + 0x5e, 0xac, 0x47, 0xfa, 0x2f, 0x7a, 0xd1, 0x49, 0x19, 0x58, 0xcb, 0x32, 0x68, 0x54, 0xc2, 0xba, + 0x0c, 0xb6, 0x28, 0xde, 0x94, 0x41, 0xf3, 0x18, 0x4d, 0x27, 0x7b, 0x11, 0xc5, 0xd1, 0xa0, 0xa1, + 0x63, 0xfb, 0x18, 0xbe, 0x05, 0xf5, 0x5c, 0x22, 0x49, 0xdc, 0xad, 0xd0, 0xee, 0x5c, 0xed, 0x3e, + 0xbc, 0x20, 0x3e, 0xde, 0x57, 0x70, 0xef, 0xce, 0xba, 0x0c, 0xcc, 0xdc, 0xa6, 0x0c, 0x2e, 0x9b, + 0x58, 0x7d, 0x8c, 0x06, 0x46, 0x86, 0x43, 0x00, 0x4c, 0x73, 0x75, 0x2f, 0xb7, 0xa6, 0xbb, 0xdf, + 0xbf, 0x20, 0x7c, 0x5f, 0x90, 0xb4, 0xb7, 0xa3, 0xda, 0xaf, 0xcb, 0xc0, 0x51, 0x83, 0x9b, 0x32, + 0x68, 0x55, 0xe9, 0x82, 0xa4, 0xd1, 0xa0, 0x99, 0xfd, 0xe1, 0xe0, 0x5d, 0x00, 0xd2, 0x19, 0x41, + 0x92, 0xe0, 0x21, 0x92, 0xae, 0x13, 0xda, 0x9d, 0xda, 0xa0, 0x59, 0x29, 0xcf, 0x64, 0xf4, 0xdd, + 0x06, 0x75, 0xdd, 0x15, 0x46, 0xa0, 0x41, 0xd9, 0x11, 0x9a, 0x50, 0xdc, 0xb6, 0xbc, 0x9b, 0xf3, + 0x45, 0x78, 0xdd, 0xfc, 0x4c, 0x99, 0x7d, 0x63, 0xc0, 0xdb, 0xc0, 0xe1, 0x82, 0xb0, 0xb6, 0xed, + 0x5d, 0x99, 0x2f, 0xc2, 0xa6, 0x06, 0x5e, 0x0b, 0xc2, 0xe0, 0x0e, 0xd8, 0x16, 0xa8, 0xc8, 0x09, + 0x6e, 0x6f, 0x79, 0xd7, 0xe6, 0x8b, 0xb0, 0xa5, 0xad, 0x37, 0x5a, 0x82, 0x5d, 0x00, 0x29, 0xcb, + 0x8b, 0xf1, 0x98, 0xa6, 0x94, 0x30, 0x39, 0x1c, 0x17, 0x0c, 0xe7, 0xed, 0x9a, 0xe7, 0xcd, 0x17, + 0xe1, 0x2d, 0xf3, 0xf8, 0x67, 0xec, 0x97, 0xca, 0x55, 0x81, 0xe9, 0x84, 0xab, 0x40, 0xe7, 0x4c, + 0xe0, 0x73, 0x2d, 0x79, 0xce, 0xe7, 0x6f, 0xbe, 0xb5, 0xe7, 0xfc, 0xfa, 0x1a, 0x58, 0xbd, 0x77, + 0x27, 0x4b, 0xdf, 0x3e, 0x5d, 0xfa, 0xf6, 0xcf, 0xa5, 0x6f, 0x7f, 0x59, 0xf9, 0xd6, 0xe9, 0xca, + 0xb7, 0x7e, 0xac, 0x7c, 0xeb, 0xfd, 0xd3, 0x8c, 0xca, 0x83, 0x62, 0x14, 0xa7, 0x7c, 0x9a, 0xe8, + 0x07, 0x7d, 0xcc, 0x88, 0xfc, 0xc8, 0x67, 0x87, 0xd5, 0x09, 0x09, 0x9a, 0x64, 0x3c, 0x61, 0x1c, + 0x93, 0x7f, 0x6c, 0xdb, 0x68, 0x5b, 0x2f, 0xd9, 0xee, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, + 0xde, 0x99, 0xe7, 0x0e, 0x03, 0x00, 0x00, +} + +func (m *Group) 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 *Group) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.GroupSpec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.GroupID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Group) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.GroupID.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.State != 0 { + n += 1 + sovGroup(uint64(m.State)) + } + l = m.GroupSpec.Size() + n += 1 + l + sovGroup(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovGroup(uint64(m.CreatedAt)) + } + return n +} + +func sovGroup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Group) 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 ErrIntOverflowGroup + } + 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: Group: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Group_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupSpec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GroupSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroup(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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrIntOverflowGroup + } + 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, ErrInvalidLengthGroup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/group_pricing_validation.go b/go/node/deployment/v1beta3/group_pricing_validation.go new file mode 100644 index 00000000..ec431fa2 --- /dev/null +++ b/go/node/deployment/v1beta3/group_pricing_validation.go @@ -0,0 +1,62 @@ +package v1beta3 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + + "github.com/akash-network/node/validation/constants" +) + +func validateGroupPricing(gspec GroupSpec) error { + var price sdk.DecCoin + + mem := sdk.NewInt(0) + + for idx, resource := range gspec.Resources { + + if err := validateUnitPricing(resource); err != nil { + return fmt.Errorf("group %v: %w", gspec.GetName(), err) + } + + if resource.FullPrice().Denom != constants.AkashDenom { + return fmt.Errorf("%w: denomination must be %q", ErrInvalidDeployment, constants.AkashDenom) + } + + if idx == 0 { + price = resource.FullPrice() + } else { + rprice := resource.FullPrice() + if rprice.Denom != price.Denom { + return errors.Errorf("multi-denonimation group: (%v == %v fails)", rprice.Denom, price.Denom) + } + price = price.Add(rprice) + } + + memCount := sdk.NewInt(0) + if u := resource.Resources.Memory; u != nil { + memCount.Add(sdk.NewIntFromUint64(u.Quantity.Value())) + } + + mem = mem.Add(memCount.Mul(sdk.NewIntFromUint64(uint64(resource.Count)))) + } + + return nil +} + +func validateUnitPricing(rg Resource) error { + if !rg.GetPrice().IsValid() { + return errors.Errorf("error: invalid price object") + } + + if rg.Price.Amount.GT(sdk.NewDecFromInt(sdk.NewIntFromUint64(validationConfig.MaxUnitPrice))) { + return errors.Errorf("error: invalid unit price (%v > %v fails)", validationConfig.MaxUnitPrice, rg.Price) + } + + return nil +} + +func validateOrderBidDuration(rg GroupSpec) error { + return nil +} diff --git a/go/node/deployment/v1beta3/group_validation.go b/go/node/deployment/v1beta3/group_validation.go new file mode 100644 index 00000000..e96a70e6 --- /dev/null +++ b/go/node/deployment/v1beta3/group_validation.go @@ -0,0 +1,35 @@ +package v1beta3 + +import "github.com/pkg/errors" + +// ValidateDeploymentGroup does validation for provided deployment group +func validateDeploymentGroup(gspec GroupSpec) error { + if err := ValidateResourceList(gspec); err != nil { + return err + } + if err := validateGroupPricing(gspec); err != nil { + return err + } + return validateOrderBidDuration(gspec) +} + +// ValidateDeploymentGroups does validation for all deployment groups +func ValidateDeploymentGroups(gspecs []GroupSpec) error { + if len(gspecs) == 0 { + return ErrInvalidGroups + } + + names := make(map[string]int, len(gspecs)) // Used as set + for _, group := range gspecs { + if err := group.ValidateBasic(); err != nil { + return err + } + + if _, exists := names[group.GetName()]; exists { + return errors.Errorf("duplicate deployment group name %q", group.GetName()) + } + names[group.GetName()] = 0 // Value stored does not matter + } + + return nil +} diff --git a/go/node/deployment/v1beta3/groupid.pb.go b/go/node/deployment/v1beta3/groupid.pb.go new file mode 100644 index 00000000..ff70a7ba --- /dev/null +++ b/go/node/deployment/v1beta3/groupid.pb.go @@ -0,0 +1,395 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/groupid.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GroupID stores owner, deployment sequence number and group sequence number +type GroupID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` +} + +func (m *GroupID) Reset() { *m = GroupID{} } +func (*GroupID) ProtoMessage() {} +func (*GroupID) Descriptor() ([]byte, []int) { + return fileDescriptor_9f2340787793cb10, []int{0} +} +func (m *GroupID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupID.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 *GroupID) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupID.Merge(m, src) +} +func (m *GroupID) XXX_Size() int { + return m.Size() +} +func (m *GroupID) XXX_DiscardUnknown() { + xxx_messageInfo_GroupID.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupID proto.InternalMessageInfo + +func (m *GroupID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *GroupID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *GroupID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func init() { + proto.RegisterType((*GroupID)(nil), "akash.deployment.v1beta3.GroupID") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/groupid.proto", fileDescriptor_9f2340787793cb10) +} + +var fileDescriptor_9f2340787793cb10 = []byte{ + // 281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xc8, 0x4c, 0xd1, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x92, 0x00, 0xab, 0xd3, 0x43, 0xa8, 0xd3, 0x83, 0xaa, 0x93, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0x95, 0xd6, 0x31, 0x72, 0xb1, 0xbb, 0x83, + 0x4c, 0xf0, 0x74, 0x11, 0xd2, 0xe7, 0x62, 0xcd, 0x2f, 0xcf, 0x4b, 0x2d, 0x92, 0x60, 0x54, 0x60, + 0xd4, 0xe0, 0x74, 0x92, 0x7c, 0x75, 0x4f, 0x1e, 0x22, 0xf0, 0xe9, 0x9e, 0x3c, 0x4f, 0x65, 0x62, + 0x6e, 0x8e, 0x95, 0x12, 0x98, 0xab, 0x14, 0x04, 0x11, 0x16, 0x32, 0xe6, 0x62, 0x49, 0x29, 0x4e, + 0x2d, 0x94, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x71, 0x92, 0x7f, 0x74, 0x4f, 0x9e, 0xc5, 0x25, 0x38, + 0xb5, 0xf0, 0xd5, 0x3d, 0x79, 0xb0, 0xf8, 0xa7, 0x7b, 0xf2, 0xdc, 0x10, 0x6d, 0x20, 0x9e, 0x52, + 0x10, 0x58, 0x10, 0xa4, 0x29, 0x1d, 0xa4, 0x89, 0x59, 0x81, 0x51, 0x83, 0x17, 0xa2, 0xc9, 0x1d, + 0xaa, 0x29, 0x1d, 0x45, 0x53, 0x3a, 0x44, 0x13, 0x88, 0xb2, 0xe2, 0x98, 0xb1, 0x40, 0x9e, 0xe1, + 0xc5, 0x02, 0x79, 0x06, 0xa7, 0xf0, 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, + 0xb2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x87, 0x82, 0x6e, + 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, 0x58, 0x90, 0xa9, 0x9f, 0x9e, 0xaf, 0x9f, + 0x97, 0x9f, 0x92, 0x8a, 0x25, 0x1c, 0x93, 0xd8, 0xc0, 0x01, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0xf0, 0x6f, 0xad, 0xb9, 0x6a, 0x01, 0x00, 0x00, +} + +func (m *GroupID) 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 *GroupID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GSeq != 0 { + i = encodeVarintGroupid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintGroupid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintGroupid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGroupid(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupid(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovGroupid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovGroupid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovGroupid(uint64(m.GSeq)) + } + return n +} + +func sovGroupid(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupid(x uint64) (n int) { + return sovGroupid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GroupID) 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 ErrIntOverflowGroupid + } + 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: GroupID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + 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 ErrInvalidLengthGroupid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroupid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroupid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupid(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, ErrIntOverflowGroupid + } + 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, ErrIntOverflowGroupid + } + 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, ErrIntOverflowGroupid + } + 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, ErrInvalidLengthGroupid + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupid + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupid + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupid = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupid = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupid = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/groupmsg.pb.go b/go/node/deployment/v1beta3/groupmsg.pb.go new file mode 100644 index 00000000..1f7eaaca --- /dev/null +++ b/go/node/deployment/v1beta3/groupmsg.pb.go @@ -0,0 +1,1034 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/groupmsg.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +type MsgCloseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseGroup) Reset() { *m = MsgCloseGroup{} } +func (m *MsgCloseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroup) ProtoMessage() {} +func (*MsgCloseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{0} +} +func (m *MsgCloseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroup.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 *MsgCloseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroup.Merge(m, src) +} +func (m *MsgCloseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroup proto.InternalMessageInfo + +func (m *MsgCloseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +type MsgCloseGroupResponse struct { +} + +func (m *MsgCloseGroupResponse) Reset() { *m = MsgCloseGroupResponse{} } +func (m *MsgCloseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseGroupResponse) ProtoMessage() {} +func (*MsgCloseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{1} +} +func (m *MsgCloseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseGroupResponse.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 *MsgCloseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseGroupResponse.Merge(m, src) +} +func (m *MsgCloseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseGroupResponse proto.InternalMessageInfo + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +type MsgPauseGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgPauseGroup) Reset() { *m = MsgPauseGroup{} } +func (m *MsgPauseGroup) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroup) ProtoMessage() {} +func (*MsgPauseGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{2} +} +func (m *MsgPauseGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroup.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 *MsgPauseGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroup.Merge(m, src) +} +func (m *MsgPauseGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroup proto.InternalMessageInfo + +func (m *MsgPauseGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +type MsgPauseGroupResponse struct { +} + +func (m *MsgPauseGroupResponse) Reset() { *m = MsgPauseGroupResponse{} } +func (m *MsgPauseGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPauseGroupResponse) ProtoMessage() {} +func (*MsgPauseGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{3} +} +func (m *MsgPauseGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPauseGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPauseGroupResponse.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 *MsgPauseGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPauseGroupResponse.Merge(m, src) +} +func (m *MsgPauseGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPauseGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPauseGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPauseGroupResponse proto.InternalMessageInfo + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +type MsgStartGroup struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *MsgStartGroup) Reset() { *m = MsgStartGroup{} } +func (m *MsgStartGroup) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroup) ProtoMessage() {} +func (*MsgStartGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{4} +} +func (m *MsgStartGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroup.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 *MsgStartGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroup.Merge(m, src) +} +func (m *MsgStartGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroup proto.InternalMessageInfo + +func (m *MsgStartGroup) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +type MsgStartGroupResponse struct { +} + +func (m *MsgStartGroupResponse) Reset() { *m = MsgStartGroupResponse{} } +func (m *MsgStartGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStartGroupResponse) ProtoMessage() {} +func (*MsgStartGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5d408bb350bcd886, []int{5} +} +func (m *MsgStartGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartGroupResponse.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 *MsgStartGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartGroupResponse.Merge(m, src) +} +func (m *MsgStartGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStartGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartGroupResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCloseGroup)(nil), "akash.deployment.v1beta3.MsgCloseGroup") + proto.RegisterType((*MsgCloseGroupResponse)(nil), "akash.deployment.v1beta3.MsgCloseGroupResponse") + proto.RegisterType((*MsgPauseGroup)(nil), "akash.deployment.v1beta3.MsgPauseGroup") + proto.RegisterType((*MsgPauseGroupResponse)(nil), "akash.deployment.v1beta3.MsgPauseGroupResponse") + proto.RegisterType((*MsgStartGroup)(nil), "akash.deployment.v1beta3.MsgStartGroup") + proto.RegisterType((*MsgStartGroupResponse)(nil), "akash.deployment.v1beta3.MsgStartGroupResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/groupmsg.proto", fileDescriptor_5d408bb350bcd886) +} + +var fileDescriptor_5d408bb350bcd886 = []byte{ + // 286 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xc8, 0x2d, 0x4e, 0xd7, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x00, 0x2b, 0xd4, 0x43, 0x28, 0xd4, 0x83, 0x2a, 0x94, 0x12, 0x49, + 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xd4, 0xf0, 0x1b, 0x9c, 0x99, + 0x02, 0x51, 0xa7, 0x94, 0xce, 0xc5, 0xeb, 0x5b, 0x9c, 0xee, 0x9c, 0x93, 0x5f, 0x9c, 0xea, 0x0e, + 0x92, 0x10, 0x0a, 0xe0, 0x62, 0xca, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd4, + 0xc3, 0x65, 0xab, 0x1e, 0x58, 0xb1, 0xa7, 0x8b, 0x93, 0xec, 0x89, 0x7b, 0xf2, 0x0c, 0x8f, 0xee, + 0xc9, 0x33, 0x79, 0xba, 0xbc, 0xba, 0x27, 0xcf, 0x94, 0x99, 0xf2, 0xe9, 0x9e, 0x3c, 0x67, 0x65, + 0x62, 0x6e, 0x8e, 0x95, 0x52, 0x66, 0x8a, 0x52, 0x10, 0x53, 0x66, 0x8a, 0x15, 0xcb, 0x8b, 0x05, + 0xf2, 0x0c, 0x4a, 0xe2, 0x5c, 0xa2, 0x28, 0x16, 0x05, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, + 0x42, 0x5d, 0x10, 0x90, 0x58, 0x4a, 0x1f, 0x17, 0x20, 0x2c, 0x42, 0x73, 0x41, 0x70, 0x49, 0x62, + 0x51, 0x09, 0x3d, 0x5c, 0x80, 0xb0, 0x08, 0xe6, 0x02, 0xa7, 0xf0, 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, 0xb2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x07, 0x3b, 0x44, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0x4b, 0x2c, 0xc8, + 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0xc5, 0x12, 0xd9, 0x49, 0x6c, 0xe0, 0x58, 0x36, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x36, 0x40, 0x58, 0x93, 0x68, 0x02, 0x00, 0x00, +} + +func (m *MsgCloseGroup) 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 *MsgCloseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseGroupResponse) 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 *MsgCloseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroup) 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 *MsgPauseGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgPauseGroupResponse) 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 *MsgPauseGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPauseGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStartGroup) 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 *MsgStartGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgStartGroupResponse) 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 *MsgStartGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGroupmsg(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupmsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCloseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgCloseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgPauseGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgPauseGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStartGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovGroupmsg(uint64(l)) + return n +} + +func (m *MsgStartGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGroupmsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupmsg(x uint64) (n int) { + return sovGroupmsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCloseGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgCloseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgCloseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgPauseGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPauseGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgPauseGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPauseGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroup) 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 ErrIntOverflowGroupmsg + } + 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: MsgStartGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroup: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartGroupResponse) 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 ErrIntOverflowGroupmsg + } + 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: MsgStartGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroupmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupmsg(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, ErrIntOverflowGroupmsg + } + 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, ErrIntOverflowGroupmsg + } + 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, ErrIntOverflowGroupmsg + } + 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, ErrInvalidLengthGroupmsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupmsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupmsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupmsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupmsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupmsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/groupspec.pb.go b/go/node/deployment/v1beta3/groupspec.pb.go new file mode 100644 index 00000000..40ab27bd --- /dev/null +++ b/go/node/deployment/v1beta3/groupspec.pb.go @@ -0,0 +1,426 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/groupspec.proto + +package v1beta3 + +import ( + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GroupSpec stores group specifications +type GroupSpec struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Requirements v1beta3.PlacementRequirements `protobuf:"bytes,2,opt,name=requirements,proto3" json:"requirements" yaml:"requirements"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources" yaml:"resources"` +} + +func (m *GroupSpec) Reset() { *m = GroupSpec{} } +func (m *GroupSpec) String() string { return proto.CompactTextString(m) } +func (*GroupSpec) ProtoMessage() {} +func (*GroupSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_8f47a9fa0e046026, []int{0} +} +func (m *GroupSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupSpec.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 *GroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupSpec.Merge(m, src) +} +func (m *GroupSpec) XXX_Size() int { + return m.Size() +} +func (m *GroupSpec) XXX_DiscardUnknown() { + xxx_messageInfo_GroupSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupSpec proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GroupSpec)(nil), "akash.deployment.v1beta3.GroupSpec") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/groupspec.proto", fileDescriptor_8f47a9fa0e046026) +} + +var fileDescriptor_8f47a9fa0e046026 = []byte{ + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0x93, 0xf6, 0xea, 0xea, 0x36, 0xbd, 0x03, 0x0a, 0x48, 0x44, 0x1d, 0xe2, 0xca, 0x12, + 0x22, 0xa8, 0xc2, 0x16, 0xed, 0x56, 0x89, 0x25, 0x0b, 0x2b, 0x0a, 0x03, 0x12, 0x9b, 0x93, 0x5a, + 0x69, 0xd4, 0x26, 0x0e, 0x8e, 0x03, 0x2a, 0x4f, 0xc0, 0xc8, 0x23, 0x74, 0xe3, 0x55, 0x3a, 0x76, + 0x64, 0x8a, 0x50, 0xbb, 0xa0, 0x8e, 0x7d, 0x02, 0x14, 0xc7, 0xa5, 0xad, 0x44, 0xb7, 0x9c, 0x93, + 0xef, 0x9c, 0xff, 0xff, 0x7d, 0x0c, 0x87, 0x8c, 0x48, 0x36, 0xc4, 0x03, 0x9a, 0x8e, 0xd9, 0x24, + 0xa6, 0x89, 0xc0, 0x4f, 0x57, 0x3e, 0x15, 0xa4, 0x87, 0x43, 0xce, 0xf2, 0x34, 0x4b, 0x69, 0x80, + 0x52, 0xce, 0x04, 0x33, 0x2d, 0x49, 0xa2, 0x2d, 0x89, 0x14, 0xd9, 0x3a, 0x09, 0x59, 0xc8, 0x24, + 0x84, 0xcb, 0xaf, 0x8a, 0x6f, 0xc1, 0x6a, 0xb3, 0x4f, 0x32, 0xfa, 0xb3, 0x93, 0x08, 0xc1, 0x23, + 0x3f, 0x17, 0x54, 0x31, 0xe7, 0x07, 0xd5, 0x39, 0xcd, 0x58, 0xce, 0x03, 0x05, 0xc2, 0xf7, 0x9a, + 0xd1, 0xb8, 0x29, 0x0d, 0xdd, 0xa5, 0x34, 0x30, 0x3b, 0xc6, 0x9f, 0x84, 0xc4, 0xd4, 0xd2, 0xdb, + 0xba, 0xd3, 0x70, 0x4f, 0x57, 0x05, 0x90, 0xf5, 0xba, 0x00, 0xcd, 0x09, 0x89, 0xc7, 0x7d, 0x58, + 0x56, 0xd0, 0x93, 0x4d, 0xf3, 0xc5, 0xf8, 0xcf, 0xe9, 0x63, 0x1e, 0x71, 0x5a, 0x0a, 0x64, 0x56, + 0xad, 0xad, 0x3b, 0xcd, 0xee, 0x05, 0xaa, 0xe2, 0x94, 0xf6, 0x36, 0x41, 0xd0, 0xed, 0x98, 0x04, + 0x92, 0xf2, 0x76, 0x06, 0xdc, 0xce, 0xac, 0x00, 0xda, 0xaa, 0x00, 0x7b, 0x6b, 0xd6, 0x05, 0x38, + 0xae, 0xb4, 0x76, 0xbb, 0xd0, 0xdb, 0x83, 0xcc, 0xd0, 0x68, 0x6c, 0x82, 0x64, 0x56, 0xbd, 0x5d, + 0x77, 0x9a, 0x5d, 0x88, 0x0e, 0xbd, 0x23, 0xf2, 0x14, 0xea, 0x9e, 0x29, 0xc5, 0xed, 0xf0, 0xba, + 0x00, 0x47, 0x1b, 0x39, 0xd5, 0x82, 0xde, 0xf6, 0x77, 0xff, 0xdf, 0xeb, 0x14, 0x68, 0x5f, 0x53, + 0xa0, 0xb9, 0xf7, 0xb3, 0x85, 0xad, 0xcf, 0x17, 0xb6, 0xfe, 0xb9, 0xb0, 0xf5, 0xb7, 0xa5, 0xad, + 0xcd, 0x97, 0xb6, 0xf6, 0xb1, 0xb4, 0xb5, 0x87, 0xeb, 0x30, 0x12, 0xc3, 0xdc, 0x47, 0x01, 0x8b, + 0xb1, 0xf4, 0x70, 0x99, 0x50, 0xf1, 0xcc, 0xf8, 0x48, 0x55, 0x24, 0x8d, 0x70, 0xc8, 0x70, 0xc2, + 0x06, 0xf4, 0x97, 0x8b, 0xf8, 0x7f, 0xe5, 0x25, 0x7a, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8b, + 0xd4, 0x1c, 0x65, 0x32, 0x02, 0x00, 0x00, +} + +func (m *GroupSpec) 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 *GroupSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupspec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Requirements.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroupspec(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGroupspec(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGroupspec(dAtA []byte, offset int, v uint64) int { + offset -= sovGroupspec(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovGroupspec(uint64(l)) + } + l = m.Requirements.Size() + n += 1 + l + sovGroupspec(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGroupspec(uint64(l)) + } + } + return n +} + +func sovGroupspec(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroupspec(x uint64) (n int) { + return sovGroupspec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GroupSpec) 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 ErrIntOverflowGroupspec + } + 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: GroupSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowGroupspec + } + 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 ErrInvalidLengthGroupspec + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requirements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupspec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupspec + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Requirements.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroupspec + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroupspec + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroupspec + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroupspec(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroupspec + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroupspec(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, ErrIntOverflowGroupspec + } + 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, ErrIntOverflowGroupspec + } + 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, ErrIntOverflowGroupspec + } + 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, ErrInvalidLengthGroupspec + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroupspec + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroupspec + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroupspec = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroupspec = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroupspec = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/id.go b/go/node/deployment/v1beta3/id.go new file mode 100644 index 00000000..ab6b1ddb --- /dev/null +++ b/go/node/deployment/v1beta3/id.go @@ -0,0 +1,103 @@ +package v1beta3 + +import ( + "fmt" + "strconv" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Equals method compares specific deployment with provided deployment +func (id DeploymentID) Equals(other DeploymentID) bool { + return id.Owner == other.Owner && id.DSeq == other.DSeq +} + +// Validate method for DeploymentID and returns nil +func (id DeploymentID) Validate() error { + _, err := sdk.AccAddressFromBech32(id.Owner) + switch { + case err != nil: + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "DeploymentID: Invalid Owner Address") + case id.DSeq == 0: + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "DeploymentID: Invalid Deployment Sequence") + } + return nil +} + +// String method for deployment IDs +func (id DeploymentID) String() string { + return fmt.Sprintf("%s/%d", id.Owner, id.DSeq) +} + +func (id DeploymentID) GetOwnerAddress() (sdk.Address, error) { + return sdk.AccAddressFromBech32(id.Owner) +} + +func ParseDeploymentID(val string) (DeploymentID, error) { + parts := strings.Split(val, "/") + return ParseDeploymentPath(parts) +} + +// ParseDeploymentPath returns DeploymentID details with provided queries, and return +// error if occurred due to wrong query +func ParseDeploymentPath(parts []string) (DeploymentID, error) { + if len(parts) != 2 { + return DeploymentID{}, ErrInvalidIDPath + } + + owner, err := sdk.AccAddressFromBech32(parts[0]) + if err != nil { + return DeploymentID{}, err + } + + dseq, err := strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return DeploymentID{}, err + } + + return DeploymentID{ + Owner: owner.String(), + DSeq: dseq, + }, nil +} + +// MakeGroupID returns GroupID instance with provided deployment details +// and group sequence number. +func MakeGroupID(id DeploymentID, gseq uint32) GroupID { + return GroupID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: gseq, + } +} + +// DeploymentID method returns DeploymentID details with specific group details +func (id GroupID) DeploymentID() DeploymentID { + return DeploymentID{ + Owner: id.Owner, + DSeq: id.DSeq, + } +} + +// Equals method compares specific group with provided group +func (id GroupID) Equals(other GroupID) bool { + return id.DeploymentID().Equals(other.DeploymentID()) && id.GSeq == other.GSeq +} + +// Validate method for GroupID and returns nil +func (id GroupID) Validate() error { + if err := id.DeploymentID().Validate(); err != nil { + return sdkerrors.Wrap(err, "GroupID: Invalid DeploymentID") + } + if id.GSeq == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "GroupID: Invalid Group Sequence") + } + return nil +} + +// String method provides human readable representation of GroupID. +func (id GroupID) String() string { + return fmt.Sprintf("%s/%d", id.DeploymentID(), id.GSeq) +} diff --git a/go/node/deployment/v1beta3/key.go b/go/node/deployment/v1beta3/key.go new file mode 100644 index 00000000..400c355e --- /dev/null +++ b/go/node/deployment/v1beta3/key.go @@ -0,0 +1,20 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "deployment" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) + +func DeploymentPrefix() []byte { + return []byte{0x01} +} + +func GroupPrefix() []byte { + return []byte{0x02} +} diff --git a/go/node/deployment/v1beta3/migrate/v1beta2.go b/go/node/deployment/v1beta3/migrate/v1beta2.go new file mode 100644 index 00000000..d707e39b --- /dev/null +++ b/go/node/deployment/v1beta3/migrate/v1beta2.go @@ -0,0 +1,44 @@ +package migrate + +// func ResourceFromV1Beta2(from v1beta2.Resource) v1beta3.Resource { +// return v1beta3.Resource{ +// Resources: amigrate.ResourceUnitsFromV1Beta2(from.Resources), +// Count: from.Count, +// Price: sdk.NewDecCoinFromCoin(from.Price), +// } +// } +// +// func ResourcesFromV1Beta2(from []v1beta2.Resource) []v1beta3.Resource { +// res := make([]v1beta3.Resource, 0, len(from)) +// +// for _, oval := range from { +// res = append(res, ResourceFromV1Beta2(oval)) +// } +// +// return res +// } +// +// func GroupIDFromV1Beta2(from v1beta2.GroupID) v1beta3.GroupID { +// return v1beta3.GroupID{ +// Owner: from.Owner, +// DSeq: from.DSeq, +// GSeq: from.GSeq, +// } +// } +// +// func GroupSpecFromV1Beta2(from v1beta2.GroupSpec) v1beta3.GroupSpec { +// return v1beta3.GroupSpec{ +// Name: from.Name, +// Requirements: amigrate.PlacementRequirementsFromV1Beta2(from.Requirements), +// Resources: ResourcesFromV1Beta2(from.Resources), +// } +// } +// +// func GroupFromV1Beta1(from v1beta2.Group) v1beta3.Group { +// return v1beta3.Group{ +// GroupID: GroupIDFromV1Beta2(from.GroupID), +// State: v1beta3.Group_State(from.State), +// GroupSpec: GroupSpecFromV1Beta2(from.GroupSpec), +// CreatedAt: from.CreatedAt, +// } +// } diff --git a/go/node/deployment/v1beta3/msgs.go b/go/node/deployment/v1beta3/msgs.go new file mode 100644 index 00000000..93297c93 --- /dev/null +++ b/go/node/deployment/v1beta3/msgs.go @@ -0,0 +1,324 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + MsgTypeCreateDeployment = "create-deployment" + MsgTypeDepositDeployment = "deposit-deployment" + MsgTypeUpdateDeployment = "update-deployment" + MsgTypeCloseDeployment = "close-deployment" + MsgTypeCloseGroup = "close-group" + MsgTypePauseGroup = "pause-group" + MsgTypeStartGroup = "start-group" +) + +var ( + _, _, _, _ sdk.Msg = &MsgCreateDeployment{}, &MsgUpdateDeployment{}, &MsgCloseDeployment{}, &MsgCloseGroup{} +) + +// NewMsgCreateDeployment creates a new MsgCreateDeployment instance +func NewMsgCreateDeployment(id DeploymentID, groups []GroupSpec, version []byte, + deposit sdk.Coin, depositor sdk.AccAddress) *MsgCreateDeployment { + return &MsgCreateDeployment{ + ID: id, + Groups: groups, + Version: version, + Deposit: deposit, + Depositor: depositor.String(), + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateDeployment) Type() string { return MsgTypeCreateDeployment } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic does basic validation like check owner and groups length +func (msg MsgCreateDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + if len(msg.Groups) == 0 { + return ErrInvalidGroups + } + + if len(msg.Version) == 0 { + return ErrEmptyVersion + } + + if len(msg.Version) != ManifestVersionLength { + return ErrInvalidVersion + } + + for _, gs := range msg.Groups { + err := gs.ValidateBasic() + if err != nil { + return err + } + } + + _, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreateDeployment: Invalid Depositor Address") + } + + return nil +} + +// NewMsgDepositDeployment creates a new MsgDepositDeployment instance +func NewMsgDepositDeployment(id DeploymentID, amount sdk.Coin, depositor string) *MsgDepositDeployment { + return &MsgDepositDeployment{ + ID: id, + Amount: amount, + Depositor: depositor, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgDepositDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgDepositDeployment) Type() string { return MsgTypeDepositDeployment } + +// GetSignBytes encodes the message for signing +func (msg MsgDepositDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgDepositDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic does basic validation like check owner and groups length +func (msg MsgDepositDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + + if msg.Amount.IsZero() { + return ErrInvalidDeposit + } + + _, err := sdk.AccAddressFromBech32(msg.Depositor) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgDepositDeployment: Invalid Depositor Address") + } + + return nil +} + +// NewMsgUpdateDeployment creates a new MsgUpdateDeployment instance +func NewMsgUpdateDeployment(id DeploymentID, version []byte) *MsgUpdateDeployment { + return &MsgUpdateDeployment{ + ID: id, + Version: version, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgUpdateDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgUpdateDeployment) Type() string { return MsgTypeUpdateDeployment } + +// ValidateBasic does basic validation +func (msg MsgUpdateDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + + if len(msg.Version) == 0 { + return ErrEmptyVersion + } + + if len(msg.Version) != ManifestVersionLength { + return ErrInvalidVersion + } + + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgUpdateDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUpdateDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgCloseDeployment creates a new MsgCloseDeployment instance +func NewMsgCloseDeployment(id DeploymentID) *MsgCloseDeployment { + return &MsgCloseDeployment{ + ID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseDeployment) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseDeployment) Type() string { return MsgTypeCloseDeployment } + +// ValidateBasic does basic validation with deployment details +func (msg MsgCloseDeployment) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCloseDeployment) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseDeployment) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgCloseGroup creates a new MsgCloseGroup instance +func NewMsgCloseGroup(id GroupID) *MsgCloseGroup { + return &MsgCloseGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgCloseGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgCloseGroup) Type() string { return MsgTypeCloseGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgCloseGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCloseGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgPauseGroup creates a new MsgPauseGroup instance +func NewMsgPauseGroup(id GroupID) *MsgPauseGroup { + return &MsgPauseGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgPauseGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgPauseGroup) Type() string { return MsgTypePauseGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgPauseGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgPauseGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgPauseGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgStartGroup creates a new MsgStartGroup instance +func NewMsgStartGroup(id GroupID) *MsgStartGroup { + return &MsgStartGroup{ + ID: id, + } +} + +// Route implements the sdk.Msg interface for routing +func (msg MsgStartGroup) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface exposing message type +func (msg MsgStartGroup) Type() string { return MsgTypeStartGroup } + +// ValidateBasic calls underlying GroupID.Validate() check and returns result +func (msg MsgStartGroup) ValidateBasic() error { + if err := msg.ID.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgStartGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgStartGroup) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} diff --git a/go/node/deployment/v1beta3/msgs_test.go b/go/node/deployment/v1beta3/msgs_test.go new file mode 100644 index 00000000..cb0a5f69 --- /dev/null +++ b/go/node/deployment/v1beta3/msgs_test.go @@ -0,0 +1,80 @@ +package v1beta3_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/testutil" + + types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +type testMsg struct { + msg sdk.Msg + err error +} + +func TestVersionValidation(t *testing.T) { + tests := []testMsg{ + { + msg: &types.MsgCreateDeployment{ + ID: testutil.DeploymentID(t), + Version: testutil.DeploymentVersion(t), + Groups: []types.GroupSpec{ + testutil.GroupSpec(t), + }, + Depositor: testutil.AccAddress(t).String(), + }, + err: nil, + }, + { + msg: &types.MsgCreateDeployment{ + ID: testutil.DeploymentID(t), + Version: []byte(""), + Groups: []types.GroupSpec{ + testutil.GroupSpec(t), + }, + Depositor: testutil.AccAddress(t).String(), + }, + err: types.ErrEmptyVersion, + }, + { + msg: &types.MsgCreateDeployment{ + ID: testutil.DeploymentID(t), + Version: []byte("invalidversion"), + Groups: []types.GroupSpec{ + testutil.GroupSpec(t), + }, + Depositor: testutil.AccAddress(t).String(), + }, + err: types.ErrInvalidVersion, + }, + { + msg: &types.MsgUpdateDeployment{ + ID: testutil.DeploymentID(t), + Version: testutil.DeploymentVersion(t), + }, + err: nil, + }, + { + msg: &types.MsgUpdateDeployment{ + ID: testutil.DeploymentID(t), + Version: []byte(""), + }, + err: types.ErrEmptyVersion, + }, + { + msg: &types.MsgUpdateDeployment{ + ID: testutil.DeploymentID(t), + Version: []byte("invalidversion"), + }, + err: types.ErrInvalidVersion, + }, + } + + for _, test := range tests { + require.Equal(t, test.err, test.msg.ValidateBasic()) + } +} diff --git a/go/node/deployment/v1beta3/params.go b/go/node/deployment/v1beta3/params.go new file mode 100644 index 00000000..354c73a6 --- /dev/null +++ b/go/node/deployment/v1beta3/params.go @@ -0,0 +1,50 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +var ( + DefaultDeploymentMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000)) +) + +const ( + keyDeploymentMinDeposit = "DeploymentMinDeposit" +) + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyDeploymentMinDeposit), &p.DeploymentMinDeposit, validateCoin), + } +} + +func DefaultParams() Params { + return Params{ + DeploymentMinDeposit: DefaultDeploymentMinDeposit, + } +} + +func (p Params) Validate() error { + if err := validateCoin(p.DeploymentMinDeposit); err != nil { + return err + } + + return nil +} + +func validateCoin(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + + return nil +} diff --git a/go/node/deployment/v1beta3/params.pb.go b/go/node/deployment/v1beta3/params.pb.go new file mode 100644 index 00000000..f9a9b596 --- /dev/null +++ b/go/node/deployment/v1beta3/params.pb.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/params.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params defines the parameters for the x/deployment package +type Params struct { + DeploymentMinDeposit types.Coin `protobuf:"bytes,1,opt,name=deployment_min_deposit,json=deploymentMinDeposit,proto3" json:"deployment_min_deposit" yaml:"deployment_min_deposit"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_9a677e8b392d6c91, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDeploymentMinDeposit() types.Coin { + if m != nil { + return m.DeploymentMinDeposit + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*Params)(nil), "akash.deployment.v1beta3.Params") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/params.proto", fileDescriptor_9a677e8b392d6c91) +} + +var fileDescriptor_9a677e8b392d6c91 = []byte{ + // 274 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, + 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x00, 0x2b, 0xd3, 0x43, 0x28, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xe4, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x93, 0x12, 0x8b, 0x53, 0xa1, 0x26, 0x1a, 0xea, 0x27, 0xe7, 0x67, 0xe6, 0x41, 0xe4, 0x95, + 0x36, 0x33, 0x72, 0xb1, 0x05, 0x80, 0x2d, 0x10, 0x5a, 0xc1, 0xc8, 0x25, 0x86, 0x30, 0x37, 0x3e, + 0x37, 0x33, 0x2f, 0x3e, 0x25, 0xb5, 0x20, 0xbf, 0x38, 0xb3, 0x44, 0x82, 0x51, 0x81, 0x51, 0x83, + 0xdb, 0x48, 0x52, 0x0f, 0x62, 0x98, 0x1e, 0xc8, 0x30, 0xa8, 0xbd, 0x86, 0x7a, 0xce, 0xf9, 0x99, + 0x79, 0x4e, 0xe1, 0x27, 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0x2f, 0xe2, 0x02, 0x37, 0xc0, 0x37, + 0x33, 0xcf, 0x05, 0xa2, 0xfd, 0xd5, 0x3d, 0x79, 0x1c, 0x06, 0x7f, 0xba, 0x27, 0x2f, 0x5b, 0x99, + 0x98, 0x9b, 0x63, 0xa5, 0x84, 0x5d, 0x5e, 0x29, 0x48, 0x24, 0x05, 0x8b, 0x81, 0x4e, 0xe1, 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, 0x65, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, + 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x0e, 0x2a, 0xdd, 0xbc, 0xd4, 0x92, 0xf2, 0xfc, 0xa2, 0x6c, + 0x28, 0x2f, 0xb1, 0x20, 0x53, 0x3f, 0x3d, 0x5f, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0x4b, 0x58, 0x27, + 0xb1, 0x81, 0x43, 0xc5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x97, 0x7f, 0x3b, 0xa1, 0x8e, 0x01, + 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeploymentMinDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeploymentMinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeploymentMinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeploymentMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/query.pb.go b/go/node/deployment/v1beta3/query.pb.go new file mode 100644 index 00000000..8125e392 --- /dev/null +++ b/go/node/deployment/v1beta3/query.pb.go @@ -0,0 +1,1628 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/escrow/v1beta3" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +type QueryDeploymentsRequest struct { + Filters DeploymentFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsRequest) Reset() { *m = QueryDeploymentsRequest{} } +func (m *QueryDeploymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsRequest) ProtoMessage() {} +func (*QueryDeploymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{0} +} +func (m *QueryDeploymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsRequest.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 *QueryDeploymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsRequest.Merge(m, src) +} +func (m *QueryDeploymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsRequest proto.InternalMessageInfo + +func (m *QueryDeploymentsRequest) GetFilters() DeploymentFilters { + if m != nil { + return m.Filters + } + return DeploymentFilters{} +} + +func (m *QueryDeploymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +type QueryDeploymentsResponse struct { + Deployments DeploymentResponses `protobuf:"bytes,1,rep,name=deployments,proto3,castrepeated=DeploymentResponses" json:"deployments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDeploymentsResponse) Reset() { *m = QueryDeploymentsResponse{} } +func (m *QueryDeploymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentsResponse) ProtoMessage() {} +func (*QueryDeploymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{1} +} +func (m *QueryDeploymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentsResponse.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 *QueryDeploymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentsResponse.Merge(m, src) +} +func (m *QueryDeploymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentsResponse proto.InternalMessageInfo + +func (m *QueryDeploymentsResponse) GetDeployments() DeploymentResponses { + if m != nil { + return m.Deployments + } + return nil +} + +func (m *QueryDeploymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +type QueryDeploymentRequest struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryDeploymentRequest) Reset() { *m = QueryDeploymentRequest{} } +func (m *QueryDeploymentRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentRequest) ProtoMessage() {} +func (*QueryDeploymentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{2} +} +func (m *QueryDeploymentRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentRequest.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 *QueryDeploymentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentRequest.Merge(m, src) +} +func (m *QueryDeploymentRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentRequest proto.InternalMessageInfo + +func (m *QueryDeploymentRequest) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +type QueryDeploymentResponse struct { + Deployment Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups []Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups" yaml:"groups"` + EscrowAccount v1beta3.Account `protobuf:"bytes,3,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` +} + +func (m *QueryDeploymentResponse) Reset() { *m = QueryDeploymentResponse{} } +func (m *QueryDeploymentResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDeploymentResponse) ProtoMessage() {} +func (*QueryDeploymentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{3} +} +func (m *QueryDeploymentResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDeploymentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDeploymentResponse.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 *QueryDeploymentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDeploymentResponse.Merge(m, src) +} +func (m *QueryDeploymentResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDeploymentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDeploymentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDeploymentResponse proto.InternalMessageInfo + +func (m *QueryDeploymentResponse) GetDeployment() Deployment { + if m != nil { + return m.Deployment + } + return Deployment{} +} + +func (m *QueryDeploymentResponse) GetGroups() []Group { + if m != nil { + return m.Groups + } + return nil +} + +func (m *QueryDeploymentResponse) GetEscrowAccount() v1beta3.Account { + if m != nil { + return m.EscrowAccount + } + return v1beta3.Account{} +} + +// QueryGroupRequest is request type for the Query/Group RPC method +type QueryGroupRequest struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryGroupRequest) Reset() { *m = QueryGroupRequest{} } +func (m *QueryGroupRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGroupRequest) ProtoMessage() {} +func (*QueryGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{4} +} +func (m *QueryGroupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupRequest.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 *QueryGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupRequest.Merge(m, src) +} +func (m *QueryGroupRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupRequest proto.InternalMessageInfo + +func (m *QueryGroupRequest) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +// QueryGroupResponse is response type for the Query/Group RPC method +type QueryGroupResponse struct { + Group Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` +} + +func (m *QueryGroupResponse) Reset() { *m = QueryGroupResponse{} } +func (m *QueryGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGroupResponse) ProtoMessage() {} +func (*QueryGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98f8fa16759df714, []int{5} +} +func (m *QueryGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGroupResponse.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 *QueryGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGroupResponse.Merge(m, src) +} +func (m *QueryGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGroupResponse proto.InternalMessageInfo + +func (m *QueryGroupResponse) GetGroup() Group { + if m != nil { + return m.Group + } + return Group{} +} + +func init() { + proto.RegisterType((*QueryDeploymentsRequest)(nil), "akash.deployment.v1beta3.QueryDeploymentsRequest") + proto.RegisterType((*QueryDeploymentsResponse)(nil), "akash.deployment.v1beta3.QueryDeploymentsResponse") + proto.RegisterType((*QueryDeploymentRequest)(nil), "akash.deployment.v1beta3.QueryDeploymentRequest") + proto.RegisterType((*QueryDeploymentResponse)(nil), "akash.deployment.v1beta3.QueryDeploymentResponse") + proto.RegisterType((*QueryGroupRequest)(nil), "akash.deployment.v1beta3.QueryGroupRequest") + proto.RegisterType((*QueryGroupResponse)(nil), "akash.deployment.v1beta3.QueryGroupResponse") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/query.proto", fileDescriptor_98f8fa16759df714) +} + +var fileDescriptor_98f8fa16759df714 = []byte{ + // 680 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0x8d, 0xdd, 0x07, 0xd2, 0x44, 0x45, 0xea, 0x80, 0xc0, 0x0a, 0x60, 0x17, 0xab, 0x24, 0xa5, + 0x0f, 0x0f, 0x49, 0x77, 0x45, 0x5d, 0x60, 0x45, 0xad, 0x0a, 0x1b, 0xea, 0x0d, 0x08, 0x21, 0x21, + 0x27, 0x99, 0xba, 0x56, 0x13, 0x8f, 0xeb, 0x99, 0x50, 0x65, 0xcb, 0x17, 0x80, 0xf8, 0x01, 0x36, + 0x48, 0x88, 0x05, 0x2b, 0x3e, 0xa2, 0xcb, 0x4a, 0x08, 0x89, 0x55, 0x40, 0x09, 0x0b, 0xc4, 0x82, + 0x45, 0xbf, 0x00, 0x79, 0x66, 0x12, 0x1b, 0x92, 0x34, 0xc9, 0x2e, 0xf1, 0x9c, 0x7b, 0xce, 0xb9, + 0xf7, 0xdc, 0xb1, 0xc1, 0xb2, 0x7b, 0xe4, 0xd2, 0x43, 0x54, 0xc3, 0x61, 0x9d, 0xb4, 0x1a, 0x38, + 0x60, 0xe8, 0x65, 0xb1, 0x82, 0x99, 0xbb, 0x89, 0x8e, 0x9b, 0x38, 0x6a, 0x59, 0x61, 0x44, 0x18, + 0x81, 0x1a, 0x47, 0x59, 0x09, 0xca, 0x92, 0xa8, 0xdc, 0x55, 0x8f, 0x78, 0x84, 0x83, 0x50, 0xfc, + 0x4b, 0xe0, 0x73, 0x37, 0x3d, 0x42, 0xbc, 0x3a, 0x46, 0x6e, 0xe8, 0x23, 0x37, 0x08, 0x08, 0x73, + 0x99, 0x4f, 0x02, 0x2a, 0x4f, 0x57, 0xab, 0x84, 0x36, 0x08, 0x45, 0x15, 0x97, 0x62, 0x21, 0x23, + 0x45, 0x8b, 0x28, 0x74, 0x3d, 0x3f, 0xe0, 0x60, 0x89, 0xbd, 0x3b, 0xd2, 0x5f, 0xca, 0x8c, 0x80, + 0x8e, 0x6e, 0xc5, 0x8b, 0x48, 0x33, 0x94, 0xa8, 0xfc, 0xc5, 0x28, 0xbf, 0x26, 0x71, 0x4b, 0x02, + 0x87, 0x69, 0x35, 0x22, 0x27, 0x7d, 0x0c, 0x6b, 0x85, 0x58, 0xb6, 0x61, 0x7e, 0x52, 0xc0, 0xf5, + 0xfd, 0xd8, 0x7d, 0xb9, 0xcf, 0x45, 0x1d, 0x7c, 0xdc, 0xc4, 0x94, 0xc1, 0x47, 0xe0, 0xd2, 0x81, + 0x5f, 0x67, 0x38, 0xa2, 0x9a, 0xb2, 0xa4, 0xac, 0x64, 0x4b, 0x6b, 0xd6, 0xa8, 0x11, 0x5a, 0x49, + 0xf9, 0x8e, 0x28, 0xb1, 0x67, 0x4f, 0xdb, 0x46, 0xc6, 0xe9, 0x31, 0xc0, 0x1d, 0x00, 0x92, 0xb9, + 0x68, 0x2a, 0xe7, 0xcb, 0x5b, 0x62, 0x88, 0x56, 0x3c, 0x44, 0x4b, 0x64, 0x25, 0x87, 0x68, 0x3d, + 0x76, 0x3d, 0x2c, 0x8d, 0x38, 0xa9, 0x4a, 0xf3, 0xab, 0x02, 0xb4, 0x41, 0xc3, 0x34, 0x24, 0x01, + 0xc5, 0x30, 0x04, 0xd9, 0xc4, 0x5b, 0xec, 0x7a, 0x66, 0x25, 0x5b, 0x2a, 0x8e, 0x76, 0xfd, 0x1f, + 0x51, 0x8f, 0xc7, 0xbe, 0x11, 0x7b, 0xff, 0xf8, 0xdd, 0xb8, 0x32, 0x78, 0x46, 0x9d, 0xb4, 0x04, + 0xdc, 0x1d, 0xd2, 0x56, 0x61, 0x6c, 0x5b, 0x82, 0xea, 0x9f, 0xbe, 0x9e, 0x83, 0x6b, 0x03, 0x6e, + 0x44, 0x0c, 0x36, 0x50, 0xfd, 0x9a, 0x4c, 0x20, 0x3f, 0x49, 0x02, 0x7b, 0x65, 0x1b, 0xc4, 0x0d, + 0x74, 0xda, 0x86, 0xba, 0x57, 0x76, 0x54, 0xbf, 0x66, 0x7e, 0x56, 0x07, 0x62, 0xee, 0x0f, 0xad, + 0x01, 0x40, 0x42, 0x27, 0x75, 0x96, 0x27, 0xd1, 0xb1, 0x0b, 0xb1, 0xca, 0xef, 0xb6, 0x91, 0xaa, + 0x3f, 0x6f, 0x1b, 0x8b, 0x2d, 0xb7, 0x51, 0xdf, 0x32, 0x93, 0x67, 0xa6, 0x93, 0x02, 0xc0, 0xa7, + 0x60, 0x9e, 0x2f, 0x29, 0xd5, 0x54, 0x1e, 0x8f, 0x31, 0x5a, 0x6a, 0x37, 0xc6, 0xd9, 0x86, 0x54, + 0x91, 0x65, 0xe7, 0x6d, 0x63, 0x41, 0x28, 0x88, 0xff, 0xa6, 0x23, 0x0f, 0xe0, 0x43, 0x70, 0x59, + 0x6c, 0xfa, 0x0b, 0xb7, 0x5a, 0x25, 0xcd, 0x80, 0x69, 0x33, 0xbc, 0x99, 0x5b, 0x52, 0x41, 0x1c, + 0xf6, 0xd9, 0x1f, 0x08, 0x90, 0x5c, 0xd4, 0x05, 0x71, 0x2a, 0x1f, 0x6e, 0xcd, 0xfe, 0x7a, 0x67, + 0x64, 0x4c, 0x07, 0x2c, 0xf2, 0xa9, 0x71, 0x23, 0xbd, 0x3c, 0xb6, 0x53, 0x79, 0xdc, 0x1e, 0x63, + 0x7e, 0x48, 0x14, 0xfb, 0x00, 0xa6, 0x39, 0x65, 0x08, 0xf7, 0xc1, 0x1c, 0xef, 0x42, 0xf2, 0x8e, + 0x1d, 0x8a, 0x30, 0x2d, 0x6a, 0x4a, 0x7f, 0x66, 0xc0, 0x1c, 0xe7, 0x84, 0x1f, 0x14, 0x90, 0x4d, + 0x5d, 0x0c, 0x38, 0xf9, 0xee, 0xf7, 0x6e, 0x7d, 0xae, 0x34, 0x4d, 0x89, 0x70, 0x6f, 0x96, 0x5e, + 0x7d, 0xf9, 0xf9, 0x56, 0x5d, 0x87, 0xab, 0x68, 0x82, 0x37, 0x1d, 0x45, 0x75, 0x9f, 0x32, 0xf8, + 0x5e, 0x01, 0x20, 0xe1, 0x82, 0xf7, 0xa6, 0xb8, 0xa5, 0xc2, 0xe8, 0xf4, 0xf7, 0x7a, 0x5a, 0x9f, + 0x7e, 0x70, 0x40, 0xe0, 0x1b, 0x05, 0xcc, 0xf1, 0x99, 0xc3, 0xb5, 0x31, 0x82, 0xe9, 0x2d, 0xc9, + 0xad, 0x4f, 0x06, 0x96, 0xc6, 0x36, 0xb8, 0xb1, 0x02, 0xbc, 0x83, 0x2e, 0x7e, 0xb3, 0x0b, 0x4f, + 0xf6, 0x93, 0xd3, 0x8e, 0xae, 0x9c, 0x75, 0x74, 0xe5, 0x47, 0x47, 0x57, 0x5e, 0x77, 0xf5, 0xcc, + 0x59, 0x57, 0xcf, 0x7c, 0xeb, 0xea, 0x99, 0x67, 0xdb, 0x9e, 0xcf, 0x0e, 0x9b, 0x15, 0xab, 0x4a, + 0x1a, 0x82, 0x6a, 0x23, 0xc0, 0xec, 0x84, 0x44, 0x47, 0xf2, 0x5f, 0xfc, 0x31, 0xf3, 0x08, 0x0a, + 0x48, 0x0d, 0x0f, 0x11, 0xa9, 0xcc, 0xf3, 0xaf, 0xc2, 0xe6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x57, 0xf2, 0xb2, 0x41, 0x52, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Deployments queries deployments + Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) + // Group queries group details + Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Deployments(ctx context.Context, in *QueryDeploymentsRequest, opts ...grpc.CallOption) (*QueryDeploymentsResponse, error) { + out := new(QueryDeploymentsResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Query/Deployments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deployment(ctx context.Context, in *QueryDeploymentRequest, opts ...grpc.CallOption) (*QueryDeploymentResponse, error) { + out := new(QueryDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Query/Deployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Group(ctx context.Context, in *QueryGroupRequest, opts ...grpc.CallOption) (*QueryGroupResponse, error) { + out := new(QueryGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Query/Group", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Deployments queries deployments + Deployments(context.Context, *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) + // Deployment queries deployment details + Deployment(context.Context, *QueryDeploymentRequest) (*QueryDeploymentResponse, error) + // Group queries group details + Group(context.Context, *QueryGroupRequest) (*QueryGroupResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Deployments(ctx context.Context, req *QueryDeploymentsRequest) (*QueryDeploymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployments not implemented") +} +func (*UnimplementedQueryServer) Deployment(ctx context.Context, req *QueryDeploymentRequest) (*QueryDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deployment not implemented") +} +func (*UnimplementedQueryServer) Group(ctx context.Context, req *QueryGroupRequest) (*QueryGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Group not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Deployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Query/Deployments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployments(ctx, req.(*QueryDeploymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDeploymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Query/Deployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deployment(ctx, req.(*QueryDeploymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Group_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Group(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Query/Group", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Group(ctx, req.(*QueryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Deployments", + Handler: _Query_Deployments_Handler, + }, + { + MethodName: "Deployment", + Handler: _Query_Deployment_Handler, + }, + { + MethodName: "Group", + Handler: _Query_Group_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta3/query.proto", +} + +func (m *QueryDeploymentsRequest) 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 *QueryDeploymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsRequest) 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 + } + { + size, err := m.Filters.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 *QueryDeploymentsResponse) 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 *QueryDeploymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentsResponse) 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.Deployments) > 0 { + for iNdEx := len(m.Deployments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deployments[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 (m *QueryDeploymentRequest) 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 *QueryDeploymentRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryDeploymentResponse) 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 *QueryDeploymentResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + 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)) + } + i-- + dAtA[i] = 0x1a + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Deployment.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 *QueryGroupRequest) 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 *QueryGroupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryGroupResponse) 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 *QueryGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Group.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 *QueryDeploymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDeploymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deployments) > 0 { + for _, e := range m.Deployments { + 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 (m *QueryDeploymentRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deployment.Size() + n += 1 + l + sovQuery(uint64(l)) + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.EscrowAccount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Group.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryDeploymentsRequest) 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: QueryDeploymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryDeploymentsResponse) 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: QueryDeploymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployments", 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.Deployments = append(m.Deployments, QueryDeploymentResponse{}) + if err := m.Deployments[len(m.Deployments)-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) + } + 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.PageResponse{} + } + 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 *QueryDeploymentRequest) 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: QueryDeploymentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentRequest: 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 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.ID.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 *QueryDeploymentResponse) 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: QueryDeploymentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDeploymentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", 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.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", 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.Groups = append(m.Groups, Group{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", 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.EscrowAccount.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 *QueryGroupRequest) 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: QueryGroupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupRequest: 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 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.ID.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 *QueryGroupResponse) 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: QueryGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", 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.Group.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/query.pb.gw.go b/go/node/deployment/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..927292bd --- /dev/null +++ b/go/node/deployment/v1beta3/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/deployment/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Deployments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentsRequest + 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_Deployments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployments(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Deployment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deployment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deployment_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDeploymentRequest + 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_Deployment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deployment(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Group_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Group(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Group_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupRequest + 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_Group_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Group(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Deployments_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_Deployments_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_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deployment_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_Deployment_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_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Group_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_Group_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_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "groups", "info"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Deployments_0 = runtime.ForwardResponseMessage + + forward_Query_Deployment_0 = runtime.ForwardResponseMessage + + forward_Query_Group_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/deployment/v1beta3/resource.pb.go b/go/node/deployment/v1beta3/resource.pb.go new file mode 100644 index 00000000..f50ba693 --- /dev/null +++ b/go/node/deployment/v1beta3/resource.pb.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/resource.proto + +package v1beta3 + +import ( + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Resource stores unit, total count and price of resource +type Resource struct { + Resources v1beta3.ResourceUnits `protobuf:"bytes,1,opt,name=resources,proto3" json:"unit" yaml:"unit"` + Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { + return fileDescriptor_14f0bdebc2254159, []int{0} +} +func (m *Resource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Resource.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 *Resource) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *Resource) XXX_Size() int { + return m.Size() +} +func (m *Resource) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func (m *Resource) GetResources() v1beta3.ResourceUnits { + if m != nil { + return m.Resources + } + return v1beta3.ResourceUnits{} +} + +func (m *Resource) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *Resource) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func init() { + proto.RegisterType((*Resource)(nil), "akash.deployment.v1beta3.Resource") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/resource.proto", fileDescriptor_14f0bdebc2254159) +} + +var fileDescriptor_14f0bdebc2254159 = []byte{ + // 339 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4e, 0xb3, 0x40, + 0x14, 0x85, 0xe1, 0xff, 0x5b, 0xa3, 0x54, 0x37, 0xc4, 0x05, 0x56, 0x1d, 0x2a, 0x0b, 0xed, 0xc6, + 0x99, 0xd4, 0xee, 0x9a, 0xb8, 0x41, 0x5f, 0x40, 0x12, 0x63, 0x62, 0xdc, 0xc0, 0x74, 0x42, 0x49, + 0xcb, 0x5c, 0xc2, 0x0c, 0x9a, 0xbe, 0x85, 0x8f, 0xe0, 0xe3, 0x74, 0xd9, 0xa5, 0x2b, 0x62, 0xda, + 0x8d, 0xe9, 0xb2, 0x4f, 0x60, 0x98, 0xa1, 0x69, 0x13, 0xdd, 0x71, 0x2e, 0xdf, 0x39, 0xf7, 0x5c, + 0xb0, 0xae, 0xc2, 0x71, 0x28, 0x46, 0x64, 0xc8, 0xb2, 0x09, 0x4c, 0x53, 0xc6, 0x25, 0x79, 0xed, + 0x45, 0x4c, 0x86, 0x7d, 0x92, 0x33, 0x01, 0x45, 0x4e, 0x19, 0xce, 0x72, 0x90, 0x60, 0x3b, 0x0a, + 0xc4, 0x5b, 0x10, 0xd7, 0x60, 0xfb, 0x38, 0x86, 0x18, 0x14, 0x44, 0xaa, 0x27, 0xcd, 0xb7, 0x2f, + 0x75, 0x70, 0x14, 0x0a, 0xf6, 0x2b, 0xb2, 0xe0, 0x89, 0x14, 0x35, 0x87, 0x28, 0x88, 0x14, 0xc4, + 0x2e, 0xd8, 0x23, 0x14, 0x12, 0xae, 0xdf, 0x7b, 0x6b, 0xd3, 0xda, 0x0f, 0x6a, 0x9f, 0xfd, 0x62, + 0x1d, 0x6c, 0x32, 0x84, 0x63, 0x76, 0xcc, 0x6e, 0xeb, 0xe6, 0x02, 0xeb, 0x62, 0x95, 0x7f, 0x53, + 0x09, 0x6f, 0x0c, 0x8f, 0xd5, 0x22, 0xff, 0x74, 0x56, 0xba, 0xc6, 0xaa, 0x74, 0x1b, 0xd5, 0xde, + 0x75, 0xe9, 0xb6, 0xa6, 0x61, 0x3a, 0x19, 0x78, 0x95, 0xf2, 0x82, 0x6d, 0xa0, 0x4d, 0xac, 0x26, + 0x85, 0x82, 0x4b, 0xe7, 0x5f, 0xc7, 0xec, 0x1e, 0xf9, 0x27, 0xab, 0xd2, 0xd5, 0x83, 0x75, 0xe9, + 0x1e, 0x6a, 0x8f, 0x92, 0x5e, 0xa0, 0xc7, 0xf6, 0x83, 0xd5, 0xcc, 0xf2, 0x84, 0x32, 0xe7, 0xbf, + 0xaa, 0x72, 0x86, 0xf5, 0x2d, 0xbb, 0x5d, 0x7a, 0xf8, 0x9e, 0xd1, 0x3b, 0x48, 0xb8, 0x7f, 0x5e, + 0xb7, 0xd0, 0x96, 0x6d, 0xa4, 0x92, 0x5e, 0xa0, 0xc7, 0x83, 0xc6, 0xf7, 0x87, 0x6b, 0xf8, 0x4f, + 0xb3, 0x05, 0x32, 0xe7, 0x0b, 0x64, 0x7e, 0x2d, 0x90, 0xf9, 0xbe, 0x44, 0xc6, 0x7c, 0x89, 0x8c, + 0xcf, 0x25, 0x32, 0x9e, 0x6f, 0xe3, 0x44, 0x8e, 0x8a, 0x08, 0x53, 0x48, 0x89, 0x3a, 0xfc, 0x9a, + 0x33, 0xf9, 0x06, 0xf9, 0xb8, 0x56, 0x61, 0x96, 0x90, 0x18, 0x08, 0x87, 0x21, 0xfb, 0xe3, 0xa7, + 0x46, 0x7b, 0xea, 0xa3, 0xf6, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x53, 0x90, 0x5c, 0xf7, + 0x01, 0x00, 0x00, +} + +func (m *Resource) 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 *Resource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Count != 0 { + i = encodeVarintResource(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { + offset -= sovResource(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Resource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resources.Size() + n += 1 + l + sovResource(uint64(l)) + if m.Count != 0 { + n += 1 + sovResource(uint64(m.Count)) + } + l = m.Price.Size() + n += 1 + l + sovResource(uint64(l)) + return n +} + +func sovResource(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Resource) 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 ErrIntOverflowResource + } + 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: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResource(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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrInvalidLengthResource + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResource + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResource + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta3/resource_list_validation.go b/go/node/deployment/v1beta3/resource_list_validation.go new file mode 100644 index 00000000..f9b6995b --- /dev/null +++ b/go/node/deployment/v1beta3/resource_list_validation.go @@ -0,0 +1,198 @@ +package v1beta3 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +var ( + ErrNoGroupsPresent = errors.New("validation: no groups present") + ErrGroupEmptyName = errors.New("validation: group has empty name") +) + +func ValidateResourceList(rlist types.ResourceGroup) error { + if rlist.GetName() == "" { + return ErrGroupEmptyName + } + + units := rlist.GetResources() + + if count := len(units); count > validationConfig.MaxGroupUnits { + return errors.Errorf("group %v: too many units (%v > %v)", rlist.GetName(), count, validationConfig.MaxGroupUnits) + } + + limits := newLimits() + + for _, resource := range units { + gLimits, err := validateResourceGroup(resource) + if err != nil { + return fmt.Errorf("group %v: %w", rlist.GetName(), err) + } + + gLimits.mul(resource.Count) + + limits.add(gLimits) + } + + if limits.cpu.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupCPU)) || limits.cpu.LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total CPU (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupCPU, limits.cpu, 0) + } + + if limits.gpu.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupCPU)) || limits.cpu.LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total GPU (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupGPU, limits.cpu, 0) + } + + if limits.memory.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupMemory)) || limits.memory.LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total memory (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupMemory, limits.memory, 0) + } + + for i := range limits.storage { + if limits.storage[i].GT(sdk.NewIntFromUint64(validationConfig.MaxGroupStorage)) || limits.storage[i].LTE(sdk.ZeroInt()) { + return errors.Errorf("group %v: invalid total storage (%v > %v > %v fails)", + rlist.GetName(), validationConfig.MaxGroupStorage, limits.storage, 0) + } + } + + return nil +} + +func validateResourceGroup(rg types.Resources) (resourceLimits, error) { + limits, err := validateResourceUnit(rg.Resources) + if err != nil { + return resourceLimits{}, err + } + + if rg.Count > uint32(validationConfig.MaxUnitCount) || rg.Count < uint32(validationConfig.MinUnitCount) { + return resourceLimits{}, errors.Errorf("error: invalid unit count (%v > %v > %v fails)", + validationConfig.MaxUnitCount, rg.Count, validationConfig.MinUnitCount) + } + + return limits, nil +} + +func validateResourceUnit(units types.ResourceUnits) (resourceLimits, error) { + limits := newLimits() + + val, err := validateCPU(units.CPU) + if err != nil { + return resourceLimits{}, err + } + limits.cpu = limits.cpu.Add(val) + + val, err = validateGPU(units.GPU) + if err != nil { + return resourceLimits{}, err + } + limits.gpu = limits.gpu.Add(val) + + val, err = validateMemory(units.Memory) + if err != nil { + return resourceLimits{}, err + } + limits.memory = limits.memory.Add(val) + + var storage []sdk.Int + storage, err = validateStorage(units.Storage) + if err != nil { + return resourceLimits{}, err + } + + // fixme this is not actually sum for storage usecase. + // do we really need sum here? + limits.storage = storage + + return limits, nil +} + +func validateCPU(u *types.CPU) (sdk.Int, error) { + if u == nil { + return sdk.Int{}, errors.Errorf("error: invalid unit CPU, cannot be nil") + } + if (u.Units.Value() > uint64(validationConfig.MaxUnitCPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitCPU)) { + return sdk.Int{}, errors.Errorf("error: invalid unit CPU (%v > %v > %v fails)", + validationConfig.MaxUnitCPU, u.Units.Value(), validationConfig.MinUnitCPU) + } + + return u.Units.Val, nil +} + +func validateGPU(u *types.GPU) (sdk.Int, error) { + if u == nil { + return sdk.Int{}, errors.Errorf("error: invalid unit GPU, cannot be nil") + } + if (u.Units.Value() > uint64(validationConfig.MaxUnitGPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitGPU)) { + return sdk.Int{}, errors.Errorf("error: invalid unit GPU (%v > %v > %v fails)", + validationConfig.MaxUnitGPU, u.Units.Value(), validationConfig.MinUnitGPU) + } + + return u.Units.Val, nil +} + +func validateMemory(u *types.Memory) (sdk.Int, error) { + if u == nil { + return sdk.Int{}, errors.Errorf("error: invalid unit memory, cannot be nil") + } + if (u.Quantity.Value() > validationConfig.MaxUnitMemory) || (u.Quantity.Value() < validationConfig.MinUnitMemory) { + return sdk.Int{}, errors.Errorf("error: invalid unit memory (%v > %v > %v fails)", + validationConfig.MaxUnitMemory, u.Quantity.Value(), validationConfig.MinUnitMemory) + } + + return u.Quantity.Val, nil +} + +func validateStorage(u types.Volumes) ([]sdk.Int, error) { + if u == nil { + return nil, errors.Errorf("error: invalid unit storage, cannot be nil") + } + + storage := make([]sdk.Int, 0, len(u)) + + for i := range u { + if (u[i].Quantity.Value() > validationConfig.MaxUnitStorage) || (u[i].Quantity.Value() < validationConfig.MinUnitStorage) { + return nil, errors.Errorf("error: invalid unit storage (%v > %v > %v fails)", + validationConfig.MaxUnitStorage, u[i].Quantity.Value(), validationConfig.MinUnitStorage) + } + + storage = append(storage, u[i].Quantity.Val) + } + + return storage, nil +} + +type resourceLimits struct { + cpu sdk.Int + gpu sdk.Int + memory sdk.Int + storage []sdk.Int +} + +func newLimits() resourceLimits { + return resourceLimits{ + cpu: sdk.ZeroInt(), + memory: sdk.ZeroInt(), + } +} + +func (u *resourceLimits) add(rhs resourceLimits) { + u.cpu = u.cpu.Add(rhs.cpu) + u.gpu = u.gpu.Add(rhs.gpu) + u.memory = u.memory.Add(rhs.memory) + + // u.storage = u.storage.Add(rhs.storage) +} + +func (u *resourceLimits) mul(count uint32) { + u.cpu = u.cpu.MulRaw(int64(count)) + u.gpu = u.gpu.MulRaw(int64(count)) + u.memory = u.memory.MulRaw(int64(count)) + for i := range u.storage { + u.storage[i] = u.storage[i].MulRaw(int64(count)) + } +} diff --git a/go/node/deployment/v1beta3/service.pb.go b/go/node/deployment/v1beta3/service.pb.go new file mode 100644 index 00000000..7bdea9d8 --- /dev/null +++ b/go/node/deployment/v1beta3/service.pb.go @@ -0,0 +1,365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta3/service.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// 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 + +func init() { + proto.RegisterFile("akash/deployment/v1beta3/service.proto", fileDescriptor_d88380ad17449a3c) +} + +var fileDescriptor_d88380ad17449a3c = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd3, 0x31, 0x4e, 0xeb, 0x30, + 0x18, 0xc0, 0xf1, 0x56, 0x4f, 0xea, 0xe0, 0xe5, 0x95, 0x4c, 0xc8, 0x83, 0x47, 0xba, 0xb4, 0xb6, + 0xa0, 0xc0, 0xc6, 0x42, 0x2b, 0x31, 0x55, 0x42, 0x20, 0x84, 0xc4, 0xe6, 0xb6, 0x1f, 0x6e, 0xd4, + 0x36, 0xb6, 0x6c, 0xa7, 0x14, 0x71, 0x09, 0x2e, 0xc1, 0x5d, 0x18, 0x3b, 0x32, 0xa2, 0xe4, 0x22, + 0x88, 0x50, 0xe2, 0x10, 0x48, 0x93, 0x8c, 0x49, 0x7e, 0xf9, 0xfe, 0x71, 0x64, 0xa3, 0x03, 0x3e, + 0xe7, 0x66, 0xc6, 0xa6, 0xa0, 0x16, 0xf2, 0x71, 0x09, 0x81, 0x65, 0xab, 0xc3, 0x31, 0x58, 0xde, + 0x67, 0x06, 0xf4, 0xca, 0x9f, 0x00, 0x55, 0x5a, 0x5a, 0xe9, 0xed, 0x27, 0x8e, 0x3a, 0x47, 0xb7, + 0x0e, 0x77, 0x0b, 0x27, 0xb8, 0x5b, 0x4b, 0x23, 0xbe, 0xe6, 0xe0, 0x4e, 0xa1, 0x16, 0x5a, 0x86, + 0x2a, 0x85, 0x47, 0x2f, 0x2d, 0xf4, 0x6f, 0x64, 0x84, 0xb7, 0x46, 0xed, 0x81, 0x06, 0x6e, 0x61, + 0x98, 0xbe, 0xe2, 0xf5, 0x68, 0xd1, 0xd7, 0xd0, 0x91, 0x11, 0x79, 0x8e, 0x4f, 0x6a, 0xf1, 0x2b, + 0x30, 0x4a, 0x06, 0x06, 0xbc, 0x27, 0xb4, 0x37, 0x04, 0x25, 0x8d, 0x6f, 0x33, 0x69, 0xba, 0x73, + 0xd6, 0x2f, 0x8f, 0x4f, 0xeb, 0xf9, 0x34, 0xbe, 0x46, 0xed, 0x1b, 0x35, 0xad, 0xb3, 0xec, 0x3c, + 0x2f, 0x59, 0x76, 0x9e, 0xa7, 0xe5, 0x10, 0xfd, 0x1f, 0x2c, 0xa4, 0xc9, 0x86, 0xbb, 0xbb, 0x7f, + 0xe0, 0x4f, 0x8d, 0x8f, 0xeb, 0xe8, 0x34, 0x7b, 0x8f, 0x50, 0xf2, 0xe8, 0xe2, 0x73, 0x1b, 0x78, + 0x9d, 0xf2, 0x19, 0x09, 0xc4, 0xac, 0x22, 0xcc, 0x76, 0x2e, 0x79, 0x58, 0xad, 0xe3, 0x60, 0x49, + 0xc7, 0xc1, 0x6c, 0xe7, 0xda, 0x72, 0x6d, 0xab, 0x74, 0x1c, 0x2c, 0xe9, 0x38, 0xf8, 0xdd, 0x39, + 0xbf, 0x7d, 0x8d, 0x48, 0x73, 0x13, 0x91, 0xe6, 0x7b, 0x44, 0x9a, 0xcf, 0x31, 0x69, 0x6c, 0x62, + 0xd2, 0x78, 0x8b, 0x49, 0xe3, 0xee, 0x4c, 0xf8, 0x76, 0x16, 0x8e, 0xe9, 0x44, 0x2e, 0x59, 0x32, + 0xb4, 0x17, 0x80, 0x7d, 0x90, 0x7a, 0xbe, 0xbd, 0xe2, 0xca, 0x67, 0x42, 0xb2, 0x40, 0x4e, 0xe1, + 0x8f, 0xf3, 0x38, 0x6e, 0x25, 0xe7, 0xb0, 0xff, 0x11, 0x00, 0x00, 0xff, 0xff, 0x17, 0xb5, 0xb4, + 0x10, 0x22, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateDeployment(ctx context.Context, in *MsgCreateDeployment, opts ...grpc.CallOption) (*MsgCreateDeploymentResponse, error) { + out := new(MsgCreateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/CreateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) { + out := new(MsgDepositDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/DepositDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateDeployment(ctx context.Context, in *MsgUpdateDeployment, opts ...grpc.CallOption) (*MsgUpdateDeploymentResponse, error) { + out := new(MsgUpdateDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/UpdateDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseDeployment(ctx context.Context, in *MsgCloseDeployment, opts ...grpc.CallOption) (*MsgCloseDeploymentResponse, error) { + out := new(MsgCloseDeploymentResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/CloseDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseGroup(ctx context.Context, in *MsgCloseGroup, opts ...grpc.CallOption) (*MsgCloseGroupResponse, error) { + out := new(MsgCloseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/CloseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PauseGroup(ctx context.Context, in *MsgPauseGroup, opts ...grpc.CallOption) (*MsgPauseGroupResponse, error) { + out := new(MsgPauseGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/PauseGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) StartGroup(ctx context.Context, in *MsgStartGroup, opts ...grpc.CallOption) (*MsgStartGroupResponse, error) { + out := new(MsgStartGroupResponse) + err := c.cc.Invoke(ctx, "/akash.deployment.v1beta3.Msg/StartGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateDeployment defines a method to create new deployment given proper inputs. + CreateDeployment(context.Context, *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) + // DepositDeployment deposits more funds into the deployment account + DepositDeployment(context.Context, *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) + // UpdateDeployment defines a method to update a deployment given proper inputs. + UpdateDeployment(context.Context, *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) + // CloseDeployment defines a method to close a deployment given proper inputs. + CloseDeployment(context.Context, *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) + // CloseGroup defines a method to close a group of a deployment given proper inputs. + CloseGroup(context.Context, *MsgCloseGroup) (*MsgCloseGroupResponse, error) + // PauseGroup defines a method to close a group of a deployment given proper inputs. + PauseGroup(context.Context, *MsgPauseGroup) (*MsgPauseGroupResponse, error) + // StartGroup defines a method to close a group of a deployment given proper inputs. + StartGroup(context.Context, *MsgStartGroup) (*MsgStartGroupResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateDeployment(ctx context.Context, req *MsgCreateDeployment) (*MsgCreateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDeployment not implemented") +} +func (*UnimplementedMsgServer) DepositDeployment(ctx context.Context, req *MsgDepositDeployment) (*MsgDepositDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositDeployment not implemented") +} +func (*UnimplementedMsgServer) UpdateDeployment(ctx context.Context, req *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseDeployment(ctx context.Context, req *MsgCloseDeployment) (*MsgCloseDeploymentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseDeployment not implemented") +} +func (*UnimplementedMsgServer) CloseGroup(ctx context.Context, req *MsgCloseGroup) (*MsgCloseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseGroup not implemented") +} +func (*UnimplementedMsgServer) PauseGroup(ctx context.Context, req *MsgPauseGroup) (*MsgPauseGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseGroup not implemented") +} +func (*UnimplementedMsgServer) StartGroup(ctx context.Context, req *MsgStartGroup) (*MsgStartGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartGroup not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/CreateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDeployment(ctx, req.(*MsgCreateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/DepositDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositDeployment(ctx, req.(*MsgDepositDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/UpdateDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateDeployment(ctx, req.(*MsgUpdateDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseDeployment) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/CloseDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseDeployment(ctx, req.(*MsgCloseDeployment)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/CloseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseGroup(ctx, req.(*MsgCloseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PauseGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPauseGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PauseGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/PauseGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PauseGroup(ctx, req.(*MsgPauseGroup)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_StartGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStartGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StartGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.deployment.v1beta3.Msg/StartGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StartGroup(ctx, req.(*MsgStartGroup)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.deployment.v1beta3.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDeployment", + Handler: _Msg_CreateDeployment_Handler, + }, + { + MethodName: "DepositDeployment", + Handler: _Msg_DepositDeployment_Handler, + }, + { + MethodName: "UpdateDeployment", + Handler: _Msg_UpdateDeployment_Handler, + }, + { + MethodName: "CloseDeployment", + Handler: _Msg_CloseDeployment_Handler, + }, + { + MethodName: "CloseGroup", + Handler: _Msg_CloseGroup_Handler, + }, + { + MethodName: "PauseGroup", + Handler: _Msg_PauseGroup_Handler, + }, + { + MethodName: "StartGroup", + Handler: _Msg_StartGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/deployment/v1beta3/service.proto", +} diff --git a/go/node/deployment/v1beta3/types.go b/go/node/deployment/v1beta3/types.go new file mode 100644 index 00000000..14e8f688 --- /dev/null +++ b/go/node/deployment/v1beta3/types.go @@ -0,0 +1,129 @@ +package v1beta3 + +import ( + "bytes" + + sdk "github.com/cosmos/cosmos-sdk/types" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +type attributesMatching map[string]types.Attributes + +const ( + // ManifestVersionLength is the length of manifest version + ManifestVersionLength = 32 + + // DefaultOrderBiddingDuration is the default time limit for an Order being active. + // After the duration, the Order is automatically closed. + // ( 24(hr) * 3600(seconds per hour) ) / 7s-Block + DefaultOrderBiddingDuration = int64(12342) + + // MaxBiddingDuration is roughly 30 days of block height + MaxBiddingDuration = DefaultOrderBiddingDuration * int64(30) +) + +// ID method returns DeploymentID details of specific deployment +func (obj Deployment) ID() DeploymentID { + return obj.DeploymentID +} + +// MatchAttributes method compares provided attributes with specific group attributes +func (g GroupSpec) MatchAttributes(attr types.Attributes) bool { + return types.AttributesSubsetOf(g.Requirements.Attributes, attr) +} + +// ID method returns GroupID details of specific group +func (g Group) ID() GroupID { + return g.GroupID +} + +// ValidateClosable provides error response if group is already closed, +// and thus should not be closed again, else nil. +func (g Group) ValidateClosable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + default: + return nil + } +} + +// ValidatePausable provides error response if group is not pausable +func (g Group) ValidatePausable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + case GroupPaused: + return ErrGroupPaused + default: + return nil + } +} + +// ValidatePausable provides error response if group is not pausable +func (g Group) ValidateStartable() error { + switch g.State { + case GroupClosed: + return ErrGroupClosed + case GroupOpen: + return ErrGroupOpen + default: + return nil + } +} + +// GetName method returns group name +func (g Group) GetName() string { + return g.GroupSpec.Name +} + +// GetResources method returns resources list in group +func (g Group) GetResources() []types.Resources { + return g.GroupSpec.GetResources() +} + +// FullPrice method returns full price of resource +func (r Resource) FullPrice() sdk.DecCoin { + return sdk.NewDecCoinFromDec(r.Price.Denom, r.Price.Amount.MulInt64(int64(r.Count))) +} + +// DeploymentResponses is a collection of DeploymentResponse +type DeploymentResponses []QueryDeploymentResponse + +func (ds DeploymentResponses) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, d := range ds { + buf.WriteString(d.String()) + buf.WriteString(sep) + } + + if len(ds) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +// Accept returns whether deployment filters valid or not +func (filters DeploymentFilters) Accept(obj Deployment, stateVal Deployment_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.DeploymentID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.DeploymentID.DSeq { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} diff --git a/go/node/deployment/v1beta3/types_test.go b/go/node/deployment/v1beta3/types_test.go new file mode 100644 index 00000000..fe2daa0b --- /dev/null +++ b/go/node/deployment/v1beta3/types_test.go @@ -0,0 +1,358 @@ +package v1beta3_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + abci "github.com/tendermint/tendermint/abci/types" + + "github.com/akash-network/node/sdkutil" + "github.com/akash-network/node/testutil" + + akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" + + atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" + + types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +type gStateTest struct { + state types.Group_State + expValidateClosable error +} + +func TestGroupState(t *testing.T) { + tests := []gStateTest{ + { + state: types.GroupOpen, + }, + { + state: types.GroupOpen, + }, + { + state: types.GroupInsufficientFunds, + }, + { + state: types.GroupClosed, + expValidateClosable: types.ErrGroupClosed, + }, + { + state: types.Group_State(99), + }, + } + + for _, test := range tests { + group := types.Group{ + GroupID: testutil.GroupID(t), + State: test.state, + } + + assert.Equal(t, group.ValidateClosable(), test.expValidateClosable, group.State) + } +} + +func TestDeploymentVersionAttributeLifecycle(t *testing.T) { + d := testutil.Deployment(t) + + t.Run("deployment created", func(t *testing.T) { + edc := types.NewEventDeploymentCreated(d.ID(), d.Version) + sdkEvent := edc.ToSDKEvent() + strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) + + ev, err := sdkutil.ParseEvent(strEvent) + require.NoError(t, err) + + versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + require.NoError(t, err) + assert.Equal(t, d.Version, versionString) + }) + + t.Run("deployment updated", func(t *testing.T) { + edu := types.NewEventDeploymentUpdated(d.ID(), d.Version) + + sdkEvent := edu.ToSDKEvent() + strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) + + ev, err := sdkutil.ParseEvent(strEvent) + require.NoError(t, err) + + versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + require.NoError(t, err) + assert.Equal(t, d.Version, versionString) + }) + + t.Run("deployment closed error", func(t *testing.T) { + edc := types.NewEventDeploymentClosed(d.ID()) + + sdkEvent := edc.ToSDKEvent() + strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) + + ev, err := sdkutil.ParseEvent(strEvent) + require.NoError(t, err) + + versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + require.Error(t, err) + assert.NotEqual(t, d.Version, versionString) + }) +} + +func TestGroupSpecValidation(t *testing.T) { + tests := []struct { + desc string + gspec types.GroupSpec + expErr error + }{ + { + desc: "groupspec requires name", + gspec: types.GroupSpec{ + Name: "", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + }, + expErr: types.ErrInvalidGroups, + }, + { + desc: "groupspec valid", + gspec: types.GroupSpec{ + Name: "hihi", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + }, + expErr: nil, + }, + } + + for _, test := range tests { + err := test.gspec.ValidateBasic() + if test.expErr != nil { + assert.Error(t, err, test.desc) + continue + } + assert.Equal(t, test.expErr, err, test.desc) + } +} + +func TestGroupPlacementRequirementsNoSigners(t *testing.T) { + group := types.GroupSpec{ + Name: "spec", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + } + + providerAttr := []atypes.Provider{ + { + Owner: "test", + Attributes: group.Requirements.Attributes, + }, + } + + require.True(t, group.MatchRequirements(providerAttr)) +} + +func TestGroupPlacementRequirementsSignerAllOf(t *testing.T) { + group := types.GroupSpec{ + Name: "spec", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + } + + group.Requirements.SignedBy.AllOf = append(group.Requirements.SignedBy.AllOf, "auditor1") + group.Requirements.SignedBy.AllOf = append(group.Requirements.SignedBy.AllOf, "auditor2") + + providerAttr := []atypes.Provider{ + { + Owner: "test", + Attributes: group.Requirements.Attributes, + }, + } + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor2", + Attributes: group.Requirements.Attributes, + }) + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor1", + Attributes: group.Requirements.Attributes, + }) + + require.True(t, group.MatchRequirements(providerAttr)) +} + +func TestGroupPlacementRequirementsSignerAnyOf(t *testing.T) { + group := types.GroupSpec{ + Name: "spec", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + } + + group.Requirements.SignedBy.AnyOf = append(group.Requirements.SignedBy.AnyOf, "auditor1") + + providerAttr := []atypes.Provider{ + { + Owner: "test", + Attributes: group.Requirements.Attributes, + }, + } + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor2", + Attributes: group.Requirements.Attributes, + }) + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor1", + Attributes: group.Requirements.Attributes, + }) + + require.True(t, group.MatchRequirements(providerAttr)) +} + +func TestGroupPlacementRequirementsSignerAllOfAnyOf(t *testing.T) { + group := types.GroupSpec{ + Name: "spec", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + } + + group.Requirements.SignedBy.AllOf = append(group.Requirements.SignedBy.AllOf, "auditor1") + group.Requirements.SignedBy.AllOf = append(group.Requirements.SignedBy.AllOf, "auditor2") + + group.Requirements.SignedBy.AnyOf = append(group.Requirements.SignedBy.AnyOf, "auditor3") + group.Requirements.SignedBy.AnyOf = append(group.Requirements.SignedBy.AnyOf, "auditor4") + + providerAttr := []atypes.Provider{ + { + Owner: "test", + Attributes: group.Requirements.Attributes, + }, + { + Owner: "test", + Auditor: "auditor3", + Attributes: group.Requirements.Attributes, + }, + { + Owner: "test", + Auditor: "auditor4", + Attributes: group.Requirements.Attributes, + }, + } + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor2", + Attributes: group.Requirements.Attributes, + }) + + require.False(t, group.MatchRequirements(providerAttr)) + + providerAttr = append(providerAttr, atypes.Provider{ + Owner: "test", + Auditor: "auditor1", + Attributes: group.Requirements.Attributes, + }) + + require.True(t, group.MatchRequirements(providerAttr)) +} + +func TestGroupSpec_MatchResourcesAttributes(t *testing.T) { + group := types.GroupSpec{ + Name: "spec", + Requirements: testutil.PlacementRequirements(t), + Resources: testutil.Resources(t), + } + + group.Resources[0].Resources.Storage[0].Attributes = akashtypes.Attributes{ + { + Key: "persistent", + Value: "true", + }, + { + Key: "class", + Value: "default", + }, + } + + provAttributes := akashtypes.Attributes{ + { + Key: "capabilities/storage/1/class", + Value: "default", + }, + { + Key: "capabilities/storage/1/persistent", + Value: "true", + }, + } + + prov2Attributes := akashtypes.Attributes{ + { + Key: "capabilities/storage/1/class", + Value: "default", + }, + } + + prov3Attributes := akashtypes.Attributes{ + { + Key: "capabilities/storage/1/class", + Value: "beta2", + }, + } + + require.True(t, group.MatchResourcesRequirements(provAttributes)) + require.False(t, group.MatchResourcesRequirements(prov2Attributes)) + require.False(t, group.MatchResourcesRequirements(prov3Attributes)) +} + +func TestDepositDeploymentAuthorization_Accept(t *testing.T) { + limit := sdk.NewInt64Coin(testutil.CoinDenom, 333) + dda := types.NewDepositDeploymentAuthorization(limit) + + // Send the wrong type of message, expect an error + var msg sdk.Msg + response, err := dda.Accept(sdk.Context{}, msg) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid type") + require.Zero(t, response) + + // Try to deposit too much coin, expect an error + msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), limit.Add(sdk.NewInt64Coin(testutil.CoinDenom, 1)), testutil.AccAddress(t).String()) + response, err = dda.Accept(sdk.Context{}, msg) + require.Error(t, err) + require.Contains(t, err.Error(), "requested amount is more than spend limit") + require.Zero(t, response) + + // Deposit 1 less than the limit, expect an updated deposit + msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), limit.Sub(sdk.NewInt64Coin(testutil.CoinDenom, 1)), testutil.AccAddress(t).String()) + response, err = dda.Accept(sdk.Context{}, msg) + require.NoError(t, err) + require.True(t, response.Accept) + require.False(t, response.Delete) + + ok := false + dda, ok = response.Updated.(*types.DepositDeploymentAuthorization) + require.True(t, ok) + + // Deposit the limit (now 1), expect that it is deleted + msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), sdk.NewInt64Coin(testutil.CoinDenom, 1), testutil.AccAddress(t).String()) + response, err = dda.Accept(sdk.Context{}, msg) + require.NoError(t, err) + require.True(t, response.Accept) + require.True(t, response.Delete) +} diff --git a/go/node/deployment/v1beta3/validation_config.go b/go/node/deployment/v1beta3/validation_config.go new file mode 100644 index 00000000..9dbc907c --- /dev/null +++ b/go/node/deployment/v1beta3/validation_config.go @@ -0,0 +1,68 @@ +package v1beta3 + +import "github.com/akash-network/node/types/unit" + +// This is the validation configuration that acts as a hard limit +// on what the network accepts for deployments. This is never changed +// and is the same across all members of the network + +type ValidationConfig struct { + // MaxUnitCPU is the maximum number of milli (1/1000) cpu units a unit can consume. + MaxUnitCPU uint + MaxUnitGPU uint + // MaxUnitMemory is the maximum number of bytes of memory that a unit can consume + MaxUnitMemory uint64 + // MaxUnitStorage is the maximum number of bytes of storage that a unit can consume + MaxUnitStorage uint64 + // MaxUnitCount is the maximum number of replias of a service + MaxUnitCount uint + // MaxUnitPrice is the maximum price that a unit can have + MaxUnitPrice uint64 + + MinUnitCPU uint + MinUnitGPU uint + MinUnitMemory uint64 + MinUnitStorage uint64 + MinUnitCount uint + + // MaxGroupCount is the maximum number of groups allowed per deployment + MaxGroupCount int + // MaxGroupUnits is the maximum number services per group + MaxGroupUnits int + + // MaxGroupCPU is the maximum total amount of CPU requested per group + MaxGroupCPU uint64 + // MaxGroupGPU is the maximum total amount of GPU requested per group + MaxGroupGPU uint64 + // MaxGroupMemory is the maximum total amount of memory requested per group + MaxGroupMemory uint64 + // MaxGroupStorage is the maximum total amount of storage requested per group + MaxGroupStorage uint64 +} + +var validationConfig = ValidationConfig{ + MaxUnitCPU: 256 * 1000, // 256 CPUs + MaxUnitGPU: 100, + MaxUnitMemory: 512 * unit.Gi, // 512 Gi + MaxUnitStorage: 32 * unit.Ti, // 32 Ti + MaxUnitCount: 50, + MaxUnitPrice: 10000000, // 10akt + + MinUnitCPU: 10, + MinUnitGPU: 0, + MinUnitMemory: unit.Mi, + MinUnitStorage: 5 * unit.Mi, + MinUnitCount: 1, + + MaxGroupCount: 20, + MaxGroupUnits: 20, + + MaxGroupCPU: 512 * 1000, + MaxGroupGPU: 512, + MaxGroupMemory: 1024 * unit.Gi, + MaxGroupStorage: 32 * unit.Ti, +} + +func GetValidationConfig() ValidationConfig { + return validationConfig +} diff --git a/go/node/escrow/v1beta1/genesis.pb.go b/go/node/escrow/v1beta1/genesis.pb.go new file mode 100644 index 00000000..a971f0b9 --- /dev/null +++ b/go/node/escrow/v1beta1/genesis.pb.go @@ -0,0 +1,398 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta1/genesis.proto + +package v1beta1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by escrow module +type GenesisState struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts" yaml:"accounts"` + Payments []Payment `protobuf:"bytes,2,rep,name=payments,proto3" json:"payments" yaml:"payments"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_97636f5fac6c1bea, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisState) GetPayments() []Payment { + if m != nil { + return m.Payments + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.escrow.v1beta1.GenesisState") +} + +func init() { + proto.RegisterFile("akash/escrow/v1beta1/genesis.proto", fileDescriptor_97636f5fac6c1bea) +} + +var fileDescriptor_97636f5fac6c1bea = []byte{ + // 260 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, + 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x14, 0xb0, 0x9a, 0x57, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x4d, + 0xe9, 0x1c, 0x23, 0x17, 0x8f, 0x3b, 0xc4, 0xfc, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0xa1, 0x38, 0x2e, + 0x8e, 0xc4, 0xe4, 0xe4, 0xfc, 0xd2, 0xbc, 0x92, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, + 0x59, 0x3d, 0x6c, 0x36, 0xea, 0x39, 0x42, 0x54, 0x39, 0x29, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, + 0x9e, 0x3c, 0x5c, 0xdb, 0xa7, 0x7b, 0xf2, 0xfc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x30, 0x11, + 0xa5, 0x20, 0xb8, 0x24, 0xc8, 0xfc, 0x82, 0xc4, 0xca, 0xdc, 0x54, 0x90, 0xf9, 0x4c, 0xf8, 0xcc, + 0x0f, 0x80, 0xa8, 0x42, 0x98, 0x0f, 0xd3, 0x86, 0x30, 0x1f, 0x26, 0xa2, 0x14, 0x04, 0x97, 0x74, + 0x0a, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, + 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xcb, 0xf4, 0xcc, 0x92, + 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x8d, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, + 0x45, 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x5a, + 0x88, 0x25, 0xb1, 0x81, 0x03, 0xcb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x75, 0xff, 0x04, 0xce, + 0xa0, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Payments) > 0 { + for _, e := range m.Payments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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 Payments", 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.Payments = append(m.Payments, Payment{}) + if err := m.Payments[len(m.Payments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta1/query.pb.go b/go/node/escrow/v1beta1/query.pb.go new file mode 100644 index 00000000..48ed4952 --- /dev/null +++ b/go/node/escrow/v1beta1/query.pb.go @@ -0,0 +1,1604 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta1/query.proto + +package v1beta1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryAccountRequest is request type for the Query/Account RPC method +type QueryAccountsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsRequest) Reset() { *m = QueryAccountsRequest{} } +func (m *QueryAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsRequest) ProtoMessage() {} +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_70738d9a3b2d7124, []int{0} +} +func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsRequest.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 *QueryAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsRequest.Merge(m, src) +} +func (m *QueryAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsRequest proto.InternalMessageInfo + +func (m *QueryAccountsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryAccountsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryAccountsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryAccountsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryAccountsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryAccountsResponse struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } +func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_70738d9a3b2d7124, []int{1} +} +func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsResponse.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 *QueryAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsResponse.Merge(m, src) +} +func (m *QueryAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo + +func (m *QueryAccountsResponse) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryAccountsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +type QueryPaymentsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsRequest) Reset() { *m = QueryPaymentsRequest{} } +func (m *QueryPaymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsRequest) ProtoMessage() {} +func (*QueryPaymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_70738d9a3b2d7124, []int{2} +} +func (m *QueryPaymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsRequest.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 *QueryPaymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsRequest.Merge(m, src) +} +func (m *QueryPaymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsRequest proto.InternalMessageInfo + +func (m *QueryPaymentsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryPaymentsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryPaymentsRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *QueryPaymentsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryPaymentsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryPaymentsResponse struct { + Payments []Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsResponse) Reset() { *m = QueryPaymentsResponse{} } +func (m *QueryPaymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsResponse) ProtoMessage() {} +func (*QueryPaymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_70738d9a3b2d7124, []int{3} +} +func (m *QueryPaymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsResponse.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 *QueryPaymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsResponse.Merge(m, src) +} +func (m *QueryPaymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsResponse proto.InternalMessageInfo + +func (m *QueryPaymentsResponse) GetPayments() []Payment { + if m != nil { + return m.Payments + } + return nil +} + +func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryAccountsRequest)(nil), "akash.escrow.v1beta1.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "akash.escrow.v1beta1.QueryAccountsResponse") + proto.RegisterType((*QueryPaymentsRequest)(nil), "akash.escrow.v1beta1.QueryPaymentsRequest") + proto.RegisterType((*QueryPaymentsResponse)(nil), "akash.escrow.v1beta1.QueryPaymentsResponse") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta1/query.proto", fileDescriptor_70738d9a3b2d7124) } + +var fileDescriptor_70738d9a3b2d7124 = []byte{ + // 493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0x4b, 0x52, 0x15, 0x57, 0x42, 0xc8, 0x0a, 0xd2, 0x29, 0x82, 0x23, 0xca, 0x00, + 0xa1, 0x15, 0xb6, 0x12, 0x26, 0x26, 0x44, 0x07, 0x58, 0x4b, 0xd8, 0xd8, 0x9c, 0xcb, 0xd3, 0xf5, + 0xd4, 0xc6, 0xef, 0x7a, 0x76, 0x08, 0x59, 0xf9, 0x04, 0x48, 0x48, 0xec, 0x7c, 0x05, 0x36, 0x56, + 0xa6, 0x8e, 0x95, 0x58, 0x98, 0x10, 0x4a, 0xf8, 0x20, 0xe8, 0x6c, 0x5f, 0xd3, 0x46, 0xd7, 0x50, + 0x01, 0xdb, 0xd9, 0xf9, 0x3f, 0xbf, 0x9f, 0x7f, 0x79, 0x77, 0xb4, 0x23, 0x8f, 0xa4, 0x3e, 0x14, + 0xa0, 0xe3, 0x1c, 0x67, 0xe2, 0x4d, 0x7f, 0x04, 0x46, 0xf6, 0xc5, 0xc9, 0x14, 0xf2, 0x39, 0xcf, + 0x72, 0x34, 0xc8, 0x5a, 0x36, 0xc1, 0x5d, 0x82, 0xfb, 0x44, 0xbb, 0x95, 0x60, 0x82, 0x36, 0x20, + 0x8a, 0x27, 0x97, 0x6d, 0xdf, 0x49, 0x10, 0x93, 0x63, 0x10, 0x32, 0x4b, 0x85, 0x54, 0x0a, 0x8d, + 0x34, 0x29, 0x2a, 0xed, 0x7f, 0xdd, 0x8d, 0x51, 0x4f, 0x50, 0x8b, 0x91, 0xd4, 0xe0, 0x5a, 0x9c, + 0x37, 0xcc, 0x64, 0x92, 0x2a, 0x1b, 0xf6, 0xd9, 0x6a, 0x2e, 0x33, 0xcf, 0xc0, 0x9f, 0xd6, 0xfd, + 0x4c, 0x68, 0xeb, 0x65, 0x71, 0xc8, 0xb3, 0x38, 0xc6, 0xa9, 0x32, 0x7a, 0x08, 0x27, 0x53, 0xd0, + 0x86, 0xb5, 0x68, 0x53, 0xc7, 0x98, 0x41, 0x48, 0x3a, 0xa4, 0x77, 0x63, 0xe8, 0x16, 0xec, 0x16, + 0xad, 0xbf, 0x4d, 0xc7, 0x61, 0x60, 0xf7, 0x8a, 0xc7, 0x22, 0x87, 0x33, 0x05, 0x79, 0x58, 0x77, + 0x39, 0xbb, 0xb0, 0xd5, 0x46, 0x1a, 0x08, 0x1b, 0xbe, 0xba, 0x58, 0xb0, 0xe7, 0x94, 0xae, 0x10, + 0xc3, 0x66, 0x87, 0xf4, 0x76, 0x06, 0xf7, 0xb9, 0xbb, 0x0f, 0x2f, 0xee, 0xc3, 0x9d, 0x32, 0x0f, + 0xca, 0x0f, 0x64, 0x02, 0x9e, 0x67, 0x78, 0xa1, 0xb2, 0xfb, 0x89, 0xd0, 0xdb, 0x6b, 0xd0, 0x3a, + 0x43, 0xa5, 0x81, 0x3d, 0xa5, 0xdb, 0xd2, 0xef, 0x85, 0xa4, 0x53, 0xef, 0xed, 0x0c, 0xee, 0xf2, + 0x2a, 0xf3, 0xdc, 0x57, 0xee, 0x37, 0x4e, 0x7f, 0xdc, 0xab, 0x0d, 0xcf, 0x8b, 0xd8, 0x8b, 0x4b, + 0x88, 0x81, 0x45, 0x7c, 0xf0, 0x47, 0x44, 0xd7, 0xfd, 0x12, 0xe3, 0xd7, 0x52, 0xec, 0x81, 0x9c, + 0x4f, 0xe0, 0x2f, 0xc4, 0xde, 0xa4, 0x41, 0x3a, 0xf6, 0x56, 0x83, 0x8b, 0xa2, 0x1b, 0x95, 0xa2, + 0x9b, 0x57, 0x8b, 0xde, 0xfa, 0x77, 0xd1, 0xab, 0x4b, 0xac, 0x44, 0x67, 0x7e, 0x6f, 0xb3, 0x68, + 0x5f, 0x59, 0x8a, 0x2e, 0x8b, 0xfe, 0x9b, 0xe8, 0xc1, 0x97, 0x80, 0x36, 0x2d, 0x23, 0xfb, 0x48, + 0xe8, 0x76, 0x39, 0x11, 0x6c, 0xb7, 0x1a, 0xa7, 0x6a, 0xd6, 0xdb, 0x7b, 0xd7, 0xca, 0xba, 0xde, + 0xdd, 0xfe, 0xbb, 0x6f, 0xbf, 0x3e, 0x04, 0x7b, 0xec, 0xa1, 0xb8, 0xfa, 0xe5, 0x12, 0xe5, 0x3c, + 0x89, 0xe3, 0x54, 0x1b, 0x0b, 0x56, 0x1a, 0xdc, 0x08, 0xb6, 0x36, 0x2b, 0x1b, 0xc1, 0xd6, 0xff, + 0x92, 0xeb, 0x81, 0x95, 0xfe, 0x2d, 0xd8, 0xfe, 0xab, 0xd3, 0x45, 0x44, 0xce, 0x16, 0x11, 0xf9, + 0xb9, 0x88, 0xc8, 0xfb, 0x65, 0x54, 0x3b, 0x5b, 0x46, 0xb5, 0xef, 0xcb, 0xa8, 0xf6, 0xfa, 0x49, + 0x92, 0x9a, 0xc3, 0xe9, 0x88, 0xc7, 0x38, 0x71, 0xc7, 0x3d, 0x52, 0x60, 0x66, 0x98, 0x1f, 0xf9, + 0x55, 0xf1, 0x6d, 0x4a, 0x50, 0x28, 0x1c, 0xc3, 0x5a, 0xa3, 0xd1, 0x96, 0xfd, 0xb2, 0x3c, 0xfe, + 0x1d, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xb5, 0x17, 0x9a, 0x15, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta1.Query/Accounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) { + out := new(QueryPaymentsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta1.Query/Payments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(context.Context, *QueryPaymentsRequest) (*QueryPaymentsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") +} +func (*UnimplementedQueryServer) Payments(ctx context.Context, req *QueryPaymentsRequest) (*QueryPaymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Payments not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta1.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Payments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPaymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Payments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta1.Query/Payments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Payments(ctx, req.(*QueryPaymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.escrow.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, + }, + { + MethodName: "Payments", + Handler: _Query_Payments_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/escrow/v1beta1/query.proto", +} + +func (m *QueryAccountsRequest) 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 *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsRequest) 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] = 0x2a + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x22 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsResponse) 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.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[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 (m *QueryPaymentsRequest) 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 *QueryPaymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsRequest) 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] = 0x32 + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x22 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPaymentsResponse) 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 *QueryPaymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsResponse) 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.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[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 *QueryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + 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 (m *QueryPaymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPaymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Payments) > 0 { + for _, e := range m.Payments { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountsRequest) 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: QueryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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) + } + 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.PageResponse{} + } + 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 *QueryPaymentsRequest) 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: QueryPaymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + 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 *QueryPaymentsResponse) 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: QueryPaymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payments", 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.Payments = append(m.Payments, Payment{}) + if err := m.Payments[len(m.Payments)-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) + } + 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.PageResponse{} + } + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta1/query.pb.gw.go b/go/node/escrow/v1beta1/query.pb.gw.go new file mode 100644 index 00000000..33d1d941 --- /dev/null +++ b/go/node/escrow/v1beta1/query.pb.gw.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/escrow/v1beta1/query.proto + +/* +Package v1beta1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Accounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Accounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Payments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Payments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Payments(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Accounts_0 = runtime.ForwardResponseMessage + + forward_Query_Payments_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/escrow/v1beta1/types.pb.go b/go/node/escrow/v1beta1/types.pb.go new file mode 100644 index 00000000..abe834dc --- /dev/null +++ b/go/node/escrow/v1beta1/types.pb.go @@ -0,0 +1,1353 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta1/types.proto + +package v1beta1 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State stores state for an escrow account +type Account_State int32 + +const ( + // AccountStateInvalid is an invalid state + AccountStateInvalid Account_State = 0 + // AccountOpen is the state when an account is open + AccountOpen Account_State = 1 + // AccountClosed is the state when an account is closed + AccountClosed Account_State = 2 + // AccountOverdrawn is the state when an account is overdrawn + AccountOverdrawn Account_State = 3 +) + +var Account_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var Account_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x Account_State) String() string { + return proto.EnumName(Account_State_name, int32(x)) +} + +func (Account_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3d89eca75409f317, []int{1, 0} +} + +// Payment State +type Payment_State int32 + +const ( + // PaymentStateInvalid is the state when the payment is invalid + PaymentStateInvalid Payment_State = 0 + // PaymentStateOpen is the state when the payment is open + PaymentOpen Payment_State = 1 + // PaymentStateClosed is the state when the payment is closed + PaymentClosed Payment_State = 2 + // PaymentStateOverdrawn is the state when the payment is overdrawn + PaymentOverdrawn Payment_State = 3 +) + +var Payment_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var Payment_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x Payment_State) String() string { + return proto.EnumName(Payment_State_name, int32(x)) +} + +func (Payment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3d89eca75409f317, []int{2, 0} +} + +// AccountID is the account identifier +type AccountID struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope" yaml:"scope"` + XID string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid" yaml:"xid"` +} + +func (m *AccountID) Reset() { *m = AccountID{} } +func (m *AccountID) String() string { return proto.CompactTextString(m) } +func (*AccountID) ProtoMessage() {} +func (*AccountID) Descriptor() ([]byte, []int) { + return fileDescriptor_3d89eca75409f317, []int{0} +} +func (m *AccountID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountID.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 *AccountID) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountID.Merge(m, src) +} +func (m *AccountID) XXX_Size() int { + return m.Size() +} +func (m *AccountID) XXX_DiscardUnknown() { + xxx_messageInfo_AccountID.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountID proto.InternalMessageInfo + +func (m *AccountID) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *AccountID) GetXID() string { + if m != nil { + return m.XID + } + return "" +} + +// Account stores state for an escrow account +type Account struct { + // unique identifier for this escrow account + ID AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + // bech32 encoded account address of the owner of this escrow account + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner" yaml:"owner"` + // current state of this escrow account + State Account_State `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.v1beta1.Account_State" json:"state" yaml:"state"` + // unspent coins received from the owner's wallet + Balance types.Coin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"` + // total coins spent by this account + Transferred types.Coin `protobuf:"bytes,5,opt,name=transferred,proto3" json:"transferred" yaml:"transferred"` + // block height at which this account was last settled + SettledAt int64 `protobuf:"varint,6,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"` +} + +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { + return fileDescriptor_3d89eca75409f317, []int{1} +} +func (m *Account) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Account.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 *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(m, src) +} +func (m *Account) XXX_Size() int { + return m.Size() +} +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) +} + +var xxx_messageInfo_Account proto.InternalMessageInfo + +func (m *Account) GetID() AccountID { + if m != nil { + return m.ID + } + return AccountID{} +} + +func (m *Account) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Account) GetState() Account_State { + if m != nil { + return m.State + } + return AccountStateInvalid +} + +func (m *Account) GetBalance() types.Coin { + if m != nil { + return m.Balance + } + return types.Coin{} +} + +func (m *Account) GetTransferred() types.Coin { + if m != nil { + return m.Transferred + } + return types.Coin{} +} + +func (m *Account) GetSettledAt() int64 { + if m != nil { + return m.SettledAt + } + return 0 +} + +// Payment stores state for a payment +type Payment struct { + AccountID AccountID `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"accountID" yaml:"accountID"` + PaymentID string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"paymentID" yaml:"paymentID"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" yaml:"owner"` + State Payment_State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1beta1.Payment_State" json:"state" yaml:"state"` + Rate types.Coin `protobuf:"bytes,5,opt,name=rate,proto3" json:"rate" yaml:"rate"` + Balance types.Coin `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance" yaml:"balance"` + Withdrawn types.Coin `protobuf:"bytes,7,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"` +} + +func (m *Payment) Reset() { *m = Payment{} } +func (m *Payment) String() string { return proto.CompactTextString(m) } +func (*Payment) ProtoMessage() {} +func (*Payment) Descriptor() ([]byte, []int) { + return fileDescriptor_3d89eca75409f317, []int{2} +} +func (m *Payment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Payment.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 *Payment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Payment.Merge(m, src) +} +func (m *Payment) XXX_Size() int { + return m.Size() +} +func (m *Payment) XXX_DiscardUnknown() { + xxx_messageInfo_Payment.DiscardUnknown(m) +} + +var xxx_messageInfo_Payment proto.InternalMessageInfo + +func (m *Payment) GetAccountID() AccountID { + if m != nil { + return m.AccountID + } + return AccountID{} +} + +func (m *Payment) GetPaymentID() string { + if m != nil { + return m.PaymentID + } + return "" +} + +func (m *Payment) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Payment) GetState() Payment_State { + if m != nil { + return m.State + } + return PaymentStateInvalid +} + +func (m *Payment) GetRate() types.Coin { + if m != nil { + return m.Rate + } + return types.Coin{} +} + +func (m *Payment) GetBalance() types.Coin { + if m != nil { + return m.Balance + } + return types.Coin{} +} + +func (m *Payment) GetWithdrawn() types.Coin { + if m != nil { + return m.Withdrawn + } + return types.Coin{} +} + +func init() { + proto.RegisterEnum("akash.escrow.v1beta1.Account_State", Account_State_name, Account_State_value) + proto.RegisterEnum("akash.escrow.v1beta1.Payment_State", Payment_State_name, Payment_State_value) + proto.RegisterType((*AccountID)(nil), "akash.escrow.v1beta1.AccountID") + proto.RegisterType((*Account)(nil), "akash.escrow.v1beta1.Account") + proto.RegisterType((*Payment)(nil), "akash.escrow.v1beta1.Payment") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta1/types.proto", fileDescriptor_3d89eca75409f317) } + +var fileDescriptor_3d89eca75409f317 = []byte{ + // 735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0x8d, 0xf3, 0xa9, 0x4c, 0xde, 0xeb, 0xcb, 0xf3, 0xab, 0xf4, 0xd2, 0x40, 0x3d, 0xc6, 0x05, + 0xa9, 0x2c, 0xb0, 0xd5, 0xb2, 0xa2, 0xbb, 0xa6, 0xdd, 0x14, 0x89, 0x0f, 0xb9, 0x08, 0x21, 0x16, + 0x54, 0x13, 0x7b, 0x9a, 0x5a, 0x4d, 0x3c, 0x96, 0x3d, 0x6d, 0xda, 0x3d, 0x0b, 0x94, 0x15, 0x62, + 0xc5, 0x26, 0x12, 0x12, 0x7f, 0xa6, 0xcb, 0x2e, 0x59, 0x8d, 0x50, 0xba, 0xcb, 0x32, 0xbf, 0x00, + 0xcd, 0x87, 0xed, 0x80, 0xaa, 0xb4, 0x48, 0xac, 0x92, 0x7b, 0xee, 0xb9, 0xc7, 0xd7, 0x67, 0xce, + 0xc8, 0xc0, 0x44, 0xc7, 0x28, 0x39, 0x72, 0x70, 0xe2, 0xc5, 0x64, 0xe8, 0x9c, 0x6e, 0x74, 0x31, + 0x45, 0x1b, 0x0e, 0x3d, 0x8f, 0x70, 0x62, 0x47, 0x31, 0xa1, 0x44, 0x5f, 0x16, 0x0c, 0x5b, 0x32, + 0x6c, 0xc5, 0x68, 0x2f, 0xf7, 0x48, 0x8f, 0x08, 0x82, 0xc3, 0xff, 0x49, 0x6e, 0xdb, 0xf0, 0x48, + 0x32, 0x20, 0x89, 0xd3, 0x45, 0x09, 0xce, 0xc4, 0x3c, 0x12, 0x84, 0xb2, 0x6f, 0xf5, 0x41, 0x7d, + 0xdb, 0xf3, 0xc8, 0x49, 0x48, 0xf7, 0x76, 0x75, 0x07, 0x54, 0x12, 0x8f, 0x44, 0xb8, 0xa5, 0x99, + 0xda, 0x7a, 0xbd, 0xb3, 0x32, 0x65, 0x50, 0x02, 0x33, 0x06, 0xff, 0x3a, 0x47, 0x83, 0xfe, 0x96, + 0x25, 0x4a, 0xcb, 0x95, 0xb0, 0x6e, 0x83, 0xd2, 0x59, 0xe0, 0xb7, 0x8a, 0x82, 0x7e, 0x77, 0xc2, + 0x60, 0xe9, 0xcd, 0xde, 0xee, 0x94, 0x41, 0x8e, 0xce, 0x18, 0x04, 0x72, 0xe6, 0x2c, 0xf0, 0x2d, + 0x97, 0x43, 0xd6, 0xfb, 0x0a, 0xa8, 0xa9, 0xc7, 0xe9, 0xcf, 0x41, 0x31, 0xf0, 0xc5, 0x93, 0x1a, + 0x9b, 0xd0, 0xbe, 0xee, 0x95, 0xec, 0x6c, 0xb3, 0xce, 0xea, 0x05, 0x83, 0x85, 0x09, 0x83, 0x45, + 0x21, 0x5f, 0x14, 0xea, 0x75, 0xa9, 0xce, 0xc5, 0x8b, 0x81, 0xcf, 0x97, 0x27, 0xc3, 0x10, 0xc7, + 0x6a, 0x1b, 0xb1, 0xbc, 0x00, 0xf2, 0xe5, 0x45, 0x69, 0xb9, 0x12, 0xd6, 0x5f, 0x81, 0x4a, 0x42, + 0x11, 0xc5, 0xad, 0x92, 0xa9, 0xad, 0x2f, 0x6d, 0xae, 0x2d, 0xdc, 0xc1, 0xde, 0xe7, 0x54, 0x65, + 0x09, 0xff, 0x3b, 0x67, 0x09, 0x2f, 0xb9, 0x25, 0xfc, 0x57, 0x7f, 0x0d, 0x6a, 0x5d, 0xd4, 0x47, + 0xa1, 0x87, 0x5b, 0x65, 0xf1, 0x6e, 0x2b, 0xb6, 0x3c, 0x02, 0x9b, 0x1f, 0x41, 0x26, 0xbb, 0x43, + 0x82, 0xb0, 0x73, 0x8f, 0xbf, 0xd5, 0x94, 0xc1, 0x74, 0x62, 0xc6, 0xe0, 0x92, 0xd4, 0x54, 0x80, + 0xe5, 0xa6, 0x2d, 0xfd, 0x10, 0x34, 0x68, 0x8c, 0xc2, 0xe4, 0x10, 0xc7, 0x31, 0xf6, 0x5b, 0x95, + 0x9b, 0xb4, 0x1f, 0x2a, 0xed, 0xf9, 0xa9, 0x19, 0x83, 0xba, 0xd4, 0x9f, 0x03, 0x2d, 0x77, 0x9e, + 0xa2, 0x3f, 0x03, 0x20, 0xc1, 0x94, 0xf6, 0xb1, 0x7f, 0x80, 0x68, 0xab, 0x6a, 0x6a, 0xeb, 0xa5, + 0x8e, 0x3d, 0x61, 0xb0, 0xbe, 0x2f, 0xd1, 0x6d, 0x3a, 0x65, 0xb0, 0x9e, 0xa4, 0xc5, 0x8c, 0xc1, + 0xa6, 0xb2, 0x21, 0x85, 0x2c, 0x37, 0x6f, 0x5b, 0x9f, 0x34, 0x50, 0x11, 0xd6, 0xe9, 0xf7, 0x41, + 0x2d, 0x08, 0x4f, 0x51, 0x3f, 0xf0, 0x9b, 0x85, 0xf6, 0xff, 0xa3, 0xb1, 0xf9, 0x9f, 0xb2, 0x56, + 0xb4, 0xf7, 0x64, 0x4b, 0x5f, 0x01, 0x65, 0x12, 0xe1, 0xb0, 0xa9, 0xb5, 0xff, 0x19, 0x8d, 0xcd, + 0x86, 0xa2, 0xbc, 0x88, 0x70, 0xa8, 0xaf, 0x82, 0xaa, 0xd7, 0x27, 0x09, 0xf6, 0x9b, 0xc5, 0xf6, + 0xbf, 0xa3, 0xb1, 0xf9, 0xb7, 0x6a, 0xee, 0x08, 0x50, 0x5f, 0x03, 0x75, 0x72, 0x8a, 0x63, 0x3f, + 0x46, 0xc3, 0xb0, 0x59, 0x6a, 0x2f, 0x8f, 0xc6, 0x66, 0x33, 0x1d, 0x4f, 0xf1, 0x76, 0xf9, 0xc3, + 0x57, 0xa3, 0x60, 0xcd, 0x2a, 0xa0, 0xf6, 0x12, 0x9d, 0x0f, 0x70, 0x48, 0xf5, 0x18, 0x00, 0x24, + 0x59, 0x07, 0xb7, 0x8f, 0xe3, 0xa6, 0x8a, 0x63, 0x7e, 0x77, 0xb8, 0x29, 0x28, 0x2d, 0x72, 0x53, + 0x32, 0xc8, 0x72, 0xb3, 0xb6, 0xf0, 0x38, 0x92, 0x8f, 0x3f, 0xc8, 0x6e, 0x8f, 0xf0, 0x58, 0x2d, + 0x25, 0xe5, 0xa2, 0xb4, 0xc8, 0xe5, 0x32, 0xc8, 0x72, 0xb3, 0xf6, 0x5c, 0xf2, 0x4b, 0xbf, 0x9b, + 0xfc, 0xf2, 0xa2, 0xe4, 0xab, 0x65, 0x6e, 0x9d, 0xfc, 0xa7, 0xa0, 0x1c, 0x73, 0xd1, 0x1b, 0xa3, + 0x79, 0x47, 0x45, 0x53, 0xd0, 0x67, 0x0c, 0x36, 0xa4, 0x5a, 0x2c, 0xc4, 0x04, 0x38, 0x7f, 0x8b, + 0xaa, 0x7f, 0xf2, 0x16, 0xbd, 0x03, 0xf5, 0x61, 0x40, 0x8f, 0x44, 0x18, 0x5a, 0xb5, 0x9b, 0x94, + 0x1f, 0x28, 0xe5, 0x7c, 0x26, 0x3f, 0x8a, 0x0c, 0xb2, 0xdc, 0xbc, 0xbd, 0x30, 0xee, 0xca, 0xcf, + 0x45, 0x71, 0x57, 0x94, 0xeb, 0xe3, 0xae, 0x9a, 0x0b, 0xe2, 0x9e, 0x8e, 0xff, 0x1c, 0xf7, 0xad, + 0xf2, 0xe7, 0x2f, 0x50, 0xeb, 0xec, 0x5f, 0x4c, 0x0c, 0xed, 0x72, 0x62, 0x68, 0xdf, 0x27, 0x86, + 0xf6, 0xf1, 0xca, 0x28, 0x5c, 0x5e, 0x19, 0x85, 0x6f, 0x57, 0x46, 0xe1, 0xed, 0x93, 0x5e, 0x40, + 0x8f, 0x4e, 0xba, 0xb6, 0x47, 0x06, 0x8e, 0x48, 0xc2, 0xa3, 0x10, 0xd3, 0x21, 0x89, 0x8f, 0x55, + 0x85, 0xa2, 0xc0, 0xe9, 0x11, 0x27, 0x24, 0x3e, 0xfe, 0xe5, 0xb3, 0xd4, 0xad, 0x8a, 0xaf, 0xc8, + 0xe3, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x88, 0xe1, 0xca, 0xb5, 0x06, 0x00, 0x00, +} + +func (m *AccountID) 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 *AccountID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.XID) > 0 { + i -= len(m.XID) + copy(dAtA[i:], m.XID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.XID))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Account) 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 *Account) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SettledAt != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SettledAt)) + i-- + dAtA[i] = 0x30 + } + { + size, err := m.Transferred.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x18 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Payment) 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 *Payment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size, err := m.Rate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x20 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.PaymentID) > 0 { + i -= len(m.PaymentID) + copy(dAtA[i:], m.PaymentID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PaymentID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.AccountID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AccountID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.XID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Account) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Transferred.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.SettledAt != 0 { + n += 1 + sovTypes(uint64(m.SettledAt)) + } + return n +} + +func (m *Payment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AccountID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.PaymentID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Rate.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Withdrawn.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AccountID) 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 ErrIntOverflowTypes + } + 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: AccountID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field XID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.XID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Account) 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 ErrIntOverflowTypes + } + 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: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Account_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transferred", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Transferred.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettledAt", wireType) + } + m.SettledAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettledAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Payment) 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 ErrIntOverflowTypes + } + 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: Payment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Payment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AccountID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymentID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Payment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta2/codec.go b/go/node/escrow/v1beta2/codec.go new file mode 100644 index 00000000..4a22b4f2 --- /dev/null +++ b/go/node/escrow/v1beta2/codec.go @@ -0,0 +1,35 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil)) +} diff --git a/go/node/escrow/v1beta2/error.go b/go/node/escrow/v1beta2/error.go new file mode 100644 index 00000000..0de3bf0c --- /dev/null +++ b/go/node/escrow/v1beta2/error.go @@ -0,0 +1,21 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + ErrAccountExists = errors.New("account exists") + ErrAccountClosed = errors.New("account closed") + ErrAccountNotFound = errors.New("account not found") + ErrAccountOverdrawn = errors.New("account overdrawn") + ErrInvalidDenomination = errors.New("invalid denomination") + ErrPaymentExists = errors.New("payment exists") + ErrPaymentClosed = errors.New("payment closed") + ErrPaymentNotFound = errors.New("payment not found") + ErrPaymentRateZero = errors.New("payment rate zero") + ErrInvalidPayment = errors.New("invalid payment") + ErrInvalidSettlement = errors.New("invalid settlement") + ErrInvalidAccountID = errors.New("invalid account ID") + ErrInvalidAccount = errors.New("invalid account") +) diff --git a/go/node/escrow/v1beta2/genesis.pb.go b/go/node/escrow/v1beta2/genesis.pb.go new file mode 100644 index 00000000..cced85db --- /dev/null +++ b/go/node/escrow/v1beta2/genesis.pb.go @@ -0,0 +1,399 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by escrow module +type GenesisState struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts" yaml:"accounts"` + Payments []FractionalPayment `protobuf:"bytes,2,rep,name=payments,proto3" json:"payments" yaml:"payments"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_707a683aff806dd0, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisState) GetPayments() []FractionalPayment { + if m != nil { + return m.Payments + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.escrow.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/escrow/v1beta2/genesis.proto", fileDescriptor_707a683aff806dd0) +} + +var fileDescriptor_707a683aff806dd0 = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, + 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x14, 0xb0, 0x9a, 0x57, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x4d, + 0xe9, 0x06, 0x23, 0x17, 0x8f, 0x3b, 0xc4, 0xfc, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0xa1, 0x38, 0x2e, + 0x8e, 0xc4, 0xe4, 0xe4, 0xfc, 0xd2, 0xbc, 0x92, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, + 0x59, 0x3d, 0x6c, 0x36, 0xea, 0x39, 0x42, 0x54, 0x39, 0x29, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, + 0x9e, 0x3c, 0x5c, 0xdb, 0xa7, 0x7b, 0xf2, 0xfc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x30, 0x11, + 0xa5, 0x20, 0xb8, 0xa4, 0x50, 0x06, 0x17, 0x47, 0x41, 0x62, 0x65, 0x6e, 0x2a, 0xc8, 0x7c, 0x26, + 0xb0, 0xf9, 0xea, 0xd8, 0xcd, 0x77, 0x2b, 0x4a, 0x4c, 0x2e, 0xc9, 0xcc, 0xcf, 0x4b, 0xcc, 0x09, + 0x80, 0xa8, 0x47, 0xd8, 0x04, 0x33, 0x00, 0x61, 0x13, 0x4c, 0x44, 0x29, 0x08, 0x2e, 0xe9, 0x14, + 0x7c, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x96, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x60, 0xbb, 0x75, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, + 0xb2, 0xa1, 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0xb4, 0xb0, + 0x4b, 0x62, 0x03, 0x07, 0x9b, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x57, 0x84, 0x55, 0x06, 0xaa, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Payments) > 0 { + for _, e := range m.Payments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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 Payments", 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.Payments = append(m.Payments, FractionalPayment{}) + if err := m.Payments[len(m.Payments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta2/key.go b/go/node/escrow/v1beta2/key.go new file mode 100644 index 00000000..c8662ad5 --- /dev/null +++ b/go/node/escrow/v1beta2/key.go @@ -0,0 +1,20 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "escrow" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) + +func AccountKeyPrefix() []byte { + return []byte{0x01} +} + +func PaymentKeyPrefix() []byte { + return []byte{0x02} +} diff --git a/go/node/escrow/v1beta2/query.pb.go b/go/node/escrow/v1beta2/query.pb.go new file mode 100644 index 00000000..c92600e6 --- /dev/null +++ b/go/node/escrow/v1beta2/query.pb.go @@ -0,0 +1,1605 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryAccountRequest is request type for the Query/Account RPC method +type QueryAccountsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsRequest) Reset() { *m = QueryAccountsRequest{} } +func (m *QueryAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsRequest) ProtoMessage() {} +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bfcec870f18514a, []int{0} +} +func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsRequest.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 *QueryAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsRequest.Merge(m, src) +} +func (m *QueryAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsRequest proto.InternalMessageInfo + +func (m *QueryAccountsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryAccountsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryAccountsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryAccountsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryAccountsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryAccountsResponse struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } +func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bfcec870f18514a, []int{1} +} +func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsResponse.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 *QueryAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsResponse.Merge(m, src) +} +func (m *QueryAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo + +func (m *QueryAccountsResponse) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryAccountsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +type QueryPaymentsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsRequest) Reset() { *m = QueryPaymentsRequest{} } +func (m *QueryPaymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsRequest) ProtoMessage() {} +func (*QueryPaymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bfcec870f18514a, []int{2} +} +func (m *QueryPaymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsRequest.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 *QueryPaymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsRequest.Merge(m, src) +} +func (m *QueryPaymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsRequest proto.InternalMessageInfo + +func (m *QueryPaymentsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryPaymentsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryPaymentsRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *QueryPaymentsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryPaymentsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryPaymentsResponse struct { + Payments []FractionalPayment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsResponse) Reset() { *m = QueryPaymentsResponse{} } +func (m *QueryPaymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsResponse) ProtoMessage() {} +func (*QueryPaymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bfcec870f18514a, []int{3} +} +func (m *QueryPaymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsResponse.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 *QueryPaymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsResponse.Merge(m, src) +} +func (m *QueryPaymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsResponse proto.InternalMessageInfo + +func (m *QueryPaymentsResponse) GetPayments() []FractionalPayment { + if m != nil { + return m.Payments + } + return nil +} + +func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryAccountsRequest)(nil), "akash.escrow.v1beta2.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "akash.escrow.v1beta2.QueryAccountsResponse") + proto.RegisterType((*QueryPaymentsRequest)(nil), "akash.escrow.v1beta2.QueryPaymentsRequest") + proto.RegisterType((*QueryPaymentsResponse)(nil), "akash.escrow.v1beta2.QueryPaymentsResponse") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta2/query.proto", fileDescriptor_2bfcec870f18514a) } + +var fileDescriptor_2bfcec870f18514a = []byte{ + // 511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xbf, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0x4b, 0x52, 0x05, 0x57, 0x42, 0xc8, 0x0a, 0xd2, 0x29, 0x82, 0x23, 0xca, 0x40, + 0x43, 0x2b, 0x6c, 0x25, 0x4c, 0x4c, 0x88, 0x0e, 0x45, 0x6c, 0x25, 0x6c, 0x6c, 0xce, 0xc5, 0xba, + 0x9e, 0x9a, 0xf8, 0x5d, 0xcf, 0x0e, 0x21, 0x2b, 0x7f, 0x01, 0x12, 0x12, 0x3b, 0x33, 0x1b, 0x1b, + 0x2b, 0x53, 0xc7, 0x4a, 0x2c, 0x4c, 0x08, 0x25, 0xfc, 0x21, 0xe8, 0xfc, 0x83, 0xb6, 0xa7, 0x6b, + 0xa9, 0xaa, 0x6e, 0x7e, 0xce, 0xf7, 0xbd, 0xf7, 0x7d, 0x9f, 0xbc, 0x33, 0xee, 0xf2, 0x43, 0xae, + 0x0e, 0x98, 0x50, 0x71, 0x0e, 0x0b, 0xf6, 0x76, 0x30, 0x16, 0x9a, 0x0f, 0xd9, 0xd1, 0x5c, 0xe4, + 0x4b, 0x9a, 0xe5, 0xa0, 0x81, 0xb4, 0x8d, 0x82, 0x5a, 0x05, 0x75, 0x8a, 0x4e, 0x3b, 0x81, 0x04, + 0x8c, 0x80, 0x15, 0x27, 0xab, 0xed, 0xdc, 0x4b, 0x00, 0x92, 0xa9, 0x60, 0x3c, 0x4b, 0x19, 0x97, + 0x12, 0x34, 0xd7, 0x29, 0x48, 0xe5, 0x7e, 0xdd, 0x8e, 0x41, 0xcd, 0x40, 0xb1, 0x31, 0x57, 0xc2, + 0xb6, 0x70, 0x0d, 0x07, 0x2c, 0xe3, 0x49, 0x2a, 0x8d, 0xd8, 0x69, 0xab, 0x7d, 0xe9, 0x65, 0x26, + 0x5c, 0xb5, 0xde, 0x57, 0x84, 0xdb, 0xaf, 0x8a, 0x22, 0xcf, 0xe3, 0x18, 0xe6, 0x52, 0xab, 0x91, + 0x38, 0x9a, 0x0b, 0xa5, 0x49, 0x1b, 0x37, 0x55, 0x0c, 0x99, 0x08, 0x51, 0x17, 0xf5, 0x6f, 0x8d, + 0x6c, 0x40, 0xee, 0xe0, 0xfa, 0xbb, 0x74, 0x12, 0x06, 0xe6, 0xae, 0x38, 0x16, 0x3a, 0x58, 0x48, + 0x91, 0x87, 0x75, 0xab, 0x33, 0x81, 0xc9, 0xd6, 0x5c, 0x8b, 0xb0, 0xe1, 0xb2, 0x8b, 0x80, 0xec, + 0x61, 0x7c, 0x6a, 0x31, 0x6c, 0x76, 0x51, 0x7f, 0x73, 0xf8, 0x90, 0xda, 0x79, 0x68, 0x31, 0x0f, + 0xb5, 0xc8, 0xdc, 0x3c, 0x74, 0x9f, 0x27, 0xc2, 0xf9, 0x19, 0x9d, 0xc9, 0xec, 0x7d, 0x46, 0xf8, + 0x6e, 0xc9, 0xb4, 0xca, 0x40, 0x2a, 0x41, 0x9e, 0xe1, 0x16, 0x77, 0x77, 0x21, 0xea, 0xd6, 0xfb, + 0x9b, 0xc3, 0xfb, 0xb4, 0x8a, 0x3c, 0x75, 0x99, 0xbb, 0x8d, 0xe3, 0x5f, 0x0f, 0x6a, 0xa3, 0x7f, + 0x49, 0xe4, 0xc5, 0x39, 0x8b, 0x81, 0xb1, 0xb8, 0xf5, 0x5f, 0x8b, 0xb6, 0xfb, 0x39, 0x8f, 0xdf, + 0x3d, 0xd8, 0x7d, 0xbe, 0x9c, 0x89, 0x6b, 0x80, 0xbd, 0x8d, 0x83, 0x74, 0xe2, 0xa8, 0x06, 0x67, + 0x41, 0x37, 0x2a, 0x41, 0x37, 0x2f, 0x06, 0xbd, 0x71, 0x6d, 0xd0, 0x5f, 0x3c, 0xe8, 0xd3, 0x21, + 0x1c, 0xe8, 0x97, 0xb8, 0x95, 0xb9, 0x3b, 0x07, 0x7a, 0xab, 0x1a, 0xf4, 0x5e, 0xce, 0xe3, 0xa2, + 0x16, 0x9f, 0xba, 0x1a, 0x1e, 0xb9, 0x4f, 0xbf, 0x31, 0xe4, 0xc3, 0x6f, 0x01, 0x6e, 0x1a, 0xb7, + 0xe4, 0x13, 0xc2, 0x2d, 0xbf, 0x1b, 0x64, 0xbb, 0xda, 0x58, 0xd5, 0xd6, 0x77, 0x76, 0xae, 0xa4, + 0xb5, 0xbd, 0x7b, 0x83, 0xf7, 0x3f, 0xfe, 0x7c, 0x0c, 0x76, 0xc8, 0x23, 0x76, 0xf1, 0x67, 0xc6, + 0xfc, 0x66, 0xb1, 0x69, 0xaa, 0xb4, 0x31, 0xe6, 0x59, 0x5e, 0x6a, 0xac, 0xb4, 0x35, 0x97, 0x1a, + 0x2b, 0xff, 0x39, 0x57, 0x33, 0xe6, 0xf9, 0x1b, 0x63, 0xbb, 0xaf, 0x8f, 0x57, 0x11, 0x3a, 0x59, + 0x45, 0xe8, 0xf7, 0x2a, 0x42, 0x1f, 0xd6, 0x51, 0xed, 0x64, 0x1d, 0xd5, 0x7e, 0xae, 0xa3, 0xda, + 0x9b, 0xa7, 0x49, 0xaa, 0x0f, 0xe6, 0x63, 0x1a, 0xc3, 0xcc, 0x96, 0x7b, 0x2c, 0x85, 0x5e, 0x40, + 0x7e, 0xe8, 0xa2, 0xe2, 0x95, 0x4a, 0x80, 0x49, 0x98, 0x88, 0x52, 0xa3, 0xf1, 0x86, 0x79, 0x63, + 0x9e, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x52, 0x61, 0x53, 0xc3, 0x1f, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta2.Query/Accounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) { + out := new(QueryPaymentsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta2.Query/Payments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(context.Context, *QueryPaymentsRequest) (*QueryPaymentsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") +} +func (*UnimplementedQueryServer) Payments(ctx context.Context, req *QueryPaymentsRequest) (*QueryPaymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Payments not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta2.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Payments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPaymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Payments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta2.Query/Payments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Payments(ctx, req.(*QueryPaymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.escrow.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, + }, + { + MethodName: "Payments", + Handler: _Query_Payments_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/escrow/v1beta2/query.proto", +} + +func (m *QueryAccountsRequest) 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 *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsRequest) 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] = 0x2a + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x22 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsResponse) 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.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[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 (m *QueryPaymentsRequest) 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 *QueryPaymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsRequest) 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] = 0x32 + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x22 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPaymentsResponse) 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 *QueryPaymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsResponse) 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.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[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 *QueryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + 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 (m *QueryPaymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPaymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Payments) > 0 { + for _, e := range m.Payments { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountsRequest) 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: QueryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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) + } + 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.PageResponse{} + } + 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 *QueryPaymentsRequest) 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: QueryPaymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + 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 *QueryPaymentsResponse) 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: QueryPaymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payments", 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.Payments = append(m.Payments, FractionalPayment{}) + if err := m.Payments[len(m.Payments)-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) + } + 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.PageResponse{} + } + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta2/query.pb.gw.go b/go/node/escrow/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..125c2cd3 --- /dev/null +++ b/go/node/escrow/v1beta2/query.pb.gw.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/escrow/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Accounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Accounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Payments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Payments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Payments(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Accounts_0 = runtime.ForwardResponseMessage + + forward_Query_Payments_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/escrow/v1beta2/types.pb.go b/go/node/escrow/v1beta2/types.pb.go new file mode 100644 index 00000000..726dc877 --- /dev/null +++ b/go/node/escrow/v1beta2/types.pb.go @@ -0,0 +1,1467 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta2/types.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State stores state for an escrow account +type Account_State int32 + +const ( + // AccountStateInvalid is an invalid state + AccountStateInvalid Account_State = 0 + // AccountOpen is the state when an account is open + AccountOpen Account_State = 1 + // AccountClosed is the state when an account is closed + AccountClosed Account_State = 2 + // AccountOverdrawn is the state when an account is overdrawn + AccountOverdrawn Account_State = 3 +) + +var Account_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var Account_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x Account_State) String() string { + return proto.EnumName(Account_State_name, int32(x)) +} + +func (Account_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5b25ee303c78038d, []int{1, 0} +} + +// Payment State +type FractionalPayment_State int32 + +const ( + // PaymentStateInvalid is the state when the payment is invalid + PaymentStateInvalid FractionalPayment_State = 0 + // PaymentStateOpen is the state when the payment is open + PaymentOpen FractionalPayment_State = 1 + // PaymentStateClosed is the state when the payment is closed + PaymentClosed FractionalPayment_State = 2 + // PaymentStateOverdrawn is the state when the payment is overdrawn + PaymentOverdrawn FractionalPayment_State = 3 +) + +var FractionalPayment_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var FractionalPayment_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x FractionalPayment_State) String() string { + return proto.EnumName(FractionalPayment_State_name, int32(x)) +} + +func (FractionalPayment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_5b25ee303c78038d, []int{2, 0} +} + +// AccountID is the account identifier +type AccountID struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope" yaml:"scope"` + XID string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid" yaml:"xid"` +} + +func (m *AccountID) Reset() { *m = AccountID{} } +func (m *AccountID) String() string { return proto.CompactTextString(m) } +func (*AccountID) ProtoMessage() {} +func (*AccountID) Descriptor() ([]byte, []int) { + return fileDescriptor_5b25ee303c78038d, []int{0} +} +func (m *AccountID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountID.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 *AccountID) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountID.Merge(m, src) +} +func (m *AccountID) XXX_Size() int { + return m.Size() +} +func (m *AccountID) XXX_DiscardUnknown() { + xxx_messageInfo_AccountID.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountID proto.InternalMessageInfo + +func (m *AccountID) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *AccountID) GetXID() string { + if m != nil { + return m.XID + } + return "" +} + +// Account stores state for an escrow account +type Account struct { + // unique identifier for this escrow account + ID AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + // bech32 encoded account address of the owner of this escrow account + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner" yaml:"owner"` + // current state of this escrow account + State Account_State `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.v1beta2.Account_State" json:"state" yaml:"state"` + // unspent coins received from the owner's wallet + Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"` + // total coins spent by this account + Transferred types.DecCoin `protobuf:"bytes,5,opt,name=transferred,proto3" json:"transferred" yaml:"transferred"` + // block height at which this account was last settled + SettledAt int64 `protobuf:"varint,6,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"` + // bech32 encoded account address of the depositor. + // If depositor is same as the owner, then any incoming coins are added to the Balance. + // If depositor isn't same as the owner, then any incoming coins are added to the Funds. + Depositor string `protobuf:"bytes,7,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` + // Funds are unspent coins received from the (non-Owner) Depositor's wallet. + // If there are any funds, they should be spent before spending the Balance. + Funds types.DecCoin `protobuf:"bytes,8,opt,name=funds,proto3" json:"funds" yaml:"funds"` +} + +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { + return fileDescriptor_5b25ee303c78038d, []int{1} +} +func (m *Account) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Account.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 *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(m, src) +} +func (m *Account) XXX_Size() int { + return m.Size() +} +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) +} + +var xxx_messageInfo_Account proto.InternalMessageInfo + +func (m *Account) GetID() AccountID { + if m != nil { + return m.ID + } + return AccountID{} +} + +func (m *Account) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Account) GetState() Account_State { + if m != nil { + return m.State + } + return AccountStateInvalid +} + +func (m *Account) GetBalance() types.DecCoin { + if m != nil { + return m.Balance + } + return types.DecCoin{} +} + +func (m *Account) GetTransferred() types.DecCoin { + if m != nil { + return m.Transferred + } + return types.DecCoin{} +} + +func (m *Account) GetSettledAt() int64 { + if m != nil { + return m.SettledAt + } + return 0 +} + +func (m *Account) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +func (m *Account) GetFunds() types.DecCoin { + if m != nil { + return m.Funds + } + return types.DecCoin{} +} + +// Payment stores state for a payment +type FractionalPayment struct { + AccountID AccountID `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"accountID" yaml:"accountID"` + PaymentID string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"paymentID" yaml:"paymentID"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" yaml:"owner"` + State FractionalPayment_State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1beta2.FractionalPayment_State" json:"state" yaml:"state"` + Rate types.DecCoin `protobuf:"bytes,5,opt,name=rate,proto3" json:"rate" yaml:"rate"` + Balance types.DecCoin `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance" yaml:"balance"` + Withdrawn types.Coin `protobuf:"bytes,7,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"` +} + +func (m *FractionalPayment) Reset() { *m = FractionalPayment{} } +func (m *FractionalPayment) String() string { return proto.CompactTextString(m) } +func (*FractionalPayment) ProtoMessage() {} +func (*FractionalPayment) Descriptor() ([]byte, []int) { + return fileDescriptor_5b25ee303c78038d, []int{2} +} +func (m *FractionalPayment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FractionalPayment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FractionalPayment.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 *FractionalPayment) XXX_Merge(src proto.Message) { + xxx_messageInfo_FractionalPayment.Merge(m, src) +} +func (m *FractionalPayment) XXX_Size() int { + return m.Size() +} +func (m *FractionalPayment) XXX_DiscardUnknown() { + xxx_messageInfo_FractionalPayment.DiscardUnknown(m) +} + +var xxx_messageInfo_FractionalPayment proto.InternalMessageInfo + +func (m *FractionalPayment) GetAccountID() AccountID { + if m != nil { + return m.AccountID + } + return AccountID{} +} + +func (m *FractionalPayment) GetPaymentID() string { + if m != nil { + return m.PaymentID + } + return "" +} + +func (m *FractionalPayment) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *FractionalPayment) GetState() FractionalPayment_State { + if m != nil { + return m.State + } + return PaymentStateInvalid +} + +func (m *FractionalPayment) GetRate() types.DecCoin { + if m != nil { + return m.Rate + } + return types.DecCoin{} +} + +func (m *FractionalPayment) GetBalance() types.DecCoin { + if m != nil { + return m.Balance + } + return types.DecCoin{} +} + +func (m *FractionalPayment) GetWithdrawn() types.Coin { + if m != nil { + return m.Withdrawn + } + return types.Coin{} +} + +func init() { + proto.RegisterEnum("akash.escrow.v1beta2.Account_State", Account_State_name, Account_State_value) + proto.RegisterEnum("akash.escrow.v1beta2.FractionalPayment_State", FractionalPayment_State_name, FractionalPayment_State_value) + proto.RegisterType((*AccountID)(nil), "akash.escrow.v1beta2.AccountID") + proto.RegisterType((*Account)(nil), "akash.escrow.v1beta2.Account") + proto.RegisterType((*FractionalPayment)(nil), "akash.escrow.v1beta2.FractionalPayment") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta2/types.proto", fileDescriptor_5b25ee303c78038d) } + +var fileDescriptor_5b25ee303c78038d = []byte{ + // 810 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xeb, 0x44, + 0x14, 0x8d, 0xf3, 0x89, 0x27, 0xf0, 0xc8, 0x1b, 0x2a, 0xe1, 0x86, 0x57, 0x8f, 0xdf, 0x3c, 0x90, + 0xca, 0xe2, 0xd9, 0x6a, 0x58, 0xf1, 0x36, 0xa8, 0x69, 0x85, 0xd4, 0x45, 0xf9, 0x70, 0x59, 0x00, + 0x8b, 0x56, 0x13, 0x7b, 0x9a, 0x5a, 0x4d, 0x3c, 0x96, 0x3d, 0x6d, 0xda, 0x7f, 0x80, 0x22, 0x16, + 0x88, 0x15, 0x9b, 0x20, 0x24, 0xfe, 0x4c, 0x97, 0x5d, 0xb2, 0xb2, 0x50, 0xba, 0xcb, 0x32, 0xbf, + 0x00, 0x79, 0x66, 0x6c, 0x07, 0x88, 0xa2, 0x2c, 0xde, 0x2a, 0xb9, 0xe7, 0x9e, 0x7b, 0xe6, 0xce, + 0xbd, 0x73, 0x64, 0x60, 0x91, 0x6b, 0x92, 0x5c, 0x39, 0x34, 0xf1, 0x62, 0x36, 0x71, 0x6e, 0x0f, + 0x06, 0x94, 0x93, 0x9e, 0xc3, 0xef, 0x23, 0x9a, 0xd8, 0x51, 0xcc, 0x38, 0x83, 0x3b, 0x82, 0x61, + 0x4b, 0x86, 0xad, 0x18, 0xdd, 0x9d, 0x21, 0x1b, 0x32, 0x41, 0x70, 0xb2, 0x7f, 0x92, 0xdb, 0x35, + 0x3d, 0x96, 0x8c, 0x59, 0xe2, 0x0c, 0x48, 0x42, 0x95, 0xd8, 0x81, 0xe3, 0xb1, 0x20, 0x94, 0x79, + 0x3c, 0x02, 0xfa, 0xa1, 0xe7, 0xb1, 0x9b, 0x90, 0x9f, 0x1c, 0x43, 0x07, 0x34, 0x12, 0x8f, 0x45, + 0xd4, 0xd0, 0x2c, 0x6d, 0x5f, 0xef, 0xef, 0x2e, 0x52, 0x24, 0x81, 0x65, 0x8a, 0xde, 0xbd, 0x27, + 0xe3, 0xd1, 0x1b, 0x2c, 0x42, 0xec, 0x4a, 0x18, 0xda, 0xa0, 0x76, 0x17, 0xf8, 0x46, 0x55, 0xd0, + 0x5f, 0xcc, 0x53, 0x54, 0xfb, 0xfe, 0xe4, 0x78, 0x91, 0xa2, 0x0c, 0x5d, 0xa6, 0x08, 0xc8, 0x9a, + 0xbb, 0xc0, 0xc7, 0x6e, 0x06, 0xe1, 0xdf, 0x9b, 0xa0, 0xa5, 0x8e, 0x83, 0x5f, 0x81, 0x6a, 0xe0, + 0x8b, 0x93, 0xda, 0x3d, 0x64, 0xaf, 0xbb, 0x92, 0x5d, 0x74, 0xd6, 0xdf, 0x7b, 0x48, 0x51, 0x65, + 0x9e, 0xa2, 0xaa, 0x90, 0xaf, 0x0a, 0x75, 0x5d, 0xaa, 0x67, 0xe2, 0xd5, 0xc0, 0xcf, 0x9a, 0x67, + 0x93, 0x90, 0xc6, 0xaa, 0x1b, 0xd1, 0xbc, 0x00, 0xca, 0xe6, 0x45, 0x88, 0x5d, 0x09, 0xc3, 0xef, + 0x40, 0x23, 0xe1, 0x84, 0x53, 0xa3, 0x66, 0x69, 0xfb, 0xcf, 0x7a, 0xaf, 0x36, 0xf6, 0x60, 0x9f, + 0x65, 0x54, 0x35, 0x92, 0xec, 0xef, 0xca, 0x48, 0xb2, 0x30, 0x1b, 0x49, 0xf6, 0x0b, 0x7f, 0x00, + 0xad, 0x01, 0x19, 0x91, 0xd0, 0xa3, 0x46, 0x5d, 0xdc, 0xed, 0x85, 0x2d, 0x57, 0x60, 0x67, 0x2b, + 0x50, 0xb2, 0x07, 0xf6, 0x31, 0xf5, 0x8e, 0x58, 0x10, 0xf6, 0x5f, 0x66, 0x17, 0x5b, 0xa4, 0x28, + 0x2f, 0x5a, 0xa6, 0xe8, 0x99, 0x94, 0x55, 0x00, 0x76, 0xf3, 0x14, 0x0c, 0x40, 0x9b, 0xc7, 0x24, + 0x4c, 0x2e, 0x69, 0x1c, 0x53, 0xdf, 0x68, 0x6c, 0x21, 0xff, 0xa9, 0x92, 0x5f, 0x2d, 0x5c, 0xa6, + 0x08, 0xca, 0x23, 0x56, 0x40, 0xec, 0xae, 0x52, 0xe0, 0x29, 0x00, 0x09, 0xe5, 0x7c, 0x44, 0xfd, + 0x0b, 0xc2, 0x8d, 0xa6, 0xa5, 0xed, 0xd7, 0xfa, 0xf6, 0x3c, 0x45, 0xfa, 0x99, 0x44, 0x0f, 0xf9, + 0x22, 0x45, 0x7a, 0x92, 0x07, 0xcb, 0x14, 0x75, 0xd4, 0x30, 0x72, 0x08, 0xbb, 0x65, 0x1a, 0x7e, + 0x01, 0x74, 0x9f, 0x46, 0x2c, 0x09, 0x38, 0x8b, 0x8d, 0x96, 0xd8, 0xcf, 0xcb, 0x4c, 0xa0, 0x00, + 0x4b, 0x81, 0x02, 0xc2, 0x6e, 0x99, 0x86, 0xdf, 0x82, 0xc6, 0xe5, 0x4d, 0xe8, 0x27, 0xc6, 0x3b, + 0x5b, 0x5c, 0x7a, 0x4f, 0x5d, 0x5a, 0x96, 0x94, 0x8b, 0x12, 0x21, 0x76, 0x25, 0x8c, 0x7f, 0xd5, + 0x40, 0x43, 0x2c, 0x15, 0x7e, 0x0c, 0x5a, 0x41, 0x78, 0x4b, 0x46, 0x81, 0xdf, 0xa9, 0x74, 0x3f, + 0x9c, 0xce, 0xac, 0x0f, 0xd4, 0xd2, 0x45, 0xfa, 0x44, 0xa6, 0xe0, 0x2e, 0xa8, 0xb3, 0x88, 0x86, + 0x1d, 0xad, 0xfb, 0xfe, 0x74, 0x66, 0xb5, 0x15, 0xe5, 0xeb, 0x88, 0x86, 0x70, 0x0f, 0x34, 0xbd, + 0x11, 0x4b, 0xa8, 0xdf, 0xa9, 0x76, 0x9f, 0x4f, 0x67, 0xd6, 0x7b, 0x2a, 0x79, 0x24, 0x40, 0xf8, + 0x0a, 0xe8, 0xec, 0x96, 0xc6, 0x7e, 0x4c, 0x26, 0x61, 0xa7, 0xd6, 0xdd, 0x99, 0xce, 0xac, 0x4e, + 0x5e, 0x9e, 0xe3, 0xdd, 0xfa, 0x4f, 0x7f, 0x9a, 0x15, 0xfc, 0x73, 0x13, 0x3c, 0xff, 0x32, 0x26, + 0x1e, 0x0f, 0x58, 0x48, 0x46, 0xdf, 0x90, 0xfb, 0x31, 0x0d, 0x39, 0x8c, 0x01, 0x20, 0x92, 0x7f, + 0xb1, 0xbd, 0x65, 0x7a, 0xca, 0x32, 0xa5, 0xbf, 0xb3, 0x89, 0x93, 0x3c, 0x28, 0x27, 0x5e, 0x40, + 0xd8, 0x2d, 0xd2, 0xe2, 0x05, 0x44, 0xf2, 0xf8, 0x8b, 0xc2, 0xe1, 0xe2, 0x05, 0xa8, 0xa6, 0xa4, + 0x5c, 0x94, 0x07, 0xa5, 0x5c, 0x01, 0x61, 0xb7, 0x48, 0xaf, 0xb8, 0xb3, 0xb6, 0xa5, 0x3b, 0xcf, + 0x73, 0x77, 0xd6, 0x85, 0x3b, 0x5f, 0xaf, 0xbf, 0xee, 0xff, 0x66, 0xb5, 0xb5, 0x4f, 0x4f, 0x41, + 0x3d, 0xce, 0xe4, 0xb7, 0x71, 0xd1, 0x47, 0xea, 0x41, 0x89, 0x8a, 0x65, 0x8a, 0xda, 0x52, 0x30, + 0x16, 0x7a, 0x02, 0x5c, 0xb5, 0x7d, 0xf3, 0x2d, 0xdb, 0xfe, 0x1c, 0xe8, 0x93, 0x80, 0x5f, 0x89, + 0x67, 0x22, 0xcc, 0xd3, 0xee, 0xed, 0xae, 0x15, 0x17, 0xca, 0x9f, 0x28, 0xe5, 0xb2, 0xa6, 0x5c, + 0x4d, 0x01, 0x61, 0xb7, 0x4c, 0x6f, 0x34, 0x82, 0x9a, 0xea, 0x26, 0x23, 0x28, 0xca, 0x7a, 0x23, + 0xa8, 0xe4, 0x06, 0x23, 0xe4, 0xe5, 0xff, 0x36, 0xc2, 0x9b, 0xfa, 0x6f, 0x7f, 0x20, 0xad, 0x7f, + 0xf6, 0x30, 0x37, 0xb5, 0xc7, 0xb9, 0xa9, 0xfd, 0x3d, 0x37, 0xb5, 0x5f, 0x9e, 0xcc, 0xca, 0xe3, + 0x93, 0x59, 0xf9, 0xeb, 0xc9, 0xac, 0xfc, 0xf8, 0xf9, 0x30, 0xe0, 0x57, 0x37, 0x03, 0xdb, 0x63, + 0x63, 0x47, 0xbc, 0x8c, 0xd7, 0x21, 0xe5, 0x13, 0x16, 0x5f, 0xab, 0x88, 0x44, 0x81, 0x33, 0x64, + 0x4e, 0xc8, 0x7c, 0xfa, 0x9f, 0x4f, 0xe9, 0xa0, 0x29, 0xbe, 0x7c, 0x9f, 0xfd, 0x13, 0x00, 0x00, + 0xff, 0xff, 0xef, 0x4c, 0x01, 0x25, 0x69, 0x07, 0x00, 0x00, +} + +func (m *AccountID) 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 *AccountID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.XID) > 0 { + i -= len(m.XID) + copy(dAtA[i:], m.XID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.XID))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Account) 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 *Account) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Funds.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x3a + } + if m.SettledAt != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SettledAt)) + i-- + dAtA[i] = 0x30 + } + { + size, err := m.Transferred.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x18 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *FractionalPayment) 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 *FractionalPayment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FractionalPayment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size, err := m.Rate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x20 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.PaymentID) > 0 { + i -= len(m.PaymentID) + copy(dAtA[i:], m.PaymentID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PaymentID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.AccountID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AccountID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.XID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Account) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Transferred.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.SettledAt != 0 { + n += 1 + sovTypes(uint64(m.SettledAt)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Funds.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *FractionalPayment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AccountID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.PaymentID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Rate.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Withdrawn.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AccountID) 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 ErrIntOverflowTypes + } + 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: AccountID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field XID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.XID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Account) 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 ErrIntOverflowTypes + } + 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: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Account_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transferred", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Transferred.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettledAt", wireType) + } + m.SettledAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettledAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Funds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FractionalPayment) 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 ErrIntOverflowTypes + } + 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: FractionalPayment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FractionalPayment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AccountID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymentID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= FractionalPayment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta2/validate.go b/go/node/escrow/v1beta2/validate.go new file mode 100644 index 00000000..7c2ebdfd --- /dev/null +++ b/go/node/escrow/v1beta2/validate.go @@ -0,0 +1,53 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +func (obj *AccountID) ValidateBasic() error { + if len(obj.Scope) == 0 { + return errors.Wrap(ErrInvalidAccountID, "empty scope") + } + if len(obj.XID) == 0 { + return errors.Wrap(ErrInvalidAccountID, "empty scope") + } + return nil +} + +func (obj *Account) ValidateBasic() error { + if err := obj.ID.ValidateBasic(); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: id - %s", err) + } + if _, err := sdk.AccAddressFromBech32(obj.Owner); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: owner - %s", err) + } + if obj.State == AccountStateInvalid { + return errors.Wrapf(ErrInvalidAccount, "invalid account: state - %s", obj.State) + } + if _, err := sdk.AccAddressFromBech32(obj.Depositor); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: depositor - %s", err) + } + return nil +} + +func (obj *FractionalPayment) ValidateBasic() error { + if err := obj.AccountID.ValidateBasic(); err != nil { + return errors.Wrapf(ErrInvalidPayment, "invalid account id: %s", err) + } + if len(obj.PaymentID) == 0 { + return errors.Wrap(ErrInvalidPayment, "empty payment id") + } + if obj.Rate.IsZero() { + return errors.Wrap(ErrInvalidPayment, "payment rate zero") + } + if obj.State == PaymentStateInvalid { + return errors.Wrap(ErrInvalidPayment, "invalid state") + } + return nil +} + +// TotalBalance is the sum of Balance and Funds +func (obj *Account) TotalBalance() sdk.DecCoin { + return obj.Balance.Add(obj.Funds) +} diff --git a/go/node/escrow/v1beta3/codec.go b/go/node/escrow/v1beta3/codec.go new file mode 100644 index 00000000..36f6fc2c --- /dev/null +++ b/go/node/escrow/v1beta3/codec.go @@ -0,0 +1,35 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil)) +} diff --git a/go/node/escrow/v1beta3/error.go b/go/node/escrow/v1beta3/error.go new file mode 100644 index 00000000..78f019c0 --- /dev/null +++ b/go/node/escrow/v1beta3/error.go @@ -0,0 +1,37 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errAccountExists uint32 = iota + 1 + errAccountClosed + errAccountNotFound + errAccountOverdrawn + errInvalidDenomination + errPaymentExists + errPaymentClosed + errPaymentNotFound + errPaymentRateZero + errInvalidPayment + errInvalidSettlement + errInvalidAccountID + errInvalidAccount +) + +var ( + ErrAccountExists = sdkerrors.Register(ModuleName, errAccountExists, "account exists") + ErrAccountClosed = sdkerrors.Register(ModuleName, errAccountClosed, "account closed") + ErrAccountNotFound = sdkerrors.Register(ModuleName, errAccountNotFound, "account not found") + ErrAccountOverdrawn = sdkerrors.Register(ModuleName, errAccountOverdrawn, "account overdrawn") + ErrInvalidDenomination = sdkerrors.Register(ModuleName, errInvalidDenomination, "invalid denomination") + ErrPaymentExists = sdkerrors.Register(ModuleName, errPaymentExists, "payment exists") + ErrPaymentClosed = sdkerrors.Register(ModuleName, errPaymentClosed, "payment closed") + ErrPaymentNotFound = sdkerrors.Register(ModuleName, errPaymentNotFound, "payment not found") + ErrPaymentRateZero = sdkerrors.Register(ModuleName, errPaymentRateZero, "payment rate zero") + ErrInvalidPayment = sdkerrors.Register(ModuleName, errInvalidPayment, "invalid payment") + ErrInvalidSettlement = sdkerrors.Register(ModuleName, errInvalidSettlement, "invalid settlement") + ErrInvalidAccountID = sdkerrors.Register(ModuleName, errInvalidAccountID, "invalid account ID") + ErrInvalidAccount = sdkerrors.Register(ModuleName, errInvalidAccount, "invalid account") +) diff --git a/go/node/escrow/v1beta3/genesis.pb.go b/go/node/escrow/v1beta3/genesis.pb.go new file mode 100644 index 00000000..887ed584 --- /dev/null +++ b/go/node/escrow/v1beta3/genesis.pb.go @@ -0,0 +1,399 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by escrow module +type GenesisState struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts" yaml:"accounts"` + Payments []FractionalPayment `protobuf:"bytes,2,rep,name=payments,proto3" json:"payments" yaml:"payments"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_d2dbb3d041f88a4c, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisState) GetPayments() []FractionalPayment { + if m != nil { + return m.Payments + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.escrow.v1beta3.GenesisState") +} + +func init() { + proto.RegisterFile("akash/escrow/v1beta3/genesis.proto", fileDescriptor_d2dbb3d041f88a4c) +} + +var fileDescriptor_d2dbb3d041f88a4c = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, + 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x14, 0xb0, 0x9a, 0x57, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x4d, + 0xe9, 0x06, 0x23, 0x17, 0x8f, 0x3b, 0xc4, 0xfc, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0xa1, 0x38, 0x2e, + 0x8e, 0xc4, 0xe4, 0xe4, 0xfc, 0xd2, 0xbc, 0x92, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, + 0x59, 0x3d, 0x6c, 0x36, 0xea, 0x39, 0x42, 0x54, 0x39, 0x29, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, + 0x9e, 0x3c, 0x5c, 0xdb, 0xa7, 0x7b, 0xf2, 0xfc, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x30, 0x11, + 0xa5, 0x20, 0xb8, 0xa4, 0x50, 0x06, 0x17, 0x47, 0x41, 0x62, 0x65, 0x6e, 0x2a, 0xc8, 0x7c, 0x26, + 0xb0, 0xf9, 0xea, 0xd8, 0xcd, 0x77, 0x2b, 0x4a, 0x4c, 0x2e, 0xc9, 0xcc, 0xcf, 0x4b, 0xcc, 0x09, + 0x80, 0xa8, 0x47, 0xd8, 0x04, 0x33, 0x00, 0x61, 0x13, 0x4c, 0x44, 0x29, 0x08, 0x2e, 0xe9, 0x14, + 0x7c, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x96, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x60, 0xbb, 0x75, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, + 0xb2, 0xa1, 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0xb4, 0xb0, + 0x4b, 0x62, 0x03, 0x07, 0x9b, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x18, 0x84, 0x9a, 0xaa, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Payments) > 0 { + for _, e := range m.Payments { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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 Payments", 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.Payments = append(m.Payments, FractionalPayment{}) + if err := m.Payments[len(m.Payments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta3/key.go b/go/node/escrow/v1beta3/key.go new file mode 100644 index 00000000..53bb7f9a --- /dev/null +++ b/go/node/escrow/v1beta3/key.go @@ -0,0 +1,20 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "escrow" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) + +func AccountKeyPrefix() []byte { + return []byte{0x01} +} + +func PaymentKeyPrefix() []byte { + return []byte{0x02} +} diff --git a/go/node/escrow/v1beta3/query.pb.go b/go/node/escrow/v1beta3/query.pb.go new file mode 100644 index 00000000..f7c827a7 --- /dev/null +++ b/go/node/escrow/v1beta3/query.pb.go @@ -0,0 +1,1605 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryAccountRequest is request type for the Query/Account RPC method +type QueryAccountsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsRequest) Reset() { *m = QueryAccountsRequest{} } +func (m *QueryAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsRequest) ProtoMessage() {} +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_84bc7a3aed491eed, []int{0} +} +func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsRequest.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 *QueryAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsRequest.Merge(m, src) +} +func (m *QueryAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsRequest proto.InternalMessageInfo + +func (m *QueryAccountsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryAccountsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryAccountsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryAccountsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryAccountsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryAccountsResponse struct { + Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } +func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_84bc7a3aed491eed, []int{1} +} +func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAccountsResponse.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 *QueryAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsResponse.Merge(m, src) +} +func (m *QueryAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo + +func (m *QueryAccountsResponse) GetAccounts() []Account { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *QueryAccountsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +type QueryPaymentsRequest struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` + Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsRequest) Reset() { *m = QueryPaymentsRequest{} } +func (m *QueryPaymentsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsRequest) ProtoMessage() {} +func (*QueryPaymentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_84bc7a3aed491eed, []int{2} +} +func (m *QueryPaymentsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsRequest.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 *QueryPaymentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsRequest.Merge(m, src) +} +func (m *QueryPaymentsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsRequest proto.InternalMessageInfo + +func (m *QueryPaymentsRequest) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *QueryPaymentsRequest) GetXid() string { + if m != nil { + return m.Xid + } + return "" +} + +func (m *QueryPaymentsRequest) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *QueryPaymentsRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *QueryPaymentsRequest) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryPaymentsResponse struct { + Payments []FractionalPayment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPaymentsResponse) Reset() { *m = QueryPaymentsResponse{} } +func (m *QueryPaymentsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPaymentsResponse) ProtoMessage() {} +func (*QueryPaymentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_84bc7a3aed491eed, []int{3} +} +func (m *QueryPaymentsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPaymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPaymentsResponse.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 *QueryPaymentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPaymentsResponse.Merge(m, src) +} +func (m *QueryPaymentsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPaymentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPaymentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPaymentsResponse proto.InternalMessageInfo + +func (m *QueryPaymentsResponse) GetPayments() []FractionalPayment { + if m != nil { + return m.Payments + } + return nil +} + +func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryAccountsRequest)(nil), "akash.escrow.v1beta3.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "akash.escrow.v1beta3.QueryAccountsResponse") + proto.RegisterType((*QueryPaymentsRequest)(nil), "akash.escrow.v1beta3.QueryPaymentsRequest") + proto.RegisterType((*QueryPaymentsResponse)(nil), "akash.escrow.v1beta3.QueryPaymentsResponse") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta3/query.proto", fileDescriptor_84bc7a3aed491eed) } + +var fileDescriptor_84bc7a3aed491eed = []byte{ + // 511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xbf, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0x4b, 0x52, 0x05, 0x57, 0x42, 0xc8, 0x0a, 0xd2, 0x29, 0x82, 0x23, 0xca, 0x40, + 0x43, 0x2b, 0x6c, 0x25, 0x9d, 0x98, 0x10, 0x1d, 0x8a, 0xd8, 0x4a, 0xd8, 0xd8, 0x9c, 0x8b, 0x75, + 0x3d, 0x35, 0xf1, 0xbb, 0x9e, 0x1d, 0x42, 0x56, 0xfe, 0x02, 0x24, 0x24, 0x76, 0x66, 0x36, 0x36, + 0x56, 0xa6, 0x8e, 0x95, 0x58, 0x98, 0x10, 0x4a, 0xf8, 0x43, 0xd0, 0xf9, 0x07, 0x6d, 0x4f, 0xd7, + 0x52, 0x55, 0x6c, 0x7e, 0xce, 0xf7, 0xbd, 0xf7, 0x7d, 0x9f, 0xbc, 0x33, 0xee, 0xf2, 0x23, 0xae, + 0x0e, 0x99, 0x50, 0x71, 0x0e, 0x0b, 0xf6, 0x66, 0x30, 0x16, 0x9a, 0xef, 0xb2, 0xe3, 0xb9, 0xc8, + 0x97, 0x34, 0xcb, 0x41, 0x03, 0x69, 0x1b, 0x05, 0xb5, 0x0a, 0xea, 0x14, 0x9d, 0x76, 0x02, 0x09, + 0x18, 0x01, 0x2b, 0x4e, 0x56, 0xdb, 0xb9, 0x97, 0x00, 0x24, 0x53, 0xc1, 0x78, 0x96, 0x32, 0x2e, + 0x25, 0x68, 0xae, 0x53, 0x90, 0xca, 0xfd, 0xba, 0x1d, 0x83, 0x9a, 0x81, 0x62, 0x63, 0xae, 0x84, + 0x6d, 0xe1, 0x1a, 0x0e, 0x58, 0xc6, 0x93, 0x54, 0x1a, 0xb1, 0xd3, 0x56, 0xfb, 0xd2, 0xcb, 0x4c, + 0xb8, 0x6a, 0xbd, 0x2f, 0x08, 0xb7, 0x5f, 0x16, 0x45, 0x9e, 0xc5, 0x31, 0xcc, 0xa5, 0x56, 0x23, + 0x71, 0x3c, 0x17, 0x4a, 0x93, 0x36, 0x6e, 0xaa, 0x18, 0x32, 0x11, 0xa2, 0x2e, 0xea, 0xdf, 0x1a, + 0xd9, 0x80, 0xdc, 0xc1, 0xf5, 0xb7, 0xe9, 0x24, 0x0c, 0xcc, 0x5d, 0x71, 0x2c, 0x74, 0xb0, 0x90, + 0x22, 0x0f, 0xeb, 0x56, 0x67, 0x02, 0x93, 0xad, 0xb9, 0x16, 0x61, 0xc3, 0x65, 0x17, 0x01, 0xd9, + 0xc7, 0xf8, 0xcc, 0x62, 0xd8, 0xec, 0xa2, 0xfe, 0xe6, 0xf0, 0x21, 0xb5, 0xf3, 0xd0, 0x62, 0x1e, + 0x6a, 0x91, 0xb9, 0x79, 0xe8, 0x01, 0x4f, 0x84, 0xf3, 0x33, 0x3a, 0x97, 0xd9, 0xfb, 0x84, 0xf0, + 0xdd, 0x92, 0x69, 0x95, 0x81, 0x54, 0x82, 0x3c, 0xc5, 0x2d, 0xee, 0xee, 0x42, 0xd4, 0xad, 0xf7, + 0x37, 0x87, 0xf7, 0x69, 0x15, 0x79, 0xea, 0x32, 0xf7, 0x1a, 0x27, 0x3f, 0x1f, 0xd4, 0x46, 0x7f, + 0x93, 0xc8, 0xf3, 0x0b, 0x16, 0x03, 0x63, 0x71, 0xeb, 0x9f, 0x16, 0x6d, 0xf7, 0x0b, 0x1e, 0xbf, + 0x79, 0xb0, 0x07, 0x7c, 0x39, 0x13, 0x37, 0x00, 0x7b, 0x1b, 0x07, 0xe9, 0xc4, 0x51, 0x0d, 0xce, + 0x83, 0x6e, 0x54, 0x82, 0x6e, 0x5e, 0x0e, 0x7a, 0xe3, 0xc6, 0xa0, 0x3f, 0x7b, 0xd0, 0x67, 0x43, + 0x38, 0xd0, 0x2f, 0x70, 0x2b, 0x73, 0x77, 0x0e, 0xf4, 0x56, 0x35, 0xe8, 0xfd, 0x9c, 0xc7, 0x45, + 0x2d, 0x3e, 0x75, 0x35, 0x3c, 0x72, 0x9f, 0xfe, 0xdf, 0x90, 0x0f, 0xbf, 0x06, 0xb8, 0x69, 0xdc, + 0x92, 0x8f, 0x08, 0xb7, 0xfc, 0x6e, 0x90, 0xed, 0x6a, 0x63, 0x55, 0x5b, 0xdf, 0xd9, 0xb9, 0x96, + 0xd6, 0xf6, 0xee, 0x0d, 0xde, 0x7d, 0xff, 0xfd, 0x21, 0xd8, 0x21, 0x8f, 0xd8, 0xe5, 0x9f, 0x19, + 0xf3, 0x9b, 0xc5, 0xa6, 0xa9, 0xd2, 0xc6, 0x98, 0x67, 0x79, 0xa5, 0xb1, 0xd2, 0xd6, 0x5c, 0x69, + 0xac, 0xfc, 0xe7, 0x5c, 0xcf, 0x98, 0xe7, 0x6f, 0x8c, 0xed, 0xbd, 0x3a, 0x59, 0x45, 0xe8, 0x74, + 0x15, 0xa1, 0x5f, 0xab, 0x08, 0xbd, 0x5f, 0x47, 0xb5, 0xd3, 0x75, 0x54, 0xfb, 0xb1, 0x8e, 0x6a, + 0xaf, 0x9f, 0x24, 0xa9, 0x3e, 0x9c, 0x8f, 0x69, 0x0c, 0x33, 0x5b, 0xee, 0xb1, 0x14, 0x7a, 0x01, + 0xf9, 0x91, 0x8b, 0x8a, 0x57, 0x2a, 0x01, 0x26, 0x61, 0x22, 0x4a, 0x8d, 0xc6, 0x1b, 0xe6, 0x8d, + 0xd9, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x13, 0xf3, 0xcb, 0x1f, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta3.Query/Accounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error) { + out := new(QueryPaymentsResponse) + err := c.cc.Invoke(ctx, "/akash.escrow.v1beta3.Query/Payments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + Payments(context.Context, *QueryPaymentsRequest) (*QueryPaymentsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") +} +func (*UnimplementedQueryServer) Payments(ctx context.Context, req *QueryPaymentsRequest) (*QueryPaymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Payments not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta3.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Payments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPaymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Payments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.escrow.v1beta3.Query/Payments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Payments(ctx, req.(*QueryPaymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.escrow.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, + }, + { + MethodName: "Payments", + Handler: _Query_Payments_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/escrow/v1beta3/query.proto", +} + +func (m *QueryAccountsRequest) 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 *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsRequest) 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] = 0x2a + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x22 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAccountsResponse) 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 *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAccountsResponse) 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.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[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 (m *QueryPaymentsRequest) 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 *QueryPaymentsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsRequest) 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] = 0x32 + } + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x22 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0x1a + } + if len(m.Xid) > 0 { + i -= len(m.Xid) + copy(dAtA[i:], m.Xid) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Xid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPaymentsResponse) 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 *QueryPaymentsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPaymentsResponse) 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.Payments) > 0 { + for iNdEx := len(m.Payments) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Payments[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 *QueryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + 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 (m *QueryPaymentsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Xid) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPaymentsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Payments) > 0 { + for _, e := range m.Payments { + 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 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryAccountsRequest) 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: QueryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 *QueryAccountsResponse) 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: QueryAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", 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.Accounts = append(m.Accounts, Account{}) + if err := m.Accounts[len(m.Accounts)-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) + } + 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.PageResponse{} + } + 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 *QueryPaymentsRequest) 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: QueryPaymentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", 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.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Xid", 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.Xid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", 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.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + 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 *QueryPaymentsResponse) 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: QueryPaymentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPaymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payments", 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.Payments = append(m.Payments, FractionalPayment{}) + if err := m.Payments[len(m.Payments)-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) + } + 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.PageResponse{} + } + 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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta3/query.pb.gw.go b/go/node/escrow/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..ee04c67e --- /dev/null +++ b/go/node/escrow/v1beta3/query.pb.gw.go @@ -0,0 +1,254 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/escrow/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Accounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAccountsRequest + 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_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Accounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Payments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Payments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Payments_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPaymentsRequest + 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_Payments_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Payments(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Accounts_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_Accounts_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_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Payments_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_Payments_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_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Accounts_0 = runtime.ForwardResponseMessage + + forward_Query_Payments_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/escrow/v1beta3/types.pb.go b/go/node/escrow/v1beta3/types.pb.go new file mode 100644 index 00000000..1361dba4 --- /dev/null +++ b/go/node/escrow/v1beta3/types.pb.go @@ -0,0 +1,1467 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/escrow/v1beta3/types.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State stores state for an escrow account +type Account_State int32 + +const ( + // AccountStateInvalid is an invalid state + AccountStateInvalid Account_State = 0 + // AccountOpen is the state when an account is open + AccountOpen Account_State = 1 + // AccountClosed is the state when an account is closed + AccountClosed Account_State = 2 + // AccountOverdrawn is the state when an account is overdrawn + AccountOverdrawn Account_State = 3 +) + +var Account_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var Account_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x Account_State) String() string { + return proto.EnumName(Account_State_name, int32(x)) +} + +func (Account_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_c4875611bf6739ee, []int{1, 0} +} + +// Payment State +type FractionalPayment_State int32 + +const ( + // PaymentStateInvalid is the state when the payment is invalid + PaymentStateInvalid FractionalPayment_State = 0 + // PaymentStateOpen is the state when the payment is open + PaymentOpen FractionalPayment_State = 1 + // PaymentStateClosed is the state when the payment is closed + PaymentClosed FractionalPayment_State = 2 + // PaymentStateOverdrawn is the state when the payment is overdrawn + PaymentOverdrawn FractionalPayment_State = 3 +) + +var FractionalPayment_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "closed", + 3: "overdrawn", +} + +var FractionalPayment_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "closed": 2, + "overdrawn": 3, +} + +func (x FractionalPayment_State) String() string { + return proto.EnumName(FractionalPayment_State_name, int32(x)) +} + +func (FractionalPayment_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_c4875611bf6739ee, []int{2, 0} +} + +// AccountID is the account identifier +type AccountID struct { + Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope" yaml:"scope"` + XID string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid" yaml:"xid"` +} + +func (m *AccountID) Reset() { *m = AccountID{} } +func (m *AccountID) String() string { return proto.CompactTextString(m) } +func (*AccountID) ProtoMessage() {} +func (*AccountID) Descriptor() ([]byte, []int) { + return fileDescriptor_c4875611bf6739ee, []int{0} +} +func (m *AccountID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountID.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 *AccountID) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountID.Merge(m, src) +} +func (m *AccountID) XXX_Size() int { + return m.Size() +} +func (m *AccountID) XXX_DiscardUnknown() { + xxx_messageInfo_AccountID.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountID proto.InternalMessageInfo + +func (m *AccountID) GetScope() string { + if m != nil { + return m.Scope + } + return "" +} + +func (m *AccountID) GetXID() string { + if m != nil { + return m.XID + } + return "" +} + +// Account stores state for an escrow account +type Account struct { + // unique identifier for this escrow account + ID AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + // bech32 encoded account address of the owner of this escrow account + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner" yaml:"owner"` + // current state of this escrow account + State Account_State `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.v1beta3.Account_State" json:"state" yaml:"state"` + // unspent coins received from the owner's wallet + Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"` + // total coins spent by this account + Transferred types.DecCoin `protobuf:"bytes,5,opt,name=transferred,proto3" json:"transferred" yaml:"transferred"` + // block height at which this account was last settled + SettledAt int64 `protobuf:"varint,6,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"` + // bech32 encoded account address of the depositor. + // If depositor is same as the owner, then any incoming coins are added to the Balance. + // If depositor isn't same as the owner, then any incoming coins are added to the Funds. + Depositor string `protobuf:"bytes,7,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"` + // Funds are unspent coins received from the (non-Owner) Depositor's wallet. + // If there are any funds, they should be spent before spending the Balance. + Funds types.DecCoin `protobuf:"bytes,8,opt,name=funds,proto3" json:"funds" yaml:"funds"` +} + +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { + return fileDescriptor_c4875611bf6739ee, []int{1} +} +func (m *Account) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Account.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 *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(m, src) +} +func (m *Account) XXX_Size() int { + return m.Size() +} +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) +} + +var xxx_messageInfo_Account proto.InternalMessageInfo + +func (m *Account) GetID() AccountID { + if m != nil { + return m.ID + } + return AccountID{} +} + +func (m *Account) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Account) GetState() Account_State { + if m != nil { + return m.State + } + return AccountStateInvalid +} + +func (m *Account) GetBalance() types.DecCoin { + if m != nil { + return m.Balance + } + return types.DecCoin{} +} + +func (m *Account) GetTransferred() types.DecCoin { + if m != nil { + return m.Transferred + } + return types.DecCoin{} +} + +func (m *Account) GetSettledAt() int64 { + if m != nil { + return m.SettledAt + } + return 0 +} + +func (m *Account) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +func (m *Account) GetFunds() types.DecCoin { + if m != nil { + return m.Funds + } + return types.DecCoin{} +} + +// Payment stores state for a payment +type FractionalPayment struct { + AccountID AccountID `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"accountID" yaml:"accountID"` + PaymentID string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"paymentID" yaml:"paymentID"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" yaml:"owner"` + State FractionalPayment_State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1beta3.FractionalPayment_State" json:"state" yaml:"state"` + Rate types.DecCoin `protobuf:"bytes,5,opt,name=rate,proto3" json:"rate" yaml:"rate"` + Balance types.DecCoin `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance" yaml:"balance"` + Withdrawn types.Coin `protobuf:"bytes,7,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"` +} + +func (m *FractionalPayment) Reset() { *m = FractionalPayment{} } +func (m *FractionalPayment) String() string { return proto.CompactTextString(m) } +func (*FractionalPayment) ProtoMessage() {} +func (*FractionalPayment) Descriptor() ([]byte, []int) { + return fileDescriptor_c4875611bf6739ee, []int{2} +} +func (m *FractionalPayment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FractionalPayment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FractionalPayment.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 *FractionalPayment) XXX_Merge(src proto.Message) { + xxx_messageInfo_FractionalPayment.Merge(m, src) +} +func (m *FractionalPayment) XXX_Size() int { + return m.Size() +} +func (m *FractionalPayment) XXX_DiscardUnknown() { + xxx_messageInfo_FractionalPayment.DiscardUnknown(m) +} + +var xxx_messageInfo_FractionalPayment proto.InternalMessageInfo + +func (m *FractionalPayment) GetAccountID() AccountID { + if m != nil { + return m.AccountID + } + return AccountID{} +} + +func (m *FractionalPayment) GetPaymentID() string { + if m != nil { + return m.PaymentID + } + return "" +} + +func (m *FractionalPayment) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *FractionalPayment) GetState() FractionalPayment_State { + if m != nil { + return m.State + } + return PaymentStateInvalid +} + +func (m *FractionalPayment) GetRate() types.DecCoin { + if m != nil { + return m.Rate + } + return types.DecCoin{} +} + +func (m *FractionalPayment) GetBalance() types.DecCoin { + if m != nil { + return m.Balance + } + return types.DecCoin{} +} + +func (m *FractionalPayment) GetWithdrawn() types.Coin { + if m != nil { + return m.Withdrawn + } + return types.Coin{} +} + +func init() { + proto.RegisterEnum("akash.escrow.v1beta3.Account_State", Account_State_name, Account_State_value) + proto.RegisterEnum("akash.escrow.v1beta3.FractionalPayment_State", FractionalPayment_State_name, FractionalPayment_State_value) + proto.RegisterType((*AccountID)(nil), "akash.escrow.v1beta3.AccountID") + proto.RegisterType((*Account)(nil), "akash.escrow.v1beta3.Account") + proto.RegisterType((*FractionalPayment)(nil), "akash.escrow.v1beta3.FractionalPayment") +} + +func init() { proto.RegisterFile("akash/escrow/v1beta3/types.proto", fileDescriptor_c4875611bf6739ee) } + +var fileDescriptor_c4875611bf6739ee = []byte{ + // 811 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xeb, 0x44, + 0x14, 0x8d, 0xf3, 0x89, 0x27, 0xf0, 0xc8, 0x1b, 0x2a, 0xe1, 0x86, 0x57, 0x8f, 0xdf, 0x3c, 0x90, + 0xca, 0xe2, 0xd9, 0x6a, 0xde, 0x8a, 0xb7, 0x41, 0x4d, 0x2b, 0xa4, 0x2e, 0xca, 0x87, 0xcb, 0x02, + 0x58, 0xb4, 0x9a, 0xd8, 0xd3, 0xd4, 0x6a, 0xe2, 0xb1, 0xec, 0x69, 0xd3, 0xfe, 0x03, 0x14, 0xb1, + 0x40, 0xac, 0xd8, 0x04, 0x21, 0xf1, 0x67, 0xba, 0xec, 0x92, 0x95, 0x85, 0xd2, 0x5d, 0x96, 0xf9, + 0x05, 0xc8, 0x33, 0x63, 0x3b, 0x40, 0x14, 0x65, 0xc1, 0x2a, 0xb9, 0xe7, 0x9e, 0x7b, 0xe6, 0xce, + 0xbd, 0x73, 0x64, 0x60, 0x91, 0x6b, 0x92, 0x5c, 0x39, 0x34, 0xf1, 0x62, 0x36, 0x71, 0x6e, 0x0f, + 0x06, 0x94, 0x93, 0x37, 0x0e, 0xbf, 0x8f, 0x68, 0x62, 0x47, 0x31, 0xe3, 0x0c, 0xee, 0x08, 0x86, + 0x2d, 0x19, 0xb6, 0x62, 0x74, 0x77, 0x86, 0x6c, 0xc8, 0x04, 0xc1, 0xc9, 0xfe, 0x49, 0x6e, 0xd7, + 0xf4, 0x58, 0x32, 0x66, 0x89, 0x33, 0x20, 0x09, 0x55, 0x62, 0x07, 0x8e, 0xc7, 0x82, 0x50, 0xe6, + 0xf1, 0x08, 0xe8, 0x87, 0x9e, 0xc7, 0x6e, 0x42, 0x7e, 0x72, 0x0c, 0x1d, 0xd0, 0x48, 0x3c, 0x16, + 0x51, 0x43, 0xb3, 0xb4, 0x7d, 0xbd, 0xbf, 0xbb, 0x48, 0x91, 0x04, 0x96, 0x29, 0x7a, 0xf7, 0x9e, + 0x8c, 0x47, 0x6f, 0xb1, 0x08, 0xb1, 0x2b, 0x61, 0x68, 0x83, 0xda, 0x5d, 0xe0, 0x1b, 0x55, 0x41, + 0x7f, 0x31, 0x4f, 0x51, 0xed, 0xbb, 0x93, 0xe3, 0x45, 0x8a, 0x32, 0x74, 0x99, 0x22, 0x20, 0x6b, + 0xee, 0x02, 0x1f, 0xbb, 0x19, 0x84, 0x7f, 0x6b, 0x82, 0x96, 0x3a, 0x0e, 0x7e, 0x09, 0xaa, 0x81, + 0x2f, 0x4e, 0x6a, 0xf7, 0x90, 0xbd, 0xee, 0x4a, 0x76, 0xd1, 0x59, 0x7f, 0xef, 0x21, 0x45, 0x95, + 0x79, 0x8a, 0xaa, 0x42, 0xbe, 0x2a, 0xd4, 0x75, 0xa9, 0x9e, 0x89, 0x57, 0x03, 0x3f, 0x6b, 0x9e, + 0x4d, 0x42, 0x1a, 0xab, 0x6e, 0x44, 0xf3, 0x02, 0x28, 0x9b, 0x17, 0x21, 0x76, 0x25, 0x0c, 0xbf, + 0x05, 0x8d, 0x84, 0x13, 0x4e, 0x8d, 0x9a, 0xa5, 0xed, 0x3f, 0xeb, 0xbd, 0xda, 0xd8, 0x83, 0x7d, + 0x96, 0x51, 0xd5, 0x48, 0xb2, 0xbf, 0x2b, 0x23, 0xc9, 0xc2, 0x6c, 0x24, 0xd9, 0x2f, 0xfc, 0x1e, + 0xb4, 0x06, 0x64, 0x44, 0x42, 0x8f, 0x1a, 0x75, 0x71, 0xb7, 0x17, 0xb6, 0x5c, 0x81, 0x9d, 0xad, + 0x40, 0xc9, 0x1e, 0xd8, 0xc7, 0xd4, 0x3b, 0x62, 0x41, 0xd8, 0x7f, 0x99, 0x5d, 0x6c, 0x91, 0xa2, + 0xbc, 0x68, 0x99, 0xa2, 0x67, 0x52, 0x56, 0x01, 0xd8, 0xcd, 0x53, 0x30, 0x00, 0x6d, 0x1e, 0x93, + 0x30, 0xb9, 0xa4, 0x71, 0x4c, 0x7d, 0xa3, 0xb1, 0x85, 0xfc, 0xa7, 0x4a, 0x7e, 0xb5, 0x70, 0x99, + 0x22, 0x28, 0x8f, 0x58, 0x01, 0xb1, 0xbb, 0x4a, 0x81, 0xa7, 0x00, 0x24, 0x94, 0xf3, 0x11, 0xf5, + 0x2f, 0x08, 0x37, 0x9a, 0x96, 0xb6, 0x5f, 0xeb, 0xdb, 0xf3, 0x14, 0xe9, 0x67, 0x12, 0x3d, 0xe4, + 0x8b, 0x14, 0xe9, 0x49, 0x1e, 0x2c, 0x53, 0xd4, 0x51, 0xc3, 0xc8, 0x21, 0xec, 0x96, 0x69, 0xf8, + 0x39, 0xd0, 0x7d, 0x1a, 0xb1, 0x24, 0xe0, 0x2c, 0x36, 0x5a, 0x62, 0x3f, 0x2f, 0x33, 0x81, 0x02, + 0x2c, 0x05, 0x0a, 0x08, 0xbb, 0x65, 0x1a, 0x7e, 0x03, 0x1a, 0x97, 0x37, 0xa1, 0x9f, 0x18, 0xef, + 0x6c, 0x71, 0xe9, 0x3d, 0x75, 0x69, 0x59, 0x52, 0x2e, 0x4a, 0x84, 0xd8, 0x95, 0x30, 0xfe, 0x45, + 0x03, 0x0d, 0xb1, 0x54, 0xf8, 0x31, 0x68, 0x05, 0xe1, 0x2d, 0x19, 0x05, 0x7e, 0xa7, 0xd2, 0xfd, + 0x70, 0x3a, 0xb3, 0x3e, 0x50, 0x4b, 0x17, 0xe9, 0x13, 0x99, 0x82, 0xbb, 0xa0, 0xce, 0x22, 0x1a, + 0x76, 0xb4, 0xee, 0xfb, 0xd3, 0x99, 0xd5, 0x56, 0x94, 0xaf, 0x22, 0x1a, 0xc2, 0x3d, 0xd0, 0xf4, + 0x46, 0x2c, 0xa1, 0x7e, 0xa7, 0xda, 0x7d, 0x3e, 0x9d, 0x59, 0xef, 0xa9, 0xe4, 0x91, 0x00, 0xe1, + 0x2b, 0xa0, 0xb3, 0x5b, 0x1a, 0xfb, 0x31, 0x99, 0x84, 0x9d, 0x5a, 0x77, 0x67, 0x3a, 0xb3, 0x3a, + 0x79, 0x79, 0x8e, 0x77, 0xeb, 0x3f, 0xfe, 0x61, 0x56, 0xf0, 0x4f, 0x4d, 0xf0, 0xfc, 0x8b, 0x98, + 0x78, 0x3c, 0x60, 0x21, 0x19, 0x7d, 0x4d, 0xee, 0xc7, 0x34, 0xe4, 0x30, 0x06, 0x80, 0x48, 0xfe, + 0xc5, 0xf6, 0x96, 0xe9, 0x29, 0xcb, 0x94, 0xfe, 0xce, 0x26, 0x4e, 0xf2, 0xa0, 0x9c, 0x78, 0x01, + 0x61, 0xb7, 0x48, 0x8b, 0x17, 0x10, 0xc9, 0xe3, 0x2f, 0x0a, 0x87, 0x8b, 0x17, 0xa0, 0x9a, 0x92, + 0x72, 0x51, 0x1e, 0x94, 0x72, 0x05, 0x84, 0xdd, 0x22, 0xbd, 0xe2, 0xce, 0xda, 0x96, 0xee, 0x3c, + 0xcf, 0xdd, 0x59, 0x17, 0xee, 0x7c, 0xbd, 0xfe, 0xba, 0xff, 0x99, 0xd5, 0xd6, 0x3e, 0x3d, 0x05, + 0xf5, 0x38, 0x93, 0xdf, 0xc6, 0x45, 0x1f, 0xa9, 0x07, 0x25, 0x2a, 0x96, 0x29, 0x6a, 0x4b, 0xc1, + 0x58, 0xe8, 0x09, 0x70, 0xd5, 0xf6, 0xcd, 0xff, 0xd9, 0xf6, 0xe7, 0x40, 0x9f, 0x04, 0xfc, 0x4a, + 0x3c, 0x13, 0x61, 0x9e, 0x76, 0x6f, 0x77, 0xad, 0xb8, 0x50, 0xfe, 0x44, 0x29, 0x97, 0x35, 0xe5, + 0x6a, 0x0a, 0x08, 0xbb, 0x65, 0x7a, 0xa3, 0x11, 0xd4, 0x54, 0x37, 0x19, 0x41, 0x51, 0xd6, 0x1b, + 0x41, 0x25, 0x37, 0x18, 0x21, 0x2f, 0xff, 0xa7, 0x11, 0xde, 0xd6, 0x7f, 0xfd, 0x1d, 0x69, 0xfd, + 0xb3, 0x87, 0xb9, 0xa9, 0x3d, 0xce, 0x4d, 0xed, 0xaf, 0xb9, 0xa9, 0xfd, 0xfc, 0x64, 0x56, 0x1e, + 0x9f, 0xcc, 0xca, 0x9f, 0x4f, 0x66, 0xe5, 0x87, 0xcf, 0x86, 0x01, 0xbf, 0xba, 0x19, 0xd8, 0x1e, + 0x1b, 0x3b, 0xe2, 0x65, 0xbc, 0x0e, 0x29, 0x9f, 0xb0, 0xf8, 0x5a, 0x45, 0x24, 0x0a, 0x9c, 0x21, + 0x73, 0x42, 0xe6, 0xd3, 0x7f, 0x7d, 0x4a, 0x07, 0x4d, 0xf1, 0xe5, 0x7b, 0xf3, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x5a, 0x62, 0xe1, 0x3e, 0x69, 0x07, 0x00, 0x00, +} + +func (m *AccountID) 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 *AccountID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.XID) > 0 { + i -= len(m.XID) + copy(dAtA[i:], m.XID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.XID))) + i-- + dAtA[i] = 0x12 + } + if len(m.Scope) > 0 { + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Account) 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 *Account) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Funds.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x3a + } + if m.SettledAt != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SettledAt)) + i-- + dAtA[i] = 0x30 + } + { + size, err := m.Transferred.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x18 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *FractionalPayment) 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 *FractionalPayment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FractionalPayment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size, err := m.Rate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.State != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x20 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1a + } + if len(m.PaymentID) > 0 { + i -= len(m.PaymentID) + copy(dAtA[i:], m.PaymentID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PaymentID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.AccountID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AccountID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Scope) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.XID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Account) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Transferred.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.SettledAt != 0 { + n += 1 + sovTypes(uint64(m.SettledAt)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Funds.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *FractionalPayment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AccountID.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.PaymentID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.State != 0 { + n += 1 + sovTypes(uint64(m.State)) + } + l = m.Rate.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Withdrawn.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AccountID) 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 ErrIntOverflowTypes + } + 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: AccountID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field XID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.XID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Account) 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 ErrIntOverflowTypes + } + 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: Account: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Account: 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 msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Account_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transferred", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Transferred.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SettledAt", wireType) + } + m.SettledAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SettledAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Funds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FractionalPayment) 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 ErrIntOverflowTypes + } + 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: FractionalPayment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FractionalPayment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AccountID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PaymentID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= FractionalPayment_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/escrow/v1beta3/validate.go b/go/node/escrow/v1beta3/validate.go new file mode 100644 index 00000000..8b29e7d1 --- /dev/null +++ b/go/node/escrow/v1beta3/validate.go @@ -0,0 +1,53 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +func (obj *AccountID) ValidateBasic() error { + if len(obj.Scope) == 0 { + return errors.Wrap(ErrInvalidAccountID, "empty scope") + } + if len(obj.XID) == 0 { + return errors.Wrap(ErrInvalidAccountID, "empty scope") + } + return nil +} + +func (obj *Account) ValidateBasic() error { + if err := obj.ID.ValidateBasic(); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: id - %s", err) + } + if _, err := sdk.AccAddressFromBech32(obj.Owner); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: owner - %s", err) + } + if obj.State == AccountStateInvalid { + return errors.Wrapf(ErrInvalidAccount, "invalid account: state - %s", obj.State) + } + if _, err := sdk.AccAddressFromBech32(obj.Depositor); err != nil { + return errors.Wrapf(ErrInvalidAccount, "invalid account: depositor - %s", err) + } + return nil +} + +func (obj *FractionalPayment) ValidateBasic() error { + if err := obj.AccountID.ValidateBasic(); err != nil { + return errors.Wrapf(ErrInvalidPayment, "invalid account id: %s", err) + } + if len(obj.PaymentID) == 0 { + return errors.Wrap(ErrInvalidPayment, "empty payment id") + } + if obj.Rate.IsZero() { + return errors.Wrap(ErrInvalidPayment, "payment rate zero") + } + if obj.State == PaymentStateInvalid { + return errors.Wrap(ErrInvalidPayment, "invalid state") + } + return nil +} + +// TotalBalance is the sum of Balance and Funds +func (obj *Account) TotalBalance() sdk.DecCoin { + return obj.Balance.Add(obj.Funds) +} diff --git a/go/node/inflation/types/v1beta2/genesis.pb.go b/go/node/inflation/types/v1beta2/genesis.pb.go new file mode 100644 index 00000000..51c6922b --- /dev/null +++ b/go/node/inflation/types/v1beta2/genesis.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_912221706d9e5bb6, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.inflation.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta2/genesis.proto", fileDescriptor_912221706d9e5bb6) +} + +var fileDescriptor_912221706d9e5bb6 = []byte{ + // 236 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x07, 0x2b, 0xd3, 0x83, 0x2b, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x54, 0x70, 0x99, 0x5a, 0x90, 0x58, 0x94, + 0x98, 0x0b, 0x35, 0x54, 0x29, 0x83, 0x8b, 0xc7, 0x1d, 0x62, 0x4b, 0x70, 0x49, 0x62, 0x49, 0xaa, + 0x50, 0x04, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5e, 0x0f, 0x87, + 0xad, 0x7a, 0x01, 0x60, 0x65, 0x4e, 0xf2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x0f, 0xd5, + 0xf6, 0xe9, 0x9e, 0x3c, 0x6f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x84, 0xaf, 0x14, 0x04, 0x95, + 0x70, 0x8a, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa7, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x6d, 0xba, 0x79, 0xa9, 0x25, 0xe5, + 0xf9, 0x45, 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, + 0x92, 0x77, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x61, 0x9e, 0x4a, 0x62, 0x03, 0x7b, 0xc7, 0x18, 0x10, + 0x00, 0x00, 0xff, 0xff, 0x59, 0xd1, 0x90, 0x65, 0x4c, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/inflation/types/v1beta2/params.pb.go b/go/node/inflation/types/v1beta2/params.pb.go new file mode 100644 index 00000000..e2d1baca --- /dev/null +++ b/go/node/inflation/types/v1beta2/params.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta2/params.proto + +package v1beta2 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params defines the parameters for the x/deployment package +type Params struct { + // InflationDecayFactor is the number of years it takes inflation to halve. + InflationDecayFactor github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation_decay_factor,json=inflationDecayFactor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_decay_factor" yaml:"inflation_decay_factor"` + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + InitialInflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=initial_inflation,json=initialInflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_inflation" yaml:"initial_inflation"` + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + Variance github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=variance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"variance" yaml:"variance"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_fea313162cb1e23f, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "akash.inflation.v1beta2.Params") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta2/params.proto", fileDescriptor_fea313162cb1e23f) +} + +var fileDescriptor_fea313162cb1e23f = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x3f, 0x4b, 0xc3, 0x40, + 0x18, 0xc6, 0x73, 0x16, 0x4a, 0xcd, 0x62, 0x0d, 0x45, 0x83, 0x60, 0x4e, 0x82, 0x88, 0x4b, 0x73, + 0xa8, 0x9b, 0x63, 0x29, 0x42, 0x37, 0xe9, 0x20, 0x28, 0x42, 0x79, 0x9b, 0xa6, 0xe9, 0xd1, 0x26, + 0x17, 0x72, 0xd7, 0x4a, 0x47, 0xbf, 0x81, 0x1f, 0xc1, 0x8f, 0xe1, 0x47, 0xe8, 0xd8, 0x51, 0x04, + 0x0f, 0x49, 0xb7, 0x8e, 0xfd, 0x04, 0xd2, 0x6b, 0x12, 0x4a, 0xad, 0x43, 0xa7, 0xfc, 0x79, 0x9f, + 0xf7, 0xf7, 0xfe, 0x86, 0x47, 0x3f, 0x87, 0x3e, 0xf0, 0x1e, 0xa1, 0x61, 0x77, 0x00, 0x82, 0xb2, + 0x90, 0x8c, 0xae, 0xda, 0x9e, 0x80, 0x6b, 0x12, 0x41, 0x0c, 0x01, 0x77, 0xa2, 0x98, 0x09, 0x66, + 0x1c, 0xab, 0x94, 0x93, 0xa7, 0x9c, 0x34, 0x75, 0x52, 0xf1, 0x99, 0xcf, 0x54, 0x86, 0x2c, 0xdf, + 0x56, 0x71, 0xfb, 0xbb, 0xa0, 0x17, 0xef, 0xd5, 0xbe, 0xf1, 0x81, 0xf4, 0xa3, 0x7c, 0xad, 0xd5, + 0xf1, 0x5c, 0x18, 0xb7, 0xba, 0xe0, 0x0a, 0x16, 0x9b, 0xe8, 0x0c, 0x5d, 0xee, 0xd7, 0x5e, 0xd1, + 0x44, 0x62, 0xed, 0x4b, 0xe2, 0x0b, 0x9f, 0x8a, 0xde, 0xb0, 0xed, 0xb8, 0x2c, 0x20, 0x2e, 0xe3, + 0x01, 0xe3, 0xe9, 0xa3, 0xca, 0x3b, 0x7d, 0x22, 0xc6, 0x91, 0xc7, 0x9d, 0xba, 0xe7, 0x26, 0x12, + 0x57, 0x1a, 0x19, 0xb0, 0xbe, 0xe4, 0xdd, 0x29, 0xdc, 0x5c, 0xe2, 0x7f, 0x0e, 0x2d, 0x24, 0x3e, + 0x1d, 0x43, 0x30, 0xb8, 0xb5, 0xb7, 0xcf, 0xed, 0x66, 0x85, 0x6e, 0x01, 0x1a, 0xef, 0x48, 0x3f, + 0xa4, 0x21, 0x15, 0x14, 0x06, 0xad, 0x3c, 0x60, 0xee, 0x29, 0x6b, 0xbe, 0xb3, 0x74, 0xb9, 0xb1, + 0x42, 0xe5, 0xee, 0x73, 0x89, 0xff, 0xe2, 0x17, 0x12, 0x9b, 0x99, 0xeb, 0xc6, 0xc8, 0x6e, 0x96, + 0xe9, 0x06, 0xc2, 0x18, 0xea, 0xa5, 0x11, 0xc4, 0x14, 0x42, 0xd7, 0x33, 0x0b, 0x4a, 0xec, 0x71, + 0x67, 0xb1, 0xd2, 0x43, 0x4a, 0x98, 0x4b, 0x9c, 0xd3, 0x16, 0x12, 0x1f, 0xac, 0x3c, 0xb2, 0x3f, + 0x76, 0x33, 0x1f, 0xd6, 0x9e, 0x27, 0x89, 0x85, 0xa6, 0x89, 0x85, 0x7e, 0x12, 0x0b, 0xbd, 0xcd, + 0x2c, 0x6d, 0x3a, 0xb3, 0xb4, 0xcf, 0x99, 0xa5, 0x3d, 0xd5, 0xd6, 0xce, 0xaa, 0xce, 0x54, 0x43, + 0x4f, 0xbc, 0xb0, 0xb8, 0x9f, 0x7e, 0x41, 0x44, 0x89, 0xcf, 0x48, 0xc8, 0x3a, 0xde, 0x5a, 0xe7, + 0x94, 0x4e, 0xd6, 0xbc, 0x76, 0x51, 0x95, 0xe8, 0xe6, 0x37, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xe8, + 0x7c, 0xfd, 0x9b, 0x02, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Variance.Size() + i -= size + if _, err := m.Variance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.InitialInflation.Size() + i -= size + if _, err := m.InitialInflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.InflationDecayFactor.Size() + i -= size + if _, err := m.InflationDecayFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.InflationDecayFactor.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.InitialInflation.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.Variance.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationDecayFactor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationDecayFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialInflation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialInflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Variance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Variance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/inflation/v1beta2/errors.go b/go/node/inflation/v1beta2/errors.go new file mode 100644 index 00000000..d0b1f9bd --- /dev/null +++ b/go/node/inflation/v1beta2/errors.go @@ -0,0 +1,12 @@ +package v1beta2 + +import "errors" + +var ( + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = errors.New("parameter invalid") + // ErrInvalidInitialInflation indicates an invalid initial_inflation parameter + ErrInvalidInitialInflation = errors.New("initial inflation parameter is invalid") + // ErrInvalidVariance indicates an invalid variance parameter + ErrInvalidVariance = errors.New("variance parameter is invalid") +) diff --git a/go/node/inflation/v1beta2/genesis.pb.go b/go/node/inflation/v1beta2/genesis.pb.go new file mode 100644 index 00000000..f0f1c2a2 --- /dev/null +++ b/go/node/inflation/v1beta2/genesis.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/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 + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_912221706d9e5bb6, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.inflation.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta2/genesis.proto", fileDescriptor_912221706d9e5bb6) +} + +var fileDescriptor_912221706d9e5bb6 = []byte{ + // 231 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x07, 0x2b, 0xd3, 0x83, 0x2b, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x54, 0x70, 0x99, 0x5a, 0x90, 0x58, 0x94, + 0x98, 0x0b, 0x35, 0x54, 0x29, 0x83, 0x8b, 0xc7, 0x1d, 0x62, 0x4b, 0x70, 0x49, 0x62, 0x49, 0xaa, + 0x50, 0x04, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5e, 0x0f, 0x87, + 0xad, 0x7a, 0x01, 0x60, 0x65, 0x4e, 0xf2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x0f, 0xd5, + 0xf6, 0xe9, 0x9e, 0x3c, 0x6f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x84, 0xaf, 0x14, 0x04, 0x95, + 0x70, 0x0a, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xf3, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x6d, 0xba, 0x79, 0xa9, 0x25, 0xe5, + 0xf9, 0x45, 0xd9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x15, 0x48, 0x7e, 0x28, 0xa9, 0x2c, 0x48, + 0x2d, 0x86, 0xf9, 0x24, 0x89, 0x0d, 0xec, 0x07, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, + 0x22, 0xf7, 0xd9, 0x41, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/inflation/v1beta2/inflation_calculator.go b/go/node/inflation/v1beta2/inflation_calculator.go new file mode 100644 index 00000000..27048080 --- /dev/null +++ b/go/node/inflation/v1beta2/inflation_calculator.go @@ -0,0 +1,102 @@ +package v1beta2 + +// todo akash-network/support#4 +// import ( +// "fmt" +// "time" +// +// sdk "github.com/cosmos/cosmos-sdk/types" +// minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +// paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" +// "github.com/ericlagergren/decimal" +// ) +// +// func GetInflationCalculator( +// genesisTime time.Time, +// inflationParamSubspace paramstypes.Subspace, +// ) minttypes.InflationCalculationFn { +// return func(ctx sdk.Context, minter minttypes.Minter, params minttypes.Params, bondedRatio sdk.Dec) sdk.Dec { +// var inflationParams Params +// inflationParamSubspace.GetParamSet(ctx, &inflationParams) +// +// return inflationCalculator(ctx.BlockTime(), genesisTime, minter, params, inflationParams, bondedRatio) +// } +// } +// +// // inflationCalculator calculate current inflation value +// // - btime - block time from sdk.Context +// // - gtime - genesis time +// func inflationCalculator(btime, gtime time.Time, minter minttypes.Minter, mparams minttypes.Params, iparams Params, bondedRatio sdk.Dec) sdk.Dec { +// inflationDecayFactor := new(decimal.Big) +// if _, valid := inflationDecayFactor.SetString(iparams.InflationDecayFactor.String()); !valid { +// panic(fmt.Sprintf("InflationDecayFactor contains invalid value [%s]. expected integer/float", iparams.InflationDecayFactor.String())) +// } +// +// // years passed since genesis = seconds passed since genesis / number of seconds per year +// // can be a fraction, eg: 0.5 +// yearsPassed := decimal.WithPrecision(sdk.Precision). +// Quo( +// // seconds since genesis +// decimal.WithPrecision(sdk.Precision). +// Sub( +// decimal.New(btime.Unix(), 0), +// decimal.New(gtime.Unix(), 0), +// ), +// // Number of hours in an year = 8766 (averaging the leap year hours) +// // Number of minutes in an hour = 60 +// // Number of seconds in a minute = 60 +// // => Number of seconds per year = 60 * 60 * 8766 = 31557600 +// decimal.New(31557600, 0), +// ) +// // 2^(-t/tHalf) +// inflationCoefDec := decimal.WithPrecision(sdk.Precision) +// inflationCoefDec = inflationCoefDec.Context. +// Pow( +// inflationCoefDec, +// decimal.New(2, 0), +// decimal.WithPrecision(sdk.Precision). +// Mul( +// decimal.New(-1, 0), +// decimal.WithPrecision(sdk.Precision). +// Quo(yearsPassed, inflationDecayFactor), +// ), +// ) +// // convert inflationCoefDec to sdk.Dec with a 6 unit precision: sdk.Decimal(big.Int(pow * 10^6)) / 10^6 +// inflationCoef := sdk.NewDecFromBigInt( +// decimal.WithPrecision(sdk.Precision). +// Mul(inflationCoefDec, decimal.New(1000000, 0)). +// Int(nil), +// ).QuoInt64(1000000) +// +// idealInflation := iparams.InitialInflation.Mul(inflationCoef) +// +// // (1 - bondedRatio/GoalBonded) * InflationRateChange +// inflationRateChangePerYear := sdk.OneDec(). +// Sub(bondedRatio.Quo(mparams.GoalBonded)). +// Mul(mparams.InflationRateChange) +// +// inflationRateChange := inflationRateChangePerYear.Quo(sdk.NewDecFromInt(sdk.NewIntFromUint64(mparams.BlocksPerYear))) +// +// sdk.NewDecFromInt(sdk.NewIntFromUint64(mparams.BlocksPerYear)) +// +// // note inflationRateChange may be negative +// currentInflation := minter.Inflation.Add(inflationRateChange) +// +// // min, max currentInflation based on a defined range parameter 'r' +// // currentInflation range = [I(t) - I(t) * R, I(t) + I(t) * R] +// // R is from iparams.Variance +// minInflation := idealInflation.Sub(idealInflation.Mul(iparams.Variance)) +// maxInflation := idealInflation.Add(idealInflation.Mul(iparams.Variance)) +// +// // the lowest possible value of minInflation is set for 0 +// // tho it can be set to higher value in the future +// minInflation = sdk.MaxDec(sdk.ZeroDec(), minInflation) +// +// if currentInflation.LT(minInflation) { +// currentInflation = minInflation +// } else if currentInflation.GT(maxInflation) { +// currentInflation = maxInflation +// } +// +// return currentInflation +// } diff --git a/go/node/inflation/v1beta2/inflation_calculator_test.go b/go/node/inflation/v1beta2/inflation_calculator_test.go new file mode 100644 index 00000000..981a25cd --- /dev/null +++ b/go/node/inflation/v1beta2/inflation_calculator_test.go @@ -0,0 +1,83 @@ +package v1beta2 + +// todo akash-network/support#4 +// import ( +// "testing" +// "time" +// +// sdk "github.com/cosmos/cosmos-sdk/types" +// minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +// "github.com/stretchr/testify/suite" +// ) +// +// const ( +// blocksPerYear = 5256000 +// ) +// +// type InflationCalculatorTestSuite struct { +// suite.Suite +// params Params +// genesistime time.Time +// } +// +// func (s *InflationCalculatorTestSuite) SetupSuite() { +// var err error +// s.genesistime, err = time.Parse(time.RFC3339, "2021-03-08T15:00:00Z") +// s.Require().NoError(err) +// +// s.params.InflationDecayFactor, err = sdk.NewDecFromStr("2.10306569") +// s.Require().NoError(err) +// +// s.params.InitialInflation, err = sdk.NewDecFromStr("48.546257") +// s.Require().NoError(err) +// +// s.params.Variance, err = sdk.NewDecFromStr("0.05") +// s.Require().NoError(err) +// } +// +// func TestIntegrationTestSuite(t *testing.T) { +// suite.Run(t, new(InflationCalculatorTestSuite)) +// } +// +// func (s *InflationCalculatorTestSuite) TestInflationCalculatorInvalidDecayFactor() { +// testFn := func() { +// inflationCalculator( +// time.Time{}, +// time.Time{}, +// minttypes.Minter{}, +// minttypes.Params{}, +// Params{}, +// sdk.Dec{}) +// } +// +// s.Panics(testFn) +// } +// +// func (s *InflationCalculatorTestSuite) TestInflationCalculator1() { +// goalBonded, err := sdk.NewDecFromStr("0.67") +// s.Require().NoError(err) +// +// currBonded, err := sdk.NewDecFromStr("0.7324") +// s.Require().NoError(err) +// +// currInflation, err := sdk.NewDecFromStr("0.230326319830867266") +// s.Require().NoError(err) +// +// blockTime, _ := time.Parse(time.RFC3339, "2022-04-18T18:28:26+00:00") +// +// res := inflationCalculator( +// blockTime, +// s.genesistime, +// minttypes.Minter{ +// Inflation: currInflation, +// }, +// minttypes.Params{ +// BlocksPerYear: blocksPerYear, +// GoalBonded: goalBonded, +// InflationRateChange: s.params.Variance, +// }, +// s.params, +// currBonded) +// +// s.Require().Equal("31.967899564902300000", res.String()) +// } diff --git a/go/node/inflation/v1beta2/key.go b/go/node/inflation/v1beta2/key.go new file mode 100644 index 00000000..4083fff8 --- /dev/null +++ b/go/node/inflation/v1beta2/key.go @@ -0,0 +1,12 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "inflation" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) diff --git a/go/node/inflation/v1beta2/params.go b/go/node/inflation/v1beta2/params.go new file mode 100644 index 00000000..e5aaa85c --- /dev/null +++ b/go/node/inflation/v1beta2/params.go @@ -0,0 +1,94 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +const ( + keyInflationDecayFactor = "InflationDecayFactor" + keyInitialInflation = "InitialInflation" + keyVariance = "Variance" +) + +func DefaultInflationDecayFactor() sdk.Dec { return sdk.NewDec(2) } // years + +func DefaultInitialInflation() sdk.Dec { return sdk.NewDec(100) } +func DefaultVarince() sdk.Dec { return sdk.MustNewDecFromStr("0.05") } + +func MaxInitialInflation() sdk.Dec { return sdk.NewDec(100) } +func MinInitialInflation() sdk.Dec { return sdk.ZeroDec() } + +func MaxVariance() sdk.Dec { return sdk.NewDec(1) } +func MinVariance() sdk.Dec { return sdk.ZeroDec() } + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyInflationDecayFactor), &p.InflationDecayFactor, validateInflationDecayFactor), + paramtypes.NewParamSetPair([]byte(keyInitialInflation), &p.InitialInflation, validateInitialInflation), + paramtypes.NewParamSetPair([]byte(keyVariance), &p.Variance, validateVariance), + } +} + +func DefaultParams() Params { + return Params{ + InflationDecayFactor: DefaultInflationDecayFactor(), + InitialInflation: DefaultInitialInflation(), + Variance: DefaultVarince(), + } +} + +func (p Params) Validate() error { + if err := validateInflationDecayFactor(p.InflationDecayFactor); err != nil { + return err + } + if err := validateInitialInflation(p.InitialInflation); err != nil { + return err + } + if err := validateVariance(p.Variance); err != nil { + return err + } + + return nil +} + +func validateInflationDecayFactor(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok || v.LT(sdk.NewDec(1)) { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + + return nil +} + +func validateInitialInflation(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + if v.GT(MaxInitialInflation()) || v.LT(MinInitialInflation()) { + return errors.Wrapf(ErrInvalidInitialInflation, "%v", v) + } + + return nil +} + +func validateVariance(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + if v.GT(MaxVariance()) || v.LT(MinVariance()) { + return errors.Wrapf(ErrInvalidVariance, "%v", v) + } + + return nil +} diff --git a/go/node/inflation/v1beta2/params.pb.go b/go/node/inflation/v1beta2/params.pb.go new file mode 100644 index 00000000..73b2569d --- /dev/null +++ b/go/node/inflation/v1beta2/params.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta2/params.proto + +package v1beta2 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/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 + +// Params defines the parameters for the x/deployment package +type Params struct { + // InflationDecayFactor is the number of years it takes inflation to halve. + InflationDecayFactor github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation_decay_factor,json=inflationDecayFactor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_decay_factor" yaml:"inflation_decay_factor"` + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + InitialInflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=initial_inflation,json=initialInflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_inflation" yaml:"initial_inflation"` + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + Variance github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=variance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"variance" yaml:"variance"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_fea313162cb1e23f, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "akash.inflation.v1beta2.Params") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta2/params.proto", fileDescriptor_fea313162cb1e23f) +} + +var fileDescriptor_fea313162cb1e23f = []byte{ + // 355 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd2, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x07, 0xab, 0xd2, 0x83, 0xab, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0x95, 0xee, 0x32, 0x73, 0xb1, 0x05, 0x80, 0xf5, 0x0b, + 0xed, 0x60, 0xe4, 0x12, 0x83, 0x6b, 0x8b, 0x4f, 0x49, 0x4d, 0x4e, 0xac, 0x8c, 0x4f, 0x4b, 0x4c, + 0x2e, 0xc9, 0x2f, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x6a, 0x64, 0x3c, 0x71, 0x4f, 0x9e, + 0xe1, 0xd6, 0x3d, 0x79, 0xb5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, + 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0xad, 0x5f, 0x52, 0x59, 0x90, + 0x5a, 0xac, 0xe7, 0x92, 0x9a, 0xfc, 0xe8, 0x9e, 0xbc, 0x88, 0x27, 0xcc, 0x40, 0x17, 0x90, 0x79, + 0x6e, 0x60, 0xe3, 0x5e, 0xdd, 0x93, 0xc7, 0x61, 0xd1, 0xa7, 0x7b, 0xf2, 0xb2, 0x95, 0x89, 0xb9, + 0x39, 0x56, 0x4a, 0xd8, 0xe5, 0x95, 0x82, 0x44, 0x32, 0xb1, 0x18, 0x28, 0xb4, 0x80, 0x91, 0x4b, + 0x30, 0x33, 0x2f, 0xb3, 0x24, 0x33, 0x31, 0x27, 0x1e, 0xae, 0x40, 0x82, 0x09, 0xec, 0xea, 0x62, + 0x92, 0x1d, 0x2d, 0xe0, 0x09, 0x31, 0x0a, 0xee, 0xf6, 0x57, 0xf7, 0xe4, 0x31, 0x8d, 0xff, 0x74, + 0x4f, 0x5e, 0x02, 0xe6, 0x56, 0x34, 0x29, 0xa5, 0x20, 0x81, 0x4c, 0x34, 0x23, 0x84, 0x4a, 0xb9, + 0x38, 0xca, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x92, 0x53, 0x25, 0x98, 0xc1, 0x0e, 0x8b, 0x24, 0xd9, + 0x61, 0x1c, 0x61, 0x50, 0x13, 0x5e, 0xdd, 0x93, 0x87, 0x9b, 0xf6, 0xe9, 0x9e, 0x3c, 0x3f, 0xc4, + 0x1d, 0x30, 0x11, 0xa5, 0x20, 0xb8, 0xa4, 0x53, 0xe0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, + 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, + 0xcb, 0x31, 0x44, 0x99, 0x23, 0x59, 0x0b, 0x4e, 0x33, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, + 0xd9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x15, 0x48, 0x09, 0x0d, 0xec, 0x06, 0x58, 0x72, 0x4b, + 0x62, 0x03, 0xa7, 0x1c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x6e, 0xaf, 0x22, 0x90, + 0x02, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Variance.Size() + i -= size + if _, err := m.Variance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.InitialInflation.Size() + i -= size + if _, err := m.InitialInflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.InflationDecayFactor.Size() + i -= size + if _, err := m.InflationDecayFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.InflationDecayFactor.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.InitialInflation.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.Variance.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationDecayFactor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationDecayFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialInflation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialInflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Variance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Variance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/inflation/v1beta3/errors.go b/go/node/inflation/v1beta3/errors.go new file mode 100644 index 00000000..71679b09 --- /dev/null +++ b/go/node/inflation/v1beta3/errors.go @@ -0,0 +1,12 @@ +package v1beta3 + +import "errors" + +var ( + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = errors.New("parameter invalid") + // ErrInvalidInitialInflation indicates an invalid initial_inflation parameter + ErrInvalidInitialInflation = errors.New("initial inflation parameter is invalid") + // ErrInvalidVariance indicates an invalid variance parameter + ErrInvalidVariance = errors.New("variance parameter is invalid") +) diff --git a/go/node/inflation/v1beta3/genesis.pb.go b/go/node/inflation/v1beta3/genesis.pb.go new file mode 100644 index 00000000..5bfd76b7 --- /dev/null +++ b/go/node/inflation/v1beta3/genesis.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState stores slice of genesis deployment instance +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_9715c8a93ab9af0b, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.inflation.v1beta3.GenesisState") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta3/genesis.proto", fileDescriptor_9715c8a93ab9af0b) +} + +var fileDescriptor_9715c8a93ab9af0b = []byte{ + // 229 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x07, 0x2b, 0xd3, 0x83, 0x2b, 0xd3, 0x83, 0x2a, 0x93, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x54, 0x70, 0x99, 0x5a, 0x90, 0x58, 0x94, + 0x98, 0x0b, 0x35, 0x54, 0x29, 0x83, 0x8b, 0xc7, 0x1d, 0x62, 0x4b, 0x70, 0x49, 0x62, 0x49, 0xaa, + 0x50, 0x04, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5e, 0x0f, 0x87, + 0xad, 0x7a, 0x01, 0x60, 0x65, 0x4e, 0xf2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x0f, 0xd5, + 0xf6, 0xe9, 0x9e, 0x3c, 0x6f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x84, 0xaf, 0x14, 0x04, 0x95, + 0x70, 0x0a, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x9b, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x6d, 0xba, 0x79, 0xa9, 0x25, 0xe5, + 0xf9, 0x45, 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, + 0xa6, 0x77, 0x92, 0xd8, 0xc0, 0x1e, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x75, 0xa3, 0xaf, + 0xd7, 0x46, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/inflation/v1beta3/inflation_calculator.go b/go/node/inflation/v1beta3/inflation_calculator.go new file mode 100644 index 00000000..78782d25 --- /dev/null +++ b/go/node/inflation/v1beta3/inflation_calculator.go @@ -0,0 +1,102 @@ +package v1beta3 + +// todo akash-network/support#4 +// import ( +// "fmt" +// "time" +// +// sdk "github.com/cosmos/cosmos-sdk/types" +// minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +// paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" +// "github.com/ericlagergren/decimal" +// ) +// +// func GetInflationCalculator( +// genesisTime time.Time, +// inflationParamSubspace paramstypes.Subspace, +// ) minttypes.InflationCalculationFn { +// return func(ctx sdk.Context, minter minttypes.Minter, params minttypes.Params, bondedRatio sdk.Dec) sdk.Dec { +// var inflationParams Params +// inflationParamSubspace.GetParamSet(ctx, &inflationParams) +// +// return inflationCalculator(ctx.BlockTime(), genesisTime, minter, params, inflationParams, bondedRatio) +// } +// } +// +// // inflationCalculator calculate current inflation value +// // - btime - block time from sdk.Context +// // - gtime - genesis time +// func inflationCalculator(btime, gtime time.Time, minter minttypes.Minter, mparams minttypes.Params, iparams Params, bondedRatio sdk.Dec) sdk.Dec { +// inflationDecayFactor := new(decimal.Big) +// if _, valid := inflationDecayFactor.SetString(iparams.InflationDecayFactor.String()); !valid { +// panic(fmt.Sprintf("InflationDecayFactor contains invalid value [%s]. expected integer/float", iparams.InflationDecayFactor.String())) +// } +// +// // years passed since genesis = seconds passed since genesis / number of seconds per year +// // can be a fraction, eg: 0.5 +// yearsPassed := decimal.WithPrecision(sdk.Precision). +// Quo( +// // seconds since genesis +// decimal.WithPrecision(sdk.Precision). +// Sub( +// decimal.New(btime.Unix(), 0), +// decimal.New(gtime.Unix(), 0), +// ), +// // Number of hours in an year = 8766 (averaging the leap year hours) +// // Number of minutes in an hour = 60 +// // Number of seconds in a minute = 60 +// // => Number of seconds per year = 60 * 60 * 8766 = 31557600 +// decimal.New(31557600, 0), +// ) +// // 2^(-t/tHalf) +// inflationCoefDec := decimal.WithPrecision(sdk.Precision) +// inflationCoefDec = inflationCoefDec.Context. +// Pow( +// inflationCoefDec, +// decimal.New(2, 0), +// decimal.WithPrecision(sdk.Precision). +// Mul( +// decimal.New(-1, 0), +// decimal.WithPrecision(sdk.Precision). +// Quo(yearsPassed, inflationDecayFactor), +// ), +// ) +// // convert inflationCoefDec to sdk.Dec with a 6 unit precision: sdk.Decimal(big.Int(pow * 10^6)) / 10^6 +// inflationCoef := sdk.NewDecFromBigInt( +// decimal.WithPrecision(sdk.Precision). +// Mul(inflationCoefDec, decimal.New(1000000, 0)). +// Int(nil), +// ).QuoInt64(1000000) +// +// idealInflation := iparams.InitialInflation.Mul(inflationCoef) +// +// // (1 - bondedRatio/GoalBonded) * InflationRateChange +// inflationRateChangePerYear := sdk.OneDec(). +// Sub(bondedRatio.Quo(mparams.GoalBonded)). +// Mul(mparams.InflationRateChange) +// +// inflationRateChange := inflationRateChangePerYear.Quo(sdk.NewDecFromInt(sdk.NewIntFromUint64(mparams.BlocksPerYear))) +// +// sdk.NewDecFromInt(sdk.NewIntFromUint64(mparams.BlocksPerYear)) +// +// // note inflationRateChange may be negative +// currentInflation := minter.Inflation.Add(inflationRateChange) +// +// // min, max currentInflation based on a defined range parameter 'r' +// // currentInflation range = [I(t) - I(t) * R, I(t) + I(t) * R] +// // R is from iparams.Variance +// minInflation := idealInflation.Sub(idealInflation.Mul(iparams.Variance)) +// maxInflation := idealInflation.Add(idealInflation.Mul(iparams.Variance)) +// +// // the lowest possible value of minInflation is set for 0 +// // tho it can be set to higher value in the future +// minInflation = sdk.MaxDec(sdk.ZeroDec(), minInflation) +// +// if currentInflation.LT(minInflation) { +// currentInflation = minInflation +// } else if currentInflation.GT(maxInflation) { +// currentInflation = maxInflation +// } +// +// return currentInflation +// } diff --git a/go/node/inflation/v1beta3/inflation_calculator_test.go b/go/node/inflation/v1beta3/inflation_calculator_test.go new file mode 100644 index 00000000..0a9dd17f --- /dev/null +++ b/go/node/inflation/v1beta3/inflation_calculator_test.go @@ -0,0 +1,83 @@ +package v1beta3 + +// todo akash-network/support#4 +// import ( +// "testing" +// "time" +// +// sdk "github.com/cosmos/cosmos-sdk/types" +// minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" +// "github.com/stretchr/testify/suite" +// ) +// +// const ( +// blocksPerYear = 5256000 +// ) +// +// type InflationCalculatorTestSuite struct { +// suite.Suite +// params Params +// genesistime time.Time +// } +// +// func (s *InflationCalculatorTestSuite) SetupSuite() { +// var err error +// s.genesistime, err = time.Parse(time.RFC3339, "2021-03-08T15:00:00Z") +// s.Require().NoError(err) +// +// s.params.InflationDecayFactor, err = sdk.NewDecFromStr("2.10306569") +// s.Require().NoError(err) +// +// s.params.InitialInflation, err = sdk.NewDecFromStr("48.546257") +// s.Require().NoError(err) +// +// s.params.Variance, err = sdk.NewDecFromStr("0.05") +// s.Require().NoError(err) +// } +// +// func TestIntegrationTestSuite(t *testing.T) { +// suite.Run(t, new(InflationCalculatorTestSuite)) +// } +// +// func (s *InflationCalculatorTestSuite) TestInflationCalculatorInvalidDecayFactor() { +// testFn := func() { +// inflationCalculator( +// time.Time{}, +// time.Time{}, +// minttypes.Minter{}, +// minttypes.Params{}, +// Params{}, +// sdk.Dec{}) +// } +// +// s.Panics(testFn) +// } +// +// func (s *InflationCalculatorTestSuite) TestInflationCalculator1() { +// goalBonded, err := sdk.NewDecFromStr("0.67") +// s.Require().NoError(err) +// +// currBonded, err := sdk.NewDecFromStr("0.7324") +// s.Require().NoError(err) +// +// currInflation, err := sdk.NewDecFromStr("0.230326319830867266") +// s.Require().NoError(err) +// +// blockTime, _ := time.Parse(time.RFC3339, "2022-04-18T18:28:26+00:00") +// +// res := inflationCalculator( +// blockTime, +// s.genesistime, +// minttypes.Minter{ +// Inflation: currInflation, +// }, +// minttypes.Params{ +// BlocksPerYear: blocksPerYear, +// GoalBonded: goalBonded, +// InflationRateChange: s.params.Variance, +// }, +// s.params, +// currBonded) +// +// s.Require().Equal("31.967899564902300000", res.String()) +// } diff --git a/go/node/inflation/v1beta3/key.go b/go/node/inflation/v1beta3/key.go new file mode 100644 index 00000000..504b7f76 --- /dev/null +++ b/go/node/inflation/v1beta3/key.go @@ -0,0 +1,12 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "inflation" + + // StoreKey is the store key string for deployment + StoreKey = ModuleName + + // RouterKey is the message route for deployment + RouterKey = ModuleName +) diff --git a/go/node/inflation/v1beta3/params.go b/go/node/inflation/v1beta3/params.go new file mode 100644 index 00000000..c09e26c1 --- /dev/null +++ b/go/node/inflation/v1beta3/params.go @@ -0,0 +1,94 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +const ( + keyInflationDecayFactor = "InflationDecayFactor" + keyInitialInflation = "InitialInflation" + keyVariance = "Variance" +) + +func DefaultInflationDecayFactor() sdk.Dec { return sdk.NewDec(2) } // years + +func DefaultInitialInflation() sdk.Dec { return sdk.NewDec(100) } +func DefaultVarince() sdk.Dec { return sdk.MustNewDecFromStr("0.05") } + +func MaxInitialInflation() sdk.Dec { return sdk.NewDec(100) } +func MinInitialInflation() sdk.Dec { return sdk.ZeroDec() } + +func MaxVariance() sdk.Dec { return sdk.NewDec(1) } +func MinVariance() sdk.Dec { return sdk.ZeroDec() } + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyInflationDecayFactor), &p.InflationDecayFactor, validateInflationDecayFactor), + paramtypes.NewParamSetPair([]byte(keyInitialInflation), &p.InitialInflation, validateInitialInflation), + paramtypes.NewParamSetPair([]byte(keyVariance), &p.Variance, validateVariance), + } +} + +func DefaultParams() Params { + return Params{ + InflationDecayFactor: DefaultInflationDecayFactor(), + InitialInflation: DefaultInitialInflation(), + Variance: DefaultVarince(), + } +} + +func (p Params) Validate() error { + if err := validateInflationDecayFactor(p.InflationDecayFactor); err != nil { + return err + } + if err := validateInitialInflation(p.InitialInflation); err != nil { + return err + } + if err := validateVariance(p.Variance); err != nil { + return err + } + + return nil +} + +func validateInflationDecayFactor(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok || v.LT(sdk.NewDec(1)) { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + + return nil +} + +func validateInitialInflation(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + if v.GT(MaxInitialInflation()) || v.LT(MinInitialInflation()) { + return errors.Wrapf(ErrInvalidInitialInflation, "%v", v) + } + + return nil +} + +func validateVariance(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return errors.Wrapf(ErrInvalidParam, "%T", i) + } + if v.GT(MaxVariance()) || v.LT(MinVariance()) { + return errors.Wrapf(ErrInvalidVariance, "%v", v) + } + + return nil +} diff --git a/go/node/inflation/v1beta3/params.pb.go b/go/node/inflation/v1beta3/params.pb.go new file mode 100644 index 00000000..00219178 --- /dev/null +++ b/go/node/inflation/v1beta3/params.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/inflation/v1beta3/params.proto + +package v1beta3 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params defines the parameters for the x/deployment package +type Params struct { + // InflationDecayFactor is the number of years it takes inflation to halve. + InflationDecayFactor github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation_decay_factor,json=inflationDecayFactor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_decay_factor" yaml:"inflation_decay_factor"` + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + InitialInflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=initial_inflation,json=initialInflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_inflation" yaml:"initial_inflation"` + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + Variance github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=variance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"variance" yaml:"variance"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_07a125eb3d20d95e, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "akash.inflation.v1beta3.Params") +} + +func init() { + proto.RegisterFile("akash/inflation/v1beta3/params.proto", fileDescriptor_07a125eb3d20d95e) +} + +var fileDescriptor_07a125eb3d20d95e = []byte{ + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, + 0x2d, 0x49, 0x34, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x07, 0xab, 0xd2, 0x83, 0xab, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0x95, 0xee, 0x32, 0x73, 0xb1, 0x05, 0x80, 0xf5, 0x0b, + 0xed, 0x60, 0xe4, 0x12, 0x83, 0x6b, 0x8b, 0x4f, 0x49, 0x4d, 0x4e, 0xac, 0x8c, 0x4f, 0x4b, 0x4c, + 0x2e, 0xc9, 0x2f, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x6a, 0x64, 0x3c, 0x71, 0x4f, 0x9e, + 0xe1, 0xd6, 0x3d, 0x79, 0xb5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, + 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0xad, 0x5f, 0x52, 0x59, 0x90, + 0x5a, 0xac, 0xe7, 0x92, 0x9a, 0xfc, 0xe8, 0x9e, 0xbc, 0x88, 0x27, 0xcc, 0x40, 0x17, 0x90, 0x79, + 0x6e, 0x60, 0xe3, 0x5e, 0xdd, 0x93, 0xc7, 0x61, 0xd1, 0xa7, 0x7b, 0xf2, 0xb2, 0x95, 0x89, 0xb9, + 0x39, 0x56, 0x4a, 0xd8, 0xe5, 0x95, 0x82, 0x44, 0x32, 0xb1, 0x18, 0x28, 0xb4, 0x80, 0x91, 0x4b, + 0x30, 0x33, 0x2f, 0xb3, 0x24, 0x33, 0x31, 0x27, 0x1e, 0xae, 0x40, 0x82, 0x09, 0xec, 0xea, 0x62, + 0x92, 0x1d, 0x2d, 0xe0, 0x09, 0x31, 0x0a, 0xee, 0xf6, 0x57, 0xf7, 0xe4, 0x31, 0x8d, 0xff, 0x74, + 0x4f, 0x5e, 0x02, 0xe6, 0x56, 0x34, 0x29, 0xa5, 0x20, 0x81, 0x4c, 0x34, 0x23, 0x84, 0x4a, 0xb9, + 0x38, 0xca, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x92, 0x53, 0x25, 0x98, 0xc1, 0x0e, 0x8b, 0x24, 0xd9, + 0x61, 0x1c, 0x61, 0x50, 0x13, 0x5e, 0xdd, 0x93, 0x87, 0x9b, 0xf6, 0xe9, 0x9e, 0x3c, 0x3f, 0xc4, + 0x1d, 0x30, 0x11, 0xa5, 0x20, 0xb8, 0xa4, 0x53, 0xd8, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, + 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, + 0xcb, 0x31, 0x44, 0xd9, 0x20, 0x59, 0x0b, 0x4e, 0x33, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, + 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x66, 0x9a, + 0x4b, 0x62, 0x03, 0x27, 0x1f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0x3a, 0x16, 0xfa, + 0x95, 0x02, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Variance.Size() + i -= size + if _, err := m.Variance.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.InitialInflation.Size() + i -= size + if _, err := m.InitialInflation.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.InflationDecayFactor.Size() + i -= size + if _, err := m.InflationDecayFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.InflationDecayFactor.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.InitialInflation.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.Variance.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InflationDecayFactor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InflationDecayFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialInflation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialInflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Variance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Variance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/bid.pb.go b/go/node/market/v1beta2/bid.pb.go new file mode 100644 index 00000000..62b51478 --- /dev/null +++ b/go/node/market/v1beta2/bid.pb.go @@ -0,0 +1,1967 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/bid.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of bid +type Bid_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + BidStateInvalid Bid_State = 0 + // BidOpen denotes state for bid open + BidOpen Bid_State = 1 + // BidMatched denotes state for bid open + BidActive Bid_State = 2 + // BidLost denotes state for bid lost + BidLost Bid_State = 3 + // BidClosed denotes state for bid closed + BidClosed Bid_State = 4 +) + +var Bid_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "active", + 3: "lost", + 4: "closed", +} + +var Bid_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "active": 2, + "lost": 3, + "closed": 4, +} + +func (x Bid_State) String() string { + return proto.EnumName(Bid_State_name, int32(x)) +} + +func (Bid_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{5, 0} +} + +// MsgCreateBid defines an SDK message for creating Bid +type MsgCreateBid struct { + Order OrderID `protobuf:"bytes,1,opt,name=order,proto3" json:"order" yaml:"order"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider" yaml:"provider"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + Deposit types.Coin `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit" yaml:"deposit"` +} + +func (m *MsgCreateBid) Reset() { *m = MsgCreateBid{} } +func (m *MsgCreateBid) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBid) ProtoMessage() {} +func (*MsgCreateBid) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{0} +} +func (m *MsgCreateBid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBid.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 *MsgCreateBid) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBid.Merge(m, src) +} +func (m *MsgCreateBid) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBid) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBid.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBid proto.InternalMessageInfo + +func (m *MsgCreateBid) GetOrder() OrderID { + if m != nil { + return m.Order + } + return OrderID{} +} + +func (m *MsgCreateBid) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *MsgCreateBid) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *MsgCreateBid) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +// MsgCreateBidResponse defines the Msg/CreateBid response type. +type MsgCreateBidResponse struct { +} + +func (m *MsgCreateBidResponse) Reset() { *m = MsgCreateBidResponse{} } +func (m *MsgCreateBidResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBidResponse) ProtoMessage() {} +func (*MsgCreateBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{1} +} +func (m *MsgCreateBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBidResponse.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 *MsgCreateBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBidResponse.Merge(m, src) +} +func (m *MsgCreateBidResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBidResponse proto.InternalMessageInfo + +// MsgCloseBid defines an SDK message for closing bid +type MsgCloseBid struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseBid) Reset() { *m = MsgCloseBid{} } +func (m *MsgCloseBid) String() string { return proto.CompactTextString(m) } +func (*MsgCloseBid) ProtoMessage() {} +func (*MsgCloseBid) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{2} +} +func (m *MsgCloseBid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseBid.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 *MsgCloseBid) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseBid.Merge(m, src) +} +func (m *MsgCloseBid) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseBid) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseBid.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseBid proto.InternalMessageInfo + +func (m *MsgCloseBid) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +// MsgCloseBidResponse defines the Msg/CloseBid response type. +type MsgCloseBidResponse struct { +} + +func (m *MsgCloseBidResponse) Reset() { *m = MsgCloseBidResponse{} } +func (m *MsgCloseBidResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseBidResponse) ProtoMessage() {} +func (*MsgCloseBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{3} +} +func (m *MsgCloseBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseBidResponse.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 *MsgCloseBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseBidResponse.Merge(m, src) +} +func (m *MsgCloseBidResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseBidResponse proto.InternalMessageInfo + +// BidID stores owner and all other seq numbers +// A successful bid becomes a Lease(ID). +type BidID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` +} + +func (m *BidID) Reset() { *m = BidID{} } +func (*BidID) ProtoMessage() {} +func (*BidID) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{4} +} +func (m *BidID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BidID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BidID.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 *BidID) XXX_Merge(src proto.Message) { + xxx_messageInfo_BidID.Merge(m, src) +} +func (m *BidID) XXX_Size() int { + return m.Size() +} +func (m *BidID) XXX_DiscardUnknown() { + xxx_messageInfo_BidID.DiscardUnknown(m) +} + +var xxx_messageInfo_BidID proto.InternalMessageInfo + +func (m *BidID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *BidID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *BidID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *BidID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *BidID) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +// Bid stores BidID, state of bid and price +type Bid struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` + State Bid_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta2.Bid_State" json:"state" yaml:"state"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Bid) Reset() { *m = Bid{} } +func (*Bid) ProtoMessage() {} +func (*Bid) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{5} +} +func (m *Bid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bid.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 *Bid) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bid.Merge(m, src) +} +func (m *Bid) XXX_Size() int { + return m.Size() +} +func (m *Bid) XXX_DiscardUnknown() { + xxx_messageInfo_Bid.DiscardUnknown(m) +} + +var xxx_messageInfo_Bid proto.InternalMessageInfo + +func (m *Bid) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +func (m *Bid) GetState() Bid_State { + if m != nil { + return m.State + } + return BidStateInvalid +} + +func (m *Bid) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *Bid) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// BidFilters defines flags for bid list filter +type BidFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *BidFilters) Reset() { *m = BidFilters{} } +func (m *BidFilters) String() string { return proto.CompactTextString(m) } +func (*BidFilters) ProtoMessage() {} +func (*BidFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_4790fafc515256e6, []int{6} +} +func (m *BidFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BidFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BidFilters.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 *BidFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_BidFilters.Merge(m, src) +} +func (m *BidFilters) XXX_Size() int { + return m.Size() +} +func (m *BidFilters) XXX_DiscardUnknown() { + xxx_messageInfo_BidFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_BidFilters proto.InternalMessageInfo + +func (m *BidFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *BidFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *BidFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *BidFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *BidFilters) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *BidFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.market.v1beta2.Bid_State", Bid_State_name, Bid_State_value) + proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta2.MsgCreateBid") + proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta2.MsgCreateBidResponse") + proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta2.MsgCloseBid") + proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta2.MsgCloseBidResponse") + proto.RegisterType((*BidID)(nil), "akash.market.v1beta2.BidID") + proto.RegisterType((*Bid)(nil), "akash.market.v1beta2.Bid") + proto.RegisterType((*BidFilters)(nil), "akash.market.v1beta2.BidFilters") +} + +func init() { proto.RegisterFile("akash/market/v1beta2/bid.proto", fileDescriptor_4790fafc515256e6) } + +var fileDescriptor_4790fafc515256e6 = []byte{ + // 750 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0xbd, 0x6e, 0xdb, 0x48, + 0x10, 0xc7, 0x49, 0x89, 0x94, 0xad, 0x95, 0x3f, 0x04, 0xda, 0x3e, 0xd8, 0xba, 0x33, 0x97, 0xc7, + 0xe2, 0xe0, 0xe6, 0x48, 0xd8, 0xae, 0xce, 0x57, 0x99, 0x16, 0xee, 0x20, 0x20, 0x81, 0x13, 0x3a, + 0x48, 0x91, 0x14, 0x06, 0xc5, 0x5d, 0xd0, 0x0b, 0x4b, 0x5c, 0x9a, 0x64, 0x64, 0xe4, 0x0d, 0x02, + 0x57, 0x01, 0xd2, 0xa4, 0x71, 0x60, 0x20, 0x0f, 0x92, 0xd6, 0xa5, 0xcb, 0xa4, 0x21, 0x02, 0xb9, + 0x09, 0x54, 0xea, 0x09, 0x82, 0xfd, 0xd0, 0x87, 0x03, 0x25, 0x40, 0x0a, 0x77, 0xa9, 0xa8, 0xfd, + 0xcf, 0xfc, 0x46, 0xc3, 0xf9, 0x0f, 0x49, 0x60, 0x06, 0xa7, 0x41, 0x76, 0xe2, 0x76, 0x83, 0xf4, + 0x14, 0xe7, 0x6e, 0x6f, 0xbb, 0x8d, 0xf3, 0x60, 0xc7, 0x6d, 0x13, 0xe4, 0x24, 0x29, 0xcd, 0xa9, + 0xb1, 0xca, 0xe3, 0x8e, 0x88, 0x3b, 0x32, 0xde, 0x58, 0x8d, 0x68, 0x44, 0x79, 0x82, 0xcb, 0x7e, + 0x89, 0xdc, 0x86, 0x35, 0xb3, 0x16, 0x4d, 0x11, 0x4e, 0x65, 0x86, 0x19, 0xd2, 0xac, 0x4b, 0x33, + 0xb7, 0x1d, 0x64, 0x58, 0x26, 0x6c, 0xbb, 0x21, 0x25, 0xb1, 0x88, 0xdb, 0x9f, 0x4a, 0x60, 0xe1, + 0x61, 0x16, 0x1d, 0xa4, 0x38, 0xc8, 0xb1, 0x47, 0x90, 0xf1, 0x1c, 0xe8, 0x9c, 0x5f, 0x57, 0x2d, + 0x75, 0xab, 0xb6, 0xb3, 0xe9, 0xcc, 0x6a, 0xc7, 0x39, 0x64, 0x29, 0xad, 0xa6, 0xf7, 0xd7, 0x75, + 0x01, 0x95, 0x7e, 0x01, 0x75, 0x2e, 0x0c, 0x0a, 0x28, 0xe0, 0x61, 0x01, 0x17, 0x5e, 0x06, 0xdd, + 0xce, 0x9e, 0xcd, 0x8f, 0xb6, 0x2f, 0x64, 0xe3, 0x5f, 0x30, 0x9f, 0xa4, 0xb4, 0x47, 0x58, 0xfd, + 0x92, 0xa5, 0x6e, 0x55, 0x3d, 0x38, 0x28, 0xe0, 0x58, 0x1b, 0x16, 0x70, 0x59, 0x60, 0x23, 0xc5, + 0xf6, 0xc7, 0x41, 0xe3, 0x31, 0xd0, 0x93, 0x94, 0x84, 0x78, 0xbd, 0xcc, 0x3b, 0xfb, 0xc3, 0x11, + 0xb7, 0xe6, 0xb0, 0x5b, 0x93, 0x8d, 0x6d, 0x3b, 0x4d, 0x1c, 0x1e, 0x50, 0x12, 0x7b, 0x9b, 0xac, + 0x31, 0xd6, 0x0f, 0x47, 0x26, 0xfd, 0xf0, 0xa3, 0xed, 0x0b, 0xd9, 0x78, 0x0a, 0xe6, 0x10, 0x4e, + 0x68, 0x46, 0xf2, 0x75, 0x8d, 0x17, 0xdd, 0x98, 0x59, 0x94, 0x57, 0xfc, 0x53, 0x56, 0x1c, 0x11, + 0xc3, 0x02, 0x2e, 0x89, 0x9a, 0x52, 0xb0, 0xfd, 0x51, 0x68, 0x4f, 0xfb, 0x72, 0x05, 0x15, 0xfb, + 0x37, 0xb0, 0x3a, 0x3d, 0x5a, 0x1f, 0x67, 0x09, 0x8d, 0x33, 0x6c, 0x13, 0x50, 0x63, 0x7a, 0x87, + 0x66, 0x7c, 0xe2, 0x4f, 0x40, 0xa5, 0x4d, 0xd0, 0x31, 0x41, 0x72, 0xe4, 0xbf, 0xcf, 0x1e, 0xb9, + 0x47, 0x50, 0xab, 0xe9, 0x59, 0xa3, 0x81, 0xf3, 0xe3, 0xa0, 0x80, 0x25, 0x82, 0x86, 0x05, 0xac, + 0x8a, 0x4e, 0x08, 0xb2, 0x7d, 0xbd, 0x4d, 0x50, 0x0b, 0xc9, 0x16, 0xd6, 0xc0, 0xca, 0xd4, 0x5f, + 0x8d, 0x3b, 0x78, 0x57, 0x02, 0xa2, 0x80, 0xe1, 0x02, 0x9d, 0x9e, 0xc7, 0xd2, 0xee, 0xaa, 0xb7, + 0xc1, 0x2d, 0x64, 0xc2, 0x94, 0x85, 0xec, 0xc8, 0x2c, 0x64, 0x57, 0x63, 0x17, 0x68, 0x28, 0xc3, + 0x67, 0xdc, 0x3e, 0xcd, 0x83, 0xfd, 0x02, 0x6a, 0xcd, 0x23, 0x7c, 0x36, 0x28, 0x20, 0xd7, 0x87, + 0x05, 0xac, 0xc9, 0xa9, 0x64, 0xf8, 0xcc, 0xf6, 0xb9, 0xc8, 0xa0, 0x88, 0x41, 0xcc, 0xb9, 0x45, + 0x01, 0xfd, 0x2f, 0xa1, 0xe8, 0x0e, 0x14, 0x09, 0x28, 0x92, 0x10, 0x65, 0x90, 0x36, 0x81, 0x0e, + 0x25, 0x44, 0xef, 0x40, 0x54, 0x40, 0xec, 0x72, 0x67, 0xc3, 0xf4, 0x9f, 0xdc, 0xb0, 0xbd, 0xf9, + 0xb7, 0x57, 0x50, 0xe1, 0x73, 0xfb, 0x50, 0x06, 0xe5, 0x7b, 0xf3, 0xc6, 0x78, 0x04, 0xf4, 0x2c, + 0x0f, 0x72, 0xcc, 0x87, 0xb8, 0xb4, 0x03, 0xbf, 0x5b, 0xd4, 0x39, 0x62, 0x69, 0xc2, 0x15, 0x4e, + 0x4c, 0x5c, 0xe1, 0x47, 0xdb, 0x17, 0xf2, 0x7d, 0x3c, 0x1b, 0x9b, 0x00, 0x84, 0x7c, 0x75, 0xd1, + 0x71, 0x20, 0x1e, 0x8f, 0xb2, 0x5f, 0x95, 0xca, 0x7e, 0x6e, 0xbf, 0x51, 0x81, 0xce, 0xbb, 0x33, + 0x2c, 0x30, 0x47, 0xe2, 0x5e, 0xd0, 0x21, 0xa8, 0xae, 0x34, 0x56, 0x2e, 0x2e, 0xad, 0x65, 0x8f, + 0x20, 0x1e, 0x6a, 0x09, 0xd9, 0x58, 0x03, 0x1a, 0x4d, 0x70, 0x5c, 0x57, 0x1b, 0xb5, 0x8b, 0x4b, + 0x6b, 0xce, 0x23, 0xe8, 0x30, 0xc1, 0xb1, 0xb1, 0x01, 0x2a, 0x41, 0x98, 0x93, 0x1e, 0xae, 0x97, + 0x1a, 0x8b, 0x17, 0x97, 0x56, 0xd5, 0x23, 0x68, 0x9f, 0x0b, 0x8c, 0xe8, 0xd0, 0x2c, 0xaf, 0x97, + 0xc7, 0xc4, 0x03, 0x9a, 0xe5, 0x8c, 0x08, 0xd9, 0x2e, 0xa3, 0xba, 0x36, 0x26, 0xf8, 0x72, 0xa3, + 0x86, 0xf6, 0xea, 0xbd, 0xa9, 0x4c, 0x39, 0x78, 0x53, 0x02, 0xc0, 0x23, 0xe8, 0x3f, 0xd2, 0xc9, + 0x71, 0x9a, 0xfd, 0xda, 0xf3, 0xe9, 0x37, 0xa9, 0x3b, 0xda, 0xbf, 0xca, 0x64, 0x18, 0x3f, 0x5a, + 0x2f, 0xf1, 0x32, 0xf1, 0x8e, 0xae, 0xfb, 0xa6, 0x7a, 0xd3, 0x37, 0xd5, 0xcf, 0x7d, 0x53, 0x7d, + 0x7d, 0x6b, 0x2a, 0x37, 0xb7, 0xa6, 0xf2, 0xf1, 0xd6, 0x54, 0x9e, 0xfd, 0x13, 0x91, 0xfc, 0xe4, + 0x45, 0xdb, 0x09, 0x69, 0xd7, 0xe5, 0xbb, 0xfc, 0x77, 0x8c, 0xf3, 0x73, 0x9a, 0x9e, 0xca, 0x53, + 0x90, 0x10, 0x37, 0xa2, 0x6e, 0x4c, 0x11, 0xfe, 0xe6, 0x63, 0xd5, 0xae, 0xf0, 0xef, 0xd0, 0xee, + 0xd7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x85, 0xd3, 0xf8, 0x17, 0x07, 0x00, 0x00, +} + +func (m *MsgCreateBid) 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 *MsgCreateBid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateBidResponse) 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 *MsgCreateBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseBid) 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 *MsgCloseBid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseBidResponse) 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 *MsgCloseBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *BidID) 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 *BidID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BidID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintBid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Bid) 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 *Bid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BidFilters) 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 *BidFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BidFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintBid(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x32 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintBid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBid(dAtA []byte, offset int, v uint64) int { + offset -= sovBid(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateBid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Order.Size() + n += 1 + l + sovBid(uint64(l)) + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovBid(uint64(l)) + l = m.Deposit.Size() + n += 1 + l + sovBid(uint64(l)) + return n +} + +func (m *MsgCreateBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseBid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovBid(uint64(l)) + return n +} + +func (m *MsgCloseBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *BidID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovBid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovBid(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovBid(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + return n +} + +func (m *Bid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovBid(uint64(l)) + if m.State != 0 { + n += 1 + sovBid(uint64(m.State)) + } + l = m.Price.Size() + n += 1 + l + sovBid(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovBid(uint64(m.CreatedAt)) + } + return n +} + +func (m *BidFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovBid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovBid(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovBid(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + return n +} + +func sovBid(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBid(x uint64) (n int) { + return sovBid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateBid) 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 ErrIntOverflowBid + } + 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: MsgCreateBid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBidResponse) 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 ErrIntOverflowBid + } + 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: MsgCreateBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseBid) 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 ErrIntOverflowBid + } + 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: MsgCloseBid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseBid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseBidResponse) 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 ErrIntOverflowBid + } + 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: MsgCloseBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BidID) 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 ErrIntOverflowBid + } + 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: BidID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BidID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bid) 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 ErrIntOverflowBid + } + 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: Bid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Bid_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BidFilters) 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 ErrIntOverflowBid + } + 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: BidFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BidFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBid(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, ErrIntOverflowBid + } + 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, ErrIntOverflowBid + } + 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, ErrIntOverflowBid + } + 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, ErrInvalidLengthBid + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBid + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBid + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBid = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBid = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBid = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/codec.go b/go/node/market/v1beta2/codec.go new file mode 100644 index 00000000..75350343 --- /dev/null +++ b/go/node/market/v1beta2/codec.go @@ -0,0 +1,50 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/market module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/market and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec registers the necessary x/market interfaces and concrete types +// on the provided Amino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateBid{}, ModuleName+"/"+MsgTypeCreateBid, nil) + cdc.RegisterConcrete(&MsgCloseBid{}, ModuleName+"/"+MsgTypeCloseBid, nil) + cdc.RegisterConcrete(&MsgCreateLease{}, ModuleName+"/"+MsgTypeCreateLease, nil) + cdc.RegisterConcrete(&MsgWithdrawLease{}, ModuleName+"/"+MsgTypeWithdrawLease, nil) + cdc.RegisterConcrete(&MsgCloseLease{}, ModuleName+"/"+MsgTypeCloseLease, nil) +} + +// RegisterInterfaces registers the x/market interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateBid{}, + &MsgCloseBid{}, + &MsgCreateLease{}, + &MsgWithdrawLease{}, + &MsgCloseLease{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/market/v1beta2/errors.go b/go/node/market/v1beta2/errors.go new file mode 100644 index 00000000..6f74841d --- /dev/null +++ b/go/node/market/v1beta2/errors.go @@ -0,0 +1,72 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + // ErrEmptyProvider is the error when provider is empty + ErrEmptyProvider = errors.New("empty provider") + // ErrSameAccount is the error when owner and provider are the same account + ErrSameAccount = errors.New("owner and provider are the same account") + // ErrInternal is the error for internal error + ErrInternal = errors.New("internal error") + // ErrBidOverOrder is the error when bid price is above max order price + ErrBidOverOrder = errors.New("bid price above max order price") + // ErrAttributeMismatch is the error for attribute mismatch + ErrAttributeMismatch = errors.New("attribute mismatch") + // ErrCapabilitiesMismatch is the error for capabilities mismatch + ErrCapabilitiesMismatch = errors.New("capabilities mismatch") + // ErrUnknownBid is the error for unknown bid + ErrUnknownBid = errors.New("unknown bid") + // ErrUnknownLease is the error for unknown bid + ErrUnknownLease = errors.New("unknown lease") + // ErrUnknownLeaseForBid is the error when lease is unknown for bid + ErrUnknownLeaseForBid = errors.New("unknown lease for bid") + // ErrUnknownOrderForBid is the error when order is unknown for bid + ErrUnknownOrderForBid = errors.New("unknown order for bid") + // ErrLeaseNotActive is the error when lease is not active + ErrLeaseNotActive = errors.New("lease not active") + // ErrBidNotActive is the error when bid is not matched + ErrBidNotActive = errors.New("bid not active") + // ErrBidNotOpen is the error when bid is not matched + ErrBidNotOpen = errors.New("bid not open") + // ErrNoLeaseForOrder is the error when there is no lease for order + ErrNoLeaseForOrder = errors.New("no lease for order") + // ErrOrderNotFound order not found + ErrOrderNotFound = errors.New("invalid order: order not found") + // ErrGroupNotFound order not found + ErrGroupNotFound = errors.New("order not found") + // ErrGroupNotOpen order not found + ErrGroupNotOpen = errors.New("order not open") + // ErrOrderNotOpen order not found + ErrOrderNotOpen = errors.New("bid: order not open") + // ErrBidNotFound bid not found + ErrBidNotFound = errors.New("invalid bid: bid not found") + // ErrBidZeroPrice zero price + ErrBidZeroPrice = errors.New("invalid bid: zero price") + // ErrLeaseNotFound lease not found + ErrLeaseNotFound = errors.New("invalid lease: lease not found") + // ErrBidExists bid exists + ErrBidExists = errors.New("invalid bid: bid exists from provider") + // ErrBidInvalidPrice bid invalid price + ErrBidInvalidPrice = errors.New("bid price is invalid") + // ErrOrderActive order active + ErrOrderActive = errors.New("order active") + // ErrOrderClosed order closed + ErrOrderClosed = errors.New("order closed") + // ErrOrderExists indicates a new order was proposed overwrite the existing store key + ErrOrderExists = errors.New("order already exists in store") + // ErrOrderTooEarly to match bid + ErrOrderTooEarly = errors.New("order: chain height to low for bidding") + // ErrOrderDurationExceeded order should be closed + ErrOrderDurationExceeded = errors.New("order duration has exceeded the bidding duration") + // ErrInvalidDeposit indicates an invalid deposit + ErrInvalidDeposit = errors.New("Deposit invalid") + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = errors.New("parameter invalid") + // ErrUnknownProvider indicates an invalid chain parameter + ErrUnknownProvider = errors.New("unknown provider") + // ErrInvalidBid indicates an invalid chain parameter + ErrInvalidBid = errors.New("unknown provider") +) diff --git a/go/node/market/v1beta2/escrow.go b/go/node/market/v1beta2/escrow.go new file mode 100644 index 00000000..fbc9e455 --- /dev/null +++ b/go/node/market/v1beta2/escrow.go @@ -0,0 +1,61 @@ +package v1beta2 + +import ( + "fmt" + "strconv" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + + etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta2" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" +) + +const ( + bidEscrowScope = "bid" +) + +func EscrowAccountForBid(id BidID) etypes.AccountID { + return etypes.AccountID{ + Scope: bidEscrowScope, + XID: id.String(), + } +} + +func EscrowPaymentForLease(id LeaseID) string { + return fmt.Sprintf("%v/%v/%s", id.GSeq, id.OSeq, id.Provider) +} + +func LeaseIDFromEscrowAccount(id etypes.AccountID, pid string) (LeaseID, bool) { + did, ok := dtypes.DeploymentIDFromEscrowAccount(id) + if !ok { + return LeaseID{}, false + } + + parts := strings.Split(pid, "/") + if len(parts) != 3 { + return LeaseID{}, false + } + + gseq, err := strconv.ParseUint(parts[0], 10, 32) + if err != nil { + return LeaseID{}, false + } + + oseq, err := strconv.ParseUint(parts[1], 10, 32) + if err != nil { + return LeaseID{}, false + } + + owner, err := sdk.AccAddressFromBech32(parts[2]) + if err != nil { + return LeaseID{}, false + } + + return MakeLeaseID( + MakeBidID( + MakeOrderID( + dtypes.MakeGroupID( + did, uint32(gseq)), uint32(oseq)), owner)), true +} diff --git a/go/node/market/v1beta2/event.go b/go/node/market/v1beta2/event.go new file mode 100644 index 00000000..c94c1948 --- /dev/null +++ b/go/node/market/v1beta2/event.go @@ -0,0 +1,360 @@ +package v1beta2 + +import ( + "strconv" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + + "github.com/akash-network/node/sdkutil" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" +) + +const ( + evActionOrderCreated = "order-created" + evActionOrderClosed = "order-closed" + evActionBidCreated = "bid-created" + evActionBidClosed = "bid-closed" + evActionLeaseCreated = "lease-created" + evActionLeaseClosed = "lease-closed" + + evOSeqKey = "oseq" + evProviderKey = "provider" + evPriceDenomKey = "price-denom" + evPriceAmountKey = "price-amount" +) + +var ( + ErrParsingPrice = errors.New("error parsing price") +) + +// EventOrderCreated struct +type EventOrderCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID OrderID `json:"id"` +} + +func NewEventOrderCreated(id OrderID) EventOrderCreated { + return EventOrderCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionOrderCreated, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventOrderCreated struct +func (e EventOrderCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionOrderCreated), + }, orderIDEVAttributes(e.ID)...)..., + ) +} + +// EventOrderClosed struct +type EventOrderClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID OrderID `json:"id"` +} + +func NewEventOrderClosed(id OrderID) EventOrderClosed { + return EventOrderClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionOrderClosed, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventOrderClosed struct +func (e EventOrderClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionOrderClosed), + }, orderIDEVAttributes(e.ID)...)..., + ) +} + +// EventBidCreated struct +type EventBidCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID BidID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventBidCreated(id BidID, price sdk.DecCoin) EventBidCreated { + return EventBidCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionBidCreated, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventBidCreated struct +func (e EventBidCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionBidCreated), + }, bidIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)..., + ) +} + +// EventBidClosed struct +type EventBidClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID BidID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventBidClosed(id BidID, price sdk.DecCoin) EventBidClosed { + return EventBidClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionBidClosed, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventBidClosed struct +func (e EventBidClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionBidClosed), + }, bidIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)..., + ) +} + +// EventLeaseCreated struct +type EventLeaseCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID LeaseID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventLeaseCreated(id LeaseID, price sdk.DecCoin) EventLeaseCreated { + return EventLeaseCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionLeaseCreated, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventLeaseCreated struct +func (e EventLeaseCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionLeaseCreated), + }, leaseIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)...) +} + +// EventLeaseClosed struct +type EventLeaseClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID LeaseID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventLeaseClosed(id LeaseID, price sdk.DecCoin) EventLeaseClosed { + return EventLeaseClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionLeaseClosed, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventLeaseClosed struct +func (e EventLeaseClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionLeaseClosed), + }, leaseIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)...) +} + +// orderIDEVAttributes returns event attribues for given orderID +func orderIDEVAttributes(id OrderID) []sdk.Attribute { + return append(dtypes.GroupIDEVAttributes(id.GroupID()), + sdk.NewAttribute(evOSeqKey, strconv.FormatUint(uint64(id.OSeq), 10))) +} + +// parseEVOrderID returns orderID for given event attributes +func parseEVOrderID(attrs []sdk.Attribute) (OrderID, error) { + gid, err := dtypes.ParseEVGroupID(attrs) + if err != nil { + return OrderID{}, err + } + oseq, err := sdkutil.GetUint64(attrs, evOSeqKey) + if err != nil { + return OrderID{}, err + } + + return OrderID{ + Owner: gid.Owner, + DSeq: gid.DSeq, + GSeq: gid.GSeq, + OSeq: uint32(oseq), + }, nil + +} + +// bidIDEVAttributes returns event attribues for given bidID +func bidIDEVAttributes(id BidID) []sdk.Attribute { + return append(orderIDEVAttributes(id.OrderID()), + sdk.NewAttribute(evProviderKey, id.Provider)) +} + +// parseEVBidID returns bidID for given event attributes +func parseEVBidID(attrs []sdk.Attribute) (BidID, error) { + oid, err := parseEVOrderID(attrs) + if err != nil { + return BidID{}, err + } + + provider, err := sdkutil.GetAccAddress(attrs, evProviderKey) + if err != nil { + return BidID{}, err + } + + return BidID{ + Owner: oid.Owner, + DSeq: oid.DSeq, + GSeq: oid.GSeq, + OSeq: oid.OSeq, + Provider: provider.String(), + }, nil +} + +// leaseIDEVAttributes returns event attribues for given LeaseID +func leaseIDEVAttributes(id LeaseID) []sdk.Attribute { + return append(orderIDEVAttributes(id.OrderID()), + sdk.NewAttribute(evProviderKey, id.Provider)) +} + +// parseEVLeaseID returns leaseID for given event attributes +func parseEVLeaseID(attrs []sdk.Attribute) (LeaseID, error) { + bid, err := parseEVBidID(attrs) + if err != nil { + return LeaseID{}, err + } + return LeaseID(bid), nil +} + +func priceEVAttributes(price sdk.DecCoin) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evPriceDenomKey, price.Denom), + sdk.NewAttribute(evPriceAmountKey, price.Amount.String()), + } +} + +func parseEVPriceAttributes(attrs []sdk.Attribute) (sdk.DecCoin, error) { + denom, err := sdkutil.GetString(attrs, evPriceDenomKey) + if err != nil { + return sdk.DecCoin{}, err + } + + amounts, err := sdkutil.GetString(attrs, evPriceAmountKey) + if err != nil { + return sdk.DecCoin{}, err + } + + amount, err := sdk.NewDecFromStr(amounts) + if err != nil { + return sdk.DecCoin{}, ErrParsingPrice + } + + return sdk.NewDecCoinFromDec(denom, amount), nil +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + + case evActionOrderCreated: + id, err := parseEVOrderID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventOrderCreated(id), nil + case evActionOrderClosed: + id, err := parseEVOrderID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventOrderClosed(id), nil + + case evActionBidCreated: + id, err := parseEVBidID(ev.Attributes) + if err != nil { + return nil, err + } + price, err := parseEVPriceAttributes(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventBidCreated(id, price), nil + case evActionBidClosed: + id, err := parseEVBidID(ev.Attributes) + if err != nil { + return nil, err + } + // optional price + price, _ := parseEVPriceAttributes(ev.Attributes) + return NewEventBidClosed(id, price), nil + + case evActionLeaseCreated: + id, err := parseEVLeaseID(ev.Attributes) + if err != nil { + return nil, err + } + price, err := parseEVPriceAttributes(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventLeaseCreated(id, price), nil + case evActionLeaseClosed: + id, err := parseEVLeaseID(ev.Attributes) + if err != nil { + return nil, err + } + // optional price + price, _ := parseEVPriceAttributes(ev.Attributes) + return NewEventLeaseClosed(id, price), nil + + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/market/v1beta2/genesis.pb.go b/go/node/market/v1beta2/genesis.pb.go new file mode 100644 index 00000000..130020c4 --- /dev/null +++ b/go/node/market/v1beta2/genesis.pb.go @@ -0,0 +1,453 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by market module +type GenesisState struct { + Orders []Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders" yaml:"orders"` + Leases []Lease `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases" yaml:"leases"` + Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_e3591e07a3cf8f44, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetOrders() []Order { + if m != nil { + return m.Orders + } + return nil +} + +func (m *GenesisState) GetLeases() []Lease { + if m != nil { + return m.Leases + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.market.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/market/v1beta2/genesis.proto", fileDescriptor_e3591e07a3cf8f44) +} + +var fileDescriptor_e3591e07a3cf8f44 = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x14, 0x45, 0x93, 0x56, 0xea, 0x90, 0xc2, 0x12, 0x75, 0x88, 0x0a, 0x72, 0x82, 0xa7, 0x2e, 0xd8, + 0x22, 0x4c, 0x30, 0x76, 0x61, 0x41, 0x02, 0xa5, 0xb0, 0xb0, 0x39, 0xd4, 0x72, 0xa3, 0x34, 0x71, + 0x64, 0x1b, 0x10, 0x7f, 0x01, 0x7f, 0xd5, 0xb1, 0x23, 0x53, 0x84, 0x92, 0x8d, 0x91, 0x2f, 0x40, + 0xb1, 0x2d, 0x45, 0x42, 0x51, 0xb7, 0x5c, 0xbd, 0xf3, 0x8e, 0x6f, 0x9e, 0x07, 0x49, 0x4e, 0xe4, + 0x06, 0x17, 0x44, 0xe4, 0x54, 0xe1, 0xd7, 0x8b, 0x94, 0x2a, 0x12, 0x63, 0x46, 0x4b, 0x2a, 0x33, + 0x89, 0x2a, 0xc1, 0x15, 0xf7, 0x67, 0x9a, 0x41, 0x86, 0x41, 0x96, 0x99, 0xcf, 0x18, 0x67, 0x5c, + 0x03, 0xb8, 0xfb, 0x32, 0xec, 0x3c, 0x1a, 0xf4, 0x71, 0xb1, 0xa6, 0xe2, 0x20, 0xb1, 0xa5, 0x44, + 0x52, 0x4b, 0x9c, 0x0d, 0x12, 0x15, 0x11, 0xa4, 0xb0, 0x95, 0xe0, 0xe7, 0xc8, 0x3b, 0xba, 0x31, + 0x25, 0x57, 0x8a, 0x28, 0xea, 0x3f, 0x78, 0x13, 0xfd, 0x88, 0x0c, 0xdc, 0x68, 0xbc, 0x98, 0xc6, + 0x27, 0x68, 0xa8, 0x34, 0xba, 0xeb, 0x98, 0x65, 0xb8, 0xab, 0x43, 0xe7, 0xa7, 0x0e, 0xed, 0xca, + 0x6f, 0x1d, 0x1e, 0xbf, 0x93, 0x62, 0x7b, 0x0d, 0x4d, 0x86, 0x89, 0x1d, 0x74, 0x56, 0x5d, 0x4c, + 0x06, 0xa3, 0x43, 0xd6, 0xdb, 0x8e, 0xe9, 0xad, 0x66, 0xa5, 0xb7, 0x9a, 0x0c, 0x13, 0x3b, 0xf0, + 0x1f, 0xbd, 0x89, 0xf9, 0x99, 0x60, 0x1c, 0xb9, 0x8b, 0x69, 0x7c, 0x3a, 0x6c, 0xbd, 0xd7, 0x4c, + 0xaf, 0x35, 0x3b, 0xbd, 0xd6, 0x64, 0x98, 0xd8, 0xc1, 0x72, 0xb5, 0x6b, 0x80, 0xbb, 0x6f, 0x80, + 0xfb, 0xdd, 0x00, 0xf7, 0xa3, 0x05, 0xce, 0xbe, 0x05, 0xce, 0x57, 0x0b, 0x9c, 0xa7, 0x2b, 0x96, + 0xa9, 0xcd, 0x4b, 0x8a, 0x9e, 0x79, 0x81, 0xf5, 0x53, 0xe7, 0x25, 0x55, 0x6f, 0x5c, 0xe4, 0x36, + 0x91, 0x2a, 0xc3, 0x8c, 0xe3, 0x92, 0xaf, 0xe9, 0xbf, 0xab, 0xa7, 0x13, 0x7d, 0xef, 0xcb, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x91, 0x42, 0x96, 0xb9, 0x28, 0x02, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Leases) > 0 { + for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Leases) > 0 { + for _, e := range m.Leases { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", 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.Orders = append(m.Orders, Order{}) + if err := m.Orders[len(m.Orders)-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 Leases", 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.Leases = append(m.Leases, Lease{}) + if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/id.go b/go/node/market/v1beta2/id.go new file mode 100644 index 00000000..a78cc598 --- /dev/null +++ b/go/node/market/v1beta2/id.go @@ -0,0 +1,154 @@ +package v1beta2 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" +) + +// MakeOrderID returns OrderID instance with provided groupID details and oseq +func MakeOrderID(id dtypes.GroupID, oseq uint32) OrderID { + return OrderID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: oseq, + } +} + +// GroupID method returns groupID details for specific order +func (id OrderID) GroupID() dtypes.GroupID { + return dtypes.GroupID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + } +} + +// Equals method compares specific order with provided order +func (id OrderID) Equals(other OrderID) bool { + return id.GroupID().Equals(other.GroupID()) && id.OSeq == other.OSeq +} + +// Validate method for OrderID and returns nil +func (id OrderID) Validate() error { + if err := id.GroupID().Validate(); err != nil { + return sdkerrors.Wrap(err, "OrderID: Invalid GroupID") + } + if id.OSeq == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "OrderID: Invalid Order Sequence") + } + return nil +} + +// String provides stringer interface to save reflected formatting. +func (id OrderID) String() string { + return fmt.Sprintf("%s/%v", id.GroupID(), id.OSeq) +} + +// MakeBidID returns BidID instance with provided order details and provider +func MakeBidID(id OrderID, provider sdk.AccAddress) BidID { + return BidID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: id.OSeq, + Provider: provider.String(), + } +} + +// Equals method compares specific bid with provided bid +func (id BidID) Equals(other BidID) bool { + return id.OrderID().Equals(other.OrderID()) && + id.Provider == other.Provider +} + +// LeaseID method returns lease details of bid +func (id BidID) LeaseID() LeaseID { + return LeaseID(id) +} + +// OrderID method returns OrderID details with specific bid details +func (id BidID) OrderID() OrderID { + return OrderID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: id.OSeq, + } +} + +// String method for consistent output. +func (id BidID) String() string { + return fmt.Sprintf("%s/%v", id.OrderID(), id.Provider) +} + +// GroupID method returns GroupID details with specific bid details +func (id BidID) GroupID() dtypes.GroupID { + return id.OrderID().GroupID() +} + +// DeploymentID method returns deployment details with specific bid details +func (id BidID) DeploymentID() dtypes.DeploymentID { + return id.GroupID().DeploymentID() +} + +// Validate validates bid instance and returns nil +func (id BidID) Validate() error { + if err := id.OrderID().Validate(); err != nil { + return sdkerrors.Wrap(err, "BidID: Invalid OrderID") + } + if _, err := sdk.AccAddressFromBech32(id.Provider); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "BidID: Invalid Provider Address") + } + if id.Owner == id.Provider { + return sdkerrors.Wrap(sdkerrors.ErrConflict, "BidID: self-bid") + } + return nil +} + +// MakeLeaseID returns LeaseID instance with provided bid details +func MakeLeaseID(id BidID) LeaseID { + return LeaseID(id) +} + +// Equals method compares specific lease with provided lease +func (id LeaseID) Equals(other LeaseID) bool { + return id.BidID().Equals(other.BidID()) +} + +// Validate calls the BidID's validator and returns any error. +func (id LeaseID) Validate() error { + if err := id.BidID().Validate(); err != nil { + return sdkerrors.Wrap(err, "LeaseID: Invalid BidID") + } + return nil +} + +// BidID method returns BidID details with specific LeaseID +func (id LeaseID) BidID() BidID { + return BidID(id) +} + +// OrderID method returns OrderID details with specific lease details +func (id LeaseID) OrderID() OrderID { + return id.BidID().OrderID() +} + +// GroupID method returns GroupID details with specific lease details +func (id LeaseID) GroupID() dtypes.GroupID { + return id.OrderID().GroupID() +} + +// DeploymentID method returns deployment details with specific lease details +func (id LeaseID) DeploymentID() dtypes.DeploymentID { + return id.GroupID().DeploymentID() +} + +// String method provides human readable representation of LeaseID. +func (id LeaseID) String() string { + return id.BidID().String() +} diff --git a/go/node/market/v1beta2/key.go b/go/node/market/v1beta2/key.go new file mode 100644 index 00000000..78c5e7e8 --- /dev/null +++ b/go/node/market/v1beta2/key.go @@ -0,0 +1,28 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "market" + + // StoreKey is the store key string for market + StoreKey = ModuleName + + // RouterKey is the message route for market + RouterKey = ModuleName +) + +func OrderPrefix() []byte { + return []byte{0x01, 0x00} +} + +func BidPrefix() []byte { + return []byte{0x02, 0x00} +} + +func LeasePrefix() []byte { + return []byte{0x03, 0x00} +} + +func SecondaryLeasePrefix() []byte { + return []byte{0x03, 0x01} +} diff --git a/go/node/market/v1beta2/lease.pb.go b/go/node/market/v1beta2/lease.pb.go new file mode 100644 index 00000000..a14dff73 --- /dev/null +++ b/go/node/market/v1beta2/lease.pb.go @@ -0,0 +1,2134 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/lease.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of lease +type Lease_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + LeaseStateInvalid Lease_State = 0 + // LeaseActive denotes state for lease active + LeaseActive Lease_State = 1 + // LeaseInsufficientFunds denotes state for lease insufficient_funds + LeaseInsufficientFunds Lease_State = 2 + // LeaseClosed denotes state for lease closed + LeaseClosed Lease_State = 3 +) + +var Lease_State_name = map[int32]string{ + 0: "invalid", + 1: "active", + 2: "insufficient_funds", + 3: "closed", +} + +var Lease_State_value = map[string]int32{ + "invalid": 0, + "active": 1, + "insufficient_funds": 2, + "closed": 3, +} + +func (x Lease_State) String() string { + return proto.EnumName(Lease_State_name, int32(x)) +} + +func (Lease_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{1, 0} +} + +// LeaseID stores bid details of lease +type LeaseID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` +} + +func (m *LeaseID) Reset() { *m = LeaseID{} } +func (*LeaseID) ProtoMessage() {} +func (*LeaseID) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{0} +} +func (m *LeaseID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LeaseID.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 *LeaseID) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseID.Merge(m, src) +} +func (m *LeaseID) XXX_Size() int { + return m.Size() +} +func (m *LeaseID) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseID.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseID proto.InternalMessageInfo + +func (m *LeaseID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *LeaseID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *LeaseID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *LeaseID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *LeaseID) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +// Lease stores LeaseID, state of lease and price +type Lease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"id" yaml:"id"` + State Lease_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta2.Lease_State" json:"state" yaml:"state"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ClosedOn int64 `protobuf:"varint,5,opt,name=closed_on,json=closedOn,proto3" json:"closed_on,omitempty"` +} + +func (m *Lease) Reset() { *m = Lease{} } +func (*Lease) ProtoMessage() {} +func (*Lease) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{1} +} +func (m *Lease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Lease.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 *Lease) XXX_Merge(src proto.Message) { + xxx_messageInfo_Lease.Merge(m, src) +} +func (m *Lease) XXX_Size() int { + return m.Size() +} +func (m *Lease) XXX_DiscardUnknown() { + xxx_messageInfo_Lease.DiscardUnknown(m) +} + +var xxx_messageInfo_Lease proto.InternalMessageInfo + +func (m *Lease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +func (m *Lease) GetState() Lease_State { + if m != nil { + return m.State + } + return LeaseStateInvalid +} + +func (m *Lease) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *Lease) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *Lease) GetClosedOn() int64 { + if m != nil { + return m.ClosedOn + } + return 0 +} + +// LeaseFilters defines flags for lease list filter +type LeaseFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *LeaseFilters) Reset() { *m = LeaseFilters{} } +func (m *LeaseFilters) String() string { return proto.CompactTextString(m) } +func (*LeaseFilters) ProtoMessage() {} +func (*LeaseFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{2} +} +func (m *LeaseFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LeaseFilters.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 *LeaseFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseFilters.Merge(m, src) +} +func (m *LeaseFilters) XXX_Size() int { + return m.Size() +} +func (m *LeaseFilters) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseFilters proto.InternalMessageInfo + +func (m *LeaseFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *LeaseFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *LeaseFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *LeaseFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *LeaseFilters) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *LeaseFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +// MsgCreateLease is sent to create a lease +type MsgCreateLease struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCreateLease) Reset() { *m = MsgCreateLease{} } +func (m *MsgCreateLease) String() string { return proto.CompactTextString(m) } +func (*MsgCreateLease) ProtoMessage() {} +func (*MsgCreateLease) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{3} +} +func (m *MsgCreateLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateLease.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 *MsgCreateLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateLease.Merge(m, src) +} +func (m *MsgCreateLease) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateLease proto.InternalMessageInfo + +func (m *MsgCreateLease) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +// MsgCreateLeaseResponse is the response from creating a lease +type MsgCreateLeaseResponse struct { +} + +func (m *MsgCreateLeaseResponse) Reset() { *m = MsgCreateLeaseResponse{} } +func (m *MsgCreateLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateLeaseResponse) ProtoMessage() {} +func (*MsgCreateLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{4} +} +func (m *MsgCreateLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateLeaseResponse.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 *MsgCreateLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateLeaseResponse.Merge(m, src) +} +func (m *MsgCreateLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateLeaseResponse proto.InternalMessageInfo + +// MsgWithdrawLease defines an SDK message for closing bid +type MsgWithdrawLease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgWithdrawLease) Reset() { *m = MsgWithdrawLease{} } +func (m *MsgWithdrawLease) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawLease) ProtoMessage() {} +func (*MsgWithdrawLease) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{5} +} +func (m *MsgWithdrawLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawLease.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 *MsgWithdrawLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawLease.Merge(m, src) +} +func (m *MsgWithdrawLease) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawLease proto.InternalMessageInfo + +func (m *MsgWithdrawLease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +// MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. +type MsgWithdrawLeaseResponse struct { +} + +func (m *MsgWithdrawLeaseResponse) Reset() { *m = MsgWithdrawLeaseResponse{} } +func (m *MsgWithdrawLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawLeaseResponse) ProtoMessage() {} +func (*MsgWithdrawLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{6} +} +func (m *MsgWithdrawLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawLeaseResponse.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 *MsgWithdrawLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawLeaseResponse.Merge(m, src) +} +func (m *MsgWithdrawLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawLeaseResponse proto.InternalMessageInfo + +// MsgCloseLease defines an SDK message for closing order +type MsgCloseLease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseLease) Reset() { *m = MsgCloseLease{} } +func (m *MsgCloseLease) String() string { return proto.CompactTextString(m) } +func (*MsgCloseLease) ProtoMessage() {} +func (*MsgCloseLease) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{7} +} +func (m *MsgCloseLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseLease.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 *MsgCloseLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseLease.Merge(m, src) +} +func (m *MsgCloseLease) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseLease proto.InternalMessageInfo + +func (m *MsgCloseLease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +// MsgCloseLeaseResponse defines the Msg/CloseLease response type. +type MsgCloseLeaseResponse struct { +} + +func (m *MsgCloseLeaseResponse) Reset() { *m = MsgCloseLeaseResponse{} } +func (m *MsgCloseLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseLeaseResponse) ProtoMessage() {} +func (*MsgCloseLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_13e4d452e6d81c98, []int{8} +} +func (m *MsgCloseLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseLeaseResponse.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 *MsgCloseLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseLeaseResponse.Merge(m, src) +} +func (m *MsgCloseLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseLeaseResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("akash.market.v1beta2.Lease_State", Lease_State_name, Lease_State_value) + proto.RegisterType((*LeaseID)(nil), "akash.market.v1beta2.LeaseID") + proto.RegisterType((*Lease)(nil), "akash.market.v1beta2.Lease") + proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1beta2.LeaseFilters") + proto.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta2.MsgCreateLease") + proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta2.MsgCreateLeaseResponse") + proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta2.MsgWithdrawLease") + proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta2.MsgWithdrawLeaseResponse") + proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta2.MsgCloseLease") + proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta2.MsgCloseLeaseResponse") +} + +func init() { proto.RegisterFile("akash/market/v1beta2/lease.proto", fileDescriptor_13e4d452e6d81c98) } + +var fileDescriptor_13e4d452e6d81c98 = []byte{ + // 755 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0xb6, 0x93, 0x38, 0x24, 0x1b, 0xfe, 0xe4, 0x67, 0x01, 0xbf, 0xd4, 0x14, 0xdb, 0xf5, 0x89, + 0x4b, 0x6d, 0x11, 0x4e, 0xa5, 0x27, 0x42, 0x44, 0x15, 0xa9, 0x08, 0xd5, 0x54, 0x6a, 0x55, 0x55, + 0x8a, 0x1c, 0xef, 0x62, 0x56, 0x24, 0xde, 0xe0, 0x35, 0x41, 0x7d, 0x83, 0x8a, 0x53, 0x8f, 0xbd, + 0xa0, 0x22, 0xf5, 0x65, 0x38, 0xa2, 0x9e, 0x7a, 0xb2, 0xaa, 0x70, 0xa9, 0x72, 0x8c, 0xfa, 0x00, + 0xd5, 0xee, 0x3a, 0x24, 0x41, 0x11, 0xa7, 0xaa, 0xa7, 0x9e, 0x92, 0xf9, 0x66, 0xbe, 0x99, 0xf1, + 0x37, 0x33, 0x36, 0x30, 0xbd, 0x13, 0x8f, 0x1e, 0x3b, 0x1d, 0x2f, 0x3a, 0x41, 0xb1, 0xd3, 0xdb, + 0x6c, 0xa1, 0xd8, 0xab, 0x3a, 0x6d, 0xe4, 0x51, 0x64, 0x77, 0x23, 0x12, 0x13, 0x75, 0x99, 0x47, + 0xd8, 0x22, 0xc2, 0x4e, 0x23, 0xb4, 0xe5, 0x80, 0x04, 0x84, 0x07, 0x38, 0xec, 0x9f, 0x88, 0xd5, + 0x74, 0x9f, 0xd0, 0x0e, 0xa1, 0x4e, 0xcb, 0xa3, 0x28, 0x4d, 0xb6, 0xe9, 0xf8, 0x04, 0x87, 0x23, + 0xff, 0xcc, 0x6a, 0x2d, 0x0c, 0x85, 0xdf, 0xba, 0xca, 0x80, 0xb9, 0x97, 0xac, 0x76, 0xa3, 0xae, + 0x3a, 0x40, 0x21, 0xe7, 0x21, 0x8a, 0x2a, 0xb2, 0x29, 0x6f, 0x14, 0x6b, 0x8f, 0x06, 0x89, 0x21, + 0x80, 0x61, 0x62, 0xcc, 0x7f, 0xf0, 0x3a, 0xed, 0x6d, 0x8b, 0x9b, 0x96, 0x2b, 0x60, 0x75, 0x0b, + 0xe4, 0x20, 0x45, 0xa7, 0x95, 0x8c, 0x29, 0x6f, 0xe4, 0x6a, 0x46, 0x3f, 0x31, 0x72, 0xf5, 0x43, + 0x74, 0x3a, 0x48, 0x0c, 0x8e, 0x0f, 0x13, 0xa3, 0x24, 0x68, 0xcc, 0xb2, 0x5c, 0x0e, 0x32, 0x52, + 0xc0, 0x48, 0x59, 0x53, 0xde, 0x58, 0x10, 0xa4, 0x17, 0x29, 0x29, 0x98, 0x22, 0x05, 0x82, 0x14, + 0xa4, 0x24, 0xc2, 0x48, 0xb9, 0x31, 0xe9, 0x20, 0x25, 0x91, 0x29, 0x12, 0x11, 0x24, 0xf6, 0xa3, + 0x3e, 0x07, 0x85, 0x6e, 0x44, 0x7a, 0x18, 0xa2, 0xa8, 0xa2, 0xf0, 0x47, 0x32, 0x06, 0x89, 0x71, + 0x87, 0x0d, 0x13, 0x63, 0x49, 0x90, 0x46, 0x88, 0xe5, 0xde, 0x39, 0xb7, 0x0b, 0x9f, 0xaf, 0x0c, + 0xe9, 0xe7, 0x95, 0x21, 0x59, 0xbf, 0xb2, 0x40, 0xe1, 0x12, 0xa9, 0xef, 0x41, 0x81, 0xcf, 0xa9, + 0x89, 0x21, 0xd7, 0xa8, 0x54, 0x5d, 0xb7, 0x67, 0xcd, 0xca, 0x4e, 0x15, 0xad, 0x59, 0xd7, 0x89, + 0x21, 0xf5, 0x13, 0x63, 0x24, 0xf1, 0x20, 0x31, 0x32, 0x18, 0x0e, 0x13, 0xa3, 0x28, 0x0a, 0x63, + 0x68, 0xb9, 0x73, 0x3c, 0x65, 0x03, 0xaa, 0x2e, 0x50, 0x68, 0xec, 0xc5, 0x88, 0xcb, 0xb9, 0x58, + 0x7d, 0xf2, 0x40, 0x6a, 0xfb, 0x90, 0x05, 0x8a, 0x09, 0x71, 0xce, 0x78, 0x42, 0xdc, 0xb4, 0x5c, + 0x01, 0xab, 0xaf, 0x80, 0xd2, 0x8d, 0xb0, 0x8f, 0xb8, 0xda, 0xa5, 0xea, 0x63, 0x5b, 0xac, 0x8b, + 0xcd, 0xd6, 0x25, 0x4d, 0xb9, 0x69, 0xd7, 0x91, 0xbf, 0x4b, 0x70, 0x58, 0x5b, 0x67, 0xdd, 0xb2, + 0x94, 0x9c, 0x32, 0x4e, 0xc9, 0x4d, 0xcb, 0x15, 0xb0, 0xba, 0x0e, 0x80, 0x1f, 0x21, 0x2f, 0x46, + 0xb0, 0xe9, 0xc5, 0x7c, 0x20, 0x59, 0xb7, 0x98, 0x22, 0x3b, 0xb1, 0xba, 0x06, 0x8a, 0x7e, 0x9b, + 0x50, 0x04, 0x9b, 0x24, 0xe4, 0xaa, 0x67, 0xdd, 0x82, 0x00, 0x0e, 0x42, 0xeb, 0x8b, 0x0c, 0x14, + 0xde, 0xba, 0x6a, 0x81, 0x39, 0x1c, 0xf6, 0xbc, 0x36, 0x86, 0x65, 0x49, 0x5b, 0xb9, 0xb8, 0x34, + 0xff, 0xe3, 0x0f, 0xc6, 0x9d, 0x0d, 0xe1, 0x50, 0xd7, 0x40, 0xde, 0xf3, 0x63, 0xdc, 0x43, 0x65, + 0x59, 0x5b, 0xba, 0xb8, 0x34, 0x4b, 0x3c, 0x64, 0x87, 0x43, 0x6a, 0x15, 0xa8, 0x38, 0xa4, 0x67, + 0x47, 0x47, 0xd8, 0xc7, 0x28, 0x8c, 0x9b, 0x47, 0x67, 0x21, 0xa4, 0xe5, 0x8c, 0xa6, 0x5d, 0x5c, + 0x9a, 0xab, 0x42, 0xee, 0x09, 0xf7, 0x1e, 0xf3, 0xb2, 0x84, 0xa2, 0x95, 0x72, 0x76, 0x22, 0xe1, + 0x2e, 0x87, 0xb4, 0xdc, 0xc7, 0xaf, 0xba, 0x34, 0x31, 0xf6, 0x6f, 0x19, 0x30, 0xcf, 0xfd, 0x7b, + 0xb8, 0x1d, 0xa3, 0x88, 0xfe, 0x3b, 0x8f, 0x89, 0xf3, 0x60, 0x62, 0x88, 0x65, 0xcd, 0x8f, 0xc5, + 0x78, 0x68, 0x13, 0xb7, 0x73, 0x5c, 0xd4, 0x36, 0x58, 0xdc, 0xa7, 0xc1, 0x2e, 0xdf, 0x16, 0x71, + 0x53, 0xaf, 0x41, 0xbe, 0x85, 0xe1, 0xf8, 0xa2, 0xd6, 0x66, 0xaf, 0x7d, 0x0d, 0xc3, 0x46, 0xbd, + 0x66, 0xa6, 0xf7, 0xa4, 0x70, 0x73, 0xd6, 0x35, 0x29, 0x2d, 0x0c, 0x1b, 0x30, 0xad, 0x56, 0x01, + 0xab, 0xd3, 0xd5, 0x5c, 0x44, 0xbb, 0x24, 0xa4, 0xc8, 0x8a, 0x40, 0x79, 0x9f, 0x06, 0x6f, 0x70, + 0x7c, 0x0c, 0x23, 0xef, 0x5c, 0x74, 0xf2, 0xf6, 0x5e, 0x27, 0x7f, 0xe0, 0xb6, 0xa7, 0xba, 0xd1, + 0x40, 0xe5, 0x7e, 0xcd, 0xbb, 0x7e, 0x28, 0x58, 0x60, 0x9d, 0xb2, 0x4d, 0xfc, 0x0b, 0xaf, 0x9a, + 0xb4, 0xa1, 0xff, 0xc1, 0xca, 0x54, 0xd1, 0x51, 0x37, 0xb5, 0xc3, 0xeb, 0xbe, 0x2e, 0xdf, 0xf4, + 0x75, 0xf9, 0x47, 0x5f, 0x97, 0x3f, 0xdd, 0xea, 0xd2, 0xcd, 0xad, 0x2e, 0x7d, 0xbf, 0xd5, 0xa5, + 0x77, 0xcf, 0x02, 0x1c, 0x1f, 0x9f, 0xb5, 0x6c, 0x9f, 0x74, 0x1c, 0xde, 0xce, 0xd3, 0x10, 0xc5, + 0xe7, 0x24, 0x3a, 0x49, 0x2d, 0xaf, 0x8b, 0x9d, 0x80, 0x38, 0x21, 0x81, 0xe8, 0xde, 0x37, 0xa7, + 0x95, 0xe7, 0x1f, 0x9c, 0xad, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0xd2, 0x5d, 0xf4, 0x00, + 0x07, 0x00, 0x00, +} + +func (m *LeaseID) 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 *LeaseID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintLease(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintLease(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Lease) 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 *Lease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClosedOn != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.ClosedOn)) + i-- + dAtA[i] = 0x28 + } + if m.CreatedAt != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LeaseFilters) 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 *LeaseFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintLease(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x32 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintLease(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintLease(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateLease) 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 *MsgCreateLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateLeaseResponse) 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 *MsgCreateLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawLease) 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 *MsgWithdrawLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawLeaseResponse) 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 *MsgWithdrawLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseLease) 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 *MsgCloseLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseLeaseResponse) 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 *MsgCloseLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintLease(dAtA []byte, offset int, v uint64) int { + offset -= sovLease(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *LeaseID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovLease(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovLease(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovLease(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func (m *Lease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + if m.State != 0 { + n += 1 + sovLease(uint64(m.State)) + } + l = m.Price.Size() + n += 1 + l + sovLease(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovLease(uint64(m.CreatedAt)) + } + if m.ClosedOn != 0 { + n += 1 + sovLease(uint64(m.ClosedOn)) + } + return n +} + +func (m *LeaseFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovLease(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovLease(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovLease(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func (m *MsgCreateLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgCreateLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgWithdrawLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgCloseLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovLease(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLease(x uint64) (n int) { + return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *LeaseID) 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 ErrIntOverflowLease + } + 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: LeaseID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Lease) 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 ErrIntOverflowLease + } + 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: Lease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Lease_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClosedOn", wireType) + } + m.ClosedOn = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClosedOn |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseFilters) 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 ErrIntOverflowLease + } + 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: LeaseFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateLease) 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 ErrIntOverflowLease + } + 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: MsgCreateLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgCreateLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawLease) 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 ErrIntOverflowLease + } + 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: MsgWithdrawLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgWithdrawLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseLease) 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 ErrIntOverflowLease + } + 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: MsgCloseLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgCloseLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLease(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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrInvalidLengthLease + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLease + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLease + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLease = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLease = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/msgs.go b/go/node/market/v1beta2/msgs.go new file mode 100644 index 00000000..47a8df17 --- /dev/null +++ b/go/node/market/v1beta2/msgs.go @@ -0,0 +1,215 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +const ( + MsgTypeCreateBid = "create-bid" + MsgTypeCloseBid = "close-bid" + MsgTypeCreateLease = "create-lease" + MsgTypeWithdrawLease = "withdraw-lease" + MsgTypeCloseLease = "close-lease" +) + +var ( + _ sdk.Msg = &MsgCreateBid{} + _ sdk.Msg = &MsgCloseBid{} + _ sdk.Msg = &MsgCreateLease{} + _ sdk.Msg = &MsgWithdrawLease{} + _ sdk.Msg = &MsgCloseLease{} +) + +// NewMsgCreateBid creates a new MsgCreateBid instance +func NewMsgCreateBid(id OrderID, provider sdk.AccAddress, price sdk.DecCoin, deposit sdk.Coin) *MsgCreateBid { + return &MsgCreateBid{ + Order: id, + Provider: provider.String(), + Price: price, + Deposit: deposit, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateBid) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateBid) Type() string { return MsgTypeCreateBid } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateBid) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateBid) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic does basic validation of provider and order +func (msg MsgCreateBid) ValidateBasic() error { + if err := msg.Order.Validate(); err != nil { + return err + } + + provider, err := sdk.AccAddressFromBech32(msg.Provider) + if err != nil { + return ErrEmptyProvider + } + + owner, err := sdk.AccAddressFromBech32(msg.Order.Owner) + if err != nil { + return errors.Wrap(ErrInvalidBid, "empty owner") + } + + if provider.Equals(owner) { + return ErrSameAccount + } + + if msg.Price.IsZero() { + return ErrBidZeroPrice + } + + return nil +} + +// NewMsgWithdrawLease creates a new MsgWithdrawLease instance +func NewMsgWithdrawLease(id LeaseID) *MsgWithdrawLease { + return &MsgWithdrawLease{ + LeaseID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgWithdrawLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgWithdrawLease) Type() string { return MsgTypeWithdrawLease } + +// GetSignBytes encodes the message for signing +func (msg MsgWithdrawLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgWithdrawLease) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.GetLeaseID().Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic does basic validation of provider and order +func (msg MsgWithdrawLease) ValidateBasic() error { + if err := msg.LeaseID.Validate(); err != nil { + return err + } + return nil +} + +// NewMsgCreateLease creates a new MsgCreateLease instance +func NewMsgCreateLease(id BidID) *MsgCreateLease { + return &MsgCreateLease{ + BidID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateLease) Type() string { return MsgTypeCreateLease } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateLease) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.BidID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic method for MsgCreateLease +func (msg MsgCreateLease) ValidateBasic() error { + return msg.BidID.Validate() +} + +// NewMsgCloseBid creates a new MsgCloseBid instance +func NewMsgCloseBid(id BidID) *MsgCloseBid { + return &MsgCloseBid{ + BidID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseBid) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseBid) Type() string { return MsgTypeCloseBid } + +// GetSignBytes encodes the message for signing +func (msg MsgCloseBid) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseBid) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.BidID.Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic method for MsgCloseBid +func (msg MsgCloseBid) ValidateBasic() error { + return msg.BidID.Validate() +} + +// NewMsgCloseLease creates a new MsgCloseLease instance +func NewMsgCloseLease(id LeaseID) *MsgCloseLease { + return &MsgCloseLease{ + LeaseID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseLease) Type() string { return MsgTypeCloseLease } + +// GetSignBytes encodes the message for signing +func (msg MsgCloseLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseLease) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.LeaseID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic method for MsgCloseLease +func (msg MsgCloseLease) ValidateBasic() error { + return msg.LeaseID.Validate() +} diff --git a/go/node/market/v1beta2/order.pb.go b/go/node/market/v1beta2/order.pb.go new file mode 100644 index 00000000..a09feac9 --- /dev/null +++ b/go/node/market/v1beta2/order.pb.go @@ -0,0 +1,1107 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/order.proto + +package v1beta2 + +import ( + fmt "fmt" + v1beta2 "github.com/akash-network/akash-api/go/node/deployment/v1beta2" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of order +type Order_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + OrderStateInvalid Order_State = 0 + // OrderOpen denotes state for order open + OrderOpen Order_State = 1 + // OrderMatched denotes state for order matched + OrderActive Order_State = 2 + // OrderClosed denotes state for order lost + OrderClosed Order_State = 3 +) + +var Order_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "active", + 3: "closed", +} + +var Order_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "active": 2, + "closed": 3, +} + +func (x Order_State) String() string { + return proto.EnumName(Order_State_name, int32(x)) +} + +func (Order_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_31c7b4cb1ace8a4b, []int{1, 0} +} + +// OrderID stores owner and all other seq numbers +type OrderID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` +} + +func (m *OrderID) Reset() { *m = OrderID{} } +func (*OrderID) ProtoMessage() {} +func (*OrderID) Descriptor() ([]byte, []int) { + return fileDescriptor_31c7b4cb1ace8a4b, []int{0} +} +func (m *OrderID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderID.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 *OrderID) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderID.Merge(m, src) +} +func (m *OrderID) XXX_Size() int { + return m.Size() +} +func (m *OrderID) XXX_DiscardUnknown() { + xxx_messageInfo_OrderID.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderID proto.InternalMessageInfo + +func (m *OrderID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *OrderID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *OrderID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *OrderID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +// Order stores orderID, state of order and other details +type Order struct { + OrderID OrderID `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"id" yaml:"id"` + State Order_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta2.Order_State" json:"state" yaml:"state"` + Spec v1beta2.GroupSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec" yaml:"spec"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Order) Reset() { *m = Order{} } +func (*Order) ProtoMessage() {} +func (*Order) Descriptor() ([]byte, []int) { + return fileDescriptor_31c7b4cb1ace8a4b, []int{1} +} +func (m *Order) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Order.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 *Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_Order.Merge(m, src) +} +func (m *Order) XXX_Size() int { + return m.Size() +} +func (m *Order) XXX_DiscardUnknown() { + xxx_messageInfo_Order.DiscardUnknown(m) +} + +var xxx_messageInfo_Order proto.InternalMessageInfo + +func (m *Order) GetOrderID() OrderID { + if m != nil { + return m.OrderID + } + return OrderID{} +} + +func (m *Order) GetState() Order_State { + if m != nil { + return m.State + } + return OrderStateInvalid +} + +func (m *Order) GetSpec() v1beta2.GroupSpec { + if m != nil { + return m.Spec + } + return v1beta2.GroupSpec{} +} + +func (m *Order) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// OrderFilters defines flags for order list filter +type OrderFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *OrderFilters) Reset() { *m = OrderFilters{} } +func (m *OrderFilters) String() string { return proto.CompactTextString(m) } +func (*OrderFilters) ProtoMessage() {} +func (*OrderFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_31c7b4cb1ace8a4b, []int{2} +} +func (m *OrderFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderFilters.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 *OrderFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderFilters.Merge(m, src) +} +func (m *OrderFilters) XXX_Size() int { + return m.Size() +} +func (m *OrderFilters) XXX_DiscardUnknown() { + xxx_messageInfo_OrderFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderFilters proto.InternalMessageInfo + +func (m *OrderFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *OrderFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *OrderFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *OrderFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *OrderFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.market.v1beta2.Order_State", Order_State_name, Order_State_value) + proto.RegisterType((*OrderID)(nil), "akash.market.v1beta2.OrderID") + proto.RegisterType((*Order)(nil), "akash.market.v1beta2.Order") + proto.RegisterType((*OrderFilters)(nil), "akash.market.v1beta2.OrderFilters") +} + +func init() { proto.RegisterFile("akash/market/v1beta2/order.proto", fileDescriptor_31c7b4cb1ace8a4b) } + +var fileDescriptor_31c7b4cb1ace8a4b = []byte{ + // 582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xb6, 0x13, 0xa7, 0x6d, 0x2e, 0x2d, 0x04, 0xab, 0x88, 0xe2, 0xaa, 0x3e, 0x63, 0x96, 0x2c, + 0xd8, 0x22, 0x9d, 0xe8, 0xd6, 0x50, 0x51, 0x65, 0x8a, 0xe4, 0x30, 0x21, 0xa4, 0xca, 0xf1, 0x9d, + 0x5c, 0x2b, 0x89, 0xcf, 0xb5, 0xaf, 0xa9, 0xba, 0x33, 0xa0, 0x4c, 0x2c, 0x48, 0x2c, 0x91, 0x2a, + 0xf1, 0x43, 0x58, 0x3b, 0x76, 0x64, 0xb2, 0x50, 0xb2, 0xa0, 0x8c, 0xf9, 0x05, 0xe8, 0xde, 0x19, + 0xdc, 0x22, 0xd4, 0x1f, 0xc0, 0x64, 0xbf, 0xef, 0x7d, 0xdf, 0xbb, 0x7b, 0xdf, 0x7b, 0x3a, 0x64, + 0xf9, 0x43, 0x3f, 0x3b, 0x75, 0xc7, 0x7e, 0x3a, 0xa4, 0xdc, 0x9d, 0xbc, 0x1c, 0x50, 0xee, 0xb7, + 0x5d, 0x96, 0x12, 0x9a, 0x3a, 0x49, 0xca, 0x38, 0xd3, 0xb7, 0x81, 0xe1, 0x48, 0x86, 0x53, 0x30, + 0x8c, 0xed, 0x90, 0x85, 0x0c, 0x08, 0xae, 0xf8, 0x93, 0x5c, 0xa3, 0x25, 0xab, 0x11, 0x9a, 0x8c, + 0xd8, 0xe5, 0x98, 0xc6, 0x65, 0xc5, 0x30, 0x65, 0xe7, 0x49, 0x96, 0xd0, 0x40, 0x32, 0xed, 0x85, + 0x8a, 0xd6, 0x7b, 0xe2, 0x94, 0xee, 0x91, 0xee, 0xa2, 0x1a, 0xbb, 0x88, 0x69, 0xba, 0xa3, 0x5a, + 0x6a, 0xab, 0xde, 0x79, 0xba, 0xcc, 0xb1, 0x04, 0x56, 0x39, 0xde, 0xbc, 0xf4, 0xc7, 0xa3, 0x03, + 0x1b, 0x42, 0xdb, 0x93, 0xb0, 0xbe, 0x8f, 0x34, 0x92, 0xd1, 0xb3, 0x9d, 0x8a, 0xa5, 0xb6, 0xb4, + 0x0e, 0x9e, 0xe7, 0x58, 0x3b, 0xea, 0xd3, 0xb3, 0x65, 0x8e, 0x01, 0x5f, 0xe5, 0xb8, 0x21, 0x65, + 0x22, 0xb2, 0x3d, 0x00, 0x85, 0x28, 0x14, 0xa2, 0xaa, 0xa5, 0xb6, 0xb6, 0xa4, 0xe8, 0xb8, 0x10, + 0x85, 0x77, 0x44, 0xa1, 0x14, 0x85, 0x85, 0x88, 0x09, 0x91, 0x56, 0x8a, 0x7a, 0x85, 0x88, 0xdd, + 0x11, 0x31, 0x29, 0x12, 0x9f, 0x83, 0x8d, 0x2f, 0x57, 0x58, 0xf9, 0x79, 0x85, 0x15, 0xfb, 0x5b, + 0x15, 0xd5, 0xa0, 0x4b, 0xfd, 0x3d, 0xda, 0x00, 0x53, 0x4f, 0x22, 0x02, 0x6d, 0x36, 0xda, 0x7b, + 0xce, 0xbf, 0x8c, 0x75, 0x0a, 0x53, 0x3a, 0xf6, 0x75, 0x8e, 0x95, 0x79, 0x8e, 0x7f, 0xbb, 0xb4, + 0xcc, 0x71, 0x25, 0x22, 0xab, 0x1c, 0xd7, 0xe5, 0x81, 0x11, 0xb1, 0xbd, 0x75, 0x28, 0xd9, 0x25, + 0xba, 0x87, 0x6a, 0x19, 0xf7, 0x39, 0x05, 0x47, 0x1e, 0xb4, 0x9f, 0xdd, 0x53, 0xda, 0xe9, 0x0b, + 0xa2, 0x34, 0x19, 0x34, 0xa5, 0xc9, 0x10, 0xda, 0x9e, 0x84, 0xf5, 0xb7, 0x48, 0x13, 0xf3, 0x02, + 0xbf, 0x1a, 0xed, 0xe7, 0x45, 0xc9, 0x72, 0xb4, 0x7f, 0xca, 0x1e, 0x8b, 0xd1, 0xf6, 0x13, 0x1a, + 0x74, 0x76, 0xc5, 0x9d, 0x85, 0x37, 0x42, 0x58, 0x7a, 0x23, 0x22, 0xdb, 0x03, 0x50, 0xdf, 0x43, + 0x28, 0x48, 0xa9, 0xcf, 0x29, 0x39, 0xf1, 0x39, 0xd8, 0x5a, 0xf5, 0xea, 0x05, 0x72, 0xc8, 0xed, + 0x0f, 0x2a, 0xaa, 0xc1, 0x05, 0x75, 0x1b, 0xad, 0x47, 0xf1, 0xc4, 0x1f, 0x45, 0xa4, 0xa9, 0x18, + 0x8f, 0xa7, 0x33, 0xeb, 0x11, 0x5c, 0x1f, 0x92, 0x5d, 0x99, 0xd0, 0x9f, 0x20, 0x8d, 0x25, 0x34, + 0x6e, 0xaa, 0xc6, 0xd6, 0x74, 0x66, 0xd5, 0x81, 0xd0, 0x4b, 0x68, 0xac, 0xef, 0xa2, 0x35, 0x3f, + 0xe0, 0xd1, 0x84, 0x36, 0x2b, 0xc6, 0xc3, 0xe9, 0xcc, 0x6a, 0x40, 0xea, 0x10, 0x20, 0x91, 0x0c, + 0x46, 0x2c, 0xa3, 0xa4, 0x59, 0xbd, 0x95, 0x7c, 0x0d, 0x90, 0xa1, 0x7d, 0xfc, 0x6a, 0x2a, 0xb7, + 0x26, 0xf8, 0xb9, 0x82, 0x36, 0x21, 0xff, 0x26, 0x1a, 0x71, 0x9a, 0x66, 0xff, 0xdb, 0xb2, 0x8a, + 0x7e, 0xe4, 0xea, 0xd4, 0xca, 0x7e, 0xee, 0xdb, 0x8b, 0x03, 0x4d, 0xf8, 0xd2, 0xe9, 0x5f, 0xcf, + 0x4d, 0xf5, 0x66, 0x6e, 0xaa, 0x3f, 0xe6, 0xa6, 0xfa, 0x69, 0x61, 0x2a, 0x37, 0x0b, 0x53, 0xf9, + 0xbe, 0x30, 0x95, 0x77, 0xaf, 0xc2, 0x88, 0x9f, 0x9e, 0x0f, 0x9c, 0x80, 0x8d, 0x5d, 0xd8, 0x99, + 0x17, 0x31, 0xe5, 0x17, 0x2c, 0x1d, 0x16, 0x91, 0x9f, 0x44, 0x6e, 0xc8, 0xdc, 0x98, 0x11, 0xfa, + 0xd7, 0xb3, 0x33, 0x58, 0x83, 0xb7, 0x61, 0xff, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xb1, + 0x3c, 0x4c, 0x95, 0x04, 0x00, 0x00, +} + +func (m *OrderID) 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 *OrderID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Order) 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 *Order) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OrderFilters) 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 *OrderFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintOrder(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { + offset -= sovOrder(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *OrderID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovOrder(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovOrder(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovOrder(uint64(m.OSeq)) + } + return n +} + +func (m *Order) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderID.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.State != 0 { + n += 1 + sovOrder(uint64(m.State)) + } + l = m.Spec.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovOrder(uint64(m.CreatedAt)) + } + return n +} + +func (m *OrderFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovOrder(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovOrder(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovOrder(uint64(m.OSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func sovOrder(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOrder(x uint64) (n int) { + return sovOrder(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OrderID) 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 ErrIntOverflowOrder + } + 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: OrderID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Order) 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 ErrIntOverflowOrder + } + 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: Order: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Order_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderFilters) 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 ErrIntOverflowOrder + } + 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: OrderFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOrder(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, ErrIntOverflowOrder + } + 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, ErrIntOverflowOrder + } + 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, ErrIntOverflowOrder + } + 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, ErrInvalidLengthOrder + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOrder + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOrder + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOrder = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOrder = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/params.go b/go/node/market/v1beta2/params.go new file mode 100644 index 00000000..2b773491 --- /dev/null +++ b/go/node/market/v1beta2/params.go @@ -0,0 +1,76 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +var ( + DefaultBidMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000)) + defaultOrderMaxBids uint32 = 20 + maxOrderMaxBids uint32 = 500 +) + +const ( + keyBidMinDeposit = "BidMinDeposit" + keyOrderMaxBids = "OrderMaxBids" +) + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyBidMinDeposit), &p.BidMinDeposit, validateCoin), + paramtypes.NewParamSetPair([]byte(keyOrderMaxBids), &p.OrderMaxBids, validateOrderMaxBids), + } +} + +func DefaultParams() Params { + return Params{ + BidMinDeposit: DefaultBidMinDeposit, + OrderMaxBids: defaultOrderMaxBids, + } +} + +func (p Params) Validate() error { + if err := validateCoin(p.BidMinDeposit); err != nil { + return err + } + + if err := validateOrderMaxBids(p.OrderMaxBids); err != nil { + return err + } + return nil +} + +func validateCoin(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return errors.Wrapf(ErrInvalidParam, "invalid type %T", i) + } + + return nil +} + +func validateOrderMaxBids(i interface{}) error { + val, ok := i.(uint32) + + if !ok { + return errors.Wrapf(ErrInvalidParam, "invalid type %T", i) + } + + if val == 0 { + return errors.Wrap(ErrInvalidParam, "order max bids too low") + } + + if val > maxOrderMaxBids { + return errors.Wrap(ErrInvalidParam, "order max bids too high") + } + + return nil +} diff --git a/go/node/market/v1beta2/params.pb.go b/go/node/market/v1beta2/params.pb.go new file mode 100644 index 00000000..81bafce2 --- /dev/null +++ b/go/node/market/v1beta2/params.pb.go @@ -0,0 +1,365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/params.proto + +package v1beta2 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params is the params for the x/market module +type Params struct { + BidMinDeposit types.Coin `protobuf:"bytes,1,opt,name=bid_min_deposit,json=bidMinDeposit,proto3" json:"bid_min_deposit" yaml:"bid_min_deposit"` + OrderMaxBids uint32 `protobuf:"varint,2,opt,name=order_max_bids,json=orderMaxBids,proto3" json:"order_max_bids" yaml:"order_max_bids"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_ea1237af8227f99c, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetBidMinDeposit() types.Coin { + if m != nil { + return m.BidMinDeposit + } + return types.Coin{} +} + +func (m *Params) GetOrderMaxBids() uint32 { + if m != nil { + return m.OrderMaxBids + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "akash.market.v1beta2.Params") +} + +func init() { proto.RegisterFile("akash/market/v1beta2/params.proto", fileDescriptor_ea1237af8227f99c) } + +var fileDescriptor_ea1237af8227f99c = []byte{ + // 321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x31, 0x4f, 0xe3, 0x30, + 0x18, 0x86, 0xe3, 0x1b, 0x3a, 0xe4, 0xda, 0x3b, 0xa9, 0xea, 0x9d, 0x4a, 0x07, 0xbb, 0x64, 0xea, + 0x82, 0xad, 0x96, 0x09, 0xd8, 0x02, 0x6b, 0x05, 0x2a, 0x1b, 0x4b, 0x64, 0xd7, 0x56, 0x6a, 0x15, + 0xe7, 0x8b, 0xe2, 0x00, 0xe5, 0x07, 0xb0, 0xf3, 0xb3, 0x3a, 0x76, 0x64, 0xb2, 0x50, 0xba, 0x75, + 0x2c, 0x7f, 0x00, 0x35, 0xc9, 0x50, 0xb2, 0xd9, 0x7e, 0x9f, 0xf7, 0xf9, 0xa4, 0xcf, 0xfe, 0x29, + 0x5f, 0x72, 0xbb, 0x60, 0x86, 0x67, 0x4b, 0x95, 0xb3, 0xe7, 0xb1, 0x50, 0x39, 0x9f, 0xb0, 0x94, + 0x67, 0xdc, 0x58, 0x9a, 0x66, 0x90, 0x43, 0xb7, 0x57, 0x22, 0xb4, 0x42, 0x68, 0x8d, 0x0c, 0x7a, + 0x31, 0xc4, 0x50, 0x02, 0xec, 0x70, 0xaa, 0xd8, 0x01, 0x9e, 0x83, 0x35, 0x60, 0x99, 0xe0, 0x56, + 0xd5, 0xb6, 0x31, 0x9b, 0x83, 0x4e, 0xaa, 0x3c, 0xf8, 0x42, 0x7e, 0xeb, 0xae, 0x94, 0x77, 0xdf, + 0x90, 0xff, 0x57, 0x68, 0x19, 0x19, 0x9d, 0x44, 0x52, 0xa5, 0x60, 0x75, 0xde, 0x47, 0x43, 0x34, + 0xfa, 0x3d, 0x39, 0xa1, 0x95, 0x85, 0x1e, 0x2c, 0xf5, 0xc0, 0x31, 0xbd, 0x06, 0x9d, 0x84, 0xe1, + 0xda, 0x11, 0xaf, 0x70, 0xa4, 0x13, 0x6a, 0x39, 0xd5, 0xc9, 0x4d, 0xd5, 0xdb, 0x39, 0xd2, 0x54, + 0xed, 0x1d, 0xf9, 0xff, 0xca, 0xcd, 0xe3, 0x65, 0xd0, 0x08, 0x82, 0x59, 0x47, 0x1c, 0x77, 0xbb, + 0xdc, 0xff, 0x03, 0x99, 0x54, 0x59, 0x64, 0xf8, 0x2a, 0x12, 0x5a, 0xda, 0xfe, 0xaf, 0x21, 0x1a, + 0x75, 0xc2, 0xab, 0xc2, 0x91, 0xf6, 0xed, 0x21, 0x99, 0xf2, 0x55, 0xa8, 0xa5, 0xdd, 0x39, 0xd2, + 0x20, 0xf7, 0x8e, 0xfc, 0xab, 0x86, 0xfc, 0x7c, 0x0f, 0x66, 0x6d, 0x38, 0x2a, 0x86, 0xf7, 0xeb, + 0x02, 0xa3, 0x4d, 0x81, 0xd1, 0x67, 0x81, 0xd1, 0xfb, 0x16, 0x7b, 0x9b, 0x2d, 0xf6, 0x3e, 0xb6, + 0xd8, 0x7b, 0xb8, 0x88, 0x75, 0xbe, 0x78, 0x12, 0x74, 0x0e, 0x86, 0x95, 0x6b, 0x3e, 0x4b, 0x54, + 0xfe, 0x02, 0xd9, 0xb2, 0xbe, 0xf1, 0x54, 0xb3, 0x18, 0x58, 0x02, 0x52, 0x35, 0xfe, 0x48, 0xb4, + 0xca, 0x8d, 0x9e, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x2f, 0x47, 0x44, 0xc2, 0x01, 0x00, + 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OrderMaxBids != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.OrderMaxBids)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.BidMinDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidMinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + if m.OrderMaxBids != 0 { + n += 1 + sovParams(uint64(m.OrderMaxBids)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidMinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderMaxBids", wireType) + } + m.OrderMaxBids = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderMaxBids |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/query.pb.go b/go/node/market/v1beta2/query.pb.go new file mode 100644 index 00000000..075be02f --- /dev/null +++ b/go/node/market/v1beta2/query.pb.go @@ -0,0 +1,3034 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + v1beta2 "github.com/akash-network/akash-api/go/node/escrow/v1beta2" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryOrdersRequest is request type for the Query/Orders RPC method +type QueryOrdersRequest struct { + Filters OrderFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryOrdersRequest) Reset() { *m = QueryOrdersRequest{} } +func (m *QueryOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOrdersRequest) ProtoMessage() {} +func (*QueryOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{0} +} +func (m *QueryOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrdersRequest.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 *QueryOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrdersRequest.Merge(m, src) +} +func (m *QueryOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrdersRequest proto.InternalMessageInfo + +func (m *QueryOrdersRequest) GetFilters() OrderFilters { + if m != nil { + return m.Filters + } + return OrderFilters{} +} + +func (m *QueryOrdersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryOrdersResponse is response type for the Query/Orders RPC method +type QueryOrdersResponse struct { + Orders Orders `protobuf:"bytes,1,rep,name=orders,proto3,castrepeated=Orders" json:"orders"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryOrdersResponse) Reset() { *m = QueryOrdersResponse{} } +func (m *QueryOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOrdersResponse) ProtoMessage() {} +func (*QueryOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{1} +} +func (m *QueryOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrdersResponse.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 *QueryOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrdersResponse.Merge(m, src) +} +func (m *QueryOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrdersResponse proto.InternalMessageInfo + +func (m *QueryOrdersResponse) GetOrders() Orders { + if m != nil { + return m.Orders + } + return nil +} + +func (m *QueryOrdersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryOrderRequest is request type for the Query/Order RPC method +type QueryOrderRequest struct { + ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryOrderRequest) Reset() { *m = QueryOrderRequest{} } +func (m *QueryOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOrderRequest) ProtoMessage() {} +func (*QueryOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{2} +} +func (m *QueryOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrderRequest.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 *QueryOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrderRequest.Merge(m, src) +} +func (m *QueryOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrderRequest proto.InternalMessageInfo + +func (m *QueryOrderRequest) GetID() OrderID { + if m != nil { + return m.ID + } + return OrderID{} +} + +// QueryOrderResponse is response type for the Query/Order RPC method +type QueryOrderResponse struct { + Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"` +} + +func (m *QueryOrderResponse) Reset() { *m = QueryOrderResponse{} } +func (m *QueryOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOrderResponse) ProtoMessage() {} +func (*QueryOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{3} +} +func (m *QueryOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrderResponse.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 *QueryOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrderResponse.Merge(m, src) +} +func (m *QueryOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrderResponse proto.InternalMessageInfo + +func (m *QueryOrderResponse) GetOrder() Order { + if m != nil { + return m.Order + } + return Order{} +} + +// QueryBidsRequest is request type for the Query/Bids RPC method +type QueryBidsRequest struct { + Filters BidFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBidsRequest) Reset() { *m = QueryBidsRequest{} } +func (m *QueryBidsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBidsRequest) ProtoMessage() {} +func (*QueryBidsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{4} +} +func (m *QueryBidsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidsRequest.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 *QueryBidsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidsRequest.Merge(m, src) +} +func (m *QueryBidsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBidsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidsRequest proto.InternalMessageInfo + +func (m *QueryBidsRequest) GetFilters() BidFilters { + if m != nil { + return m.Filters + } + return BidFilters{} +} + +func (m *QueryBidsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBidsResponse is response type for the Query/Bids RPC method +type QueryBidsResponse struct { + Bids []QueryBidResponse `protobuf:"bytes,1,rep,name=bids,proto3" json:"bids"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBidsResponse) Reset() { *m = QueryBidsResponse{} } +func (m *QueryBidsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBidsResponse) ProtoMessage() {} +func (*QueryBidsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{5} +} +func (m *QueryBidsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidsResponse.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 *QueryBidsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidsResponse.Merge(m, src) +} +func (m *QueryBidsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBidsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidsResponse proto.InternalMessageInfo + +func (m *QueryBidsResponse) GetBids() []QueryBidResponse { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryBidsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBidRequest is request type for the Query/Bid RPC method +type QueryBidRequest struct { + ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryBidRequest) Reset() { *m = QueryBidRequest{} } +func (m *QueryBidRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBidRequest) ProtoMessage() {} +func (*QueryBidRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{6} +} +func (m *QueryBidRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidRequest.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 *QueryBidRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidRequest.Merge(m, src) +} +func (m *QueryBidRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBidRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidRequest proto.InternalMessageInfo + +func (m *QueryBidRequest) GetID() BidID { + if m != nil { + return m.ID + } + return BidID{} +} + +// QueryBidResponse is response type for the Query/Bid RPC method +type QueryBidResponse struct { + Bid Bid `protobuf:"bytes,1,opt,name=bid,proto3" json:"bid"` + EscrowAccount v1beta2.Account `protobuf:"bytes,2,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` +} + +func (m *QueryBidResponse) Reset() { *m = QueryBidResponse{} } +func (m *QueryBidResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBidResponse) ProtoMessage() {} +func (*QueryBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{7} +} +func (m *QueryBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidResponse.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 *QueryBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidResponse.Merge(m, src) +} +func (m *QueryBidResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidResponse proto.InternalMessageInfo + +func (m *QueryBidResponse) GetBid() Bid { + if m != nil { + return m.Bid + } + return Bid{} +} + +func (m *QueryBidResponse) GetEscrowAccount() v1beta2.Account { + if m != nil { + return m.EscrowAccount + } + return v1beta2.Account{} +} + +// QueryLeasesRequest is request type for the Query/Leases RPC method +type QueryLeasesRequest struct { + Filters LeaseFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryLeasesRequest) Reset() { *m = QueryLeasesRequest{} } +func (m *QueryLeasesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLeasesRequest) ProtoMessage() {} +func (*QueryLeasesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{8} +} +func (m *QueryLeasesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeasesRequest.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 *QueryLeasesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeasesRequest.Merge(m, src) +} +func (m *QueryLeasesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLeasesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeasesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeasesRequest proto.InternalMessageInfo + +func (m *QueryLeasesRequest) GetFilters() LeaseFilters { + if m != nil { + return m.Filters + } + return LeaseFilters{} +} + +func (m *QueryLeasesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryLeasesResponse is response type for the Query/Leases RPC method +type QueryLeasesResponse struct { + Leases []QueryLeaseResponse `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryLeasesResponse) Reset() { *m = QueryLeasesResponse{} } +func (m *QueryLeasesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLeasesResponse) ProtoMessage() {} +func (*QueryLeasesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{9} +} +func (m *QueryLeasesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeasesResponse.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 *QueryLeasesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeasesResponse.Merge(m, src) +} +func (m *QueryLeasesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLeasesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeasesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeasesResponse proto.InternalMessageInfo + +func (m *QueryLeasesResponse) GetLeases() []QueryLeaseResponse { + if m != nil { + return m.Leases + } + return nil +} + +func (m *QueryLeasesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryLeaseRequest is request type for the Query/Lease RPC method +type QueryLeaseRequest struct { + ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryLeaseRequest) Reset() { *m = QueryLeaseRequest{} } +func (m *QueryLeaseRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLeaseRequest) ProtoMessage() {} +func (*QueryLeaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{10} +} +func (m *QueryLeaseRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeaseRequest.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 *QueryLeaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeaseRequest.Merge(m, src) +} +func (m *QueryLeaseRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLeaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeaseRequest proto.InternalMessageInfo + +func (m *QueryLeaseRequest) GetID() LeaseID { + if m != nil { + return m.ID + } + return LeaseID{} +} + +// QueryLeaseResponse is response type for the Query/Lease RPC method +type QueryLeaseResponse struct { + Lease Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease"` + EscrowPayment v1beta2.FractionalPayment `protobuf:"bytes,2,opt,name=escrow_payment,json=escrowPayment,proto3" json:"escrow_payment"` +} + +func (m *QueryLeaseResponse) Reset() { *m = QueryLeaseResponse{} } +func (m *QueryLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLeaseResponse) ProtoMessage() {} +func (*QueryLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_673a6df4a4bc85e3, []int{11} +} +func (m *QueryLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeaseResponse.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 *QueryLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeaseResponse.Merge(m, src) +} +func (m *QueryLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeaseResponse proto.InternalMessageInfo + +func (m *QueryLeaseResponse) GetLease() Lease { + if m != nil { + return m.Lease + } + return Lease{} +} + +func (m *QueryLeaseResponse) GetEscrowPayment() v1beta2.FractionalPayment { + if m != nil { + return m.EscrowPayment + } + return v1beta2.FractionalPayment{} +} + +func init() { + proto.RegisterType((*QueryOrdersRequest)(nil), "akash.market.v1beta2.QueryOrdersRequest") + proto.RegisterType((*QueryOrdersResponse)(nil), "akash.market.v1beta2.QueryOrdersResponse") + proto.RegisterType((*QueryOrderRequest)(nil), "akash.market.v1beta2.QueryOrderRequest") + proto.RegisterType((*QueryOrderResponse)(nil), "akash.market.v1beta2.QueryOrderResponse") + proto.RegisterType((*QueryBidsRequest)(nil), "akash.market.v1beta2.QueryBidsRequest") + proto.RegisterType((*QueryBidsResponse)(nil), "akash.market.v1beta2.QueryBidsResponse") + proto.RegisterType((*QueryBidRequest)(nil), "akash.market.v1beta2.QueryBidRequest") + proto.RegisterType((*QueryBidResponse)(nil), "akash.market.v1beta2.QueryBidResponse") + proto.RegisterType((*QueryLeasesRequest)(nil), "akash.market.v1beta2.QueryLeasesRequest") + proto.RegisterType((*QueryLeasesResponse)(nil), "akash.market.v1beta2.QueryLeasesResponse") + proto.RegisterType((*QueryLeaseRequest)(nil), "akash.market.v1beta2.QueryLeaseRequest") + proto.RegisterType((*QueryLeaseResponse)(nil), "akash.market.v1beta2.QueryLeaseResponse") +} + +func init() { proto.RegisterFile("akash/market/v1beta2/query.proto", fileDescriptor_673a6df4a4bc85e3) } + +var fileDescriptor_673a6df4a4bc85e3 = []byte{ + // 796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0x8d, 0xd3, 0x36, 0x3f, 0x69, 0xab, 0x5f, 0x81, 0xa5, 0x87, 0x92, 0x42, 0xd2, 0x06, 0xd1, + 0xa4, 0x48, 0xd8, 0x6a, 0x38, 0x54, 0xbd, 0x15, 0x53, 0x05, 0xb5, 0xe2, 0x4f, 0x09, 0x9c, 0xb8, + 0xa0, 0x75, 0xbc, 0x75, 0x57, 0x4d, 0xbc, 0xa9, 0xd7, 0xa1, 0xea, 0x01, 0x09, 0x21, 0x21, 0x71, + 0x04, 0x71, 0x45, 0x08, 0xa9, 0x12, 0x07, 0x2e, 0x7c, 0x8d, 0x1e, 0x2b, 0x71, 0xe1, 0x54, 0x50, + 0xca, 0x07, 0x41, 0xfb, 0xc7, 0x4e, 0x5c, 0x39, 0xb6, 0x2b, 0xb5, 0xb7, 0xc4, 0x7e, 0x33, 0xf3, + 0x66, 0xe6, 0xed, 0xf3, 0x82, 0x39, 0xb4, 0x83, 0xd8, 0xb6, 0xd1, 0x41, 0xde, 0x0e, 0xf6, 0x8d, + 0x57, 0x4b, 0x16, 0xf6, 0x51, 0xdd, 0xd8, 0xed, 0x61, 0x6f, 0x5f, 0xef, 0x7a, 0xd4, 0xa7, 0x70, + 0x5a, 0x20, 0x74, 0x89, 0xd0, 0x15, 0xa2, 0x38, 0xed, 0x50, 0x87, 0x0a, 0x80, 0xc1, 0x7f, 0x49, + 0x6c, 0xf1, 0xba, 0x43, 0xa9, 0xd3, 0xc6, 0x06, 0xea, 0x12, 0x03, 0xb9, 0x2e, 0xf5, 0x91, 0x4f, + 0xa8, 0xcb, 0xd4, 0xdb, 0xdb, 0x2d, 0xca, 0x3a, 0x94, 0x19, 0x16, 0x62, 0x58, 0x96, 0x50, 0x05, + 0x97, 0x8c, 0x2e, 0x72, 0x88, 0x2b, 0xc0, 0x0a, 0x1b, 0xcf, 0x8b, 0x7a, 0x36, 0xf6, 0x14, 0xa2, + 0x14, 0x8b, 0xb0, 0x88, 0x9d, 0x98, 0xa1, 0x8d, 0x11, 0xc3, 0x51, 0x04, 0x66, 0x2d, 0x8f, 0xee, + 0x85, 0x08, 0x7f, 0xbf, 0x8b, 0x15, 0xe3, 0xca, 0x57, 0x0d, 0xc0, 0xa7, 0x9c, 0xe8, 0x13, 0x5e, + 0x98, 0x35, 0xf1, 0x6e, 0x0f, 0x33, 0x1f, 0x9a, 0xe0, 0xbf, 0x2d, 0xd2, 0xf6, 0xb1, 0xc7, 0x66, + 0xb4, 0x39, 0xad, 0x36, 0x59, 0xaf, 0xe8, 0x71, 0x43, 0xd2, 0x45, 0x54, 0x43, 0x22, 0xcd, 0xf1, + 0xc3, 0xe3, 0x72, 0xae, 0x19, 0x04, 0xc2, 0x06, 0x00, 0x83, 0xa6, 0x67, 0xf2, 0x22, 0xcd, 0x82, + 0x2e, 0x27, 0xa4, 0xf3, 0x09, 0xe9, 0x72, 0x09, 0x6a, 0x42, 0xfa, 0x26, 0x72, 0xb0, 0xaa, 0xdf, + 0x1c, 0x8a, 0xac, 0x1c, 0x68, 0xe0, 0x6a, 0x84, 0x22, 0xeb, 0x52, 0x97, 0x61, 0x78, 0x1f, 0x14, + 0xc4, 0xb4, 0x38, 0xc5, 0xb1, 0xda, 0x64, 0x7d, 0x36, 0x81, 0xa2, 0x39, 0xc5, 0xb9, 0x7d, 0xff, + 0x5d, 0x2e, 0xa8, 0x24, 0x2a, 0x14, 0x3e, 0x88, 0x21, 0x59, 0x4d, 0x25, 0x29, 0x19, 0x44, 0x58, + 0x3e, 0x06, 0x57, 0x06, 0x24, 0x83, 0x31, 0xae, 0x80, 0x3c, 0xb1, 0xd5, 0x04, 0x6f, 0x24, 0xd0, + 0x5b, 0x5f, 0x33, 0x01, 0x27, 0xd8, 0x3f, 0x2e, 0xe7, 0xd7, 0xd7, 0x9a, 0x79, 0x62, 0x57, 0x1e, + 0x0d, 0xef, 0x25, 0xec, 0x79, 0x19, 0x4c, 0x08, 0xe2, 0x2a, 0x67, 0x62, 0xcb, 0x72, 0x1d, 0x12, + 0x5f, 0xf9, 0xac, 0x81, 0xcb, 0x22, 0x9f, 0x49, 0xec, 0x70, 0xcb, 0xab, 0xa7, 0xb7, 0x3c, 0x17, + 0x9f, 0xcf, 0x24, 0xf6, 0x05, 0xef, 0xf8, 0x8b, 0xa6, 0xc6, 0x27, 0xe9, 0xa9, 0x6e, 0x57, 0xc1, + 0xb8, 0x45, 0xec, 0x60, 0xbf, 0x0b, 0xf1, 0xe4, 0x82, 0xb0, 0x20, 0x4a, 0x51, 0x14, 0x91, 0xe7, + 0xb7, 0xde, 0x0d, 0x70, 0x69, 0x50, 0x48, 0x4e, 0x6f, 0x79, 0x68, 0xb9, 0xb3, 0x23, 0x07, 0x17, + 0xb3, 0xda, 0x8f, 0x43, 0xbb, 0x08, 0x7b, 0x5d, 0x02, 0x63, 0x56, 0x98, 0xee, 0xda, 0xc8, 0x74, + 0xaa, 0x3b, 0x8e, 0x85, 0x1b, 0x60, 0x4a, 0x9e, 0xec, 0x97, 0xa8, 0xd5, 0xa2, 0x3d, 0xd7, 0x57, + 0x0d, 0x06, 0x4a, 0x93, 0x2f, 0xc3, 0xe8, 0x7b, 0x12, 0xa4, 0x32, 0xfc, 0x2f, 0xdf, 0xaa, 0x87, + 0x03, 0x1f, 0x78, 0xc8, 0xed, 0xe3, 0xcc, 0x3e, 0x20, 0xa2, 0x2e, 0x58, 0x23, 0xdf, 0x02, 0x1f, + 0x08, 0x28, 0xaa, 0xc9, 0x35, 0x40, 0x41, 0x78, 0x5e, 0xa0, 0x93, 0x5a, 0x82, 0x4e, 0x44, 0xe8, + 0x29, 0xa5, 0xa8, 0xe8, 0xf3, 0xb7, 0x02, 0x55, 0x2c, 0xb3, 0x15, 0x08, 0x7c, 0x8c, 0x5e, 0x0e, + 0x22, 0xbb, 0x19, 0xf6, 0x02, 0xc1, 0x3c, 0x59, 0x82, 0x22, 0x26, 0xf0, 0x02, 0x81, 0x87, 0xcf, + 0x43, 0xdd, 0x74, 0xd1, 0x7e, 0x07, 0x87, 0xba, 0xa9, 0xc6, 0xeb, 0xa6, 0xe1, 0xa1, 0x16, 0xef, + 0x0b, 0xb5, 0x37, 0x25, 0x3c, 0xaa, 0x20, 0xf5, 0xb0, 0xfe, 0xa3, 0x00, 0x26, 0x04, 0x4b, 0xf8, + 0x5e, 0x03, 0xca, 0x66, 0x61, 0xd2, 0x2e, 0x22, 0x5f, 0x9c, 0xe2, 0x62, 0x06, 0xa4, 0x6c, 0xbc, + 0xb2, 0xf8, 0xf6, 0xe7, 0xdf, 0x4f, 0xf9, 0x9b, 0x70, 0xde, 0x18, 0xfd, 0x09, 0x65, 0x46, 0x9b, + 0x30, 0x1f, 0xbe, 0xd3, 0xc0, 0x84, 0x88, 0x86, 0xd5, 0xb4, 0xfc, 0x01, 0x91, 0x5a, 0x3a, 0xf0, + 0x4c, 0x3c, 0x88, 0xbb, 0x45, 0xe1, 0x1b, 0x0d, 0x8c, 0x73, 0x6b, 0x83, 0x29, 0x26, 0x16, 0x8e, + 0xa3, 0x9a, 0x8a, 0x53, 0x24, 0xaa, 0x82, 0xc4, 0x3c, 0x2c, 0x1b, 0xa3, 0x6e, 0x0b, 0x6a, 0x14, + 0xaf, 0xc1, 0x98, 0x49, 0x6c, 0x78, 0x2b, 0xcd, 0x45, 0x65, 0xfd, 0x8c, 0x66, 0x9b, 0xa9, 0xbc, + 0x98, 0x00, 0x17, 0x85, 0x3c, 0xb8, 0x30, 0xf5, 0x80, 0x66, 0x12, 0x45, 0xd4, 0x05, 0xd2, 0x96, + 0x21, 0xcf, 0xf8, 0x40, 0x14, 0x22, 0x3a, 0x51, 0x14, 0xc3, 0xa7, 0xb7, 0x98, 0xd9, 0x53, 0x32, + 0xf2, 0xe0, 0x23, 0x31, 0x9f, 0x1d, 0xf6, 0x4b, 0xda, 0x51, 0xbf, 0xa4, 0xfd, 0xe9, 0x97, 0xb4, + 0x0f, 0x27, 0xa5, 0xdc, 0xd1, 0x49, 0x29, 0xf7, 0xeb, 0xa4, 0x94, 0x7b, 0xb1, 0xe2, 0x10, 0x7f, + 0xbb, 0x67, 0xe9, 0x2d, 0xda, 0x91, 0x69, 0xee, 0xb8, 0xd8, 0xdf, 0xa3, 0xde, 0x8e, 0xfa, 0xc7, + 0x6f, 0x9f, 0x0e, 0x35, 0x5c, 0x6a, 0xe3, 0x53, 0x05, 0xac, 0x82, 0xb8, 0xd7, 0xdd, 0xfd, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x8e, 0x19, 0x72, 0x7b, 0xf7, 0x0a, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Orders queries orders with filters + Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) + // Order queries order details + Order(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) + // Bids queries bids with filters + Bids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error) + // Bid queries bid details + Bid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) + // Leases queries leases with filters + Leases(ctx context.Context, in *QueryLeasesRequest, opts ...grpc.CallOption) (*QueryLeasesResponse, error) + // Lease queries lease details + Lease(ctx context.Context, in *QueryLeaseRequest, opts ...grpc.CallOption) (*QueryLeaseResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) { + out := new(QueryOrdersResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Orders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Order(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) { + out := new(QueryOrderResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Order", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error) { + out := new(QueryBidsResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Bids", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) { + out := new(QueryBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Bid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Leases(ctx context.Context, in *QueryLeasesRequest, opts ...grpc.CallOption) (*QueryLeasesResponse, error) { + out := new(QueryLeasesResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Leases", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Lease(ctx context.Context, in *QueryLeaseRequest, opts ...grpc.CallOption) (*QueryLeaseResponse, error) { + out := new(QueryLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Query/Lease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Orders queries orders with filters + Orders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error) + // Order queries order details + Order(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error) + // Bids queries bids with filters + Bids(context.Context, *QueryBidsRequest) (*QueryBidsResponse, error) + // Bid queries bid details + Bid(context.Context, *QueryBidRequest) (*QueryBidResponse, error) + // Leases queries leases with filters + Leases(context.Context, *QueryLeasesRequest) (*QueryLeasesResponse, error) + // Lease queries lease details + Lease(context.Context, *QueryLeaseRequest) (*QueryLeaseResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Orders(ctx context.Context, req *QueryOrdersRequest) (*QueryOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orders not implemented") +} +func (*UnimplementedQueryServer) Order(ctx context.Context, req *QueryOrderRequest) (*QueryOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Order not implemented") +} +func (*UnimplementedQueryServer) Bids(ctx context.Context, req *QueryBidsRequest) (*QueryBidsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bids not implemented") +} +func (*UnimplementedQueryServer) Bid(ctx context.Context, req *QueryBidRequest) (*QueryBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bid not implemented") +} +func (*UnimplementedQueryServer) Leases(ctx context.Context, req *QueryLeasesRequest) (*QueryLeasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Leases not implemented") +} +func (*UnimplementedQueryServer) Lease(ctx context.Context, req *QueryLeaseRequest) (*QueryLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Lease not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Orders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Orders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Orders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Orders(ctx, req.(*QueryOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Order(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Order", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Order(ctx, req.(*QueryOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBidsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bids(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Bids", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bids(ctx, req.(*QueryBidsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBidRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Bid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bid(ctx, req.(*QueryBidRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Leases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLeasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Leases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Leases", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Leases(ctx, req.(*QueryLeasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Lease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Lease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Query/Lease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Lease(ctx, req.(*QueryLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.market.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Orders", + Handler: _Query_Orders_Handler, + }, + { + MethodName: "Order", + Handler: _Query_Order_Handler, + }, + { + MethodName: "Bids", + Handler: _Query_Bids_Handler, + }, + { + MethodName: "Bid", + Handler: _Query_Bid_Handler, + }, + { + MethodName: "Leases", + Handler: _Query_Leases_Handler, + }, + { + MethodName: "Lease", + Handler: _Query_Lease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/market/v1beta2/query.proto", +} + +func (m *QueryOrdersRequest) 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 *QueryOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrdersRequest) 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 + } + { + size, err := m.Filters.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 *QueryOrdersResponse) 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 *QueryOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrdersResponse) 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.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[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 (m *QueryOrderRequest) 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 *QueryOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryOrderResponse) 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 *QueryOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.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 *QueryBidsRequest) 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 *QueryBidsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidsRequest) 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 + } + { + size, err := m.Filters.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 *QueryBidsResponse) 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 *QueryBidsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidsResponse) 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.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[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 (m *QueryBidRequest) 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 *QueryBidRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryBidResponse) 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 *QueryBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + 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)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Bid.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 *QueryLeasesRequest) 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 *QueryLeasesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeasesRequest) 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 + } + { + size, err := m.Filters.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 *QueryLeasesResponse) 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 *QueryLeasesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeasesResponse) 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.Leases) > 0 { + for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leases[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 (m *QueryLeaseRequest) 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 *QueryLeaseRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeaseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryLeaseResponse) 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 *QueryLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.EscrowPayment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Lease.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 *QueryOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + 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 (m *QueryOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBidsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBidsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bids) > 0 { + for _, e := range m.Bids { + 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 (m *QueryBidRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Bid.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EscrowAccount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryLeasesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLeasesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Leases) > 0 { + for _, e := range m.Leases { + 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 (m *QueryLeaseRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Lease.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EscrowPayment.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryOrdersRequest) 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: QueryOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryOrdersResponse) 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: QueryOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", 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.Orders = append(m.Orders, Order{}) + if err := m.Orders[len(m.Orders)-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) + } + 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.PageResponse{} + } + 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 *QueryOrderRequest) 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: QueryOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrderRequest: 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 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.ID.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 *QueryOrderResponse) 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: QueryOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", 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.Order.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 *QueryBidsRequest) 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: QueryBidsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryBidsResponse) 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: QueryBidsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", 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.Bids = append(m.Bids, QueryBidResponse{}) + if err := m.Bids[len(m.Bids)-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) + } + 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.PageResponse{} + } + 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 *QueryBidRequest) 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: QueryBidRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidRequest: 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 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.ID.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 *QueryBidResponse) 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: QueryBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bid", 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.Bid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", 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.EscrowAccount.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 *QueryLeasesRequest) 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: QueryLeasesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeasesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryLeasesResponse) 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: QueryLeasesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeasesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leases", 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.Leases = append(m.Leases, QueryLeaseResponse{}) + if err := m.Leases[len(m.Leases)-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) + } + 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.PageResponse{} + } + 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 *QueryLeaseRequest) 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: QueryLeaseRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeaseRequest: 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 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.ID.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 *QueryLeaseResponse) 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: QueryLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", 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.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowPayment", 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.EscrowPayment.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta2/query.pb.gw.go b/go/node/market/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..7d8d85a8 --- /dev/null +++ b/go/node/market/v1beta2/query.pb.gw.go @@ -0,0 +1,586 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/market/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Orders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Orders_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrdersRequest + 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_Orders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Orders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Orders_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrdersRequest + 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_Orders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Orders(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Order_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrderRequest + 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_Order_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Order(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrderRequest + 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_Order_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Order(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Bids_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Bids_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidsRequest + 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_Bids_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Bids(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bids_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidsRequest + 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_Bids_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Bids(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Bid_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Bid_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidRequest + 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_Bid_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Bid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bid_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidRequest + 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_Bid_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Bid(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Leases_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Leases_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeasesRequest + 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_Leases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Leases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Leases_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeasesRequest + 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_Leases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Leases(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Lease_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Lease_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeaseRequest + 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_Lease_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Lease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Lease_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeaseRequest + 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_Lease_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Lease(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Orders_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_Orders_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_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Order_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_Order_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_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bids_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_Bids_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_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bid_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_Bid_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_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Leases_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_Leases_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_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Lease_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_Lease_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_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Orders_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_Orders_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_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Order_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_Order_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_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bids_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_Bids_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_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bid_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_Bid_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_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Leases_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_Leases_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_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Lease_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_Lease_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_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "info"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Orders_0 = runtime.ForwardResponseMessage + + forward_Query_Order_0 = runtime.ForwardResponseMessage + + forward_Query_Bids_0 = runtime.ForwardResponseMessage + + forward_Query_Bid_0 = runtime.ForwardResponseMessage + + forward_Query_Leases_0 = runtime.ForwardResponseMessage + + forward_Query_Lease_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/market/v1beta2/service.pb.go b/go/node/market/v1beta2/service.pb.go new file mode 100644 index 00000000..f19c30f8 --- /dev/null +++ b/go/node/market/v1beta2/service.pb.go @@ -0,0 +1,287 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta2/service.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// 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 + +func init() { + proto.RegisterFile("akash/market/v1beta2/service.proto", fileDescriptor_22998c3fbeffa97e) +} + +var fileDescriptor_22998c3fbeffa97e = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd2, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x92, 0xc3, 0xaa, 0x33, 0x29, 0x33, 0x05, + 0xa2, 0x4b, 0x4a, 0x01, 0xab, 0x7c, 0x4e, 0x6a, 0x62, 0x31, 0xd4, 0x5c, 0xa3, 0x17, 0xcc, 0x5c, + 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0xd1, 0x5c, 0x9c, 0xce, 0x45, 0xa9, 0x89, 0x25, 0xa9, 0x4e, 0x99, + 0x29, 0x42, 0x4a, 0x7a, 0xd8, 0x6c, 0xd3, 0xf3, 0x2d, 0x4e, 0x87, 0xab, 0x91, 0xd2, 0x22, 0xac, + 0x26, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0x28, 0x82, 0x8b, 0xc3, 0x39, 0x27, 0xbf, + 0x18, 0x6c, 0xb6, 0x22, 0x6e, 0x7d, 0x50, 0x25, 0x52, 0x9a, 0x04, 0x95, 0xc0, 0x4d, 0x4e, 0xe7, + 0xe2, 0x0d, 0xcf, 0x2c, 0xc9, 0x48, 0x29, 0x4a, 0x2c, 0xf7, 0x01, 0xf9, 0x4a, 0x48, 0x0d, 0xa7, + 0x5e, 0x14, 0x75, 0x52, 0x7a, 0xc4, 0xa9, 0x83, 0x5b, 0x94, 0xc8, 0xc5, 0x0d, 0xf1, 0x17, 0xc4, + 0x1a, 0x15, 0x02, 0xbe, 0x87, 0x58, 0xa2, 0x43, 0x8c, 0x2a, 0xb8, 0x15, 0x71, 0x5c, 0x5c, 0x60, + 0xff, 0x41, 0x6c, 0x50, 0xc6, 0x1f, 0x08, 0x10, 0x0b, 0xb4, 0x89, 0x50, 0x04, 0x33, 0xdf, 0x29, + 0xf8, 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, 0x2c, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0x06, 0xea, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, + 0x65, 0x43, 0x79, 0x89, 0x05, 0x99, 0xfa, 0xe9, 0xf9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0x68, 0x69, + 0x29, 0x89, 0x0d, 0x9c, 0x8c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x05, 0xbc, 0x13, + 0xc4, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateBid defines a method to create a bid given proper inputs. + CreateBid(ctx context.Context, in *MsgCreateBid, opts ...grpc.CallOption) (*MsgCreateBidResponse, error) + // CloseBid defines a method to close a bid given proper inputs. + CloseBid(ctx context.Context, in *MsgCloseBid, opts ...grpc.CallOption) (*MsgCloseBidResponse, error) + // WithdrawLease withdraws accrued funds from the lease payment + WithdrawLease(ctx context.Context, in *MsgWithdrawLease, opts ...grpc.CallOption) (*MsgWithdrawLeaseResponse, error) + // CreateLease creates a new lease + CreateLease(ctx context.Context, in *MsgCreateLease, opts ...grpc.CallOption) (*MsgCreateLeaseResponse, error) + // CloseLease defines a method to close an order given proper inputs. + CloseLease(ctx context.Context, in *MsgCloseLease, opts ...grpc.CallOption) (*MsgCloseLeaseResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateBid(ctx context.Context, in *MsgCreateBid, opts ...grpc.CallOption) (*MsgCreateBidResponse, error) { + out := new(MsgCreateBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Msg/CreateBid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseBid(ctx context.Context, in *MsgCloseBid, opts ...grpc.CallOption) (*MsgCloseBidResponse, error) { + out := new(MsgCloseBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Msg/CloseBid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawLease(ctx context.Context, in *MsgWithdrawLease, opts ...grpc.CallOption) (*MsgWithdrawLeaseResponse, error) { + out := new(MsgWithdrawLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Msg/WithdrawLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateLease(ctx context.Context, in *MsgCreateLease, opts ...grpc.CallOption) (*MsgCreateLeaseResponse, error) { + out := new(MsgCreateLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Msg/CreateLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseLease(ctx context.Context, in *MsgCloseLease, opts ...grpc.CallOption) (*MsgCloseLeaseResponse, error) { + out := new(MsgCloseLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta2.Msg/CloseLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateBid defines a method to create a bid given proper inputs. + CreateBid(context.Context, *MsgCreateBid) (*MsgCreateBidResponse, error) + // CloseBid defines a method to close a bid given proper inputs. + CloseBid(context.Context, *MsgCloseBid) (*MsgCloseBidResponse, error) + // WithdrawLease withdraws accrued funds from the lease payment + WithdrawLease(context.Context, *MsgWithdrawLease) (*MsgWithdrawLeaseResponse, error) + // CreateLease creates a new lease + CreateLease(context.Context, *MsgCreateLease) (*MsgCreateLeaseResponse, error) + // CloseLease defines a method to close an order given proper inputs. + CloseLease(context.Context, *MsgCloseLease) (*MsgCloseLeaseResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateBid(ctx context.Context, req *MsgCreateBid) (*MsgCreateBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBid not implemented") +} +func (*UnimplementedMsgServer) CloseBid(ctx context.Context, req *MsgCloseBid) (*MsgCloseBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseBid not implemented") +} +func (*UnimplementedMsgServer) WithdrawLease(ctx context.Context, req *MsgWithdrawLease) (*MsgWithdrawLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawLease not implemented") +} +func (*UnimplementedMsgServer) CreateLease(ctx context.Context, req *MsgCreateLease) (*MsgCreateLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLease not implemented") +} +func (*UnimplementedMsgServer) CloseLease(ctx context.Context, req *MsgCloseLease) (*MsgCloseLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseLease not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBid) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Msg/CreateBid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBid(ctx, req.(*MsgCreateBid)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseBid) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseBid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Msg/CloseBid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseBid(ctx, req.(*MsgCloseBid)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Msg/WithdrawLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawLease(ctx, req.(*MsgWithdrawLease)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Msg/CreateLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateLease(ctx, req.(*MsgCreateLease)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta2.Msg/CloseLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseLease(ctx, req.(*MsgCloseLease)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.market.v1beta2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBid", + Handler: _Msg_CreateBid_Handler, + }, + { + MethodName: "CloseBid", + Handler: _Msg_CloseBid_Handler, + }, + { + MethodName: "WithdrawLease", + Handler: _Msg_WithdrawLease_Handler, + }, + { + MethodName: "CreateLease", + Handler: _Msg_CreateLease_Handler, + }, + { + MethodName: "CloseLease", + Handler: _Msg_CloseLease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/market/v1beta2/service.proto", +} diff --git a/go/node/market/v1beta2/types.go b/go/node/market/v1beta2/types.go new file mode 100644 index 00000000..81e3f5c2 --- /dev/null +++ b/go/node/market/v1beta2/types.go @@ -0,0 +1,241 @@ +package v1beta2 + +import ( + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + + types "github.com/akash-network/node/types/v1beta2" + + atypes "github.com/akash-network/akash-api/go/node/audit/v1beta2" + + "gopkg.in/yaml.v3" +) + +// ID method returns OrderID details of specific order +func (o Order) ID() OrderID { + return o.OrderID +} + +// String implements the Stringer interface for a Order object. +func (o Order) String() string { + out, _ := yaml.Marshal(o) + return string(out) +} + +// Orders is a collection of Order +type Orders []Order + +// String implements the Stringer interface for a Orders object. +func (o Orders) String() string { + var out string + for _, order := range o { + out += order.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// ValidateCanBid method validates whether order is open or not and +// returns error if not +func (o Order) ValidateCanBid() error { + switch o.State { + case OrderOpen: + return nil + case OrderActive: + return ErrOrderActive + default: + return ErrOrderClosed + } +} + +// ValidateInactive method validates whether order is open or not and +// returns error if not +func (o Order) ValidateInactive() error { + switch o.State { + case OrderClosed: + return nil + case OrderActive: + return ErrOrderActive + default: + return ErrOrderClosed + } +} + +// Price method returns price of specific order +func (o Order) Price() sdk.DecCoin { + return o.Spec.Price() +} + +// MatchAttributes method compares provided attributes with specific order attributes +func (o Order) MatchAttributes(attrs []types.Attribute) bool { + return o.Spec.MatchAttributes(attrs) +} + +// MatchRequirements method compares provided attributes with specific order attributes +func (o Order) MatchRequirements(prov []atypes.Provider) bool { + return o.Spec.MatchRequirements(prov) +} + +// MatchResourcesRequirements method compares provider capabilities with specific order resources attributes +func (o Order) MatchResourcesRequirements(attr types.Attributes) bool { + return o.Spec.MatchResourcesRequirements(attr) +} + +// Accept returns whether order filters valid or not +func (filters OrderFilters) Accept(obj Order, stateVal Order_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.OrderID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.OrderID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.OrderID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.OrderID.OSeq { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +// ID method returns BidID details of specific bid +func (obj Bid) ID() BidID { + return obj.BidID +} + +// String implements the Stringer interface for a Bid object. +func (obj Bid) String() string { + out, _ := yaml.Marshal(obj) + return string(out) +} + +// Bids is a collection of Bid +type Bids []Bid + +// String implements the Stringer interface for a Bids object. +func (b Bids) String() string { + var out string + for _, bid := range b { + out += bid.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// Accept returns whether bid filters valid or not +func (filters BidFilters) Accept(obj Bid, stateVal Bid_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.BidID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.BidID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.BidID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.BidID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != obj.BidID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +// ID method returns LeaseID details of specific lease +func (obj Lease) ID() LeaseID { + return obj.LeaseID +} + +// String implements the Stringer interface for a Lease object. +func (obj Lease) String() string { + out, _ := yaml.Marshal(obj) + return string(out) +} + +// Leases is a collection of Lease +type Leases []Lease + +// String implements the Stringer interface for a Leases object. +func (l Leases) String() string { + var out string + for _, order := range l { + out += order.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// Accept returns whether lease filters valid or not +func (filters LeaseFilters) Accept(obj Lease, stateVal Lease_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.LeaseID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.LeaseID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.LeaseID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.LeaseID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != obj.LeaseID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +func (m QueryLeasesResponse) TotalPriceAmount() sdk.Dec { + total := sdk.NewDec(0) + + for _, lease := range m.Leases { + total = total.Add(lease.Lease.Price.Amount) + } + + return total +} diff --git a/go/node/market/v1beta3/bid.pb.go b/go/node/market/v1beta3/bid.pb.go new file mode 100644 index 00000000..0a91fd54 --- /dev/null +++ b/go/node/market/v1beta3/bid.pb.go @@ -0,0 +1,1967 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/bid.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of bid +type Bid_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + BidStateInvalid Bid_State = 0 + // BidOpen denotes state for bid open + BidOpen Bid_State = 1 + // BidMatched denotes state for bid open + BidActive Bid_State = 2 + // BidLost denotes state for bid lost + BidLost Bid_State = 3 + // BidClosed denotes state for bid closed + BidClosed Bid_State = 4 +) + +var Bid_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "active", + 3: "lost", + 4: "closed", +} + +var Bid_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "active": 2, + "lost": 3, + "closed": 4, +} + +func (x Bid_State) String() string { + return proto.EnumName(Bid_State_name, int32(x)) +} + +func (Bid_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{5, 0} +} + +// MsgCreateBid defines an SDK message for creating Bid +type MsgCreateBid struct { + Order OrderID `protobuf:"bytes,1,opt,name=order,proto3" json:"order" yaml:"order"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider" yaml:"provider"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + Deposit types.Coin `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit" yaml:"deposit"` +} + +func (m *MsgCreateBid) Reset() { *m = MsgCreateBid{} } +func (m *MsgCreateBid) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBid) ProtoMessage() {} +func (*MsgCreateBid) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{0} +} +func (m *MsgCreateBid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBid.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 *MsgCreateBid) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBid.Merge(m, src) +} +func (m *MsgCreateBid) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBid) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBid.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBid proto.InternalMessageInfo + +func (m *MsgCreateBid) GetOrder() OrderID { + if m != nil { + return m.Order + } + return OrderID{} +} + +func (m *MsgCreateBid) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *MsgCreateBid) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *MsgCreateBid) GetDeposit() types.Coin { + if m != nil { + return m.Deposit + } + return types.Coin{} +} + +// MsgCreateBidResponse defines the Msg/CreateBid response type. +type MsgCreateBidResponse struct { +} + +func (m *MsgCreateBidResponse) Reset() { *m = MsgCreateBidResponse{} } +func (m *MsgCreateBidResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBidResponse) ProtoMessage() {} +func (*MsgCreateBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{1} +} +func (m *MsgCreateBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBidResponse.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 *MsgCreateBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBidResponse.Merge(m, src) +} +func (m *MsgCreateBidResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBidResponse proto.InternalMessageInfo + +// MsgCloseBid defines an SDK message for closing bid +type MsgCloseBid struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseBid) Reset() { *m = MsgCloseBid{} } +func (m *MsgCloseBid) String() string { return proto.CompactTextString(m) } +func (*MsgCloseBid) ProtoMessage() {} +func (*MsgCloseBid) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{2} +} +func (m *MsgCloseBid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseBid.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 *MsgCloseBid) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseBid.Merge(m, src) +} +func (m *MsgCloseBid) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseBid) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseBid.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseBid proto.InternalMessageInfo + +func (m *MsgCloseBid) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +// MsgCloseBidResponse defines the Msg/CloseBid response type. +type MsgCloseBidResponse struct { +} + +func (m *MsgCloseBidResponse) Reset() { *m = MsgCloseBidResponse{} } +func (m *MsgCloseBidResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseBidResponse) ProtoMessage() {} +func (*MsgCloseBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{3} +} +func (m *MsgCloseBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseBidResponse.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 *MsgCloseBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseBidResponse.Merge(m, src) +} +func (m *MsgCloseBidResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseBidResponse proto.InternalMessageInfo + +// BidID stores owner and all other seq numbers +// A successful bid becomes a Lease(ID). +type BidID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` +} + +func (m *BidID) Reset() { *m = BidID{} } +func (*BidID) ProtoMessage() {} +func (*BidID) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{4} +} +func (m *BidID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BidID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BidID.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 *BidID) XXX_Merge(src proto.Message) { + xxx_messageInfo_BidID.Merge(m, src) +} +func (m *BidID) XXX_Size() int { + return m.Size() +} +func (m *BidID) XXX_DiscardUnknown() { + xxx_messageInfo_BidID.DiscardUnknown(m) +} + +var xxx_messageInfo_BidID proto.InternalMessageInfo + +func (m *BidID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *BidID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *BidID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *BidID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *BidID) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +// Bid stores BidID, state of bid and price +type Bid struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` + State Bid_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta3.Bid_State" json:"state" yaml:"state"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Bid) Reset() { *m = Bid{} } +func (*Bid) ProtoMessage() {} +func (*Bid) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{5} +} +func (m *Bid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bid.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 *Bid) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bid.Merge(m, src) +} +func (m *Bid) XXX_Size() int { + return m.Size() +} +func (m *Bid) XXX_DiscardUnknown() { + xxx_messageInfo_Bid.DiscardUnknown(m) +} + +var xxx_messageInfo_Bid proto.InternalMessageInfo + +func (m *Bid) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +func (m *Bid) GetState() Bid_State { + if m != nil { + return m.State + } + return BidStateInvalid +} + +func (m *Bid) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *Bid) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// BidFilters defines flags for bid list filter +type BidFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *BidFilters) Reset() { *m = BidFilters{} } +func (m *BidFilters) String() string { return proto.CompactTextString(m) } +func (*BidFilters) ProtoMessage() {} +func (*BidFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_d666bdb5fcae295d, []int{6} +} +func (m *BidFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BidFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BidFilters.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 *BidFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_BidFilters.Merge(m, src) +} +func (m *BidFilters) XXX_Size() int { + return m.Size() +} +func (m *BidFilters) XXX_DiscardUnknown() { + xxx_messageInfo_BidFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_BidFilters proto.InternalMessageInfo + +func (m *BidFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *BidFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *BidFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *BidFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *BidFilters) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *BidFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.market.v1beta3.Bid_State", Bid_State_name, Bid_State_value) + proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta3.MsgCreateBid") + proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta3.MsgCreateBidResponse") + proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta3.MsgCloseBid") + proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta3.MsgCloseBidResponse") + proto.RegisterType((*BidID)(nil), "akash.market.v1beta3.BidID") + proto.RegisterType((*Bid)(nil), "akash.market.v1beta3.Bid") + proto.RegisterType((*BidFilters)(nil), "akash.market.v1beta3.BidFilters") +} + +func init() { proto.RegisterFile("akash/market/v1beta3/bid.proto", fileDescriptor_d666bdb5fcae295d) } + +var fileDescriptor_d666bdb5fcae295d = []byte{ + // 750 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0xbd, 0x6e, 0xdb, 0x48, + 0x10, 0xc7, 0x49, 0x89, 0x94, 0xad, 0x95, 0x3f, 0x04, 0xda, 0x3e, 0xd8, 0xba, 0x33, 0x97, 0xc7, + 0xe2, 0xe0, 0xe6, 0x48, 0xd8, 0xae, 0xce, 0x57, 0x99, 0x16, 0xee, 0x20, 0x20, 0x81, 0x13, 0x3a, + 0x48, 0x91, 0x14, 0x06, 0xc5, 0x5d, 0xd0, 0x0b, 0x4b, 0x5c, 0x9a, 0x64, 0x64, 0xe4, 0x0d, 0x02, + 0x57, 0x01, 0xd2, 0xa4, 0x71, 0x60, 0x20, 0x0f, 0x92, 0xd6, 0xa5, 0xcb, 0xa4, 0x21, 0x02, 0xb9, + 0x09, 0x54, 0xea, 0x09, 0x82, 0xfd, 0xd0, 0x87, 0x03, 0x25, 0x40, 0x0a, 0x77, 0xa9, 0xa4, 0xf9, + 0xcf, 0xfe, 0x86, 0xc3, 0xf9, 0x0f, 0x49, 0x60, 0x06, 0xa7, 0x41, 0x76, 0xe2, 0x76, 0x83, 0xf4, + 0x14, 0xe7, 0x6e, 0x6f, 0xbb, 0x8d, 0xf3, 0x60, 0xd7, 0x6d, 0x13, 0xe4, 0x24, 0x29, 0xcd, 0xa9, + 0xb1, 0xca, 0xf3, 0x8e, 0xc8, 0x3b, 0x32, 0xdf, 0x58, 0x8d, 0x68, 0x44, 0xf9, 0x01, 0x97, 0xfd, + 0x13, 0x67, 0x1b, 0x66, 0x48, 0xb3, 0x2e, 0xcd, 0xdc, 0x76, 0x90, 0x61, 0x59, 0x6a, 0xdb, 0x0d, + 0x29, 0x89, 0x65, 0xde, 0x9a, 0x79, 0x2d, 0x9a, 0x22, 0x9c, 0x8a, 0x13, 0xf6, 0xa7, 0x12, 0x58, + 0x78, 0x98, 0x45, 0x07, 0x29, 0x0e, 0x72, 0xec, 0x11, 0x64, 0x3c, 0x07, 0x3a, 0xcf, 0xaf, 0xab, + 0x96, 0xba, 0x55, 0xdb, 0xd9, 0x74, 0x66, 0xb5, 0xe3, 0x1c, 0xb2, 0x23, 0xad, 0xa6, 0xf7, 0xd7, + 0x75, 0x01, 0x95, 0x7e, 0x01, 0x75, 0x2e, 0x0c, 0x0a, 0x28, 0xe0, 0x61, 0x01, 0x17, 0x5e, 0x06, + 0xdd, 0xce, 0x9e, 0xcd, 0x43, 0xdb, 0x17, 0xb2, 0xf1, 0x2f, 0x98, 0x4f, 0x52, 0xda, 0x23, 0xac, + 0x7e, 0xc9, 0x52, 0xb7, 0xaa, 0x1e, 0x1c, 0x14, 0x70, 0xac, 0x0d, 0x0b, 0xb8, 0x2c, 0xb0, 0x91, + 0x62, 0xfb, 0xe3, 0xa4, 0xf1, 0x18, 0xe8, 0x49, 0x4a, 0x42, 0xbc, 0x5e, 0xe6, 0x9d, 0xfd, 0xe1, + 0x88, 0x9b, 0x77, 0xd8, 0xcd, 0xcb, 0xc6, 0xb6, 0x9d, 0x26, 0x0e, 0x0f, 0x28, 0x89, 0xbd, 0x4d, + 0xd6, 0x18, 0xeb, 0x87, 0x23, 0x93, 0x7e, 0x78, 0x68, 0xfb, 0x42, 0x36, 0x9e, 0x82, 0x39, 0x84, + 0x13, 0x9a, 0x91, 0x7c, 0x5d, 0xe3, 0x45, 0x37, 0x66, 0x16, 0xe5, 0x15, 0xff, 0x94, 0x15, 0x47, + 0xc4, 0xb0, 0x80, 0x4b, 0xa2, 0xa6, 0x14, 0x6c, 0x7f, 0x94, 0xda, 0xd3, 0xbe, 0x5c, 0x41, 0xc5, + 0xfe, 0x0d, 0xac, 0x4e, 0x8f, 0xd6, 0xc7, 0x59, 0x42, 0xe3, 0x0c, 0xdb, 0x04, 0xd4, 0x98, 0xde, + 0xa1, 0x19, 0x9f, 0xf8, 0x13, 0x50, 0x69, 0x13, 0x74, 0x4c, 0x90, 0x1c, 0xf9, 0xef, 0xb3, 0x47, + 0xee, 0x11, 0xd4, 0x6a, 0x7a, 0xd6, 0x68, 0xe0, 0x3c, 0x1c, 0x14, 0xb0, 0x44, 0xd0, 0xb0, 0x80, + 0x55, 0xd1, 0x09, 0x41, 0xb6, 0xaf, 0xb7, 0x09, 0x6a, 0x21, 0xd9, 0xc2, 0x1a, 0x58, 0x99, 0xba, + 0xd4, 0xb8, 0x83, 0x77, 0x25, 0x20, 0x0a, 0x18, 0x2e, 0xd0, 0xe9, 0x79, 0x2c, 0xed, 0xae, 0x7a, + 0x1b, 0xdc, 0x42, 0x26, 0x4c, 0x59, 0xc8, 0x42, 0x66, 0x21, 0xfb, 0x35, 0x76, 0x81, 0x86, 0x32, + 0x7c, 0xc6, 0xed, 0xd3, 0x3c, 0xd8, 0x2f, 0xa0, 0xd6, 0x3c, 0xc2, 0x67, 0x83, 0x02, 0x72, 0x7d, + 0x58, 0xc0, 0x9a, 0x9c, 0x4a, 0x86, 0xcf, 0x6c, 0x9f, 0x8b, 0x0c, 0x8a, 0x18, 0xc4, 0x9c, 0x5b, + 0x14, 0xd0, 0xff, 0x12, 0x8a, 0xee, 0x40, 0x91, 0x80, 0x22, 0x09, 0x51, 0x06, 0x69, 0x13, 0xe8, + 0x50, 0x42, 0xf4, 0x0e, 0x44, 0x05, 0xc4, 0x7e, 0xee, 0x6c, 0x98, 0xfe, 0x93, 0x1b, 0xb6, 0x37, + 0xff, 0xf6, 0x0a, 0x2a, 0x7c, 0x6e, 0x1f, 0xca, 0xa0, 0x7c, 0x6f, 0xde, 0x18, 0x8f, 0x80, 0x9e, + 0xe5, 0x41, 0x8e, 0xf9, 0x10, 0x97, 0x76, 0xe0, 0x77, 0x8b, 0x3a, 0x47, 0xec, 0x98, 0x70, 0x85, + 0x13, 0x13, 0x57, 0x78, 0x68, 0xfb, 0x42, 0xbe, 0x8f, 0x67, 0x63, 0x13, 0x80, 0x90, 0xaf, 0x2e, + 0x3a, 0x0e, 0xc4, 0xe3, 0x51, 0xf6, 0xab, 0x52, 0xd9, 0xcf, 0xed, 0x37, 0x2a, 0xd0, 0x79, 0x77, + 0x86, 0x05, 0xe6, 0x48, 0xdc, 0x0b, 0x3a, 0x04, 0xd5, 0x95, 0xc6, 0xca, 0xc5, 0xa5, 0xb5, 0xec, + 0x11, 0xc4, 0x53, 0x2d, 0x21, 0x1b, 0x6b, 0x40, 0xa3, 0x09, 0x8e, 0xeb, 0x6a, 0xa3, 0x76, 0x71, + 0x69, 0xcd, 0x79, 0x04, 0x1d, 0x26, 0x38, 0x36, 0x36, 0x40, 0x25, 0x08, 0x73, 0xd2, 0xc3, 0xf5, + 0x52, 0x63, 0xf1, 0xe2, 0xd2, 0xaa, 0x7a, 0x04, 0xed, 0x73, 0x81, 0x11, 0x1d, 0x9a, 0xe5, 0xf5, + 0xf2, 0x98, 0x78, 0x40, 0xb3, 0x9c, 0x11, 0x21, 0xdb, 0x65, 0x54, 0xd7, 0xc6, 0x04, 0x5f, 0x6e, + 0xd4, 0xd0, 0x5e, 0xbd, 0x37, 0x95, 0x29, 0x07, 0x6f, 0x4a, 0x00, 0x78, 0x04, 0xfd, 0x47, 0x3a, + 0x39, 0x4e, 0xb3, 0x5f, 0x7b, 0x3e, 0xfd, 0x26, 0x75, 0x47, 0xfb, 0x57, 0x99, 0x0c, 0xe3, 0x47, + 0xeb, 0x25, 0x5e, 0x26, 0xde, 0xd1, 0x75, 0xdf, 0x54, 0x6f, 0xfa, 0xa6, 0xfa, 0xb9, 0x6f, 0xaa, + 0xaf, 0x6f, 0x4d, 0xe5, 0xe6, 0xd6, 0x54, 0x3e, 0xde, 0x9a, 0xca, 0xb3, 0x7f, 0x22, 0x92, 0x9f, + 0xbc, 0x68, 0x3b, 0x21, 0xed, 0xba, 0x7c, 0x97, 0xff, 0x8e, 0x71, 0x7e, 0x4e, 0xd3, 0x53, 0x19, + 0x05, 0x09, 0x71, 0x23, 0xea, 0xc6, 0x14, 0xe1, 0x6f, 0x3e, 0x46, 0xed, 0x0a, 0xff, 0x0e, 0xed, + 0x7e, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x74, 0xc0, 0xb6, 0x17, 0x07, 0x00, 0x00, +} + +func (m *MsgCreateBid) 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 *MsgCreateBid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Order.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateBidResponse) 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 *MsgCreateBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseBid) 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 *MsgCloseBid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseBidResponse) 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 *MsgCloseBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *BidID) 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 *BidID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BidID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintBid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Bid) 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 *Bid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BidFilters) 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 *BidFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BidFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintBid(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x32 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBid(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintBid(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintBid(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBid(dAtA []byte, offset int, v uint64) int { + offset -= sovBid(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateBid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Order.Size() + n += 1 + l + sovBid(uint64(l)) + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovBid(uint64(l)) + l = m.Deposit.Size() + n += 1 + l + sovBid(uint64(l)) + return n +} + +func (m *MsgCreateBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseBid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovBid(uint64(l)) + return n +} + +func (m *MsgCloseBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *BidID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovBid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovBid(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovBid(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + return n +} + +func (m *Bid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovBid(uint64(l)) + if m.State != 0 { + n += 1 + sovBid(uint64(m.State)) + } + l = m.Price.Size() + n += 1 + l + sovBid(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovBid(uint64(m.CreatedAt)) + } + return n +} + +func (m *BidFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovBid(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovBid(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovBid(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovBid(uint64(l)) + } + return n +} + +func sovBid(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBid(x uint64) (n int) { + return sovBid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateBid) 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 ErrIntOverflowBid + } + 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: MsgCreateBid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBidResponse) 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 ErrIntOverflowBid + } + 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: MsgCreateBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseBid) 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 ErrIntOverflowBid + } + 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: MsgCloseBid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseBid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseBidResponse) 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 ErrIntOverflowBid + } + 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: MsgCloseBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BidID) 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 ErrIntOverflowBid + } + 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: BidID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BidID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bid) 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 ErrIntOverflowBid + } + 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: Bid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Bid_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BidFilters) 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 ErrIntOverflowBid + } + 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: BidFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BidFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBid + } + 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 ErrInvalidLengthBid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBid(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, ErrIntOverflowBid + } + 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, ErrIntOverflowBid + } + 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, ErrIntOverflowBid + } + 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, ErrInvalidLengthBid + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBid + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBid + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBid = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBid = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBid = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/codec.go b/go/node/market/v1beta3/codec.go new file mode 100644 index 00000000..c8dbf100 --- /dev/null +++ b/go/node/market/v1beta3/codec.go @@ -0,0 +1,50 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/market module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/market and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec registers the necessary x/market interfaces and concrete types +// on the provided Amino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateBid{}, ModuleName+"/"+MsgTypeCreateBid, nil) + cdc.RegisterConcrete(&MsgCloseBid{}, ModuleName+"/"+MsgTypeCloseBid, nil) + cdc.RegisterConcrete(&MsgCreateLease{}, ModuleName+"/"+MsgTypeCreateLease, nil) + cdc.RegisterConcrete(&MsgWithdrawLease{}, ModuleName+"/"+MsgTypeWithdrawLease, nil) + cdc.RegisterConcrete(&MsgCloseLease{}, ModuleName+"/"+MsgTypeCloseLease, nil) +} + +// RegisterInterfaces registers the x/market interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateBid{}, + &MsgCloseBid{}, + &MsgCreateLease{}, + &MsgWithdrawLease{}, + &MsgCloseLease{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/market/v1beta3/errors.go b/go/node/market/v1beta3/errors.go new file mode 100644 index 00000000..31a563a2 --- /dev/null +++ b/go/node/market/v1beta3/errors.go @@ -0,0 +1,107 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errCodeEmptyProvider uint32 = iota + 1 + errCodeSameAccount + errCodeInternal + errCodeOverOrder + errCodeAttributeMismatch + errCodeUnknownBid + errCodeUnknownLease + errCodeUnknownLeaseForOrder + errCodeUnknownOrderForBid + errCodeLeaseNotActive + errCodeBidNotActive + errCodeBidNotOpen + errCodeOrderNotOpen + errCodeNoLeaseForOrder + errCodeOrderNotFound + errCodeGroupNotFound + errCodeGroupNotOpen + errCodeBidNotFound + errCodeBidZeroPrice + errCodeLeaseNotFound + errCodeBidExists + errCodeInvalidPrice + errCodeOrderActive + errCodeOrderClosed + errCodeOrderExists + errCodeOrderDurationExceeded + errCodeOrderTooEarly + errInvalidDeposit + errInvalidParam + errUnknownProvider + errInvalidBid + errCodeCapabilitiesMismatch +) + +var ( + // ErrEmptyProvider is the error when provider is empty + ErrEmptyProvider = sdkerrors.Register(ModuleName, errCodeEmptyProvider, "empty provider") + // ErrSameAccount is the error when owner and provider are the same account + ErrSameAccount = sdkerrors.Register(ModuleName, errCodeSameAccount, "owner and provider are the same account") + // ErrInternal is the error for internal error + ErrInternal = sdkerrors.Register(ModuleName, errCodeInternal, "internal error") + // ErrBidOverOrder is the error when bid price is above max order price + ErrBidOverOrder = sdkerrors.Register(ModuleName, errCodeOverOrder, "bid price above max order price") + // ErrAttributeMismatch is the error for attribute mismatch + ErrAttributeMismatch = sdkerrors.Register(ModuleName, errCodeAttributeMismatch, "attribute mismatch") + // ErrCapabilitiesMismatch is the error for capabilities mismatch + ErrCapabilitiesMismatch = sdkerrors.Register(ModuleName, errCodeCapabilitiesMismatch, "capabilities mismatch") + // ErrUnknownBid is the error for unknown bid + ErrUnknownBid = sdkerrors.Register(ModuleName, errCodeUnknownBid, "unknown bid") + // ErrUnknownLease is the error for unknown bid + ErrUnknownLease = sdkerrors.Register(ModuleName, errCodeUnknownLease, "unknown lease") + // ErrUnknownLeaseForBid is the error when lease is unknown for bid + ErrUnknownLeaseForBid = sdkerrors.Register(ModuleName, errCodeUnknownLeaseForOrder, "unknown lease for bid") + // ErrUnknownOrderForBid is the error when order is unknown for bid + ErrUnknownOrderForBid = sdkerrors.Register(ModuleName, errCodeUnknownOrderForBid, "unknown order for bid") + // ErrLeaseNotActive is the error when lease is not active + ErrLeaseNotActive = sdkerrors.Register(ModuleName, errCodeLeaseNotActive, "lease not active") + // ErrBidNotActive is the error when bid is not matched + ErrBidNotActive = sdkerrors.Register(ModuleName, errCodeBidNotActive, "bid not active") + // ErrBidNotOpen is the error when bid is not matched + ErrBidNotOpen = sdkerrors.Register(ModuleName, errCodeBidNotOpen, "bid not open") + // ErrNoLeaseForOrder is the error when there is no lease for order + ErrNoLeaseForOrder = sdkerrors.Register(ModuleName, errCodeNoLeaseForOrder, "no lease for order") + // ErrOrderNotFound order not found + ErrOrderNotFound = sdkerrors.Register(ModuleName, errCodeOrderNotFound, "invalid order: order not found") + // ErrGroupNotFound order not found + ErrGroupNotFound = sdkerrors.Register(ModuleName, errCodeGroupNotFound, "order not found") + // ErrGroupNotOpen order not found + ErrGroupNotOpen = sdkerrors.Register(ModuleName, errCodeGroupNotOpen, "order not open") + // ErrOrderNotOpen order not found + ErrOrderNotOpen = sdkerrors.Register(ModuleName, errCodeOrderNotOpen, "bid: order not open") + // ErrBidNotFound bid not found + ErrBidNotFound = sdkerrors.Register(ModuleName, errCodeBidNotFound, "invalid bid: bid not found") + // ErrBidZeroPrice zero price + ErrBidZeroPrice = sdkerrors.Register(ModuleName, errCodeBidZeroPrice, "invalid bid: zero price") + // ErrLeaseNotFound lease not found + ErrLeaseNotFound = sdkerrors.Register(ModuleName, errCodeLeaseNotFound, "invalid lease: lease not found") + // ErrBidExists bid exists + ErrBidExists = sdkerrors.Register(ModuleName, errCodeBidExists, "invalid bid: bid exists from provider") + // ErrBidInvalidPrice bid invalid price + ErrBidInvalidPrice = sdkerrors.Register(ModuleName, errCodeInvalidPrice, "bid price is invalid") + // ErrOrderActive order active + ErrOrderActive = sdkerrors.New(ModuleName, errCodeOrderActive, "order active") + // ErrOrderClosed order closed + ErrOrderClosed = sdkerrors.New(ModuleName, errCodeOrderClosed, "order closed") + // ErrOrderExists indicates a new order was proposed overwrite the existing store key + ErrOrderExists = sdkerrors.New(ModuleName, errCodeOrderExists, "order already exists in store") + // ErrOrderTooEarly to match bid + ErrOrderTooEarly = sdkerrors.New(ModuleName, errCodeOrderTooEarly, "order: chain height to low for bidding") + // ErrOrderDurationExceeded order should be closed + ErrOrderDurationExceeded = sdkerrors.New(ModuleName, errCodeOrderDurationExceeded, "order duration has exceeded the bidding duration") + // ErrInvalidDeposit indicates an invalid deposit + ErrInvalidDeposit = sdkerrors.Register(ModuleName, errInvalidDeposit, "Deposit invalid") + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = sdkerrors.Register(ModuleName, errInvalidParam, "parameter invalid") + // ErrUnknownProvider indicates an invalid chain parameter + ErrUnknownProvider = sdkerrors.Register(ModuleName, errUnknownProvider, "unknown provider") + // ErrInvalidBid indicates an invalid chain parameter + ErrInvalidBid = sdkerrors.Register(ModuleName, errInvalidBid, "unknown provider") +) diff --git a/go/node/market/v1beta3/escrow.go b/go/node/market/v1beta3/escrow.go new file mode 100644 index 00000000..f49ee939 --- /dev/null +++ b/go/node/market/v1beta3/escrow.go @@ -0,0 +1,61 @@ +package v1beta3 + +import ( + "fmt" + "strconv" + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + + etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +const ( + bidEscrowScope = "bid" +) + +func EscrowAccountForBid(id BidID) etypes.AccountID { + return etypes.AccountID{ + Scope: bidEscrowScope, + XID: id.String(), + } +} + +func EscrowPaymentForLease(id LeaseID) string { + return fmt.Sprintf("%v/%v/%s", id.GSeq, id.OSeq, id.Provider) +} + +func LeaseIDFromEscrowAccount(id etypes.AccountID, pid string) (LeaseID, bool) { + did, ok := dtypes.DeploymentIDFromEscrowAccount(id) + if !ok { + return LeaseID{}, false + } + + parts := strings.Split(pid, "/") + if len(parts) != 3 { + return LeaseID{}, false + } + + gseq, err := strconv.ParseUint(parts[0], 10, 32) + if err != nil { + return LeaseID{}, false + } + + oseq, err := strconv.ParseUint(parts[1], 10, 32) + if err != nil { + return LeaseID{}, false + } + + owner, err := sdk.AccAddressFromBech32(parts[2]) + if err != nil { + return LeaseID{}, false + } + + return MakeLeaseID( + MakeBidID( + MakeOrderID( + dtypes.MakeGroupID( + did, uint32(gseq)), uint32(oseq)), owner)), true +} diff --git a/go/node/market/v1beta3/event.go b/go/node/market/v1beta3/event.go new file mode 100644 index 00000000..14c1fde2 --- /dev/null +++ b/go/node/market/v1beta3/event.go @@ -0,0 +1,360 @@ +package v1beta3 + +import ( + "strconv" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + + "github.com/akash-network/node/sdkutil" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +const ( + evActionOrderCreated = "order-created" + evActionOrderClosed = "order-closed" + evActionBidCreated = "bid-created" + evActionBidClosed = "bid-closed" + evActionLeaseCreated = "lease-created" + evActionLeaseClosed = "lease-closed" + + evOSeqKey = "oseq" + evProviderKey = "provider" + evPriceDenomKey = "price-denom" + evPriceAmountKey = "price-amount" +) + +var ( + ErrParsingPrice = errors.New("error parsing price") +) + +// EventOrderCreated struct +type EventOrderCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID OrderID `json:"id"` +} + +func NewEventOrderCreated(id OrderID) EventOrderCreated { + return EventOrderCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionOrderCreated, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventOrderCreated struct +func (e EventOrderCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionOrderCreated), + }, orderIDEVAttributes(e.ID)...)..., + ) +} + +// EventOrderClosed struct +type EventOrderClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID OrderID `json:"id"` +} + +func NewEventOrderClosed(id OrderID) EventOrderClosed { + return EventOrderClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionOrderClosed, + }, + ID: id, + } +} + +// ToSDKEvent method creates new sdk event for EventOrderClosed struct +func (e EventOrderClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionOrderClosed), + }, orderIDEVAttributes(e.ID)...)..., + ) +} + +// EventBidCreated struct +type EventBidCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID BidID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventBidCreated(id BidID, price sdk.DecCoin) EventBidCreated { + return EventBidCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionBidCreated, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventBidCreated struct +func (e EventBidCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionBidCreated), + }, bidIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)..., + ) +} + +// EventBidClosed struct +type EventBidClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID BidID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventBidClosed(id BidID, price sdk.DecCoin) EventBidClosed { + return EventBidClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionBidClosed, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventBidClosed struct +func (e EventBidClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionBidClosed), + }, bidIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)..., + ) +} + +// EventLeaseCreated struct +type EventLeaseCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID LeaseID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventLeaseCreated(id LeaseID, price sdk.DecCoin) EventLeaseCreated { + return EventLeaseCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionLeaseCreated, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventLeaseCreated struct +func (e EventLeaseCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionLeaseCreated), + }, leaseIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)...) +} + +// EventLeaseClosed struct +type EventLeaseClosed struct { + Context sdkutil.BaseModuleEvent `json:"context"` + ID LeaseID `json:"id"` + Price sdk.DecCoin `json:"price"` +} + +func NewEventLeaseClosed(id LeaseID, price sdk.DecCoin) EventLeaseClosed { + return EventLeaseClosed{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: evActionLeaseClosed, + }, + ID: id, + Price: price, + } +} + +// ToSDKEvent method creates new sdk event for EventLeaseClosed struct +func (e EventLeaseClosed) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append( + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, evActionLeaseClosed), + }, leaseIDEVAttributes(e.ID)...), + priceEVAttributes(e.Price)...)...) +} + +// orderIDEVAttributes returns event attribues for given orderID +func orderIDEVAttributes(id OrderID) []sdk.Attribute { + return append(dtypes.GroupIDEVAttributes(id.GroupID()), + sdk.NewAttribute(evOSeqKey, strconv.FormatUint(uint64(id.OSeq), 10))) +} + +// parseEVOrderID returns orderID for given event attributes +func parseEVOrderID(attrs []sdk.Attribute) (OrderID, error) { + gid, err := dtypes.ParseEVGroupID(attrs) + if err != nil { + return OrderID{}, err + } + oseq, err := sdkutil.GetUint64(attrs, evOSeqKey) + if err != nil { + return OrderID{}, err + } + + return OrderID{ + Owner: gid.Owner, + DSeq: gid.DSeq, + GSeq: gid.GSeq, + OSeq: uint32(oseq), + }, nil + +} + +// bidIDEVAttributes returns event attribues for given bidID +func bidIDEVAttributes(id BidID) []sdk.Attribute { + return append(orderIDEVAttributes(id.OrderID()), + sdk.NewAttribute(evProviderKey, id.Provider)) +} + +// parseEVBidID returns bidID for given event attributes +func parseEVBidID(attrs []sdk.Attribute) (BidID, error) { + oid, err := parseEVOrderID(attrs) + if err != nil { + return BidID{}, err + } + + provider, err := sdkutil.GetAccAddress(attrs, evProviderKey) + if err != nil { + return BidID{}, err + } + + return BidID{ + Owner: oid.Owner, + DSeq: oid.DSeq, + GSeq: oid.GSeq, + OSeq: oid.OSeq, + Provider: provider.String(), + }, nil +} + +// leaseIDEVAttributes returns event attribues for given LeaseID +func leaseIDEVAttributes(id LeaseID) []sdk.Attribute { + return append(orderIDEVAttributes(id.OrderID()), + sdk.NewAttribute(evProviderKey, id.Provider)) +} + +// parseEVLeaseID returns leaseID for given event attributes +func parseEVLeaseID(attrs []sdk.Attribute) (LeaseID, error) { + bid, err := parseEVBidID(attrs) + if err != nil { + return LeaseID{}, err + } + return LeaseID(bid), nil +} + +func priceEVAttributes(price sdk.DecCoin) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(evPriceDenomKey, price.Denom), + sdk.NewAttribute(evPriceAmountKey, price.Amount.String()), + } +} + +func parseEVPriceAttributes(attrs []sdk.Attribute) (sdk.DecCoin, error) { + denom, err := sdkutil.GetString(attrs, evPriceDenomKey) + if err != nil { + return sdk.DecCoin{}, err + } + + amounts, err := sdkutil.GetString(attrs, evPriceAmountKey) + if err != nil { + return sdk.DecCoin{}, err + } + + amount, err := sdk.NewDecFromStr(amounts) + if err != nil { + return sdk.DecCoin{}, ErrParsingPrice + } + + return sdk.NewDecCoinFromDec(denom, amount), nil +} + +// ParseEvent parses event and returns details of event and error if occurred +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + + case evActionOrderCreated: + id, err := parseEVOrderID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventOrderCreated(id), nil + case evActionOrderClosed: + id, err := parseEVOrderID(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventOrderClosed(id), nil + + case evActionBidCreated: + id, err := parseEVBidID(ev.Attributes) + if err != nil { + return nil, err + } + price, err := parseEVPriceAttributes(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventBidCreated(id, price), nil + case evActionBidClosed: + id, err := parseEVBidID(ev.Attributes) + if err != nil { + return nil, err + } + // optional price + price, _ := parseEVPriceAttributes(ev.Attributes) + return NewEventBidClosed(id, price), nil + + case evActionLeaseCreated: + id, err := parseEVLeaseID(ev.Attributes) + if err != nil { + return nil, err + } + price, err := parseEVPriceAttributes(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventLeaseCreated(id, price), nil + case evActionLeaseClosed: + id, err := parseEVLeaseID(ev.Attributes) + if err != nil { + return nil, err + } + // optional price + price, _ := parseEVPriceAttributes(ev.Attributes) + return NewEventLeaseClosed(id, price), nil + + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/market/v1beta3/events_test.go b/go/node/market/v1beta3/events_test.go new file mode 100644 index 00000000..ace61956 --- /dev/null +++ b/go/node/market/v1beta3/events_test.go @@ -0,0 +1,466 @@ +package v1beta3 + +import ( + "fmt" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pkg/errors" + + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/sdkutil" +) + +var ( + _ = func() string { + config := sdk.GetConfig() + config.SetBech32PrefixForAccount(sdkutil.Bech32PrefixAccAddr, sdkutil.Bech32PrefixAccPub) + return "" + }() + + errWildcard = errors.New("wildcard string error can't be matched") + evOwnerKey = "owner" + evDSeqKey = "dseq" + evGSeqKey = "gseq" +) + +type testEventParsing struct { + msg sdkutil.Event + expErr error +} + +func (tep testEventParsing) testMessageType() func(t *testing.T) { + _, err := ParseEvent(tep.msg) + return func(t *testing.T) { + // if the error expected is errWildcard to catch untyped errors, don't fail the test, the error was expected. + if errors.Is(tep.expErr, errWildcard) { + require.Error(t, err) + } else { + require.Equal(t, tep.expErr, err) + } + } +} + +var TEPS = []testEventParsing{ + { + msg: sdkutil.Event{ + Type: "nil", + }, + expErr: sdkutil.ErrUnknownType, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + }, + expErr: sdkutil.ErrUnknownAction, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: "nil", + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: "nil", + }, + expErr: sdkutil.ErrUnknownAction, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionOrderCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionOrderCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "nooo", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionOrderCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "abc", + }, + }, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionOrderClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + }, + }, + expErr: nil, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionBidCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionBidCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "yesss", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionBidCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "hello", + }, + }, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionBidClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: nil, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionLeaseCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionLeaseCreated, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "hello", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: ModuleName, + Action: evActionLeaseClosed, + Attributes: []sdk.Attribute{ + { + Key: evOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evDSeqKey, + Value: "5", + }, + { + Key: evGSeqKey, + Value: "2", + }, + { + Key: evOSeqKey, + Value: "5", + }, + { + Key: evProviderKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + { + Key: evPriceDenomKey, + Value: "uakt", + }, + { + Key: evPriceAmountKey, + Value: "23", + }, + }, + }, + expErr: nil, + }, +} + +func TestEventParsing(t *testing.T) { + for i, test := range TEPS { + t.Run(fmt.Sprintf("%d", i), + test.testMessageType()) + } +} diff --git a/go/node/market/v1beta3/genesis.pb.go b/go/node/market/v1beta3/genesis.pb.go new file mode 100644 index 00000000..0fbdd377 --- /dev/null +++ b/go/node/market/v1beta3/genesis.pb.go @@ -0,0 +1,453 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by market module +type GenesisState struct { + Orders []Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders" yaml:"orders"` + Leases []Lease `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases" yaml:"leases"` + Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_fa7e580cdc6cba31, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetOrders() []Order { + if m != nil { + return m.Orders + } + return nil +} + +func (m *GenesisState) GetLeases() []Lease { + if m != nil { + return m.Leases + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.market.v1beta3.GenesisState") +} + +func init() { + proto.RegisterFile("akash/market/v1beta3/genesis.proto", fileDescriptor_fa7e580cdc6cba31) +} + +var fileDescriptor_fa7e580cdc6cba31 = []byte{ + // 302 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0x93, 0x56, 0xca, 0x90, 0xde, 0xbb, 0x44, 0x1d, 0xa2, 0x82, 0x9c, 0xe0, 0xa9, 0x0b, + 0xb6, 0x68, 0x27, 0x18, 0xbb, 0xb0, 0x20, 0x81, 0x52, 0x58, 0xd8, 0x1c, 0x6a, 0xb9, 0x51, 0x9a, + 0x38, 0xb2, 0x0d, 0x88, 0xb7, 0x80, 0xb7, 0xea, 0xd8, 0x91, 0x29, 0x42, 0xc9, 0xc6, 0xc8, 0x13, + 0xa0, 0xd8, 0x96, 0x22, 0xa1, 0xa8, 0x5b, 0x7e, 0x9d, 0xef, 0x7c, 0xfe, 0x73, 0x7c, 0x48, 0x72, + 0x22, 0xb7, 0xb8, 0x20, 0x22, 0xa7, 0x0a, 0xbf, 0x5c, 0xa4, 0x54, 0x91, 0x25, 0x66, 0xb4, 0xa4, + 0x32, 0x93, 0xa8, 0x12, 0x5c, 0xf1, 0x60, 0xaa, 0x19, 0x64, 0x18, 0x64, 0x99, 0xd9, 0x94, 0x71, + 0xc6, 0x35, 0x80, 0xbb, 0x2f, 0xc3, 0xce, 0xe2, 0x41, 0x1f, 0x17, 0x1b, 0x2a, 0x8e, 0x12, 0x3b, + 0x4a, 0x24, 0xb5, 0xc4, 0xd9, 0x20, 0x51, 0x11, 0x41, 0x0a, 0x5b, 0x09, 0x7e, 0x8c, 0xfc, 0x7f, + 0xd7, 0xa6, 0xe4, 0x5a, 0x11, 0x45, 0x83, 0x7b, 0xdf, 0xd3, 0x8f, 0xc8, 0xd0, 0x8d, 0xc7, 0xf3, + 0xc9, 0xe2, 0x04, 0x0d, 0x95, 0x46, 0xb7, 0x1d, 0xb3, 0x8a, 0xf6, 0x75, 0xe4, 0x7c, 0xd7, 0x91, + 0x5d, 0xf9, 0xa9, 0xa3, 0xff, 0x6f, 0xa4, 0xd8, 0x5d, 0x41, 0x93, 0x61, 0x62, 0x07, 0x9d, 0x55, + 0x17, 0x93, 0xe1, 0xe8, 0x98, 0xf5, 0xa6, 0x63, 0x7a, 0xab, 0x59, 0xe9, 0xad, 0x26, 0xc3, 0xc4, + 0x0e, 0x82, 0x07, 0xdf, 0x33, 0x3f, 0x13, 0x8e, 0x63, 0x77, 0x3e, 0x59, 0x9c, 0x0e, 0x5b, 0xef, + 0x34, 0xd3, 0x6b, 0xcd, 0x4e, 0xaf, 0x35, 0x19, 0x26, 0x76, 0xb0, 0x5a, 0xef, 0x1b, 0xe0, 0x1e, + 0x1a, 0xe0, 0x7e, 0x35, 0xc0, 0x7d, 0x6f, 0x81, 0x73, 0x68, 0x81, 0xf3, 0xd9, 0x02, 0xe7, 0xf1, + 0x92, 0x65, 0x6a, 0xfb, 0x9c, 0xa2, 0x27, 0x5e, 0x60, 0xfd, 0xd4, 0x79, 0x49, 0xd5, 0x2b, 0x17, + 0xb9, 0x4d, 0xa4, 0xca, 0x30, 0xe3, 0xb8, 0xe4, 0x1b, 0xfa, 0xe7, 0xea, 0xa9, 0xa7, 0xef, 0xbd, + 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xea, 0x86, 0x3c, 0x28, 0x02, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Leases) > 0 { + for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Leases) > 0 { + for _, e := range m.Leases { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", 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.Orders = append(m.Orders, Order{}) + if err := m.Orders[len(m.Orders)-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 Leases", 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.Leases = append(m.Leases, Lease{}) + if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/id.go b/go/node/market/v1beta3/id.go new file mode 100644 index 00000000..e8981526 --- /dev/null +++ b/go/node/market/v1beta3/id.go @@ -0,0 +1,154 @@ +package v1beta3 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" +) + +// MakeOrderID returns OrderID instance with provided groupID details and oseq +func MakeOrderID(id dtypes.GroupID, oseq uint32) OrderID { + return OrderID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: oseq, + } +} + +// GroupID method returns groupID details for specific order +func (id OrderID) GroupID() dtypes.GroupID { + return dtypes.GroupID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + } +} + +// Equals method compares specific order with provided order +func (id OrderID) Equals(other OrderID) bool { + return id.GroupID().Equals(other.GroupID()) && id.OSeq == other.OSeq +} + +// Validate method for OrderID and returns nil +func (id OrderID) Validate() error { + if err := id.GroupID().Validate(); err != nil { + return sdkerrors.Wrap(err, "OrderID: Invalid GroupID") + } + if id.OSeq == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "OrderID: Invalid Order Sequence") + } + return nil +} + +// String provides stringer interface to save reflected formatting. +func (id OrderID) String() string { + return fmt.Sprintf("%s/%v", id.GroupID(), id.OSeq) +} + +// MakeBidID returns BidID instance with provided order details and provider +func MakeBidID(id OrderID, provider sdk.AccAddress) BidID { + return BidID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: id.OSeq, + Provider: provider.String(), + } +} + +// Equals method compares specific bid with provided bid +func (id BidID) Equals(other BidID) bool { + return id.OrderID().Equals(other.OrderID()) && + id.Provider == other.Provider +} + +// LeaseID method returns lease details of bid +func (id BidID) LeaseID() LeaseID { + return LeaseID(id) +} + +// OrderID method returns OrderID details with specific bid details +func (id BidID) OrderID() OrderID { + return OrderID{ + Owner: id.Owner, + DSeq: id.DSeq, + GSeq: id.GSeq, + OSeq: id.OSeq, + } +} + +// String method for consistent output. +func (id BidID) String() string { + return fmt.Sprintf("%s/%v", id.OrderID(), id.Provider) +} + +// GroupID method returns GroupID details with specific bid details +func (id BidID) GroupID() dtypes.GroupID { + return id.OrderID().GroupID() +} + +// DeploymentID method returns deployment details with specific bid details +func (id BidID) DeploymentID() dtypes.DeploymentID { + return id.GroupID().DeploymentID() +} + +// Validate validates bid instance and returns nil +func (id BidID) Validate() error { + if err := id.OrderID().Validate(); err != nil { + return sdkerrors.Wrap(err, "BidID: Invalid OrderID") + } + if _, err := sdk.AccAddressFromBech32(id.Provider); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "BidID: Invalid Provider Address") + } + if id.Owner == id.Provider { + return sdkerrors.Wrap(sdkerrors.ErrConflict, "BidID: self-bid") + } + return nil +} + +// MakeLeaseID returns LeaseID instance with provided bid details +func MakeLeaseID(id BidID) LeaseID { + return LeaseID(id) +} + +// Equals method compares specific lease with provided lease +func (id LeaseID) Equals(other LeaseID) bool { + return id.BidID().Equals(other.BidID()) +} + +// Validate calls the BidID's validator and returns any error. +func (id LeaseID) Validate() error { + if err := id.BidID().Validate(); err != nil { + return sdkerrors.Wrap(err, "LeaseID: Invalid BidID") + } + return nil +} + +// BidID method returns BidID details with specific LeaseID +func (id LeaseID) BidID() BidID { + return BidID(id) +} + +// OrderID method returns OrderID details with specific lease details +func (id LeaseID) OrderID() OrderID { + return id.BidID().OrderID() +} + +// GroupID method returns GroupID details with specific lease details +func (id LeaseID) GroupID() dtypes.GroupID { + return id.OrderID().GroupID() +} + +// DeploymentID method returns deployment details with specific lease details +func (id LeaseID) DeploymentID() dtypes.DeploymentID { + return id.GroupID().DeploymentID() +} + +// String method provides human readable representation of LeaseID. +func (id LeaseID) String() string { + return id.BidID().String() +} diff --git a/go/node/market/v1beta3/key.go b/go/node/market/v1beta3/key.go new file mode 100644 index 00000000..d6afb173 --- /dev/null +++ b/go/node/market/v1beta3/key.go @@ -0,0 +1,28 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "market" + + // StoreKey is the store key string for market + StoreKey = ModuleName + + // RouterKey is the message route for market + RouterKey = ModuleName +) + +func OrderPrefix() []byte { + return []byte{0x01, 0x00} +} + +func BidPrefix() []byte { + return []byte{0x02, 0x00} +} + +func LeasePrefix() []byte { + return []byte{0x03, 0x00} +} + +func SecondaryLeasePrefix() []byte { + return []byte{0x03, 0x01} +} diff --git a/go/node/market/v1beta3/lease.pb.go b/go/node/market/v1beta3/lease.pb.go new file mode 100644 index 00000000..a88c67bd --- /dev/null +++ b/go/node/market/v1beta3/lease.pb.go @@ -0,0 +1,2134 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/lease.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of lease +type Lease_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + LeaseStateInvalid Lease_State = 0 + // LeaseActive denotes state for lease active + LeaseActive Lease_State = 1 + // LeaseInsufficientFunds denotes state for lease insufficient_funds + LeaseInsufficientFunds Lease_State = 2 + // LeaseClosed denotes state for lease closed + LeaseClosed Lease_State = 3 +) + +var Lease_State_name = map[int32]string{ + 0: "invalid", + 1: "active", + 2: "insufficient_funds", + 3: "closed", +} + +var Lease_State_value = map[string]int32{ + "invalid": 0, + "active": 1, + "insufficient_funds": 2, + "closed": 3, +} + +func (x Lease_State) String() string { + return proto.EnumName(Lease_State_name, int32(x)) +} + +func (Lease_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{1, 0} +} + +// LeaseID stores bid details of lease +type LeaseID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` +} + +func (m *LeaseID) Reset() { *m = LeaseID{} } +func (*LeaseID) ProtoMessage() {} +func (*LeaseID) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{0} +} +func (m *LeaseID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LeaseID.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 *LeaseID) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseID.Merge(m, src) +} +func (m *LeaseID) XXX_Size() int { + return m.Size() +} +func (m *LeaseID) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseID.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseID proto.InternalMessageInfo + +func (m *LeaseID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *LeaseID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *LeaseID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *LeaseID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *LeaseID) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +// Lease stores LeaseID, state of lease and price +type Lease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"id" yaml:"id"` + State Lease_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta3.Lease_State" json:"state" yaml:"state"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ClosedOn int64 `protobuf:"varint,5,opt,name=closed_on,json=closedOn,proto3" json:"closed_on,omitempty"` +} + +func (m *Lease) Reset() { *m = Lease{} } +func (*Lease) ProtoMessage() {} +func (*Lease) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{1} +} +func (m *Lease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Lease.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 *Lease) XXX_Merge(src proto.Message) { + xxx_messageInfo_Lease.Merge(m, src) +} +func (m *Lease) XXX_Size() int { + return m.Size() +} +func (m *Lease) XXX_DiscardUnknown() { + xxx_messageInfo_Lease.DiscardUnknown(m) +} + +var xxx_messageInfo_Lease proto.InternalMessageInfo + +func (m *Lease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +func (m *Lease) GetState() Lease_State { + if m != nil { + return m.State + } + return LeaseStateInvalid +} + +func (m *Lease) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +func (m *Lease) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +func (m *Lease) GetClosedOn() int64 { + if m != nil { + return m.ClosedOn + } + return 0 +} + +// LeaseFilters defines flags for lease list filter +type LeaseFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"` + State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *LeaseFilters) Reset() { *m = LeaseFilters{} } +func (m *LeaseFilters) String() string { return proto.CompactTextString(m) } +func (*LeaseFilters) ProtoMessage() {} +func (*LeaseFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{2} +} +func (m *LeaseFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LeaseFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LeaseFilters.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 *LeaseFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseFilters.Merge(m, src) +} +func (m *LeaseFilters) XXX_Size() int { + return m.Size() +} +func (m *LeaseFilters) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseFilters proto.InternalMessageInfo + +func (m *LeaseFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *LeaseFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *LeaseFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *LeaseFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *LeaseFilters) GetProvider() string { + if m != nil { + return m.Provider + } + return "" +} + +func (m *LeaseFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +// MsgCreateLease is sent to create a lease +type MsgCreateLease struct { + BidID BidID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCreateLease) Reset() { *m = MsgCreateLease{} } +func (m *MsgCreateLease) String() string { return proto.CompactTextString(m) } +func (*MsgCreateLease) ProtoMessage() {} +func (*MsgCreateLease) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{3} +} +func (m *MsgCreateLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateLease.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 *MsgCreateLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateLease.Merge(m, src) +} +func (m *MsgCreateLease) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateLease proto.InternalMessageInfo + +func (m *MsgCreateLease) GetBidID() BidID { + if m != nil { + return m.BidID + } + return BidID{} +} + +// MsgCreateLeaseResponse is the response from creating a lease +type MsgCreateLeaseResponse struct { +} + +func (m *MsgCreateLeaseResponse) Reset() { *m = MsgCreateLeaseResponse{} } +func (m *MsgCreateLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateLeaseResponse) ProtoMessage() {} +func (*MsgCreateLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{4} +} +func (m *MsgCreateLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateLeaseResponse.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 *MsgCreateLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateLeaseResponse.Merge(m, src) +} +func (m *MsgCreateLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateLeaseResponse proto.InternalMessageInfo + +// MsgWithdrawLease defines an SDK message for closing bid +type MsgWithdrawLease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=bid_id,json=bidId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgWithdrawLease) Reset() { *m = MsgWithdrawLease{} } +func (m *MsgWithdrawLease) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawLease) ProtoMessage() {} +func (*MsgWithdrawLease) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{5} +} +func (m *MsgWithdrawLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawLease.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 *MsgWithdrawLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawLease.Merge(m, src) +} +func (m *MsgWithdrawLease) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawLease proto.InternalMessageInfo + +func (m *MsgWithdrawLease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +// MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. +type MsgWithdrawLeaseResponse struct { +} + +func (m *MsgWithdrawLeaseResponse) Reset() { *m = MsgWithdrawLeaseResponse{} } +func (m *MsgWithdrawLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawLeaseResponse) ProtoMessage() {} +func (*MsgWithdrawLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{6} +} +func (m *MsgWithdrawLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawLeaseResponse.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 *MsgWithdrawLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawLeaseResponse.Merge(m, src) +} +func (m *MsgWithdrawLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawLeaseResponse proto.InternalMessageInfo + +// MsgCloseLease defines an SDK message for closing order +type MsgCloseLease struct { + LeaseID LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"id" yaml:"id"` +} + +func (m *MsgCloseLease) Reset() { *m = MsgCloseLease{} } +func (m *MsgCloseLease) String() string { return proto.CompactTextString(m) } +func (*MsgCloseLease) ProtoMessage() {} +func (*MsgCloseLease) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{7} +} +func (m *MsgCloseLease) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseLease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseLease.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 *MsgCloseLease) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseLease.Merge(m, src) +} +func (m *MsgCloseLease) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseLease) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseLease.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseLease proto.InternalMessageInfo + +func (m *MsgCloseLease) GetLeaseID() LeaseID { + if m != nil { + return m.LeaseID + } + return LeaseID{} +} + +// MsgCloseLeaseResponse defines the Msg/CloseLease response type. +type MsgCloseLeaseResponse struct { +} + +func (m *MsgCloseLeaseResponse) Reset() { *m = MsgCloseLeaseResponse{} } +func (m *MsgCloseLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCloseLeaseResponse) ProtoMessage() {} +func (*MsgCloseLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2eca529d0bc380ae, []int{8} +} +func (m *MsgCloseLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCloseLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCloseLeaseResponse.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 *MsgCloseLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCloseLeaseResponse.Merge(m, src) +} +func (m *MsgCloseLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCloseLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCloseLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCloseLeaseResponse proto.InternalMessageInfo + +func init() { + proto.RegisterEnum("akash.market.v1beta3.Lease_State", Lease_State_name, Lease_State_value) + proto.RegisterType((*LeaseID)(nil), "akash.market.v1beta3.LeaseID") + proto.RegisterType((*Lease)(nil), "akash.market.v1beta3.Lease") + proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1beta3.LeaseFilters") + proto.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta3.MsgCreateLease") + proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta3.MsgCreateLeaseResponse") + proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta3.MsgWithdrawLease") + proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta3.MsgWithdrawLeaseResponse") + proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta3.MsgCloseLease") + proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta3.MsgCloseLeaseResponse") +} + +func init() { proto.RegisterFile("akash/market/v1beta3/lease.proto", fileDescriptor_2eca529d0bc380ae) } + +var fileDescriptor_2eca529d0bc380ae = []byte{ + // 755 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0xb6, 0x93, 0x38, 0x24, 0x1b, 0xfe, 0xe4, 0x67, 0x01, 0xbf, 0xd4, 0x14, 0xdb, 0xf5, 0x89, + 0x4b, 0x6d, 0x11, 0x4e, 0xa5, 0x27, 0x42, 0x44, 0x15, 0xa9, 0x08, 0xd5, 0x54, 0x6a, 0x55, 0x55, + 0x8a, 0x1c, 0xef, 0x62, 0x56, 0x24, 0xde, 0xe0, 0x35, 0x41, 0x7d, 0x83, 0x8a, 0x53, 0x8f, 0xbd, + 0xa0, 0x22, 0xf5, 0x65, 0x38, 0xa2, 0x9e, 0x7a, 0xb2, 0xaa, 0x70, 0xa9, 0x72, 0x8c, 0xfa, 0x00, + 0xd5, 0xee, 0x3a, 0x24, 0x41, 0x11, 0xa7, 0xaa, 0xa7, 0x9e, 0x92, 0xf9, 0x66, 0xbe, 0x99, 0xf1, + 0x37, 0x33, 0x36, 0x30, 0xbd, 0x13, 0x8f, 0x1e, 0x3b, 0x1d, 0x2f, 0x3a, 0x41, 0xb1, 0xd3, 0xdb, + 0x6c, 0xa1, 0xd8, 0xdb, 0x72, 0xda, 0xc8, 0xa3, 0xc8, 0xee, 0x46, 0x24, 0x26, 0xea, 0x32, 0x8f, + 0xb0, 0x45, 0x84, 0x9d, 0x46, 0x68, 0xcb, 0x01, 0x09, 0x08, 0x0f, 0x70, 0xd8, 0x3f, 0x11, 0xab, + 0xe9, 0x3e, 0xa1, 0x1d, 0x42, 0x9d, 0x96, 0x47, 0x51, 0x9a, 0x6c, 0xd3, 0xf1, 0x09, 0x0e, 0x47, + 0xfe, 0x99, 0xd5, 0x5a, 0x18, 0x0a, 0xbf, 0x75, 0x95, 0x01, 0x73, 0x2f, 0x59, 0xed, 0x46, 0x5d, + 0x75, 0x80, 0x42, 0xce, 0x43, 0x14, 0x55, 0x64, 0x53, 0xde, 0x28, 0xd6, 0x1e, 0x0d, 0x12, 0x43, + 0x00, 0xc3, 0xc4, 0x98, 0xff, 0xe0, 0x75, 0xda, 0xdb, 0x16, 0x37, 0x2d, 0x57, 0xc0, 0xea, 0x16, + 0xc8, 0x41, 0x8a, 0x4e, 0x2b, 0x19, 0x53, 0xde, 0xc8, 0xd5, 0x8c, 0x7e, 0x62, 0xe4, 0xea, 0x87, + 0xe8, 0x74, 0x90, 0x18, 0x1c, 0x1f, 0x26, 0x46, 0x49, 0xd0, 0x98, 0x65, 0xb9, 0x1c, 0x64, 0xa4, + 0x80, 0x91, 0xb2, 0xa6, 0xbc, 0xb1, 0x20, 0x48, 0x2f, 0x52, 0x52, 0x30, 0x45, 0x0a, 0x04, 0x29, + 0x48, 0x49, 0x84, 0x91, 0x72, 0x63, 0xd2, 0x41, 0x4a, 0x22, 0x53, 0x24, 0x22, 0x48, 0xec, 0x47, + 0x7d, 0x0e, 0x0a, 0xdd, 0x88, 0xf4, 0x30, 0x44, 0x51, 0x45, 0xe1, 0x8f, 0x64, 0x0c, 0x12, 0xe3, + 0x0e, 0x1b, 0x26, 0xc6, 0x92, 0x20, 0x8d, 0x10, 0xcb, 0xbd, 0x73, 0x6e, 0x17, 0x3e, 0x5f, 0x19, + 0xd2, 0xcf, 0x2b, 0x43, 0xb2, 0x7e, 0x65, 0x81, 0xc2, 0x25, 0x52, 0xdf, 0x83, 0x02, 0x9f, 0x53, + 0x13, 0x43, 0xae, 0x51, 0xa9, 0xba, 0x6e, 0xcf, 0x9a, 0x95, 0x9d, 0x2a, 0x5a, 0xb3, 0xae, 0x13, + 0x43, 0xea, 0x27, 0xc6, 0x48, 0xe2, 0x41, 0x62, 0x64, 0x30, 0x1c, 0x26, 0x46, 0x51, 0x14, 0xc6, + 0xd0, 0x72, 0xe7, 0x78, 0xca, 0x06, 0x54, 0x5d, 0xa0, 0xd0, 0xd8, 0x8b, 0x11, 0x97, 0x73, 0xb1, + 0xfa, 0xe4, 0x81, 0xd4, 0xf6, 0x21, 0x0b, 0x14, 0x13, 0xe2, 0x9c, 0xf1, 0x84, 0xb8, 0x69, 0xb9, + 0x02, 0x56, 0x5f, 0x01, 0xa5, 0x1b, 0x61, 0x1f, 0x71, 0xb5, 0x4b, 0xd5, 0xc7, 0xb6, 0x58, 0x17, + 0x9b, 0xad, 0x4b, 0x9a, 0x72, 0xd3, 0xae, 0x23, 0x7f, 0x97, 0xe0, 0xb0, 0xb6, 0xce, 0xba, 0x65, + 0x29, 0x39, 0x65, 0x9c, 0x92, 0x9b, 0x96, 0x2b, 0x60, 0x75, 0x1d, 0x00, 0x3f, 0x42, 0x5e, 0x8c, + 0x60, 0xd3, 0x8b, 0xf9, 0x40, 0xb2, 0x6e, 0x31, 0x45, 0x76, 0x62, 0x75, 0x0d, 0x14, 0xfd, 0x36, + 0xa1, 0x08, 0x36, 0x49, 0xc8, 0x55, 0xcf, 0xba, 0x05, 0x01, 0x1c, 0x84, 0xd6, 0x17, 0x19, 0x28, + 0xbc, 0x75, 0xd5, 0x02, 0x73, 0x38, 0xec, 0x79, 0x6d, 0x0c, 0xcb, 0x92, 0xb6, 0x72, 0x71, 0x69, + 0xfe, 0xc7, 0x1f, 0x8c, 0x3b, 0x1b, 0xc2, 0xa1, 0xae, 0x81, 0xbc, 0xe7, 0xc7, 0xb8, 0x87, 0xca, + 0xb2, 0xb6, 0x74, 0x71, 0x69, 0x96, 0x78, 0xc8, 0x0e, 0x87, 0xd4, 0x2a, 0x50, 0x71, 0x48, 0xcf, + 0x8e, 0x8e, 0xb0, 0x8f, 0x51, 0x18, 0x37, 0x8f, 0xce, 0x42, 0x48, 0xcb, 0x19, 0x4d, 0xbb, 0xb8, + 0x34, 0x57, 0x85, 0xdc, 0x13, 0xee, 0x3d, 0xe6, 0x65, 0x09, 0x45, 0x2b, 0xe5, 0xec, 0x44, 0xc2, + 0x5d, 0x0e, 0x69, 0xb9, 0x8f, 0x5f, 0x75, 0x69, 0x62, 0xec, 0xdf, 0x32, 0x60, 0x9e, 0xfb, 0xf7, + 0x70, 0x3b, 0x46, 0x11, 0xfd, 0x77, 0x1e, 0x13, 0xe7, 0xc1, 0xc4, 0x10, 0xcb, 0x9a, 0x1f, 0x8b, + 0xf1, 0xd0, 0x26, 0x6e, 0xe7, 0xb8, 0xa8, 0x6d, 0xb0, 0xb8, 0x4f, 0x83, 0x5d, 0xbe, 0x2d, 0xe2, + 0xa6, 0x5e, 0x83, 0x7c, 0x0b, 0xc3, 0xf1, 0x45, 0xad, 0xcd, 0x5e, 0xfb, 0x1a, 0x86, 0x8d, 0x7a, + 0xcd, 0x4c, 0xef, 0x49, 0xe1, 0xe6, 0xac, 0x6b, 0x52, 0x5a, 0x18, 0x36, 0x60, 0x5a, 0xad, 0x02, + 0x56, 0xa7, 0xab, 0xb9, 0x88, 0x76, 0x49, 0x48, 0x91, 0x15, 0x81, 0xf2, 0x3e, 0x0d, 0xde, 0xe0, + 0xf8, 0x18, 0x46, 0xde, 0xb9, 0xe8, 0xe4, 0xed, 0xbd, 0x4e, 0xfe, 0xc0, 0x6d, 0x4f, 0x75, 0xa3, + 0x81, 0xca, 0xfd, 0x9a, 0x77, 0xfd, 0x50, 0xb0, 0xc0, 0x3a, 0x65, 0x9b, 0xf8, 0x17, 0x5e, 0x35, + 0x69, 0x43, 0xff, 0x83, 0x95, 0xa9, 0xa2, 0xa3, 0x6e, 0x6a, 0x87, 0xd7, 0x7d, 0x5d, 0xbe, 0xe9, + 0xeb, 0xf2, 0x8f, 0xbe, 0x2e, 0x7f, 0xba, 0xd5, 0xa5, 0x9b, 0x5b, 0x5d, 0xfa, 0x7e, 0xab, 0x4b, + 0xef, 0x9e, 0x05, 0x38, 0x3e, 0x3e, 0x6b, 0xd9, 0x3e, 0xe9, 0x38, 0xbc, 0x9d, 0xa7, 0x21, 0x8a, + 0xcf, 0x49, 0x74, 0x92, 0x5a, 0x5e, 0x17, 0x3b, 0x01, 0x71, 0x42, 0x02, 0xd1, 0xbd, 0x6f, 0x4e, + 0x2b, 0xcf, 0x3f, 0x38, 0x5b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x98, 0xd5, 0x37, 0x96, 0x00, + 0x07, 0x00, 0x00, +} + +func (m *LeaseID) 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 *LeaseID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintLease(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintLease(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Lease) 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 *Lease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClosedOn != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.ClosedOn)) + i-- + dAtA[i] = 0x28 + } + if m.CreatedAt != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *LeaseFilters) 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 *LeaseFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LeaseFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintLease(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x32 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintLease(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintLease(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintLease(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateLease) 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 *MsgCreateLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BidID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCreateLeaseResponse) 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 *MsgCreateLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawLease) 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 *MsgWithdrawLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawLeaseResponse) 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 *MsgWithdrawLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCloseLease) 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 *MsgCloseLease) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseLease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LeaseID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLease(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgCloseLeaseResponse) 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 *MsgCloseLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCloseLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintLease(dAtA []byte, offset int, v uint64) int { + offset -= sovLease(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *LeaseID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovLease(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovLease(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovLease(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func (m *Lease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + if m.State != 0 { + n += 1 + sovLease(uint64(m.State)) + } + l = m.Price.Size() + n += 1 + l + sovLease(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovLease(uint64(m.CreatedAt)) + } + if m.ClosedOn != 0 { + n += 1 + sovLease(uint64(m.ClosedOn)) + } + return n +} + +func (m *LeaseFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovLease(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovLease(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovLease(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func (m *MsgCreateLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgCreateLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgWithdrawLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCloseLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeaseID.Size() + n += 1 + l + sovLease(uint64(l)) + return n +} + +func (m *MsgCloseLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovLease(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLease(x uint64) (n int) { + return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *LeaseID) 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 ErrIntOverflowLease + } + 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: LeaseID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Lease) 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 ErrIntOverflowLease + } + 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: Lease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Lease_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClosedOn", wireType) + } + m.ClosedOn = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClosedOn |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseFilters) 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 ErrIntOverflowLease + } + 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: LeaseFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + 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 ErrInvalidLengthLease + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateLease) 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 ErrIntOverflowLease + } + 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: MsgCreateLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgCreateLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawLease) 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 ErrIntOverflowLease + } + 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: MsgWithdrawLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgWithdrawLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseLease) 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 ErrIntOverflowLease + } + 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: MsgCloseLease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseLease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLease + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LeaseID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCloseLeaseResponse) 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 ErrIntOverflowLease + } + 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: MsgCloseLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCloseLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLease(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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrInvalidLengthLease + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLease + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLease + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLease = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLease = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/migrate/v1beta2.go b/go/node/market/v1beta3/migrate/v1beta2.go new file mode 100644 index 00000000..ab964676 --- /dev/null +++ b/go/node/market/v1beta3/migrate/v1beta2.go @@ -0,0 +1,16 @@ +package migrate + +import ( + "github.com/akash-network/akash-api/go/node/market/v1beta2" + "github.com/akash-network/akash-api/go/node/market/v1beta3" +) + +func LeaseIDToV1beta3(from v1beta2.LeaseID) v1beta3.LeaseID { + return v1beta3.LeaseID{ + Owner: from.Owner, + DSeq: from.DSeq, + GSeq: from.GSeq, + OSeq: from.OSeq, + Provider: from.Provider, + } +} diff --git a/go/node/market/v1beta3/msgs.go b/go/node/market/v1beta3/msgs.go new file mode 100644 index 00000000..1dfe91a9 --- /dev/null +++ b/go/node/market/v1beta3/msgs.go @@ -0,0 +1,215 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +const ( + MsgTypeCreateBid = "create-bid" + MsgTypeCloseBid = "close-bid" + MsgTypeCreateLease = "create-lease" + MsgTypeWithdrawLease = "withdraw-lease" + MsgTypeCloseLease = "close-lease" +) + +var ( + _ sdk.Msg = &MsgCreateBid{} + _ sdk.Msg = &MsgCloseBid{} + _ sdk.Msg = &MsgCreateLease{} + _ sdk.Msg = &MsgWithdrawLease{} + _ sdk.Msg = &MsgCloseLease{} +) + +// NewMsgCreateBid creates a new MsgCreateBid instance +func NewMsgCreateBid(id OrderID, provider sdk.AccAddress, price sdk.DecCoin, deposit sdk.Coin) *MsgCreateBid { + return &MsgCreateBid{ + Order: id, + Provider: provider.String(), + Price: price, + Deposit: deposit, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateBid) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateBid) Type() string { return MsgTypeCreateBid } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateBid) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateBid) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic does basic validation of provider and order +func (msg MsgCreateBid) ValidateBasic() error { + if err := msg.Order.Validate(); err != nil { + return err + } + + provider, err := sdk.AccAddressFromBech32(msg.Provider) + if err != nil { + return ErrEmptyProvider + } + + owner, err := sdk.AccAddressFromBech32(msg.Order.Owner) + if err != nil { + return errors.Wrap(ErrInvalidBid, "empty owner") + } + + if provider.Equals(owner) { + return ErrSameAccount + } + + if msg.Price.IsZero() { + return ErrBidZeroPrice + } + + return nil +} + +// NewMsgWithdrawLease creates a new MsgWithdrawLease instance +func NewMsgWithdrawLease(id LeaseID) *MsgWithdrawLease { + return &MsgWithdrawLease{ + LeaseID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgWithdrawLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgWithdrawLease) Type() string { return MsgTypeWithdrawLease } + +// GetSignBytes encodes the message for signing +func (msg MsgWithdrawLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgWithdrawLease) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.GetLeaseID().Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic does basic validation of provider and order +func (msg MsgWithdrawLease) ValidateBasic() error { + if err := msg.LeaseID.Validate(); err != nil { + return err + } + return nil +} + +// NewMsgCreateLease creates a new MsgCreateLease instance +func NewMsgCreateLease(id BidID) *MsgCreateLease { + return &MsgCreateLease{ + BidID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateLease) Type() string { return MsgTypeCreateLease } + +// GetSignBytes encodes the message for signing +func (msg MsgCreateLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateLease) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.BidID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic method for MsgCreateLease +func (msg MsgCreateLease) ValidateBasic() error { + return msg.BidID.Validate() +} + +// NewMsgCloseBid creates a new MsgCloseBid instance +func NewMsgCloseBid(id BidID) *MsgCloseBid { + return &MsgCloseBid{ + BidID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseBid) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseBid) Type() string { return MsgTypeCloseBid } + +// GetSignBytes encodes the message for signing +func (msg MsgCloseBid) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseBid) GetSigners() []sdk.AccAddress { + provider, err := sdk.AccAddressFromBech32(msg.BidID.Provider) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{provider} +} + +// ValidateBasic method for MsgCloseBid +func (msg MsgCloseBid) ValidateBasic() error { + return msg.BidID.Validate() +} + +// NewMsgCloseLease creates a new MsgCloseLease instance +func NewMsgCloseLease(id LeaseID) *MsgCloseLease { + return &MsgCloseLease{ + LeaseID: id, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCloseLease) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCloseLease) Type() string { return MsgTypeCloseLease } + +// GetSignBytes encodes the message for signing +func (msg MsgCloseLease) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCloseLease) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.LeaseID.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// ValidateBasic method for MsgCloseLease +func (msg MsgCloseLease) ValidateBasic() error { + return msg.LeaseID.Validate() +} diff --git a/go/node/market/v1beta3/order.pb.go b/go/node/market/v1beta3/order.pb.go new file mode 100644 index 00000000..754d09d0 --- /dev/null +++ b/go/node/market/v1beta3/order.pb.go @@ -0,0 +1,1107 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/order.proto + +package v1beta3 + +import ( + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/deployment/v1beta3" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// State is an enum which refers to state of order +type Order_State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + OrderStateInvalid Order_State = 0 + // OrderOpen denotes state for order open + OrderOpen Order_State = 1 + // OrderMatched denotes state for order matched + OrderActive Order_State = 2 + // OrderClosed denotes state for order lost + OrderClosed Order_State = 3 +) + +var Order_State_name = map[int32]string{ + 0: "invalid", + 1: "open", + 2: "active", + 3: "closed", +} + +var Order_State_value = map[string]int32{ + "invalid": 0, + "open": 1, + "active": 2, + "closed": 3, +} + +func (x Order_State) String() string { + return proto.EnumName(Order_State_name, int32(x)) +} + +func (Order_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_cffb7c6e7c4cdcbf, []int{1, 0} +} + +// OrderID stores owner and all other seq numbers +type OrderID struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` +} + +func (m *OrderID) Reset() { *m = OrderID{} } +func (*OrderID) ProtoMessage() {} +func (*OrderID) Descriptor() ([]byte, []int) { + return fileDescriptor_cffb7c6e7c4cdcbf, []int{0} +} +func (m *OrderID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderID.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 *OrderID) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderID.Merge(m, src) +} +func (m *OrderID) XXX_Size() int { + return m.Size() +} +func (m *OrderID) XXX_DiscardUnknown() { + xxx_messageInfo_OrderID.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderID proto.InternalMessageInfo + +func (m *OrderID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *OrderID) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *OrderID) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *OrderID) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +// Order stores orderID, state of order and other details +type Order struct { + OrderID OrderID `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"id" yaml:"id"` + State Order_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1beta3.Order_State" json:"state" yaml:"state"` + Spec v1beta3.GroupSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec" yaml:"spec"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (m *Order) Reset() { *m = Order{} } +func (*Order) ProtoMessage() {} +func (*Order) Descriptor() ([]byte, []int) { + return fileDescriptor_cffb7c6e7c4cdcbf, []int{1} +} +func (m *Order) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Order.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 *Order) XXX_Merge(src proto.Message) { + xxx_messageInfo_Order.Merge(m, src) +} +func (m *Order) XXX_Size() int { + return m.Size() +} +func (m *Order) XXX_DiscardUnknown() { + xxx_messageInfo_Order.DiscardUnknown(m) +} + +var xxx_messageInfo_Order proto.InternalMessageInfo + +func (m *Order) GetOrderID() OrderID { + if m != nil { + return m.OrderID + } + return OrderID{} +} + +func (m *Order) GetState() Order_State { + if m != nil { + return m.State + } + return OrderStateInvalid +} + +func (m *Order) GetSpec() v1beta3.GroupSpec { + if m != nil { + return m.Spec + } + return v1beta3.GroupSpec{} +} + +func (m *Order) GetCreatedAt() int64 { + if m != nil { + return m.CreatedAt + } + return 0 +} + +// OrderFilters defines flags for order list filter +type OrderFilters struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"` + GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"` + OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"` + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state" yaml:"state"` +} + +func (m *OrderFilters) Reset() { *m = OrderFilters{} } +func (m *OrderFilters) String() string { return proto.CompactTextString(m) } +func (*OrderFilters) ProtoMessage() {} +func (*OrderFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_cffb7c6e7c4cdcbf, []int{2} +} +func (m *OrderFilters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderFilters.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 *OrderFilters) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderFilters.Merge(m, src) +} +func (m *OrderFilters) XXX_Size() int { + return m.Size() +} +func (m *OrderFilters) XXX_DiscardUnknown() { + xxx_messageInfo_OrderFilters.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderFilters proto.InternalMessageInfo + +func (m *OrderFilters) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *OrderFilters) GetDSeq() uint64 { + if m != nil { + return m.DSeq + } + return 0 +} + +func (m *OrderFilters) GetGSeq() uint32 { + if m != nil { + return m.GSeq + } + return 0 +} + +func (m *OrderFilters) GetOSeq() uint32 { + if m != nil { + return m.OSeq + } + return 0 +} + +func (m *OrderFilters) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func init() { + proto.RegisterEnum("akash.market.v1beta3.Order_State", Order_State_name, Order_State_value) + proto.RegisterType((*OrderID)(nil), "akash.market.v1beta3.OrderID") + proto.RegisterType((*Order)(nil), "akash.market.v1beta3.Order") + proto.RegisterType((*OrderFilters)(nil), "akash.market.v1beta3.OrderFilters") +} + +func init() { proto.RegisterFile("akash/market/v1beta3/order.proto", fileDescriptor_cffb7c6e7c4cdcbf) } + +var fileDescriptor_cffb7c6e7c4cdcbf = []byte{ + // 582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xb6, 0x13, 0xa7, 0x6d, 0x2e, 0x2d, 0x04, 0xab, 0x88, 0xe2, 0xaa, 0x3e, 0x63, 0x96, 0x2c, + 0xd8, 0xa2, 0x9d, 0xc8, 0xd6, 0x50, 0x51, 0x65, 0x8a, 0xe4, 0x30, 0x21, 0xa4, 0xca, 0xf1, 0x9d, + 0x5c, 0x2b, 0x89, 0xcf, 0xb5, 0xaf, 0xa9, 0xba, 0x33, 0xa0, 0x4c, 0x2c, 0x48, 0x2c, 0x91, 0x2a, + 0xf1, 0x43, 0x58, 0x3b, 0x76, 0x64, 0xb2, 0x50, 0xb2, 0xa0, 0x8c, 0xf9, 0x05, 0xe8, 0xde, 0x19, + 0xdc, 0x22, 0xd4, 0x1f, 0xc0, 0x64, 0xbf, 0xef, 0x7d, 0xdf, 0xbb, 0x7b, 0xdf, 0x7b, 0x3a, 0x64, + 0xf9, 0x43, 0x3f, 0x3b, 0x75, 0xc7, 0x7e, 0x3a, 0xa4, 0xdc, 0x9d, 0xbc, 0x1c, 0x50, 0xee, 0x1f, + 0xb8, 0x2c, 0x25, 0x34, 0x75, 0x92, 0x94, 0x71, 0xa6, 0x6f, 0x03, 0xc3, 0x91, 0x0c, 0xa7, 0x60, + 0x18, 0xdb, 0x21, 0x0b, 0x19, 0x10, 0x5c, 0xf1, 0x27, 0xb9, 0x46, 0x4b, 0x56, 0x23, 0x34, 0x19, + 0xb1, 0xcb, 0x31, 0x8d, 0xcb, 0x8a, 0x61, 0xca, 0xce, 0x93, 0x2c, 0xa1, 0x81, 0x64, 0xda, 0x0b, + 0x15, 0xad, 0xf7, 0xc4, 0x29, 0xdd, 0x23, 0xdd, 0x45, 0x35, 0x76, 0x11, 0xd3, 0x74, 0x47, 0xb5, + 0xd4, 0x56, 0xbd, 0xf3, 0x74, 0x99, 0x63, 0x09, 0xac, 0x72, 0xbc, 0x79, 0xe9, 0x8f, 0x47, 0x6d, + 0x1b, 0x42, 0xdb, 0x93, 0xb0, 0x7e, 0x80, 0x34, 0x92, 0xd1, 0xb3, 0x9d, 0x8a, 0xa5, 0xb6, 0xb4, + 0x0e, 0x9e, 0xe7, 0x58, 0x3b, 0xea, 0xd3, 0xb3, 0x65, 0x8e, 0x01, 0x5f, 0xe5, 0xb8, 0x21, 0x65, + 0x22, 0xb2, 0x3d, 0x00, 0x85, 0x28, 0x14, 0xa2, 0xaa, 0xa5, 0xb6, 0xb6, 0xa4, 0xe8, 0xb8, 0x10, + 0x85, 0x77, 0x44, 0xa1, 0x14, 0x85, 0x85, 0x88, 0x09, 0x91, 0x56, 0x8a, 0x7a, 0x85, 0x88, 0xdd, + 0x11, 0x31, 0x29, 0x12, 0x9f, 0xf6, 0xc6, 0x97, 0x2b, 0xac, 0xfc, 0xbc, 0xc2, 0x8a, 0xfd, 0xad, + 0x8a, 0x6a, 0xd0, 0xa5, 0xfe, 0x1e, 0x6d, 0x80, 0xa9, 0x27, 0x11, 0x81, 0x36, 0x1b, 0xfb, 0x7b, + 0xce, 0xbf, 0x8c, 0x75, 0x0a, 0x53, 0x3a, 0xf6, 0x75, 0x8e, 0x95, 0x79, 0x8e, 0x7f, 0xbb, 0xb4, + 0xcc, 0x71, 0x25, 0x22, 0xab, 0x1c, 0xd7, 0xe5, 0x81, 0x11, 0xb1, 0xbd, 0x75, 0x28, 0xd9, 0x25, + 0xba, 0x87, 0x6a, 0x19, 0xf7, 0x39, 0x05, 0x47, 0x1e, 0xec, 0x3f, 0xbb, 0xa7, 0xb4, 0xd3, 0x17, + 0x44, 0x69, 0x32, 0x68, 0x4a, 0x93, 0x21, 0xb4, 0x3d, 0x09, 0xeb, 0x6f, 0x91, 0x26, 0xe6, 0x05, + 0x7e, 0x35, 0xf6, 0x9f, 0x17, 0x25, 0xcb, 0xd1, 0xfe, 0x29, 0x7b, 0x2c, 0x46, 0xdb, 0x4f, 0x68, + 0xd0, 0xd9, 0x15, 0x77, 0x16, 0xde, 0x08, 0x61, 0xe9, 0x8d, 0x88, 0x6c, 0x0f, 0x40, 0x7d, 0x0f, + 0xa1, 0x20, 0xa5, 0x3e, 0xa7, 0xe4, 0xc4, 0xe7, 0x60, 0x6b, 0xd5, 0xab, 0x17, 0xc8, 0x21, 0xb7, + 0x3f, 0xa8, 0xa8, 0x06, 0x17, 0xd4, 0x6d, 0xb4, 0x1e, 0xc5, 0x13, 0x7f, 0x14, 0x91, 0xa6, 0x62, + 0x3c, 0x9e, 0xce, 0xac, 0x47, 0x70, 0x7d, 0x48, 0x76, 0x65, 0x42, 0x7f, 0x82, 0x34, 0x96, 0xd0, + 0xb8, 0xa9, 0x1a, 0x5b, 0xd3, 0x99, 0x55, 0x07, 0x42, 0x2f, 0xa1, 0xb1, 0xbe, 0x8b, 0xd6, 0xfc, + 0x80, 0x47, 0x13, 0xda, 0xac, 0x18, 0x0f, 0xa7, 0x33, 0xab, 0x01, 0xa9, 0x43, 0x80, 0x44, 0x32, + 0x18, 0xb1, 0x8c, 0x92, 0x66, 0xf5, 0x56, 0xf2, 0x35, 0x40, 0x86, 0xf6, 0xf1, 0xab, 0xa9, 0xdc, + 0x9a, 0xe0, 0xe7, 0x0a, 0xda, 0x84, 0xfc, 0x9b, 0x68, 0xc4, 0x69, 0x9a, 0xfd, 0x6f, 0xcb, 0x2a, + 0xfa, 0x91, 0xab, 0x53, 0x2b, 0xfb, 0xb9, 0x6f, 0x2f, 0xda, 0x9a, 0xf0, 0xa5, 0xd3, 0xbf, 0x9e, + 0x9b, 0xea, 0xcd, 0xdc, 0x54, 0x7f, 0xcc, 0x4d, 0xf5, 0xd3, 0xc2, 0x54, 0x6e, 0x16, 0xa6, 0xf2, + 0x7d, 0x61, 0x2a, 0xef, 0x5e, 0x85, 0x11, 0x3f, 0x3d, 0x1f, 0x38, 0x01, 0x1b, 0xbb, 0xb0, 0x33, + 0x2f, 0x62, 0xca, 0x2f, 0x58, 0x3a, 0x2c, 0x22, 0x3f, 0x89, 0xdc, 0x90, 0xb9, 0x31, 0x23, 0xf4, + 0xaf, 0x67, 0x67, 0xb0, 0x06, 0x6f, 0xc3, 0xc1, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0x36, + 0xa2, 0x46, 0x95, 0x04, 0x00, 0x00, +} + +func (m *OrderID) 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 *OrderID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Order) 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 *Order) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.State != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.OrderID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOrder(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OrderFilters) 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 *OrderFilters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OrderFilters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.State) > 0 { + i -= len(m.State) + copy(dAtA[i:], m.State) + i = encodeVarintOrder(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintOrder(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintOrder(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { + offset -= sovOrder(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *OrderID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovOrder(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovOrder(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovOrder(uint64(m.OSeq)) + } + return n +} + +func (m *Order) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.OrderID.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.State != 0 { + n += 1 + sovOrder(uint64(m.State)) + } + l = m.Spec.Size() + n += 1 + l + sovOrder(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovOrder(uint64(m.CreatedAt)) + } + return n +} + +func (m *OrderFilters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovOrder(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovOrder(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovOrder(uint64(m.OSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovOrder(uint64(l)) + } + return n +} + +func sovOrder(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOrder(x uint64) (n int) { + return sovOrder(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OrderID) 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 ErrIntOverflowOrder + } + 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: OrderID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderID: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Order) 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 ErrIntOverflowOrder + } + 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: Order: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= Order_State(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOrder + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderFilters) 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 ErrIntOverflowOrder + } + 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: OrderFilters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderFilters: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DSeq", wireType) + } + m.DSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DSeq |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GSeq", wireType) + } + m.GSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OSeq", wireType) + } + m.OSeq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OSeq |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOrder + } + 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 ErrInvalidLengthOrder + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOrder + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOrder(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOrder + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOrder(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, ErrIntOverflowOrder + } + 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, ErrIntOverflowOrder + } + 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, ErrIntOverflowOrder + } + 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, ErrInvalidLengthOrder + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOrder + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOrder + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOrder = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOrder = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOrder = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/params.go b/go/node/market/v1beta3/params.go new file mode 100644 index 00000000..4dbe0ddd --- /dev/null +++ b/go/node/market/v1beta3/params.go @@ -0,0 +1,76 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/pkg/errors" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +var ( + DefaultBidMinDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000)) + defaultOrderMaxBids uint32 = 20 + maxOrderMaxBids uint32 = 500 +) + +const ( + keyBidMinDeposit = "BidMinDeposit" + keyOrderMaxBids = "OrderMaxBids" +) + +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair([]byte(keyBidMinDeposit), &p.BidMinDeposit, validateCoin), + paramtypes.NewParamSetPair([]byte(keyOrderMaxBids), &p.OrderMaxBids, validateOrderMaxBids), + } +} + +func DefaultParams() Params { + return Params{ + BidMinDeposit: DefaultBidMinDeposit, + OrderMaxBids: defaultOrderMaxBids, + } +} + +func (p Params) Validate() error { + if err := validateCoin(p.BidMinDeposit); err != nil { + return err + } + + if err := validateOrderMaxBids(p.OrderMaxBids); err != nil { + return err + } + return nil +} + +func validateCoin(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return errors.Wrapf(ErrInvalidParam, "invalid type %T", i) + } + + return nil +} + +func validateOrderMaxBids(i interface{}) error { + val, ok := i.(uint32) + + if !ok { + return errors.Wrapf(ErrInvalidParam, "invalid type %T", i) + } + + if val == 0 { + return errors.Wrap(ErrInvalidParam, "order max bids too low") + } + + if val > maxOrderMaxBids { + return errors.Wrap(ErrInvalidParam, "order max bids too high") + } + + return nil +} diff --git a/go/node/market/v1beta3/params.pb.go b/go/node/market/v1beta3/params.pb.go new file mode 100644 index 00000000..9cf656b1 --- /dev/null +++ b/go/node/market/v1beta3/params.pb.go @@ -0,0 +1,365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/params.proto + +package v1beta3 + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Params is the params for the x/market module +type Params struct { + BidMinDeposit types.Coin `protobuf:"bytes,1,opt,name=bid_min_deposit,json=bidMinDeposit,proto3" json:"bid_min_deposit" yaml:"bid_min_deposit"` + OrderMaxBids uint32 `protobuf:"varint,2,opt,name=order_max_bids,json=orderMaxBids,proto3" json:"order_max_bids" yaml:"order_max_bids"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_ee47153ff137a530, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetBidMinDeposit() types.Coin { + if m != nil { + return m.BidMinDeposit + } + return types.Coin{} +} + +func (m *Params) GetOrderMaxBids() uint32 { + if m != nil { + return m.OrderMaxBids + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "akash.market.v1beta3.Params") +} + +func init() { proto.RegisterFile("akash/market/v1beta3/params.proto", fileDescriptor_ee47153ff137a530) } + +var fileDescriptor_ee47153ff137a530 = []byte{ + // 321 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x31, 0x4f, 0xe3, 0x30, + 0x18, 0x86, 0xe3, 0x1b, 0x3a, 0xe4, 0xda, 0x3b, 0xa9, 0xea, 0x9d, 0x4a, 0x07, 0xbb, 0x64, 0xea, + 0x82, 0xad, 0xd2, 0x09, 0xd8, 0x02, 0x6b, 0x05, 0x2a, 0x1b, 0x4b, 0x64, 0xd7, 0x56, 0x6a, 0x15, + 0xe7, 0x8b, 0xe2, 0x00, 0xe5, 0x07, 0xb0, 0xf3, 0xb3, 0x3a, 0x76, 0x64, 0xb2, 0x50, 0xba, 0x75, + 0x2c, 0x7f, 0x00, 0x35, 0xc9, 0x50, 0xb2, 0xd9, 0x7e, 0x9f, 0xf7, 0xf9, 0xa4, 0xcf, 0xfe, 0x29, + 0x5f, 0x72, 0xbb, 0x60, 0x86, 0x67, 0x4b, 0x95, 0xb3, 0xe7, 0xb1, 0x50, 0x39, 0x9f, 0xb0, 0x94, + 0x67, 0xdc, 0x58, 0x9a, 0x66, 0x90, 0x43, 0xb7, 0x57, 0x22, 0xb4, 0x42, 0x68, 0x8d, 0x0c, 0x7a, + 0x31, 0xc4, 0x50, 0x02, 0xec, 0x70, 0xaa, 0xd8, 0x01, 0x9e, 0x83, 0x35, 0x60, 0x99, 0xe0, 0x56, + 0xd5, 0xb6, 0x31, 0x9b, 0x83, 0x4e, 0xaa, 0x3c, 0xf8, 0x42, 0x7e, 0xeb, 0xae, 0x94, 0x77, 0xdf, + 0x90, 0xff, 0x57, 0x68, 0x19, 0x19, 0x9d, 0x44, 0x52, 0xa5, 0x60, 0x75, 0xde, 0x47, 0x43, 0x34, + 0xfa, 0x7d, 0x7e, 0x42, 0x2b, 0x0b, 0x3d, 0x58, 0xea, 0x81, 0x63, 0x7a, 0x0d, 0x3a, 0x09, 0xc3, + 0xb5, 0x23, 0x5e, 0xe1, 0x48, 0x27, 0xd4, 0x72, 0xaa, 0x93, 0x9b, 0xaa, 0xb7, 0x73, 0xa4, 0xa9, + 0xda, 0x3b, 0xf2, 0xff, 0x95, 0x9b, 0xc7, 0xcb, 0xa0, 0x11, 0x04, 0xb3, 0x8e, 0x38, 0xee, 0x76, + 0xb9, 0xff, 0x07, 0x32, 0xa9, 0xb2, 0xc8, 0xf0, 0x55, 0x24, 0xb4, 0xb4, 0xfd, 0x5f, 0x43, 0x34, + 0xea, 0x84, 0x57, 0x85, 0x23, 0xed, 0xdb, 0x43, 0x32, 0xe5, 0xab, 0x50, 0x4b, 0xbb, 0x73, 0xa4, + 0x41, 0xee, 0x1d, 0xf9, 0x57, 0x0d, 0xf9, 0xf9, 0x1e, 0xcc, 0xda, 0x70, 0x54, 0x0c, 0xef, 0xd7, + 0x05, 0x46, 0x9b, 0x02, 0xa3, 0xcf, 0x02, 0xa3, 0xf7, 0x2d, 0xf6, 0x36, 0x5b, 0xec, 0x7d, 0x6c, + 0xb1, 0xf7, 0x70, 0x11, 0xeb, 0x7c, 0xf1, 0x24, 0xe8, 0x1c, 0x0c, 0x2b, 0xd7, 0x7c, 0x96, 0xa8, + 0xfc, 0x05, 0xb2, 0x65, 0x7d, 0xe3, 0xa9, 0x66, 0x31, 0xb0, 0x04, 0xa4, 0x6a, 0xfc, 0x91, 0x68, + 0x95, 0x1b, 0x9d, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0x04, 0xe1, 0x11, 0x23, 0xc2, 0x01, 0x00, + 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OrderMaxBids != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.OrderMaxBids)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.BidMinDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidMinDeposit.Size() + n += 1 + l + sovParams(uint64(l)) + if m.OrderMaxBids != 0 { + n += 1 + sovParams(uint64(m.OrderMaxBids)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BidMinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BidMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrderMaxBids", wireType) + } + m.OrderMaxBids = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OrderMaxBids |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/query.pb.go b/go/node/market/v1beta3/query.pb.go new file mode 100644 index 00000000..49105a94 --- /dev/null +++ b/go/node/market/v1beta3/query.pb.go @@ -0,0 +1,3034 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + v1beta3 "github.com/akash-network/akash-api/go/node/escrow/v1beta3" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryOrdersRequest is request type for the Query/Orders RPC method +type QueryOrdersRequest struct { + Filters OrderFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryOrdersRequest) Reset() { *m = QueryOrdersRequest{} } +func (m *QueryOrdersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOrdersRequest) ProtoMessage() {} +func (*QueryOrdersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{0} +} +func (m *QueryOrdersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrdersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrdersRequest.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 *QueryOrdersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrdersRequest.Merge(m, src) +} +func (m *QueryOrdersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOrdersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrdersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrdersRequest proto.InternalMessageInfo + +func (m *QueryOrdersRequest) GetFilters() OrderFilters { + if m != nil { + return m.Filters + } + return OrderFilters{} +} + +func (m *QueryOrdersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryOrdersResponse is response type for the Query/Orders RPC method +type QueryOrdersResponse struct { + Orders Orders `protobuf:"bytes,1,rep,name=orders,proto3,castrepeated=Orders" json:"orders"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryOrdersResponse) Reset() { *m = QueryOrdersResponse{} } +func (m *QueryOrdersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOrdersResponse) ProtoMessage() {} +func (*QueryOrdersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{1} +} +func (m *QueryOrdersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrdersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrdersResponse.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 *QueryOrdersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrdersResponse.Merge(m, src) +} +func (m *QueryOrdersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOrdersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrdersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrdersResponse proto.InternalMessageInfo + +func (m *QueryOrdersResponse) GetOrders() Orders { + if m != nil { + return m.Orders + } + return nil +} + +func (m *QueryOrdersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryOrderRequest is request type for the Query/Order RPC method +type QueryOrderRequest struct { + ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryOrderRequest) Reset() { *m = QueryOrderRequest{} } +func (m *QueryOrderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryOrderRequest) ProtoMessage() {} +func (*QueryOrderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{2} +} +func (m *QueryOrderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrderRequest.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 *QueryOrderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrderRequest.Merge(m, src) +} +func (m *QueryOrderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryOrderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrderRequest proto.InternalMessageInfo + +func (m *QueryOrderRequest) GetID() OrderID { + if m != nil { + return m.ID + } + return OrderID{} +} + +// QueryOrderResponse is response type for the Query/Order RPC method +type QueryOrderResponse struct { + Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"` +} + +func (m *QueryOrderResponse) Reset() { *m = QueryOrderResponse{} } +func (m *QueryOrderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOrderResponse) ProtoMessage() {} +func (*QueryOrderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{3} +} +func (m *QueryOrderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOrderResponse.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 *QueryOrderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOrderResponse.Merge(m, src) +} +func (m *QueryOrderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOrderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOrderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOrderResponse proto.InternalMessageInfo + +func (m *QueryOrderResponse) GetOrder() Order { + if m != nil { + return m.Order + } + return Order{} +} + +// QueryBidsRequest is request type for the Query/Bids RPC method +type QueryBidsRequest struct { + Filters BidFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBidsRequest) Reset() { *m = QueryBidsRequest{} } +func (m *QueryBidsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBidsRequest) ProtoMessage() {} +func (*QueryBidsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{4} +} +func (m *QueryBidsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidsRequest.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 *QueryBidsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidsRequest.Merge(m, src) +} +func (m *QueryBidsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBidsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidsRequest proto.InternalMessageInfo + +func (m *QueryBidsRequest) GetFilters() BidFilters { + if m != nil { + return m.Filters + } + return BidFilters{} +} + +func (m *QueryBidsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBidsResponse is response type for the Query/Bids RPC method +type QueryBidsResponse struct { + Bids []QueryBidResponse `protobuf:"bytes,1,rep,name=bids,proto3" json:"bids"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryBidsResponse) Reset() { *m = QueryBidsResponse{} } +func (m *QueryBidsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBidsResponse) ProtoMessage() {} +func (*QueryBidsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{5} +} +func (m *QueryBidsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidsResponse.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 *QueryBidsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidsResponse.Merge(m, src) +} +func (m *QueryBidsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBidsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidsResponse proto.InternalMessageInfo + +func (m *QueryBidsResponse) GetBids() []QueryBidResponse { + if m != nil { + return m.Bids + } + return nil +} + +func (m *QueryBidsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryBidRequest is request type for the Query/Bid RPC method +type QueryBidRequest struct { + ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryBidRequest) Reset() { *m = QueryBidRequest{} } +func (m *QueryBidRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBidRequest) ProtoMessage() {} +func (*QueryBidRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{6} +} +func (m *QueryBidRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidRequest.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 *QueryBidRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidRequest.Merge(m, src) +} +func (m *QueryBidRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBidRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidRequest proto.InternalMessageInfo + +func (m *QueryBidRequest) GetID() BidID { + if m != nil { + return m.ID + } + return BidID{} +} + +// QueryBidResponse is response type for the Query/Bid RPC method +type QueryBidResponse struct { + Bid Bid `protobuf:"bytes,1,opt,name=bid,proto3" json:"bid"` + EscrowAccount v1beta3.Account `protobuf:"bytes,2,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` +} + +func (m *QueryBidResponse) Reset() { *m = QueryBidResponse{} } +func (m *QueryBidResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBidResponse) ProtoMessage() {} +func (*QueryBidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{7} +} +func (m *QueryBidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBidResponse.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 *QueryBidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBidResponse.Merge(m, src) +} +func (m *QueryBidResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBidResponse proto.InternalMessageInfo + +func (m *QueryBidResponse) GetBid() Bid { + if m != nil { + return m.Bid + } + return Bid{} +} + +func (m *QueryBidResponse) GetEscrowAccount() v1beta3.Account { + if m != nil { + return m.EscrowAccount + } + return v1beta3.Account{} +} + +// QueryLeasesRequest is request type for the Query/Leases RPC method +type QueryLeasesRequest struct { + Filters LeaseFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryLeasesRequest) Reset() { *m = QueryLeasesRequest{} } +func (m *QueryLeasesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLeasesRequest) ProtoMessage() {} +func (*QueryLeasesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{8} +} +func (m *QueryLeasesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeasesRequest.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 *QueryLeasesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeasesRequest.Merge(m, src) +} +func (m *QueryLeasesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLeasesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeasesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeasesRequest proto.InternalMessageInfo + +func (m *QueryLeasesRequest) GetFilters() LeaseFilters { + if m != nil { + return m.Filters + } + return LeaseFilters{} +} + +func (m *QueryLeasesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryLeasesResponse is response type for the Query/Leases RPC method +type QueryLeasesResponse struct { + Leases []QueryLeaseResponse `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryLeasesResponse) Reset() { *m = QueryLeasesResponse{} } +func (m *QueryLeasesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLeasesResponse) ProtoMessage() {} +func (*QueryLeasesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{9} +} +func (m *QueryLeasesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeasesResponse.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 *QueryLeasesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeasesResponse.Merge(m, src) +} +func (m *QueryLeasesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLeasesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeasesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeasesResponse proto.InternalMessageInfo + +func (m *QueryLeasesResponse) GetLeases() []QueryLeaseResponse { + if m != nil { + return m.Leases + } + return nil +} + +func (m *QueryLeasesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryLeaseRequest is request type for the Query/Lease RPC method +type QueryLeaseRequest struct { + ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` +} + +func (m *QueryLeaseRequest) Reset() { *m = QueryLeaseRequest{} } +func (m *QueryLeaseRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLeaseRequest) ProtoMessage() {} +func (*QueryLeaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{10} +} +func (m *QueryLeaseRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeaseRequest.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 *QueryLeaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeaseRequest.Merge(m, src) +} +func (m *QueryLeaseRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLeaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeaseRequest proto.InternalMessageInfo + +func (m *QueryLeaseRequest) GetID() LeaseID { + if m != nil { + return m.ID + } + return LeaseID{} +} + +// QueryLeaseResponse is response type for the Query/Lease RPC method +type QueryLeaseResponse struct { + Lease Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease"` + EscrowPayment v1beta3.FractionalPayment `protobuf:"bytes,2,opt,name=escrow_payment,json=escrowPayment,proto3" json:"escrow_payment"` +} + +func (m *QueryLeaseResponse) Reset() { *m = QueryLeaseResponse{} } +func (m *QueryLeaseResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLeaseResponse) ProtoMessage() {} +func (*QueryLeaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0aae55c1068e12dc, []int{11} +} +func (m *QueryLeaseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLeaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLeaseResponse.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 *QueryLeaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLeaseResponse.Merge(m, src) +} +func (m *QueryLeaseResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLeaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLeaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLeaseResponse proto.InternalMessageInfo + +func (m *QueryLeaseResponse) GetLease() Lease { + if m != nil { + return m.Lease + } + return Lease{} +} + +func (m *QueryLeaseResponse) GetEscrowPayment() v1beta3.FractionalPayment { + if m != nil { + return m.EscrowPayment + } + return v1beta3.FractionalPayment{} +} + +func init() { + proto.RegisterType((*QueryOrdersRequest)(nil), "akash.market.v1beta3.QueryOrdersRequest") + proto.RegisterType((*QueryOrdersResponse)(nil), "akash.market.v1beta3.QueryOrdersResponse") + proto.RegisterType((*QueryOrderRequest)(nil), "akash.market.v1beta3.QueryOrderRequest") + proto.RegisterType((*QueryOrderResponse)(nil), "akash.market.v1beta3.QueryOrderResponse") + proto.RegisterType((*QueryBidsRequest)(nil), "akash.market.v1beta3.QueryBidsRequest") + proto.RegisterType((*QueryBidsResponse)(nil), "akash.market.v1beta3.QueryBidsResponse") + proto.RegisterType((*QueryBidRequest)(nil), "akash.market.v1beta3.QueryBidRequest") + proto.RegisterType((*QueryBidResponse)(nil), "akash.market.v1beta3.QueryBidResponse") + proto.RegisterType((*QueryLeasesRequest)(nil), "akash.market.v1beta3.QueryLeasesRequest") + proto.RegisterType((*QueryLeasesResponse)(nil), "akash.market.v1beta3.QueryLeasesResponse") + proto.RegisterType((*QueryLeaseRequest)(nil), "akash.market.v1beta3.QueryLeaseRequest") + proto.RegisterType((*QueryLeaseResponse)(nil), "akash.market.v1beta3.QueryLeaseResponse") +} + +func init() { proto.RegisterFile("akash/market/v1beta3/query.proto", fileDescriptor_0aae55c1068e12dc) } + +var fileDescriptor_0aae55c1068e12dc = []byte{ + // 795 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0x16, 0xa8, 0xc9, 0x10, 0x51, 0x47, 0x0e, 0x58, 0xb4, 0x85, 0x1a, 0x69, 0x31, 0x71, + 0x37, 0xc0, 0x81, 0x70, 0xc3, 0x95, 0xd4, 0x40, 0xfc, 0x81, 0xd5, 0x93, 0x17, 0x33, 0xdb, 0x1d, + 0x96, 0x09, 0xed, 0x4e, 0xd9, 0xd9, 0x4a, 0x38, 0x98, 0x18, 0x13, 0x13, 0x8f, 0x1a, 0xaf, 0xc6, + 0x98, 0x90, 0x78, 0xf0, 0xe2, 0xbf, 0xc1, 0x91, 0xc4, 0x8b, 0x27, 0x34, 0xc5, 0x3f, 0xc4, 0xcc, + 0x8f, 0xdd, 0x76, 0xc9, 0x76, 0x77, 0x49, 0xe0, 0xd6, 0xee, 0x7e, 0xef, 0xbd, 0xef, 0xbd, 0xf7, + 0xcd, 0xb7, 0x03, 0x66, 0xd0, 0x0e, 0x62, 0xdb, 0x46, 0x1b, 0x79, 0x3b, 0xd8, 0x37, 0x5e, 0x2f, + 0x58, 0xd8, 0x47, 0x4b, 0xc6, 0x6e, 0x17, 0x7b, 0xfb, 0x7a, 0xc7, 0xa3, 0x3e, 0x85, 0x93, 0x02, + 0xa1, 0x4b, 0x84, 0xae, 0x10, 0xc5, 0x49, 0x87, 0x3a, 0x54, 0x00, 0x0c, 0xfe, 0x4b, 0x62, 0x8b, + 0x37, 0x1d, 0x4a, 0x9d, 0x16, 0x36, 0x50, 0x87, 0x18, 0xc8, 0x75, 0xa9, 0x8f, 0x7c, 0x42, 0x5d, + 0xa6, 0xde, 0xde, 0x6d, 0x52, 0xd6, 0xa6, 0xcc, 0xb0, 0x10, 0xc3, 0xb2, 0x84, 0x2a, 0xb8, 0x60, + 0x74, 0x90, 0x43, 0x5c, 0x01, 0x56, 0xd8, 0x78, 0x5e, 0xd4, 0xb3, 0xb1, 0xa7, 0x10, 0xa5, 0x58, + 0x84, 0x45, 0xec, 0xc4, 0x0c, 0x2d, 0x8c, 0x18, 0x8e, 0x22, 0x30, 0x6b, 0x7a, 0x74, 0x2f, 0x44, + 0xf8, 0xfb, 0x1d, 0xac, 0x18, 0x57, 0xbe, 0x69, 0x00, 0x3e, 0xe3, 0x44, 0x9f, 0xf2, 0xc2, 0xac, + 0x81, 0x77, 0xbb, 0x98, 0xf9, 0xd0, 0x04, 0x97, 0xb6, 0x48, 0xcb, 0xc7, 0x1e, 0x9b, 0xd2, 0x66, + 0xb4, 0xda, 0xf8, 0x62, 0x45, 0x8f, 0x1b, 0x92, 0x2e, 0xa2, 0xea, 0x12, 0x69, 0x8e, 0x1e, 0x1e, + 0x97, 0x73, 0x8d, 0x20, 0x10, 0xd6, 0x01, 0xe8, 0x37, 0x3d, 0x95, 0x17, 0x69, 0xe6, 0x74, 0x39, + 0x21, 0x9d, 0x4f, 0x48, 0x97, 0x4b, 0x50, 0x13, 0xd2, 0x37, 0x91, 0x83, 0x55, 0xfd, 0xc6, 0x40, + 0x64, 0xe5, 0x40, 0x03, 0xd7, 0x23, 0x14, 0x59, 0x87, 0xba, 0x0c, 0xc3, 0x07, 0xa0, 0x20, 0xa6, + 0xc5, 0x29, 0x8e, 0xd4, 0xc6, 0x17, 0xa7, 0x13, 0x28, 0x9a, 0x13, 0x9c, 0xdb, 0x8f, 0x3f, 0xe5, + 0x82, 0x4a, 0xa2, 0x42, 0xe1, 0xc3, 0x18, 0x92, 0xd5, 0x54, 0x92, 0x92, 0x41, 0x84, 0xe5, 0x13, + 0x70, 0xad, 0x4f, 0x32, 0x18, 0xe3, 0x0a, 0xc8, 0x13, 0x5b, 0x4d, 0xf0, 0x56, 0x02, 0xbd, 0xf5, + 0x35, 0x13, 0x70, 0x82, 0xbd, 0xe3, 0x72, 0x7e, 0x7d, 0xad, 0x91, 0x27, 0x76, 0xe5, 0xf1, 0xe0, + 0x5e, 0xc2, 0x9e, 0x97, 0xc1, 0x98, 0x20, 0xae, 0x72, 0x26, 0xb6, 0x2c, 0xd7, 0x21, 0xf1, 0x95, + 0x2f, 0x1a, 0xb8, 0x2a, 0xf2, 0x99, 0xc4, 0x0e, 0xb7, 0xbc, 0x7a, 0x7a, 0xcb, 0x33, 0xf1, 0xf9, + 0x4c, 0x62, 0x5f, 0xf0, 0x8e, 0xbf, 0x6a, 0x6a, 0x7c, 0x92, 0x9e, 0xea, 0x76, 0x15, 0x8c, 0x5a, + 0xc4, 0x0e, 0xf6, 0x3b, 0x17, 0x4f, 0x2e, 0x08, 0x0b, 0xa2, 0x14, 0x45, 0x11, 0x79, 0x7e, 0xeb, + 0xdd, 0x00, 0x57, 0xfa, 0x85, 0xe4, 0xf4, 0x96, 0x07, 0x96, 0x3b, 0x3d, 0x74, 0x70, 0x31, 0xab, + 0xfd, 0x34, 0xb0, 0x8b, 0xb0, 0xd7, 0x05, 0x30, 0x62, 0x85, 0xe9, 0x6e, 0x0c, 0x4d, 0xa7, 0xba, + 0xe3, 0x58, 0xb8, 0x01, 0x26, 0xe4, 0xc9, 0x7e, 0x85, 0x9a, 0x4d, 0xda, 0x75, 0x7d, 0xd5, 0x60, + 0xa0, 0x34, 0xf9, 0x32, 0x8c, 0xbe, 0x2f, 0x41, 0x2a, 0xc3, 0x65, 0xf9, 0x56, 0x3d, 0xec, 0xfb, + 0xc0, 0x23, 0x6e, 0x1f, 0x67, 0xf6, 0x01, 0x11, 0x75, 0xc1, 0x1a, 0xf9, 0x1e, 0xf8, 0x40, 0x40, + 0x51, 0x4d, 0xae, 0x0e, 0x0a, 0xc2, 0xf3, 0x02, 0x9d, 0xd4, 0x12, 0x74, 0x22, 0x42, 0x4f, 0x29, + 0x45, 0x45, 0x9f, 0xbf, 0x15, 0xa8, 0x62, 0x99, 0xad, 0x40, 0xe0, 0x63, 0xf4, 0x72, 0x10, 0xd9, + 0xcd, 0xa0, 0x17, 0x08, 0xe6, 0xc9, 0x12, 0x14, 0x31, 0x81, 0x17, 0x08, 0x3c, 0x7c, 0x11, 0xea, + 0xa6, 0x83, 0xf6, 0xdb, 0x38, 0xd4, 0x4d, 0x35, 0x5e, 0x37, 0x75, 0x0f, 0x35, 0x79, 0x5f, 0xa8, + 0xb5, 0x29, 0xe1, 0x51, 0x05, 0xa9, 0x87, 0x8b, 0x3f, 0x0b, 0x60, 0x4c, 0xb0, 0x84, 0x1f, 0x34, + 0xa0, 0x6c, 0x16, 0x26, 0xed, 0x22, 0xf2, 0xc5, 0x29, 0xce, 0x67, 0x40, 0xca, 0xc6, 0x2b, 0xf3, + 0xef, 0x7e, 0xfd, 0xfb, 0x9c, 0xbf, 0x0d, 0x67, 0x8d, 0xe1, 0x9f, 0x50, 0x66, 0xb4, 0x08, 0xf3, + 0xe1, 0x7b, 0x0d, 0x8c, 0x89, 0x68, 0x58, 0x4d, 0xcb, 0x1f, 0x10, 0xa9, 0xa5, 0x03, 0xcf, 0xc4, + 0x83, 0xb8, 0x5b, 0x14, 0xbe, 0xd5, 0xc0, 0x28, 0xb7, 0x36, 0x98, 0x62, 0x62, 0xe1, 0x38, 0xaa, + 0xa9, 0x38, 0x45, 0xa2, 0x2a, 0x48, 0xcc, 0xc2, 0xb2, 0x31, 0xec, 0xb6, 0xa0, 0x46, 0xf1, 0x06, + 0x8c, 0x98, 0xc4, 0x86, 0x77, 0xd2, 0x5c, 0x54, 0xd6, 0xcf, 0x68, 0xb6, 0x99, 0xca, 0x8b, 0x09, + 0x70, 0x51, 0xc8, 0x83, 0x0b, 0x53, 0x0f, 0x68, 0x26, 0x51, 0x44, 0x5d, 0x20, 0x6d, 0x19, 0xf2, + 0x8c, 0xf7, 0x45, 0x21, 0xa2, 0x13, 0x45, 0x31, 0x78, 0x7a, 0x8b, 0x99, 0x3d, 0x25, 0x23, 0x0f, + 0x3e, 0x12, 0xf3, 0xf9, 0x61, 0xaf, 0xa4, 0x1d, 0xf5, 0x4a, 0xda, 0xdf, 0x5e, 0x49, 0xfb, 0x78, + 0x52, 0xca, 0x1d, 0x9d, 0x94, 0x72, 0xbf, 0x4f, 0x4a, 0xb9, 0x97, 0x2b, 0x0e, 0xf1, 0xb7, 0xbb, + 0x96, 0xde, 0xa4, 0x6d, 0x99, 0xe6, 0x9e, 0x8b, 0xfd, 0x3d, 0xea, 0xed, 0xa8, 0x7f, 0xfc, 0xf6, + 0xe9, 0x50, 0xc3, 0xa5, 0x36, 0x3e, 0x55, 0xc0, 0x2a, 0x88, 0x7b, 0xdd, 0xd2, 0xff, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x9f, 0x56, 0xf0, 0xe7, 0xf7, 0x0a, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Orders queries orders with filters + Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) + // Order queries order details + Order(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) + // Bids queries bids with filters + Bids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error) + // Bid queries bid details + Bid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) + // Leases queries leases with filters + Leases(ctx context.Context, in *QueryLeasesRequest, opts ...grpc.CallOption) (*QueryLeasesResponse, error) + // Lease queries lease details + Lease(ctx context.Context, in *QueryLeaseRequest, opts ...grpc.CallOption) (*QueryLeaseResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Orders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error) { + out := new(QueryOrdersResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Orders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Order(ctx context.Context, in *QueryOrderRequest, opts ...grpc.CallOption) (*QueryOrderResponse, error) { + out := new(QueryOrderResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Order", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bids(ctx context.Context, in *QueryBidsRequest, opts ...grpc.CallOption) (*QueryBidsResponse, error) { + out := new(QueryBidsResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Bids", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) { + out := new(QueryBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Bid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Leases(ctx context.Context, in *QueryLeasesRequest, opts ...grpc.CallOption) (*QueryLeasesResponse, error) { + out := new(QueryLeasesResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Leases", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Lease(ctx context.Context, in *QueryLeaseRequest, opts ...grpc.CallOption) (*QueryLeaseResponse, error) { + out := new(QueryLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Query/Lease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Orders queries orders with filters + Orders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error) + // Order queries order details + Order(context.Context, *QueryOrderRequest) (*QueryOrderResponse, error) + // Bids queries bids with filters + Bids(context.Context, *QueryBidsRequest) (*QueryBidsResponse, error) + // Bid queries bid details + Bid(context.Context, *QueryBidRequest) (*QueryBidResponse, error) + // Leases queries leases with filters + Leases(context.Context, *QueryLeasesRequest) (*QueryLeasesResponse, error) + // Lease queries lease details + Lease(context.Context, *QueryLeaseRequest) (*QueryLeaseResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Orders(ctx context.Context, req *QueryOrdersRequest) (*QueryOrdersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Orders not implemented") +} +func (*UnimplementedQueryServer) Order(ctx context.Context, req *QueryOrderRequest) (*QueryOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Order not implemented") +} +func (*UnimplementedQueryServer) Bids(ctx context.Context, req *QueryBidsRequest) (*QueryBidsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bids not implemented") +} +func (*UnimplementedQueryServer) Bid(ctx context.Context, req *QueryBidRequest) (*QueryBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bid not implemented") +} +func (*UnimplementedQueryServer) Leases(ctx context.Context, req *QueryLeasesRequest) (*QueryLeasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Leases not implemented") +} +func (*UnimplementedQueryServer) Lease(ctx context.Context, req *QueryLeaseRequest) (*QueryLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Lease not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Orders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOrdersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Orders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Orders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Orders(ctx, req.(*QueryOrdersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Order(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Order", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Order(ctx, req.(*QueryOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBidsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bids(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Bids", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bids(ctx, req.(*QueryBidsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBidRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Bid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bid(ctx, req.(*QueryBidRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Leases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLeasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Leases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Leases", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Leases(ctx, req.(*QueryLeasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Lease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Lease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Query/Lease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Lease(ctx, req.(*QueryLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.market.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Orders", + Handler: _Query_Orders_Handler, + }, + { + MethodName: "Order", + Handler: _Query_Order_Handler, + }, + { + MethodName: "Bids", + Handler: _Query_Bids_Handler, + }, + { + MethodName: "Bid", + Handler: _Query_Bid_Handler, + }, + { + MethodName: "Leases", + Handler: _Query_Leases_Handler, + }, + { + MethodName: "Lease", + Handler: _Query_Lease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/market/v1beta3/query.proto", +} + +func (m *QueryOrdersRequest) 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 *QueryOrdersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrdersRequest) 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 + } + { + size, err := m.Filters.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 *QueryOrdersResponse) 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 *QueryOrdersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrdersResponse) 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.Orders) > 0 { + for iNdEx := len(m.Orders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Orders[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 (m *QueryOrderRequest) 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 *QueryOrderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryOrderResponse) 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 *QueryOrderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Order.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 *QueryBidsRequest) 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 *QueryBidsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidsRequest) 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 + } + { + size, err := m.Filters.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 *QueryBidsResponse) 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 *QueryBidsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidsResponse) 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.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[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 (m *QueryBidRequest) 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 *QueryBidRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryBidResponse) 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 *QueryBidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + 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)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Bid.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 *QueryLeasesRequest) 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 *QueryLeasesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeasesRequest) 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 + } + { + size, err := m.Filters.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 *QueryLeasesResponse) 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 *QueryLeasesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeasesResponse) 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.Leases) > 0 { + for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leases[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 (m *QueryLeaseRequest) 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 *QueryLeaseRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeaseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ID.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 *QueryLeaseResponse) 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 *QueryLeaseResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLeaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.EscrowPayment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Lease.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 *QueryOrdersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOrdersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Orders) > 0 { + for _, e := range m.Orders { + 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 (m *QueryOrderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryOrderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Order.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBidsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBidsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bids) > 0 { + for _, e := range m.Bids { + 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 (m *QueryBidRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Bid.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EscrowAccount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryLeasesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Filters.Size() + n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLeasesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Leases) > 0 { + for _, e := range m.Leases { + 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 (m *QueryLeaseRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Lease.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.EscrowPayment.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryOrdersRequest) 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: QueryOrdersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrdersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryOrdersResponse) 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: QueryOrdersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrdersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Orders", 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.Orders = append(m.Orders, Order{}) + if err := m.Orders[len(m.Orders)-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) + } + 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.PageResponse{} + } + 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 *QueryOrderRequest) 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: QueryOrderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrderRequest: 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 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.ID.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 *QueryOrderResponse) 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: QueryOrderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOrderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", 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.Order.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 *QueryBidsRequest) 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: QueryBidsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryBidsResponse) 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: QueryBidsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", 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.Bids = append(m.Bids, QueryBidResponse{}) + if err := m.Bids[len(m.Bids)-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) + } + 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.PageResponse{} + } + 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 *QueryBidRequest) 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: QueryBidRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidRequest: 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 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.ID.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 *QueryBidResponse) 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: QueryBidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bid", 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.Bid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", 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.EscrowAccount.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 *QueryLeasesRequest) 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: QueryLeasesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeasesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", 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.Filters.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) + } + 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 *QueryLeasesResponse) 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: QueryLeasesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeasesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leases", 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.Leases = append(m.Leases, QueryLeaseResponse{}) + if err := m.Leases[len(m.Leases)-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) + } + 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.PageResponse{} + } + 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 *QueryLeaseRequest) 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: QueryLeaseRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeaseRequest: 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 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.ID.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 *QueryLeaseResponse) 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: QueryLeaseResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLeaseResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", 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.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowPayment", 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.EscrowPayment.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta3/query.pb.gw.go b/go/node/market/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..94d18612 --- /dev/null +++ b/go/node/market/v1beta3/query.pb.gw.go @@ -0,0 +1,586 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/market/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Orders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Orders_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrdersRequest + 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_Orders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Orders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Orders_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrdersRequest + 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_Orders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Orders(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Order_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrderRequest + 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_Order_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Order(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Order_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOrderRequest + 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_Order_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Order(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Bids_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Bids_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidsRequest + 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_Bids_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Bids(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bids_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidsRequest + 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_Bids_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Bids(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Bid_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Bid_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidRequest + 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_Bid_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Bid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bid_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBidRequest + 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_Bid_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Bid(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Leases_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Leases_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeasesRequest + 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_Leases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Leases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Leases_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeasesRequest + 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_Leases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Leases(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Lease_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Lease_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeaseRequest + 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_Lease_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Lease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Lease_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLeaseRequest + 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_Lease_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Lease(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Orders_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_Orders_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_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Order_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_Order_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_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bids_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_Bids_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_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bid_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_Bid_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_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Leases_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_Leases_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_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Lease_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_Lease_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_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Orders_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_Orders_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_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Order_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_Order_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_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bids_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_Bids_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_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bid_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_Bid_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_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Leases_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_Leases_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_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Lease_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_Lease_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_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "info"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Orders_0 = runtime.ForwardResponseMessage + + forward_Query_Order_0 = runtime.ForwardResponseMessage + + forward_Query_Bids_0 = runtime.ForwardResponseMessage + + forward_Query_Bid_0 = runtime.ForwardResponseMessage + + forward_Query_Leases_0 = runtime.ForwardResponseMessage + + forward_Query_Lease_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/market/v1beta3/service.pb.go b/go/node/market/v1beta3/service.pb.go new file mode 100644 index 00000000..d29c704e --- /dev/null +++ b/go/node/market/v1beta3/service.pb.go @@ -0,0 +1,287 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta3/service.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// 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 + +func init() { + proto.RegisterFile("akash/market/v1beta3/service.proto", fileDescriptor_0637a2f85fdb6b87) +} + +var fileDescriptor_0637a2f85fdb6b87 = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd6, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x92, 0xc3, 0xaa, 0x33, 0x29, 0x33, 0x05, + 0xa2, 0x4b, 0x4a, 0x01, 0xab, 0x7c, 0x4e, 0x6a, 0x62, 0x31, 0xd4, 0x5c, 0xa3, 0x17, 0xcc, 0x5c, + 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0xd1, 0x5c, 0x9c, 0xce, 0x45, 0xa9, 0x89, 0x25, 0xa9, 0x4e, 0x99, + 0x29, 0x42, 0x4a, 0x7a, 0xd8, 0x6c, 0xd3, 0xf3, 0x2d, 0x4e, 0x87, 0xab, 0x91, 0xd2, 0x22, 0xac, + 0x26, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0x28, 0x82, 0x8b, 0xc3, 0x39, 0x27, 0xbf, + 0x18, 0x6c, 0xb6, 0x22, 0x6e, 0x7d, 0x50, 0x25, 0x52, 0x9a, 0x04, 0x95, 0xc0, 0x4d, 0x4e, 0xe7, + 0xe2, 0x0d, 0xcf, 0x2c, 0xc9, 0x48, 0x29, 0x4a, 0x2c, 0xf7, 0x01, 0xf9, 0x4a, 0x48, 0x0d, 0xa7, + 0x5e, 0x14, 0x75, 0x52, 0x7a, 0xc4, 0xa9, 0x83, 0x5b, 0x94, 0xc8, 0xc5, 0x0d, 0xf1, 0x17, 0xc4, + 0x1a, 0x15, 0x02, 0xbe, 0x87, 0x58, 0xa2, 0x43, 0x8c, 0x2a, 0xb8, 0x15, 0x71, 0x5c, 0x5c, 0x60, + 0xff, 0x41, 0x6c, 0x50, 0xc6, 0x1f, 0x08, 0x10, 0x0b, 0xb4, 0x89, 0x50, 0x04, 0x33, 0xdf, 0x29, + 0xf8, 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, 0x2c, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0x06, 0xea, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, + 0x65, 0x43, 0x79, 0x89, 0x05, 0x99, 0xfa, 0xe9, 0xf9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0x68, 0x69, + 0x29, 0x89, 0x0d, 0x9c, 0x8c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x0e, 0xeb, 0xba, + 0xc4, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateBid defines a method to create a bid given proper inputs. + CreateBid(ctx context.Context, in *MsgCreateBid, opts ...grpc.CallOption) (*MsgCreateBidResponse, error) + // CloseBid defines a method to close a bid given proper inputs. + CloseBid(ctx context.Context, in *MsgCloseBid, opts ...grpc.CallOption) (*MsgCloseBidResponse, error) + // WithdrawLease withdraws accrued funds from the lease payment + WithdrawLease(ctx context.Context, in *MsgWithdrawLease, opts ...grpc.CallOption) (*MsgWithdrawLeaseResponse, error) + // CreateLease creates a new lease + CreateLease(ctx context.Context, in *MsgCreateLease, opts ...grpc.CallOption) (*MsgCreateLeaseResponse, error) + // CloseLease defines a method to close an order given proper inputs. + CloseLease(ctx context.Context, in *MsgCloseLease, opts ...grpc.CallOption) (*MsgCloseLeaseResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateBid(ctx context.Context, in *MsgCreateBid, opts ...grpc.CallOption) (*MsgCreateBidResponse, error) { + out := new(MsgCreateBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Msg/CreateBid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseBid(ctx context.Context, in *MsgCloseBid, opts ...grpc.CallOption) (*MsgCloseBidResponse, error) { + out := new(MsgCloseBidResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Msg/CloseBid", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawLease(ctx context.Context, in *MsgWithdrawLease, opts ...grpc.CallOption) (*MsgWithdrawLeaseResponse, error) { + out := new(MsgWithdrawLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Msg/WithdrawLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CreateLease(ctx context.Context, in *MsgCreateLease, opts ...grpc.CallOption) (*MsgCreateLeaseResponse, error) { + out := new(MsgCreateLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Msg/CreateLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CloseLease(ctx context.Context, in *MsgCloseLease, opts ...grpc.CallOption) (*MsgCloseLeaseResponse, error) { + out := new(MsgCloseLeaseResponse) + err := c.cc.Invoke(ctx, "/akash.market.v1beta3.Msg/CloseLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateBid defines a method to create a bid given proper inputs. + CreateBid(context.Context, *MsgCreateBid) (*MsgCreateBidResponse, error) + // CloseBid defines a method to close a bid given proper inputs. + CloseBid(context.Context, *MsgCloseBid) (*MsgCloseBidResponse, error) + // WithdrawLease withdraws accrued funds from the lease payment + WithdrawLease(context.Context, *MsgWithdrawLease) (*MsgWithdrawLeaseResponse, error) + // CreateLease creates a new lease + CreateLease(context.Context, *MsgCreateLease) (*MsgCreateLeaseResponse, error) + // CloseLease defines a method to close an order given proper inputs. + CloseLease(context.Context, *MsgCloseLease) (*MsgCloseLeaseResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateBid(ctx context.Context, req *MsgCreateBid) (*MsgCreateBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBid not implemented") +} +func (*UnimplementedMsgServer) CloseBid(ctx context.Context, req *MsgCloseBid) (*MsgCloseBidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseBid not implemented") +} +func (*UnimplementedMsgServer) WithdrawLease(ctx context.Context, req *MsgWithdrawLease) (*MsgWithdrawLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawLease not implemented") +} +func (*UnimplementedMsgServer) CreateLease(ctx context.Context, req *MsgCreateLease) (*MsgCreateLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLease not implemented") +} +func (*UnimplementedMsgServer) CloseLease(ctx context.Context, req *MsgCloseLease) (*MsgCloseLeaseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseLease not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBid) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Msg/CreateBid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBid(ctx, req.(*MsgCreateBid)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseBid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseBid) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseBid(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Msg/CloseBid", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseBid(ctx, req.(*MsgCloseBid)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Msg/WithdrawLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawLease(ctx, req.(*MsgWithdrawLease)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CreateLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Msg/CreateLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateLease(ctx, req.(*MsgCreateLease)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CloseLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCloseLease) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CloseLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.market.v1beta3.Msg/CloseLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CloseLease(ctx, req.(*MsgCloseLease)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.market.v1beta3.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBid", + Handler: _Msg_CreateBid_Handler, + }, + { + MethodName: "CloseBid", + Handler: _Msg_CloseBid_Handler, + }, + { + MethodName: "WithdrawLease", + Handler: _Msg_WithdrawLease_Handler, + }, + { + MethodName: "CreateLease", + Handler: _Msg_CreateLease_Handler, + }, + { + MethodName: "CloseLease", + Handler: _Msg_CloseLease_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/market/v1beta3/service.proto", +} diff --git a/go/node/market/v1beta3/types.go b/go/node/market/v1beta3/types.go new file mode 100644 index 00000000..b67ea4e6 --- /dev/null +++ b/go/node/market/v1beta3/types.go @@ -0,0 +1,241 @@ +package v1beta3 + +import ( + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" + + atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" + + "gopkg.in/yaml.v3" +) + +// ID method returns OrderID details of specific order +func (o Order) ID() OrderID { + return o.OrderID +} + +// String implements the Stringer interface for a Order object. +func (o Order) String() string { + out, _ := yaml.Marshal(o) + return string(out) +} + +// Orders is a collection of Order +type Orders []Order + +// String implements the Stringer interface for a Orders object. +func (o Orders) String() string { + var out string + for _, order := range o { + out += order.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// ValidateCanBid method validates whether order is open or not and +// returns error if not +func (o Order) ValidateCanBid() error { + switch o.State { + case OrderOpen: + return nil + case OrderActive: + return ErrOrderActive + default: + return ErrOrderClosed + } +} + +// ValidateInactive method validates whether order is open or not and +// returns error if not +func (o Order) ValidateInactive() error { + switch o.State { + case OrderClosed: + return nil + case OrderActive: + return ErrOrderActive + default: + return ErrOrderClosed + } +} + +// Price method returns price of specific order +func (o Order) Price() sdk.DecCoin { + return o.Spec.Price() +} + +// MatchAttributes method compares provided attributes with specific order attributes +func (o Order) MatchAttributes(attrs []types.Attribute) bool { + return o.Spec.MatchAttributes(attrs) +} + +// MatchRequirements method compares provided attributes with specific order attributes +func (o Order) MatchRequirements(prov []atypes.Provider) bool { + return o.Spec.MatchRequirements(prov) +} + +// MatchResourcesRequirements method compares provider capabilities with specific order resources attributes +func (o Order) MatchResourcesRequirements(attr types.Attributes) bool { + return o.Spec.MatchResourcesRequirements(attr) +} + +// Accept returns whether order filters valid or not +func (filters OrderFilters) Accept(obj Order, stateVal Order_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.OrderID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.OrderID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.OrderID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.OrderID.OSeq { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +// ID method returns BidID details of specific bid +func (obj Bid) ID() BidID { + return obj.BidID +} + +// String implements the Stringer interface for a Bid object. +func (obj Bid) String() string { + out, _ := yaml.Marshal(obj) + return string(out) +} + +// Bids is a collection of Bid +type Bids []Bid + +// String implements the Stringer interface for a Bids object. +func (b Bids) String() string { + var out string + for _, bid := range b { + out += bid.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// Accept returns whether bid filters valid or not +func (filters BidFilters) Accept(obj Bid, stateVal Bid_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.BidID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.BidID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.BidID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.BidID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != obj.BidID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +// ID method returns LeaseID details of specific lease +func (obj Lease) ID() LeaseID { + return obj.LeaseID +} + +// String implements the Stringer interface for a Lease object. +func (obj Lease) String() string { + out, _ := yaml.Marshal(obj) + return string(out) +} + +// Leases is a collection of Lease +type Leases []Lease + +// String implements the Stringer interface for a Leases object. +func (l Leases) String() string { + var out string + for _, order := range l { + out += order.String() + "\n" + } + + return strings.TrimSpace(out) +} + +// Accept returns whether lease filters valid or not +func (filters LeaseFilters) Accept(obj Lease, stateVal Lease_State) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.LeaseID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.LeaseID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.LeaseID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.LeaseID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != obj.LeaseID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} + +func (m QueryLeasesResponse) TotalPriceAmount() sdk.Dec { + total := sdk.NewDec(0) + + for _, lease := range m.Leases { + total = total.Add(lease.Lease.Price.Amount) + } + + return total +} diff --git a/go/node/provider/v1beta1/provider.pb.go b/go/node/provider/v1beta1/provider.pb.go new file mode 100644 index 00000000..60ff694e --- /dev/null +++ b/go/node/provider/v1beta1/provider.pb.go @@ -0,0 +1,2102 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta1/provider.proto + +package v1beta1 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta1 "github.com/akash-network/akash-api/go/node/types/v1beta1" + v1beta1 "github.com/akash-network/akash-api/go/node/types/v1beta1" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// ProviderInfo +type ProviderInfo struct { + EMail string `protobuf:"bytes,1,opt,name=email,proto3" json:"email" yaml:"email"` + Website string `protobuf:"bytes,2,opt,name=website,proto3" json:"website" yaml:"website"` +} + +func (m *ProviderInfo) Reset() { *m = ProviderInfo{} } +func (m *ProviderInfo) String() string { return proto.CompactTextString(m) } +func (*ProviderInfo) ProtoMessage() {} +func (*ProviderInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{0} +} +func (m *ProviderInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProviderInfo.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 *ProviderInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderInfo.Merge(m, src) +} +func (m *ProviderInfo) XXX_Size() int { + return m.Size() +} +func (m *ProviderInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderInfo proto.InternalMessageInfo + +func (m *ProviderInfo) GetEMail() string { + if m != nil { + return m.EMail + } + return "" +} + +func (m *ProviderInfo) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +// MsgCreateProvider defines an SDK message for creating a provider +type MsgCreateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgCreateProvider) Reset() { *m = MsgCreateProvider{} } +func (m *MsgCreateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProvider) ProtoMessage() {} +func (*MsgCreateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{1} +} +func (m *MsgCreateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProvider.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 *MsgCreateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProvider.Merge(m, src) +} +func (m *MsgCreateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProvider proto.InternalMessageInfo + +func (m *MsgCreateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgCreateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgCreateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgCreateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +type MsgCreateProviderResponse struct { +} + +func (m *MsgCreateProviderResponse) Reset() { *m = MsgCreateProviderResponse{} } +func (m *MsgCreateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProviderResponse) ProtoMessage() {} +func (*MsgCreateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{2} +} +func (m *MsgCreateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProviderResponse.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 *MsgCreateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProviderResponse.Merge(m, src) +} +func (m *MsgCreateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProviderResponse proto.InternalMessageInfo + +// MsgUpdateProvider defines an SDK message for updating a provider +type MsgUpdateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgUpdateProvider) Reset() { *m = MsgUpdateProvider{} } +func (m *MsgUpdateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProvider) ProtoMessage() {} +func (*MsgUpdateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{3} +} +func (m *MsgUpdateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProvider.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 *MsgUpdateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProvider.Merge(m, src) +} +func (m *MsgUpdateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProvider proto.InternalMessageInfo + +func (m *MsgUpdateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgUpdateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgUpdateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgUpdateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +type MsgUpdateProviderResponse struct { +} + +func (m *MsgUpdateProviderResponse) Reset() { *m = MsgUpdateProviderResponse{} } +func (m *MsgUpdateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProviderResponse) ProtoMessage() {} +func (*MsgUpdateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{4} +} +func (m *MsgUpdateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProviderResponse.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 *MsgUpdateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProviderResponse.Merge(m, src) +} +func (m *MsgUpdateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProviderResponse proto.InternalMessageInfo + +// MsgDeleteProvider defines an SDK message for deleting a provider +type MsgDeleteProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` +} + +func (m *MsgDeleteProvider) Reset() { *m = MsgDeleteProvider{} } +func (m *MsgDeleteProvider) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProvider) ProtoMessage() {} +func (*MsgDeleteProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{5} +} +func (m *MsgDeleteProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProvider.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 *MsgDeleteProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProvider.Merge(m, src) +} +func (m *MsgDeleteProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProvider proto.InternalMessageInfo + +func (m *MsgDeleteProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +type MsgDeleteProviderResponse struct { +} + +func (m *MsgDeleteProviderResponse) Reset() { *m = MsgDeleteProviderResponse{} } +func (m *MsgDeleteProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderResponse) ProtoMessage() {} +func (*MsgDeleteProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{6} +} +func (m *MsgDeleteProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderResponse.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 *MsgDeleteProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderResponse.Merge(m, src) +} +func (m *MsgDeleteProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderResponse proto.InternalMessageInfo + +// Provider stores owner and host details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_12a8109840398be6, []int{7} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Provider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +func init() { + proto.RegisterType((*ProviderInfo)(nil), "akash.provider.v1beta1.ProviderInfo") + proto.RegisterType((*MsgCreateProvider)(nil), "akash.provider.v1beta1.MsgCreateProvider") + proto.RegisterType((*MsgCreateProviderResponse)(nil), "akash.provider.v1beta1.MsgCreateProviderResponse") + proto.RegisterType((*MsgUpdateProvider)(nil), "akash.provider.v1beta1.MsgUpdateProvider") + proto.RegisterType((*MsgUpdateProviderResponse)(nil), "akash.provider.v1beta1.MsgUpdateProviderResponse") + proto.RegisterType((*MsgDeleteProvider)(nil), "akash.provider.v1beta1.MsgDeleteProvider") + proto.RegisterType((*MsgDeleteProviderResponse)(nil), "akash.provider.v1beta1.MsgDeleteProviderResponse") + proto.RegisterType((*Provider)(nil), "akash.provider.v1beta1.Provider") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta1/provider.proto", fileDescriptor_12a8109840398be6) +} + +var fileDescriptor_12a8109840398be6 = []byte{ + // 577 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xb1, 0x6b, 0xdb, 0x4e, + 0x18, 0x95, 0x62, 0xfb, 0x67, 0xff, 0xce, 0x21, 0x25, 0xa2, 0x14, 0xc7, 0x21, 0x3a, 0x73, 0xb4, + 0xe0, 0x16, 0x2a, 0x61, 0x77, 0x68, 0x49, 0xa7, 0x3a, 0x0d, 0x34, 0x05, 0x43, 0x11, 0x78, 0xe9, + 0x52, 0xa4, 0xfa, 0x22, 0x8b, 0xd8, 0x3a, 0xa1, 0x3b, 0xc7, 0x64, 0xec, 0x7f, 0x50, 0xe8, 0x92, + 0x31, 0x73, 0xa1, 0xff, 0x47, 0xc6, 0x2c, 0x85, 0x4e, 0xd7, 0x62, 0x2f, 0xc5, 0xa3, 0xff, 0x82, + 0xa2, 0x3b, 0x49, 0xb1, 0x6c, 0xd7, 0xb4, 0x74, 0xc9, 0x90, 0x4d, 0xf7, 0xee, 0x7d, 0xdf, 0xfb, + 0xf8, 0xde, 0xe3, 0x6c, 0xf0, 0xc0, 0x3e, 0xb1, 0x69, 0xcf, 0x0c, 0x42, 0x72, 0xea, 0x75, 0x71, + 0x68, 0x9e, 0x36, 0x1c, 0xcc, 0xec, 0x46, 0x0a, 0x18, 0x41, 0x48, 0x18, 0xd1, 0xee, 0x09, 0x9a, + 0x91, 0xa2, 0x31, 0xad, 0x7a, 0xd7, 0x25, 0x2e, 0x11, 0x14, 0x33, 0xfa, 0x92, 0xec, 0x2a, 0x92, + 0x4d, 0x1d, 0x9b, 0xe2, 0xb4, 0xa1, 0xcd, 0x58, 0xe8, 0x39, 0x43, 0x86, 0x25, 0x07, 0x7d, 0x50, + 0xc1, 0xe6, 0x9b, 0xb8, 0xdd, 0x91, 0x7f, 0x4c, 0xb4, 0x67, 0xa0, 0x80, 0x07, 0xb6, 0xd7, 0xaf, + 0xa8, 0x35, 0xb5, 0xfe, 0x7f, 0x0b, 0x8d, 0x39, 0x2c, 0x1c, 0xb6, 0x6d, 0xaf, 0x3f, 0xe5, 0x50, + 0xde, 0xcc, 0x38, 0xdc, 0x3c, 0xb3, 0x07, 0xfd, 0x7d, 0x24, 0x8e, 0xc8, 0x92, 0xb0, 0xf6, 0x14, + 0x14, 0x47, 0xd8, 0xa1, 0x1e, 0xc3, 0x95, 0x0d, 0x51, 0xbb, 0x37, 0xe5, 0x30, 0x81, 0x66, 0x1c, + 0x6e, 0xc9, 0xa2, 0x18, 0x40, 0x56, 0x72, 0x85, 0xce, 0x73, 0x60, 0xbb, 0x4d, 0xdd, 0x83, 0x10, + 0xdb, 0x0c, 0x27, 0xc3, 0x68, 0x26, 0x28, 0x90, 0x91, 0x8f, 0xc3, 0x78, 0x90, 0x9d, 0x48, 0x5f, + 0x00, 0xd7, 0xfa, 0xe2, 0x88, 0x2c, 0x09, 0x6b, 0x87, 0xa0, 0xd4, 0x23, 0x94, 0xbd, 0x1b, 0x86, + 0x5e, 0x3c, 0xc0, 0xa3, 0x31, 0x87, 0xc5, 0x57, 0x84, 0xb2, 0x8e, 0x75, 0x34, 0xe5, 0x30, 0xbd, + 0x9e, 0x71, 0x78, 0x47, 0x76, 0x48, 0x10, 0x64, 0x15, 0xa3, 0xcf, 0x4e, 0xe8, 0x69, 0x5f, 0x54, + 0x00, 0xd2, 0x2d, 0xd1, 0x4a, 0xae, 0x96, 0xab, 0x97, 0x9b, 0x7b, 0x86, 0xdc, 0x7c, 0xb4, 0xcb, + 0x64, 0xeb, 0xc6, 0x8b, 0x84, 0xd5, 0xf2, 0x2f, 0x39, 0x54, 0xa6, 0x1c, 0xce, 0x15, 0xce, 0x38, + 0xdc, 0x96, 0x1a, 0xd7, 0x18, 0xfa, 0xfc, 0x1d, 0x1e, 0xb8, 0x1e, 0xeb, 0x0d, 0x1d, 0xe3, 0x3d, + 0x19, 0x98, 0xa2, 0xe7, 0x63, 0x1f, 0xb3, 0x11, 0x09, 0x4f, 0xe2, 0x93, 0x1d, 0x78, 0xa6, 0x4b, + 0x4c, 0x9f, 0x74, 0xb1, 0xc9, 0xce, 0x02, 0x4c, 0xcd, 0x25, 0x39, 0x6a, 0xcd, 0xe9, 0x68, 0x1d, + 0x90, 0xf7, 0xfc, 0x63, 0x52, 0xc9, 0xd7, 0xd4, 0x7a, 0xb9, 0x79, 0xdf, 0x58, 0x1d, 0x11, 0x63, + 0xde, 0xe4, 0xd6, 0x6e, 0x3c, 0xaf, 0xa8, 0x9c, 0x71, 0x58, 0x96, 0x93, 0x46, 0x27, 0x64, 0x09, + 0x70, 0x3f, 0xff, 0xf3, 0x02, 0x2a, 0x68, 0x17, 0xec, 0x2c, 0x39, 0x63, 0x61, 0x1a, 0x10, 0x9f, + 0xa6, 0xbe, 0x75, 0x82, 0xee, 0xad, 0x6f, 0x37, 0xd2, 0xb7, 0xac, 0x33, 0xa9, 0x6f, 0xaf, 0x85, + 0x6d, 0x2f, 0x71, 0x1f, 0xff, 0x83, 0x6d, 0x19, 0xa1, 0x6c, 0xaf, 0x54, 0xe8, 0x53, 0x0e, 0x94, + 0x6e, 0x73, 0x71, 0x33, 0x72, 0x51, 0x3a, 0xbf, 0x80, 0x4a, 0x64, 0x59, 0xf3, 0xeb, 0x06, 0xc8, + 0xb5, 0xa9, 0xab, 0xf9, 0x60, 0x6b, 0xe1, 0xc9, 0x7d, 0xf8, 0x3b, 0xb1, 0xa5, 0x37, 0xa0, 0xda, + 0xf8, 0x63, 0x6a, 0x92, 0x86, 0x48, 0x6f, 0xe1, 0xa9, 0x58, 0xa7, 0x97, 0xa5, 0xae, 0xd5, 0x5b, + 0x1d, 0xf3, 0x48, 0x6f, 0x21, 0xe3, 0xeb, 0xf4, 0xb2, 0xd4, 0xb5, 0x7a, 0xab, 0xd3, 0xde, 0xea, + 0x5c, 0x8e, 0x75, 0xf5, 0x6a, 0xac, 0xab, 0x3f, 0xc6, 0xba, 0xfa, 0x71, 0xa2, 0x2b, 0x57, 0x13, + 0x5d, 0xf9, 0x36, 0xd1, 0x95, 0xb7, 0xcf, 0xff, 0x22, 0x23, 0x8b, 0x7f, 0x01, 0x9c, 0xff, 0xc4, + 0x0f, 0xf5, 0x93, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xf6, 0x77, 0x26, 0x23, 0x08, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) { + out := new(MsgCreateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta1.Msg/CreateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) { + out := new(MsgUpdateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta1.Msg/UpdateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) { + out := new(MsgDeleteProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta1.Msg/DeleteProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(context.Context, *MsgCreateProvider) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(context.Context, *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(context.Context, *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateProvider(ctx context.Context, req *MsgCreateProvider) (*MsgCreateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProvider not implemented") +} +func (*UnimplementedMsgServer) UpdateProvider(ctx context.Context, req *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProvider not implemented") +} +func (*UnimplementedMsgServer) DeleteProvider(ctx context.Context, req *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProvider not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta1.Msg/CreateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateProvider(ctx, req.(*MsgCreateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta1.Msg/UpdateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateProvider(ctx, req.(*MsgUpdateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta1.Msg/DeleteProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProvider(ctx, req.(*MsgDeleteProvider)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.provider.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateProvider", + Handler: _Msg_CreateProvider_Handler, + }, + { + MethodName: "UpdateProvider", + Handler: _Msg_UpdateProvider_Handler, + }, + { + MethodName: "DeleteProvider", + Handler: _Msg_DeleteProvider_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/provider/v1beta1/provider.proto", +} + +func (m *ProviderInfo) 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 *ProviderInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x12 + } + if len(m.EMail) > 0 { + i -= len(m.EMail) + copy(dAtA[i:], m.EMail) + i = encodeVarintProvider(dAtA, i, uint64(len(m.EMail))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProvider) 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 *MsgCreateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProviderResponse) 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 *MsgCreateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProvider) 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 *MsgUpdateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProviderResponse) 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 *MsgUpdateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProvider) 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 *MsgDeleteProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderResponse) 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 *MsgDeleteProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProvider(dAtA []byte, offset int, v uint64) int { + offset -= sovProvider(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProviderInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EMail) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgCreateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgCreateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgUpdateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgDeleteProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func sovProvider(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProvider(x uint64) (n int) { + return sovProvider(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProviderInfo) 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 ErrIntOverflowProvider + } + 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: ProviderInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProviderInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EMail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EMail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProvider) 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 ErrIntOverflowProvider + } + 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: MsgCreateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgCreateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProvider) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProvider) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Provider) 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 ErrIntOverflowProvider + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProvider(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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrInvalidLengthProvider + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProvider + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProvider + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProvider = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProvider = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProvider = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta2/codec.go b/go/node/provider/v1beta2/codec.go new file mode 100644 index 00000000..b1ea5f2a --- /dev/null +++ b/go/node/provider/v1beta2/codec.go @@ -0,0 +1,45 @@ +package v1beta2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateProvider{}, ModuleName+"/"+MsgTypeCreateProvider, nil) + cdc.RegisterConcrete(&MsgUpdateProvider{}, ModuleName+"/"+MsgTypeUpdateProvider, nil) + cdc.RegisterConcrete(&MsgDeleteProvider{}, ModuleName+"/"+MsgTypeDeleteProvider, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateProvider{}, + &MsgUpdateProvider{}, + &MsgDeleteProvider{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/provider/v1beta2/errors.go b/go/node/provider/v1beta2/errors.go new file mode 100644 index 00000000..e6c5c66b --- /dev/null +++ b/go/node/provider/v1beta2/errors.go @@ -0,0 +1,31 @@ +package v1beta2 + +import ( + "errors" +) + +var ( + // ErrInvalidProviderURI register error code for invalid provider uri + ErrInvalidProviderURI = errors.New("invalid provider: invalid host uri") + + // ErrNotAbsProviderURI register error code for not absolute provider uri + ErrNotAbsProviderURI = errors.New("invalid provider: not absolute host uri") + + // ErrProviderNotFound provider not found + ErrProviderNotFound = errors.New("invalid provider: address not found") + + // ErrProviderExists provider already exists + ErrProviderExists = errors.New("invalid provider: already exists") + + // ErrInvalidAddress invalid provider address + ErrInvalidAddress = errors.New("invalid address") + + // ErrAttributes error code for provider attribute problems + ErrAttributes = errors.New("attribute specification error") + + // ErrIncompatibleAttributes error code for attributes update + ErrIncompatibleAttributes = errors.New("attributes cannot be changed") + + // ErrInvalidInfoWebsite register error code for invalid info website + ErrInvalidInfoWebsite = errors.New("invalid provider: invalid info website") +) diff --git a/go/node/provider/v1beta2/event.go b/go/node/provider/v1beta2/event.go new file mode 100644 index 00000000..87519f4e --- /dev/null +++ b/go/node/provider/v1beta2/event.go @@ -0,0 +1,141 @@ +package v1beta2 + +import ( + "github.com/akash-network/node/sdkutil" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + EvActionProviderCreated = "provider-created" + EvActionProviderUpdated = "provider-updated" + EvActionProviderDeleted = "provider-deleted" + EvOwnerKey = "owner" +) + +// EventProviderCreated struct +type EventProviderCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderCreated(owner sdk.AccAddress) EventProviderCreated { + return EventProviderCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderCreated, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventProviderCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderCreated), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// EventProviderUpdated struct +type EventProviderUpdated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderUpdated(owner sdk.AccAddress) EventProviderUpdated { + return EventProviderUpdated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderUpdated, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderUpdated struct +func (ev EventProviderUpdated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderUpdated), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// EventProviderDeleted struct +type EventProviderDeleted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderDeleted(owner sdk.AccAddress) EventProviderDeleted { + return EventProviderDeleted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderDeleted, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderDeleted struct +func (ev EventProviderDeleted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderDeleted), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// ProviderEVAttributes returns event attribues for given Provider +func ProviderEVAttributes(owner sdk.AccAddress) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(EvOwnerKey, owner.String()), + } +} + +// ParseEVProvider returns provider details for given event attributes +func ParseEVProvider(attrs []sdk.Attribute) (sdk.AccAddress, error) { + owner, err := sdkutil.GetAccAddress(attrs, EvOwnerKey) + if err != nil { + return sdk.AccAddress{}, err + } + + return owner, nil +} + +// ParseEvent parses event and returns details of event and error if occurred +// TODO: Enable returning actual events. +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case EvActionProviderCreated: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderCreated(owner), nil + case EvActionProviderUpdated: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderUpdated(owner), nil + case EvActionProviderDeleted: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderDeleted(owner), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/provider/v1beta2/genesis.pb.go b/go/node/provider/v1beta2/genesis.pb.go new file mode 100644 index 00000000..3e66b6cd --- /dev/null +++ b/go/node/provider/v1beta2/genesis.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta2/genesis.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by provider module +type GenesisState struct { + Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers" yaml:"providers"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_d89e94590927be88, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetProviders() []Provider { + if m != nil { + return m.Providers + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.provider.v1beta2.GenesisState") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta2/genesis.proto", fileDescriptor_d89e94590927be88) +} + +var fileDescriptor_d89e94590927be88 = []byte{ + // 226 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, + 0x49, 0x34, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x03, 0xab, 0xd2, 0x83, 0xa9, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x54, 0x71, 0x98, 0x09, 0xd7, 0x0e, 0x56, 0xa6, + 0x54, 0xca, 0xc5, 0xe3, 0x0e, 0xb1, 0x25, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x28, 0x95, 0x8b, 0x13, + 0xa6, 0xa2, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xbb, 0xc5, 0x7a, 0x01, + 0x50, 0x01, 0x27, 0xd5, 0x13, 0xf7, 0xe4, 0x19, 0x5e, 0xdd, 0x93, 0x47, 0x68, 0xfd, 0x74, 0x4f, + 0x5e, 0xa0, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x2e, 0xa4, 0x14, 0x84, 0x90, 0x76, 0x0a, 0x3d, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, + 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xeb, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, + 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xbd, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, + 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x86, 0xe7, 0x92, + 0xd8, 0xc0, 0x9e, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x1d, 0x93, 0x13, 0x51, 0x01, + 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta2/key.go b/go/node/provider/v1beta2/key.go new file mode 100644 index 00000000..93b959b0 --- /dev/null +++ b/go/node/provider/v1beta2/key.go @@ -0,0 +1,12 @@ +package v1beta2 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "provider" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) diff --git a/go/node/provider/v1beta2/msgs.go b/go/node/provider/v1beta2/msgs.go new file mode 100644 index 00000000..fcc29ece --- /dev/null +++ b/go/node/provider/v1beta2/msgs.go @@ -0,0 +1,175 @@ +package v1beta2 + +import ( + "net/url" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pkg/errors" + + types "github.com/akash-network/node/types/v1beta2" +) + +const ( + MsgTypeCreateProvider = "create-provider" + MsgTypeUpdateProvider = "update-provider" + MsgTypeDeleteProvider = "delete-provider" +) + +var ( + _, _, _ sdk.Msg = &MsgCreateProvider{}, &MsgUpdateProvider{}, &MsgDeleteProvider{} +) + +// NewMsgCreateProvider creates a new MsgCreateProvider instance +func NewMsgCreateProvider(owner sdk.AccAddress, hostURI string, attributes types.Attributes) *MsgCreateProvider { + return &MsgCreateProvider{ + Owner: owner.String(), + HostURI: hostURI, + Attributes: attributes, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateProvider) Type() string { return MsgTypeCreateProvider } + +// ValidateBasic does basic validation of a HostURI +func (msg MsgCreateProvider) ValidateBasic() error { + if err := validateProviderURI(msg.HostURI); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Provider Address") + } + if err := msg.Attributes.Validate(); err != nil { + return err + } + if err := msg.Info.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCreateProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgUpdateProvider creates a new MsgUpdateProvider instance +func NewMsgUpdateProvider(owner sdk.AccAddress, hostURI string, attributes types.Attributes) *MsgUpdateProvider { + return &MsgUpdateProvider{ + Owner: owner.String(), + HostURI: hostURI, + Attributes: attributes, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgUpdateProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgUpdateProvider) Type() string { return MsgTypeUpdateProvider } + +// ValidateBasic does basic validation of a ProviderURI +func (msg MsgUpdateProvider) ValidateBasic() error { + if err := validateProviderURI(msg.HostURI); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdate: Invalid Provider Address") + } + if err := msg.Attributes.Validate(); err != nil { + return err + } + if err := msg.Info.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgUpdateProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUpdateProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgDeleteProvider creates a new MsgDeleteProvider instance +func NewMsgDeleteProvider(owner sdk.AccAddress) *MsgDeleteProvider { + return &MsgDeleteProvider{ + Owner: owner.String(), + } +} + +// Route implements the sdk.Msg interface +func (msg MsgDeleteProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgDeleteProvider) Type() string { return MsgTypeDeleteProvider } + +// ValidateBasic does basic validation +func (msg MsgDeleteProvider) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgDelete: Invalid Provider Address") + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgDeleteProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgDeleteProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +func validateProviderURI(val string) error { + u, err := url.Parse(val) + if err != nil { + return ErrInvalidProviderURI + } + if !u.IsAbs() { + return errors.Wrapf(ErrNotAbsProviderURI, "validating %q for absolute URI", val) + } + + if u.Scheme != "https" { + return errors.Wrapf(ErrInvalidProviderURI, "scheme in %q should be https", val) + } + + if u.Host == "" { + return errors.Wrapf(ErrInvalidProviderURI, "validating %q for valid host", val) + } + + if u.Path != "" { + return errors.Wrapf(ErrInvalidProviderURI, "path in %q should be empty", val) + } + + return nil +} diff --git a/go/node/provider/v1beta2/provider.pb.go b/go/node/provider/v1beta2/provider.pb.go new file mode 100644 index 00000000..42918ffd --- /dev/null +++ b/go/node/provider/v1beta2/provider.pb.go @@ -0,0 +1,2101 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta2/provider.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// ProviderInfo +type ProviderInfo struct { + EMail string `protobuf:"bytes,1,opt,name=email,proto3" json:"email" yaml:"email"` + Website string `protobuf:"bytes,2,opt,name=website,proto3" json:"website" yaml:"website"` +} + +func (m *ProviderInfo) Reset() { *m = ProviderInfo{} } +func (m *ProviderInfo) String() string { return proto.CompactTextString(m) } +func (*ProviderInfo) ProtoMessage() {} +func (*ProviderInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{0} +} +func (m *ProviderInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProviderInfo.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 *ProviderInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderInfo.Merge(m, src) +} +func (m *ProviderInfo) XXX_Size() int { + return m.Size() +} +func (m *ProviderInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderInfo proto.InternalMessageInfo + +func (m *ProviderInfo) GetEMail() string { + if m != nil { + return m.EMail + } + return "" +} + +func (m *ProviderInfo) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +// MsgCreateProvider defines an SDK message for creating a provider +type MsgCreateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgCreateProvider) Reset() { *m = MsgCreateProvider{} } +func (m *MsgCreateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProvider) ProtoMessage() {} +func (*MsgCreateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{1} +} +func (m *MsgCreateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProvider.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 *MsgCreateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProvider.Merge(m, src) +} +func (m *MsgCreateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProvider proto.InternalMessageInfo + +func (m *MsgCreateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgCreateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgCreateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgCreateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +type MsgCreateProviderResponse struct { +} + +func (m *MsgCreateProviderResponse) Reset() { *m = MsgCreateProviderResponse{} } +func (m *MsgCreateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProviderResponse) ProtoMessage() {} +func (*MsgCreateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{2} +} +func (m *MsgCreateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProviderResponse.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 *MsgCreateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProviderResponse.Merge(m, src) +} +func (m *MsgCreateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProviderResponse proto.InternalMessageInfo + +// MsgUpdateProvider defines an SDK message for updating a provider +type MsgUpdateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgUpdateProvider) Reset() { *m = MsgUpdateProvider{} } +func (m *MsgUpdateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProvider) ProtoMessage() {} +func (*MsgUpdateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{3} +} +func (m *MsgUpdateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProvider.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 *MsgUpdateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProvider.Merge(m, src) +} +func (m *MsgUpdateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProvider proto.InternalMessageInfo + +func (m *MsgUpdateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgUpdateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgUpdateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgUpdateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +type MsgUpdateProviderResponse struct { +} + +func (m *MsgUpdateProviderResponse) Reset() { *m = MsgUpdateProviderResponse{} } +func (m *MsgUpdateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProviderResponse) ProtoMessage() {} +func (*MsgUpdateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{4} +} +func (m *MsgUpdateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProviderResponse.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 *MsgUpdateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProviderResponse.Merge(m, src) +} +func (m *MsgUpdateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProviderResponse proto.InternalMessageInfo + +// MsgDeleteProvider defines an SDK message for deleting a provider +type MsgDeleteProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` +} + +func (m *MsgDeleteProvider) Reset() { *m = MsgDeleteProvider{} } +func (m *MsgDeleteProvider) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProvider) ProtoMessage() {} +func (*MsgDeleteProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{5} +} +func (m *MsgDeleteProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProvider.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 *MsgDeleteProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProvider.Merge(m, src) +} +func (m *MsgDeleteProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProvider proto.InternalMessageInfo + +func (m *MsgDeleteProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +type MsgDeleteProviderResponse struct { +} + +func (m *MsgDeleteProviderResponse) Reset() { *m = MsgDeleteProviderResponse{} } +func (m *MsgDeleteProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderResponse) ProtoMessage() {} +func (*MsgDeleteProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{6} +} +func (m *MsgDeleteProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderResponse.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 *MsgDeleteProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderResponse.Merge(m, src) +} +func (m *MsgDeleteProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderResponse proto.InternalMessageInfo + +// Provider stores owner and host details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_3b2702cb5ab07405, []int{7} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta2.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Provider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +func init() { + proto.RegisterType((*ProviderInfo)(nil), "akash.provider.v1beta2.ProviderInfo") + proto.RegisterType((*MsgCreateProvider)(nil), "akash.provider.v1beta2.MsgCreateProvider") + proto.RegisterType((*MsgCreateProviderResponse)(nil), "akash.provider.v1beta2.MsgCreateProviderResponse") + proto.RegisterType((*MsgUpdateProvider)(nil), "akash.provider.v1beta2.MsgUpdateProvider") + proto.RegisterType((*MsgUpdateProviderResponse)(nil), "akash.provider.v1beta2.MsgUpdateProviderResponse") + proto.RegisterType((*MsgDeleteProvider)(nil), "akash.provider.v1beta2.MsgDeleteProvider") + proto.RegisterType((*MsgDeleteProviderResponse)(nil), "akash.provider.v1beta2.MsgDeleteProviderResponse") + proto.RegisterType((*Provider)(nil), "akash.provider.v1beta2.Provider") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta2/provider.proto", fileDescriptor_3b2702cb5ab07405) +} + +var fileDescriptor_3b2702cb5ab07405 = []byte{ + // 575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x41, 0x6b, 0x13, 0x41, + 0x18, 0xdd, 0x6d, 0x12, 0x13, 0x27, 0xa5, 0xd2, 0x45, 0x24, 0x4d, 0xe9, 0x4e, 0x18, 0x14, 0xa2, + 0xe0, 0x2e, 0x8d, 0x07, 0xa5, 0x9e, 0x4c, 0x2d, 0x58, 0x21, 0x20, 0x0b, 0xb9, 0x78, 0x91, 0x5d, + 0x33, 0xdd, 0x2c, 0x4d, 0x76, 0x96, 0x9d, 0x49, 0x43, 0x8f, 0xfe, 0x03, 0xc1, 0x4b, 0x8f, 0x3d, + 0x0b, 0xfe, 0x8f, 0x1e, 0x7b, 0x11, 0x3c, 0x8d, 0x92, 0x5c, 0x24, 0xc7, 0xfc, 0x02, 0xd9, 0x99, + 0xdd, 0x6d, 0x36, 0x89, 0x41, 0xe9, 0xa5, 0x87, 0xde, 0x76, 0xde, 0xbc, 0xef, 0x7b, 0x1f, 0xdf, + 0x7b, 0x4c, 0x02, 0x1e, 0xd9, 0xc7, 0x36, 0xed, 0x9a, 0x41, 0x48, 0x4e, 0xbc, 0x0e, 0x0e, 0xcd, + 0x93, 0x5d, 0x07, 0x33, 0xbb, 0x91, 0x02, 0x46, 0x10, 0x12, 0x46, 0xb4, 0x07, 0x82, 0x66, 0xa4, + 0x68, 0x4c, 0xab, 0xde, 0x77, 0x89, 0x4b, 0x04, 0xc5, 0x8c, 0xbe, 0x24, 0xbb, 0x8a, 0x64, 0x53, + 0xc7, 0xa6, 0x38, 0x6d, 0x68, 0x33, 0x16, 0x7a, 0xce, 0x80, 0x61, 0xc9, 0x41, 0x9f, 0x54, 0xb0, + 0xfe, 0x2e, 0x6e, 0x77, 0xe8, 0x1f, 0x11, 0xed, 0x05, 0x28, 0xe0, 0xbe, 0xed, 0xf5, 0x2a, 0x6a, + 0x4d, 0xad, 0xdf, 0x6d, 0xa2, 0x11, 0x87, 0x85, 0x83, 0x96, 0xed, 0xf5, 0x26, 0x1c, 0xca, 0x9b, + 0x29, 0x87, 0xeb, 0xa7, 0x76, 0xbf, 0xb7, 0x87, 0xc4, 0x11, 0x59, 0x12, 0xd6, 0x9e, 0x83, 0xe2, + 0x10, 0x3b, 0xd4, 0x63, 0xb8, 0xb2, 0x26, 0x6a, 0x77, 0x26, 0x1c, 0x26, 0xd0, 0x94, 0xc3, 0x0d, + 0x59, 0x14, 0x03, 0xc8, 0x4a, 0xae, 0xd0, 0x59, 0x0e, 0x6c, 0xb6, 0xa8, 0xbb, 0x1f, 0x62, 0x9b, + 0xe1, 0x64, 0x18, 0xcd, 0x04, 0x05, 0x32, 0xf4, 0x71, 0x18, 0x0f, 0xb2, 0x15, 0xe9, 0x0b, 0xe0, + 0x4a, 0x5f, 0x1c, 0x91, 0x25, 0x61, 0xed, 0x00, 0x94, 0xba, 0x84, 0xb2, 0x0f, 0x83, 0xd0, 0x8b, + 0x07, 0x78, 0x32, 0xe2, 0xb0, 0xf8, 0x86, 0x50, 0xd6, 0xb6, 0x0e, 0x27, 0x1c, 0xa6, 0xd7, 0x53, + 0x0e, 0xef, 0xc9, 0x0e, 0x09, 0x82, 0xac, 0x62, 0xf4, 0xd9, 0x0e, 0x3d, 0xed, 0x9b, 0x0a, 0x40, + 0xba, 0x25, 0x5a, 0xc9, 0xd5, 0x72, 0xf5, 0x72, 0x63, 0xc7, 0x90, 0x9b, 0x8f, 0x76, 0x99, 0x6c, + 0xdd, 0x78, 0x95, 0xb0, 0x9a, 0xfe, 0x05, 0x87, 0xca, 0x84, 0xc3, 0x99, 0xc2, 0x29, 0x87, 0x9b, + 0x52, 0xe3, 0x0a, 0x43, 0x5f, 0x7f, 0xc2, 0x7d, 0xd7, 0x63, 0xdd, 0x81, 0x63, 0x7c, 0x24, 0x7d, + 0x53, 0xf4, 0x7c, 0xea, 0x63, 0x36, 0x24, 0xe1, 0x71, 0x7c, 0xb2, 0x03, 0xcf, 0x74, 0x89, 0xe9, + 0x93, 0x0e, 0x36, 0xd9, 0x69, 0x80, 0xa9, 0xb9, 0x20, 0x47, 0xad, 0x19, 0x1d, 0xad, 0x0d, 0xf2, + 0x9e, 0x7f, 0x44, 0x2a, 0xf9, 0x9a, 0x5a, 0x2f, 0x37, 0x1e, 0x1a, 0xcb, 0x23, 0x62, 0xcc, 0x9a, + 0xdc, 0xdc, 0x8e, 0xe7, 0x15, 0x95, 0x53, 0x0e, 0xcb, 0x72, 0xd2, 0xe8, 0x84, 0x2c, 0x01, 0xee, + 0xe5, 0x7f, 0x9f, 0x43, 0x05, 0x6d, 0x83, 0xad, 0x05, 0x67, 0x2c, 0x4c, 0x03, 0xe2, 0xd3, 0xd4, + 0xb7, 0x76, 0xd0, 0xb9, 0xf5, 0xed, 0x46, 0xfa, 0x96, 0x75, 0x26, 0xf5, 0xed, 0xad, 0xb0, 0xed, + 0x35, 0xee, 0xe1, 0x6b, 0xd8, 0x96, 0x11, 0xca, 0xf6, 0x4a, 0x85, 0xbe, 0xe4, 0x40, 0xe9, 0x36, + 0x17, 0x37, 0x23, 0x17, 0xa5, 0xb3, 0x73, 0xa8, 0x44, 0x96, 0x35, 0xbe, 0xaf, 0x81, 0x5c, 0x8b, + 0xba, 0x9a, 0x0f, 0x36, 0xe6, 0x9e, 0xdc, 0xc7, 0x7f, 0x13, 0x5b, 0x78, 0x03, 0xaa, 0xbb, 0xff, + 0x4c, 0x4d, 0xd2, 0x10, 0xe9, 0xcd, 0x3d, 0x15, 0xab, 0xf4, 0xb2, 0xd4, 0x95, 0x7a, 0xcb, 0x63, + 0x1e, 0xe9, 0xcd, 0x65, 0x7c, 0x95, 0x5e, 0x96, 0xba, 0x52, 0x6f, 0x79, 0xda, 0x9b, 0xed, 0x8b, + 0x91, 0xae, 0x5e, 0x8e, 0x74, 0xf5, 0xd7, 0x48, 0x57, 0x3f, 0x8f, 0x75, 0xe5, 0x72, 0xac, 0x2b, + 0x3f, 0xc6, 0xba, 0xf2, 0xfe, 0xe5, 0x7f, 0x64, 0x64, 0xfe, 0x2f, 0x80, 0x73, 0x47, 0xfc, 0x50, + 0x3f, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x57, 0xe5, 0x36, 0x23, 0x08, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) { + out := new(MsgCreateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta2.Msg/CreateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) { + out := new(MsgUpdateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta2.Msg/UpdateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) { + out := new(MsgDeleteProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta2.Msg/DeleteProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(context.Context, *MsgCreateProvider) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(context.Context, *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(context.Context, *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateProvider(ctx context.Context, req *MsgCreateProvider) (*MsgCreateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProvider not implemented") +} +func (*UnimplementedMsgServer) UpdateProvider(ctx context.Context, req *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProvider not implemented") +} +func (*UnimplementedMsgServer) DeleteProvider(ctx context.Context, req *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProvider not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta2.Msg/CreateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateProvider(ctx, req.(*MsgCreateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta2.Msg/UpdateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateProvider(ctx, req.(*MsgUpdateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta2.Msg/DeleteProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProvider(ctx, req.(*MsgDeleteProvider)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.provider.v1beta2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateProvider", + Handler: _Msg_CreateProvider_Handler, + }, + { + MethodName: "UpdateProvider", + Handler: _Msg_UpdateProvider_Handler, + }, + { + MethodName: "DeleteProvider", + Handler: _Msg_DeleteProvider_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/provider/v1beta2/provider.proto", +} + +func (m *ProviderInfo) 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 *ProviderInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x12 + } + if len(m.EMail) > 0 { + i -= len(m.EMail) + copy(dAtA[i:], m.EMail) + i = encodeVarintProvider(dAtA, i, uint64(len(m.EMail))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProvider) 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 *MsgCreateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProviderResponse) 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 *MsgCreateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProvider) 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 *MsgUpdateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProviderResponse) 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 *MsgUpdateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProvider) 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 *MsgDeleteProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderResponse) 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 *MsgDeleteProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProvider(dAtA []byte, offset int, v uint64) int { + offset -= sovProvider(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProviderInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EMail) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgCreateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgCreateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgUpdateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgDeleteProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func sovProvider(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProvider(x uint64) (n int) { + return sovProvider(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProviderInfo) 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 ErrIntOverflowProvider + } + 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: ProviderInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProviderInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EMail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EMail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProvider) 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 ErrIntOverflowProvider + } + 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: MsgCreateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgCreateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProvider) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProvider) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Provider) 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 ErrIntOverflowProvider + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta2.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProvider(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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrInvalidLengthProvider + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProvider + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProvider + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProvider = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProvider = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProvider = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta2/query.pb.go b/go/node/provider/v1beta2/query.pb.go new file mode 100644 index 00000000..ffa09221 --- /dev/null +++ b/go/node/provider/v1beta2/query.pb.go @@ -0,0 +1,1059 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta2/query.proto + +package v1beta2 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryProvidersRequest is request type for the Query/Providers RPC method +type QueryProvidersRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersRequest) Reset() { *m = QueryProvidersRequest{} } +func (m *QueryProvidersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersRequest) ProtoMessage() {} +func (*QueryProvidersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_42d9228a7f66d48a, []int{0} +} +func (m *QueryProvidersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersRequest.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 *QueryProvidersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersRequest.Merge(m, src) +} +func (m *QueryProvidersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersRequest proto.InternalMessageInfo + +func (m *QueryProvidersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryProvidersResponse struct { + Providers Providers `protobuf:"bytes,1,rep,name=providers,proto3,castrepeated=Providers" json:"providers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersResponse) Reset() { *m = QueryProvidersResponse{} } +func (m *QueryProvidersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersResponse) ProtoMessage() {} +func (*QueryProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_42d9228a7f66d48a, []int{1} +} +func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersResponse.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 *QueryProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersResponse.Merge(m, src) +} +func (m *QueryProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo + +func (m *QueryProvidersResponse) GetProviders() Providers { + if m != nil { + return m.Providers + } + return nil +} + +func (m *QueryProvidersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +type QueryProviderRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderRequest) Reset() { *m = QueryProviderRequest{} } +func (m *QueryProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderRequest) ProtoMessage() {} +func (*QueryProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_42d9228a7f66d48a, []int{2} +} +func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderRequest.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 *QueryProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderRequest.Merge(m, src) +} +func (m *QueryProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo + +func (m *QueryProviderRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryProviderResponse is response type for the Query/Provider RPC method +type QueryProviderResponse struct { + Provider Provider `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider"` +} + +func (m *QueryProviderResponse) Reset() { *m = QueryProviderResponse{} } +func (m *QueryProviderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProviderResponse) ProtoMessage() {} +func (*QueryProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_42d9228a7f66d48a, []int{3} +} +func (m *QueryProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderResponse.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 *QueryProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderResponse.Merge(m, src) +} +func (m *QueryProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderResponse proto.InternalMessageInfo + +func (m *QueryProviderResponse) GetProvider() Provider { + if m != nil { + return m.Provider + } + return Provider{} +} + +func init() { + proto.RegisterType((*QueryProvidersRequest)(nil), "akash.provider.v1beta2.QueryProvidersRequest") + proto.RegisterType((*QueryProvidersResponse)(nil), "akash.provider.v1beta2.QueryProvidersResponse") + proto.RegisterType((*QueryProviderRequest)(nil), "akash.provider.v1beta2.QueryProviderRequest") + proto.RegisterType((*QueryProviderResponse)(nil), "akash.provider.v1beta2.QueryProviderResponse") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta2/query.proto", fileDescriptor_42d9228a7f66d48a) +} + +var fileDescriptor_42d9228a7f66d48a = []byte{ + // 449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x81, 0xa2, 0xe6, 0x3a, 0x71, 0x0a, 0x55, 0x15, 0x21, 0x37, 0x18, 0x01, 0x2d, + 0x34, 0x77, 0x8a, 0x19, 0xd9, 0x32, 0xc0, 0xda, 0x5a, 0x62, 0x81, 0x01, 0x9d, 0xdb, 0xd3, 0xd5, + 0x2a, 0xbd, 0xe7, 0xfa, 0x9c, 0x44, 0x08, 0xb1, 0xf0, 0x09, 0x90, 0x10, 0x0b, 0x1f, 0x81, 0x99, + 0x91, 0x0f, 0x90, 0x31, 0x12, 0x0b, 0x13, 0xa0, 0x84, 0x0f, 0x82, 0x7c, 0x77, 0x8e, 0x49, 0x48, + 0xe4, 0x6c, 0x3e, 0xfb, 0xff, 0xfe, 0xef, 0xf7, 0xfe, 0xe7, 0x87, 0x03, 0x7e, 0xc1, 0xf5, 0x39, + 0x4b, 0x33, 0x18, 0x26, 0x67, 0x22, 0x63, 0xc3, 0x5e, 0x2c, 0x72, 0x1e, 0xb2, 0xab, 0x81, 0xc8, + 0xde, 0xd0, 0x34, 0x83, 0x1c, 0xc8, 0xae, 0xd1, 0xd0, 0x52, 0x43, 0x9d, 0xa6, 0xdd, 0x92, 0x20, + 0xc1, 0x48, 0x58, 0xf1, 0x64, 0xd5, 0xed, 0xdb, 0x12, 0x40, 0xbe, 0x16, 0x8c, 0xa7, 0x09, 0xe3, + 0x4a, 0x41, 0xce, 0xf3, 0x04, 0x94, 0x76, 0x5f, 0x1f, 0x9e, 0x82, 0xbe, 0x04, 0xcd, 0x62, 0xae, + 0x85, 0x6d, 0xe2, 0x5a, 0xf6, 0x58, 0xca, 0x65, 0xa2, 0x8c, 0xd8, 0x69, 0xef, 0xad, 0x61, 0x9b, + 0x83, 0x18, 0x59, 0xf0, 0x0a, 0xdf, 0x3a, 0x29, 0x8c, 0x8e, 0xdd, 0x6b, 0x1d, 0x89, 0xab, 0x81, + 0xd0, 0x39, 0x79, 0x8a, 0x71, 0xe5, 0xb9, 0x87, 0x3a, 0xe8, 0x60, 0x27, 0xbc, 0x4f, 0x2d, 0x00, + 0x2d, 0x00, 0xa8, 0x9d, 0xd2, 0x01, 0xd0, 0x63, 0x2e, 0x85, 0xab, 0x8d, 0xfe, 0xa9, 0x0c, 0xbe, + 0x22, 0xbc, 0xbb, 0xdc, 0x41, 0xa7, 0xa0, 0xb4, 0x20, 0x27, 0xb8, 0x59, 0xd2, 0xe8, 0x3d, 0xd4, + 0xb9, 0x76, 0xb0, 0x13, 0x76, 0xe8, 0xea, 0xb8, 0x68, 0x59, 0xdd, 0xbf, 0x39, 0xfe, 0xb9, 0xef, + 0x7d, 0xf9, 0xb5, 0xdf, 0xac, 0xfc, 0x2a, 0x17, 0xf2, 0x6c, 0x81, 0xba, 0x61, 0xa8, 0x1f, 0xd4, + 0x52, 0x5b, 0x9e, 0x05, 0xec, 0x23, 0xdc, 0x5a, 0xa0, 0x2e, 0x63, 0x69, 0xe1, 0x2d, 0x18, 0x29, + 0x91, 0x99, 0x44, 0x9a, 0x91, 0x3d, 0x04, 0x2f, 0x97, 0x52, 0x9c, 0x8f, 0xd8, 0xc7, 0xdb, 0x25, + 0x9c, 0xcb, 0xb0, 0x7e, 0xc2, 0xeb, 0xc5, 0x84, 0xd1, 0xbc, 0x2e, 0xfc, 0xd6, 0xc0, 0x5b, 0xc6, + 0x9d, 0x7c, 0x42, 0xb8, 0x1a, 0x9b, 0x74, 0xd7, 0x39, 0xad, 0xbc, 0xd0, 0x36, 0xdd, 0x54, 0x6e, + 0xd1, 0x83, 0xc3, 0xf7, 0xdf, 0xff, 0x7c, 0x6c, 0xdc, 0x25, 0x77, 0x58, 0xcd, 0x9f, 0xa4, 0xc9, + 0x67, 0x84, 0xb7, 0x4b, 0x03, 0x72, 0xb4, 0x51, 0x9f, 0x92, 0xaa, 0xbb, 0xa1, 0xda, 0x41, 0xf5, + 0x0c, 0xd4, 0x23, 0x72, 0x58, 0x0b, 0xc5, 0xde, 0x9a, 0xab, 0x79, 0xd7, 0x7f, 0x3e, 0x9e, 0xfa, + 0x68, 0x32, 0xf5, 0xd1, 0xef, 0xa9, 0x8f, 0x3e, 0xcc, 0x7c, 0x6f, 0x32, 0xf3, 0xbd, 0x1f, 0x33, + 0xdf, 0x7b, 0xf1, 0x44, 0x26, 0xf9, 0xf9, 0x20, 0xa6, 0xa7, 0x70, 0x69, 0xed, 0xba, 0x4a, 0xe4, + 0x23, 0xc8, 0x2e, 0xdc, 0xa9, 0x58, 0x42, 0x09, 0x4c, 0xc1, 0x99, 0xf8, 0xaf, 0x51, 0x7c, 0xc3, + 0xec, 0xcf, 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x71, 0x5f, 0x48, 0x04, 0x04, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Providers queries providers + Providers(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // Provider queries provider details + Provider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Providers(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta2.Query/Providers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Provider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) { + out := new(QueryProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta2.Query/Provider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Providers queries providers + Providers(context.Context, *QueryProvidersRequest) (*QueryProvidersResponse, error) + // Provider queries provider details + Provider(context.Context, *QueryProviderRequest) (*QueryProviderResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Providers(ctx context.Context, req *QueryProvidersRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Providers not implemented") +} +func (*UnimplementedQueryServer) Provider(ctx context.Context, req *QueryProviderRequest) (*QueryProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Provider not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Providers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProvidersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Providers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta2.Query/Providers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Providers(ctx, req.(*QueryProvidersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Provider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Provider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta2.Query/Provider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Provider(ctx, req.(*QueryProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.provider.v1beta2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Providers", + Handler: _Query_Providers_Handler, + }, + { + MethodName: "Provider", + Handler: _Query_Provider_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/provider/v1beta2/query.proto", +} + +func (m *QueryProvidersRequest) 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 *QueryProvidersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersRequest) 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 *QueryProvidersResponse) 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 *QueryProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersResponse) 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.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[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 (m *QueryProviderRequest) 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 *QueryProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderResponse) 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 *QueryProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Provider.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 *QueryProvidersRequest) 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 *QueryProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + 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 (m *QueryProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Provider.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryProvidersRequest) 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: QueryProvidersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersRequest: 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 *QueryProvidersResponse) 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: QueryProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-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) + } + 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.PageResponse{} + } + 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 *QueryProviderRequest) 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: QueryProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderRequest: 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) + } + 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.Owner = 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 *QueryProviderResponse) 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: QueryProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", 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.Provider.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta2/query.pb.gw.go b/go/node/provider/v1beta2/query.pb.gw.go new file mode 100644 index 00000000..84143346 --- /dev/null +++ b/go/node/provider/v1beta2/query.pb.gw.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/provider/v1beta2/query.proto + +/* +Package v1beta2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Providers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Providers_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + 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_Providers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Providers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Providers_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + 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_Providers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Providers(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := client.Provider(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := server.Provider(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Providers_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_Providers_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_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Provider_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_Provider_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_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Providers_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_Providers_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_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Provider_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_Provider_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_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta2", "providers"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta2", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Providers_0 = runtime.ForwardResponseMessage + + forward_Query_Provider_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/provider/v1beta2/types.go b/go/node/provider/v1beta2/types.go new file mode 100644 index 00000000..fd76cee0 --- /dev/null +++ b/go/node/provider/v1beta2/types.go @@ -0,0 +1,67 @@ +package v1beta2 + +import ( + "bytes" + "fmt" + "net/url" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// String implements the Stringer interface for a Provider object. +func (p Provider) String() string { + res := fmt.Sprintf(`Deployment + Owner: %s + HostURI: %s + Attributes: %v + `, p.Owner, p.HostURI, p.Attributes) + + if !p.Info.IsEmpty() { + res += fmt.Sprintf("Info: %v\n", p.Info) + } + return res +} + +// Providers is the collection of Provider +type Providers []Provider + +// String implements the Stringer interface for a Providers object. +func (obj Providers) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +// Address implements provider and returns owner of provider +func (p *Provider) Address() sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(p.Owner) + if err != nil { + panic(err) + } + + return owner +} + +func (m ProviderInfo) IsEmpty() bool { + return m.EMail == "" && m.Website == "" +} + +func (m ProviderInfo) Validate() error { + if m.Website != "" { + if _, err := url.Parse(m.Website); err != nil { + return ErrInvalidInfoWebsite + } + } + return nil +} diff --git a/go/node/provider/v1beta3/codec.go b/go/node/provider/v1beta3/codec.go new file mode 100644 index 00000000..ff85fe96 --- /dev/null +++ b/go/node/provider/v1beta3/codec.go @@ -0,0 +1,45 @@ +package v1beta3 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/provider module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/provider and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + amino.Seal() +} + +// RegisterCodec register concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgCreateProvider{}, ModuleName+"/"+MsgTypeCreateProvider, nil) + cdc.RegisterConcrete(&MsgUpdateProvider{}, ModuleName+"/"+MsgTypeUpdateProvider, nil) + cdc.RegisterConcrete(&MsgDeleteProvider{}, ModuleName+"/"+MsgTypeDeleteProvider, nil) +} + +// RegisterInterfaces registers the x/provider interfaces types with the interface registry +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateProvider{}, + &MsgUpdateProvider{}, + &MsgDeleteProvider{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/go/node/provider/v1beta3/errors.go b/go/node/provider/v1beta3/errors.go new file mode 100644 index 00000000..b5b7a5c1 --- /dev/null +++ b/go/node/provider/v1beta3/errors.go @@ -0,0 +1,42 @@ +package v1beta3 + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + errInvalidProviderURI uint32 = iota + 1 + errNotAbsProviderURI + errProviderNotFound + errProviderExists + errInvalidAddress + errAttributes + errIncompatibleAttributes + errInvalidInfoWebsite +) + +var ( + // ErrInvalidProviderURI register error code for invalid provider uri + ErrInvalidProviderURI = sdkerrors.Register(ModuleName, errInvalidProviderURI, "invalid provider: invalid host uri") + + // ErrNotAbsProviderURI register error code for not absolute provider uri + ErrNotAbsProviderURI = sdkerrors.Register(ModuleName, errNotAbsProviderURI, "invalid provider: not absolute host uri") + + // ErrProviderNotFound provider not found + ErrProviderNotFound = sdkerrors.Register(ModuleName, errProviderNotFound, "invalid provider: address not found") + + // ErrProviderExists provider already exists + ErrProviderExists = sdkerrors.Register(ModuleName, errProviderExists, "invalid provider: already exists") + + // ErrInvalidAddress invalid provider address + ErrInvalidAddress = sdkerrors.Register(ModuleName, errInvalidAddress, "invalid address") + + // ErrAttributes error code for provider attribute problems + ErrAttributes = sdkerrors.Register(ModuleName, errAttributes, "attribute specification error") + + // ErrIncompatibleAttributes error code for attributes update + ErrIncompatibleAttributes = sdkerrors.Register(ModuleName, errIncompatibleAttributes, "attributes cannot be changed") + + // ErrInvalidInfoWebsite register error code for invalid info website + ErrInvalidInfoWebsite = sdkerrors.Register(ModuleName, errInvalidInfoWebsite, "invalid provider: invalid info website") +) diff --git a/go/node/provider/v1beta3/event.go b/go/node/provider/v1beta3/event.go new file mode 100644 index 00000000..c738a4b2 --- /dev/null +++ b/go/node/provider/v1beta3/event.go @@ -0,0 +1,142 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/akash-network/node/sdkutil" +) + +const ( + EvActionProviderCreated = "provider-created" + EvActionProviderUpdated = "provider-updated" + EvActionProviderDeleted = "provider-deleted" + EvOwnerKey = "owner" +) + +// EventProviderCreated struct +type EventProviderCreated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderCreated(owner sdk.AccAddress) EventProviderCreated { + return EventProviderCreated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderCreated, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderCreated struct +func (ev EventProviderCreated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderCreated), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// EventProviderUpdated struct +type EventProviderUpdated struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderUpdated(owner sdk.AccAddress) EventProviderUpdated { + return EventProviderUpdated{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderUpdated, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderUpdated struct +func (ev EventProviderUpdated) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderUpdated), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// EventProviderDeleted struct +type EventProviderDeleted struct { + Context sdkutil.BaseModuleEvent `json:"context"` + Owner sdk.AccAddress `json:"owner"` +} + +func NewEventProviderDeleted(owner sdk.AccAddress) EventProviderDeleted { + return EventProviderDeleted{ + Context: sdkutil.BaseModuleEvent{ + Module: ModuleName, + Action: EvActionProviderDeleted, + }, + Owner: owner, + } +} + +// ToSDKEvent method creates new sdk event for EventProviderDeleted struct +func (ev EventProviderDeleted) ToSDKEvent() sdk.Event { + return sdk.NewEvent(sdkutil.EventTypeMessage, + append([]sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyAction, EvActionProviderDeleted), + }, ProviderEVAttributes(ev.Owner)...)..., + ) +} + +// ProviderEVAttributes returns event attribues for given Provider +func ProviderEVAttributes(owner sdk.AccAddress) []sdk.Attribute { + return []sdk.Attribute{ + sdk.NewAttribute(EvOwnerKey, owner.String()), + } +} + +// ParseEVProvider returns provider details for given event attributes +func ParseEVProvider(attrs []sdk.Attribute) (sdk.AccAddress, error) { + owner, err := sdkutil.GetAccAddress(attrs, EvOwnerKey) + if err != nil { + return sdk.AccAddress{}, err + } + + return owner, nil +} + +// ParseEvent parses event and returns details of event and error if occurred +// TODO: Enable returning actual events. +func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { + if ev.Type != sdkutil.EventTypeMessage { + return nil, sdkutil.ErrUnknownType + } + if ev.Module != ModuleName { + return nil, sdkutil.ErrUnknownModule + } + switch ev.Action { + case EvActionProviderCreated: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderCreated(owner), nil + case EvActionProviderUpdated: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderUpdated(owner), nil + case EvActionProviderDeleted: + owner, err := ParseEVProvider(ev.Attributes) + if err != nil { + return nil, err + } + return NewEventProviderDeleted(owner), nil + default: + return nil, sdkutil.ErrUnknownAction + } +} diff --git a/go/node/provider/v1beta3/events_test.go b/go/node/provider/v1beta3/events_test.go new file mode 100644 index 00000000..c556cd19 --- /dev/null +++ b/go/node/provider/v1beta3/events_test.go @@ -0,0 +1,197 @@ +package v1beta3_test + +import ( + "fmt" + "testing" + + _ "github.com/akash-network/node/testutil" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" + "github.com/stretchr/testify/require" + + "github.com/akash-network/node/sdkutil" + + types "github.com/akash-network/akash-api/go/node/provider/v1beta3" +) + +var ( + errWildcard = errors.New("wildcard string error can't be matched") +) + +type testEventParsing struct { + msg sdkutil.Event + expErr error +} + +func (tep testEventParsing) testMessageType() func(t *testing.T) { + _, err := types.ParseEvent(tep.msg) + return func(t *testing.T) { + // if the error expected is errWildcard to catch untyped errors, don't fail the test, the error was expected. + if errors.Is(tep.expErr, errWildcard) { + require.Error(t, err) + } else { + require.Equal(t, tep.expErr, err) + } + } +} + +var TEPS = []testEventParsing{ + { + msg: sdkutil.Event{ + Type: "nil", + }, + expErr: sdkutil.ErrUnknownType, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + }, + expErr: sdkutil.ErrUnknownAction, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: "nil", + }, + expErr: sdkutil.ErrUnknownModule, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: "nil", + }, + expErr: sdkutil.ErrUnknownAction, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderCreated, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderCreated, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "hello", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderCreated, + Attributes: []sdk.Attribute{}, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderUpdated, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderUpdated, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "hello", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderUpdated, + Attributes: []sdk.Attribute{}, + }, + expErr: errWildcard, + }, + + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderDeleted, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", + }, + }, + }, + expErr: nil, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderDeleted, + Attributes: []sdk.Attribute{ + { + Key: types.EvOwnerKey, + Value: "hello", + }, + }, + }, + expErr: errWildcard, + }, + { + msg: sdkutil.Event{ + Type: sdkutil.EventTypeMessage, + Module: types.ModuleName, + Action: types.EvActionProviderDeleted, + Attributes: []sdk.Attribute{}, + }, + expErr: errWildcard, + }, +} + +func TestEventParsing(t *testing.T) { + for i, test := range TEPS { + t.Run(fmt.Sprintf("%d", i), + test.testMessageType()) + } +} diff --git a/go/node/provider/v1beta3/genesis.pb.go b/go/node/provider/v1beta3/genesis.pb.go new file mode 100644 index 00000000..f1c4fe8c --- /dev/null +++ b/go/node/provider/v1beta3/genesis.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta3/genesis.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GenesisState defines the basic genesis state used by provider module +type GenesisState struct { + Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers" yaml:"providers"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_4a3393cd40e1bd09, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetProviders() []Provider { + if m != nil { + return m.Providers + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "akash.provider.v1beta3.GenesisState") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta3/genesis.proto", fileDescriptor_4a3393cd40e1bd09) +} + +var fileDescriptor_4a3393cd40e1bd09 = []byte{ + // 226 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, + 0x49, 0x34, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x03, 0xab, 0xd2, 0x83, 0xa9, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x54, 0x71, 0x98, 0x09, 0xd7, 0x0e, 0x56, 0xa6, + 0x54, 0xca, 0xc5, 0xe3, 0x0e, 0xb1, 0x25, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x28, 0x95, 0x8b, 0x13, + 0xa6, 0xa2, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xbb, 0xc5, 0x7a, 0x01, + 0x50, 0x01, 0x27, 0xd5, 0x13, 0xf7, 0xe4, 0x19, 0x5e, 0xdd, 0x93, 0x47, 0x68, 0xfd, 0x74, 0x4f, + 0x5e, 0xa0, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x2e, 0xa4, 0x14, 0x84, 0x90, 0x76, 0x0a, 0x3d, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, + 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xeb, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, + 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xbd, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, + 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x86, 0xe7, 0x92, + 0xd8, 0xc0, 0x9e, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xd8, 0x17, 0x39, 0x51, 0x01, + 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta3/key.go b/go/node/provider/v1beta3/key.go new file mode 100644 index 00000000..0a39047b --- /dev/null +++ b/go/node/provider/v1beta3/key.go @@ -0,0 +1,12 @@ +package v1beta3 + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "provider" + + // StoreKey is the store key string for provider + StoreKey = ModuleName + + // RouterKey is the message route for provider + RouterKey = ModuleName +) diff --git a/go/node/provider/v1beta3/msgs.go b/go/node/provider/v1beta3/msgs.go new file mode 100644 index 00000000..dafb854b --- /dev/null +++ b/go/node/provider/v1beta3/msgs.go @@ -0,0 +1,175 @@ +package v1beta3 + +import ( + "net/url" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pkg/errors" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +const ( + MsgTypeCreateProvider = "create-provider" + MsgTypeUpdateProvider = "update-provider" + MsgTypeDeleteProvider = "delete-provider" +) + +var ( + _, _, _ sdk.Msg = &MsgCreateProvider{}, &MsgUpdateProvider{}, &MsgDeleteProvider{} +) + +// NewMsgCreateProvider creates a new MsgCreateProvider instance +func NewMsgCreateProvider(owner sdk.AccAddress, hostURI string, attributes types.Attributes) *MsgCreateProvider { + return &MsgCreateProvider{ + Owner: owner.String(), + HostURI: hostURI, + Attributes: attributes, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgCreateProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgCreateProvider) Type() string { return MsgTypeCreateProvider } + +// ValidateBasic does basic validation of a HostURI +func (msg MsgCreateProvider) ValidateBasic() error { + if err := validateProviderURI(msg.HostURI); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Provider Address") + } + if err := msg.Attributes.Validate(); err != nil { + return err + } + if err := msg.Info.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgCreateProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgCreateProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgUpdateProvider creates a new MsgUpdateProvider instance +func NewMsgUpdateProvider(owner sdk.AccAddress, hostURI string, attributes types.Attributes) *MsgUpdateProvider { + return &MsgUpdateProvider{ + Owner: owner.String(), + HostURI: hostURI, + Attributes: attributes, + } +} + +// Route implements the sdk.Msg interface +func (msg MsgUpdateProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgUpdateProvider) Type() string { return MsgTypeUpdateProvider } + +// ValidateBasic does basic validation of a ProviderURI +func (msg MsgUpdateProvider) ValidateBasic() error { + if err := validateProviderURI(msg.HostURI); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdate: Invalid Provider Address") + } + if err := msg.Attributes.Validate(); err != nil { + return err + } + if err := msg.Info.Validate(); err != nil { + return err + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgUpdateProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUpdateProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +// NewMsgDeleteProvider creates a new MsgDeleteProvider instance +func NewMsgDeleteProvider(owner sdk.AccAddress) *MsgDeleteProvider { + return &MsgDeleteProvider{ + Owner: owner.String(), + } +} + +// Route implements the sdk.Msg interface +func (msg MsgDeleteProvider) Route() string { return RouterKey } + +// Type implements the sdk.Msg interface +func (msg MsgDeleteProvider) Type() string { return MsgTypeDeleteProvider } + +// ValidateBasic does basic validation +func (msg MsgDeleteProvider) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgDelete: Invalid Provider Address") + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg MsgDeleteProvider) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgDeleteProvider) GetSigners() []sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(msg.Owner) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{owner} +} + +func validateProviderURI(val string) error { + u, err := url.Parse(val) + if err != nil { + return ErrInvalidProviderURI + } + if !u.IsAbs() { + return errors.Wrapf(ErrNotAbsProviderURI, "validating %q for absolute URI", val) + } + + if u.Scheme != "https" { + return errors.Wrapf(ErrInvalidProviderURI, "scheme in %q should be https", val) + } + + if u.Host == "" { + return errors.Wrapf(ErrInvalidProviderURI, "validating %q for valid host", val) + } + + if u.Path != "" { + return errors.Wrapf(ErrInvalidProviderURI, "path in %q should be empty", val) + } + + return nil +} diff --git a/go/node/provider/v1beta3/msgs_test.go b/go/node/provider/v1beta3/msgs_test.go new file mode 100644 index 00000000..7c8082e7 --- /dev/null +++ b/go/node/provider/v1beta3/msgs_test.go @@ -0,0 +1,245 @@ +package v1beta3 + +import ( + "fmt" + "net/url" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pkg/errors" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +func TestConfigPath(t *testing.T) { + type testConfigPath struct { + path string + expErr error + } + tests := []testConfigPath{ + { + path: "/home/ropes/go/src/github.com/akash-network/node/_run/kube/provider.yaml", + expErr: ErrNotAbsProviderURI, + }, + { + path: "foo.yaml", + expErr: ErrNotAbsProviderURI, + }, + { + path: "localhost", + expErr: ErrNotAbsProviderURI, + }, + { + path: "localhost/foo", + expErr: ErrNotAbsProviderURI, + }, + { + path: "localhost:80", + expErr: ErrInvalidProviderURI, + }, + { + path: "localhost:80/foo", + expErr: ErrInvalidProviderURI, + }, + { + path: "127.0.0.1", + expErr: ErrNotAbsProviderURI, + }, + { + path: "127.0.0.1/foo", + expErr: ErrNotAbsProviderURI, + }, + { + path: "127.0.0.1:80", + expErr: ErrInvalidProviderURI, + }, + { + path: "127.0.0.1:80/foo", + expErr: ErrInvalidProviderURI, + }, + { + path: "file:///foo.yaml", + expErr: ErrInvalidProviderURI, + }, + { + path: "https://localhost", + expErr: nil, + }, + { + path: "http://localhost/foo", + expErr: ErrInvalidProviderURI, + }, + { + path: "https://localhost:80", + expErr: nil, + }, + { + path: "http://localhost:80/foo", + expErr: ErrInvalidProviderURI, + }, + { + path: "http://localhost:3001/", + expErr: ErrInvalidProviderURI, + }, + { + path: "https://localhost:80", + expErr: nil, + }, + { + path: "https://localhost:80/foo", + expErr: ErrInvalidProviderURI, + }, + } + + for i, testUnit := range tests { + closure := func(test testConfigPath) func(t *testing.T) { + testFunc := func(t *testing.T) { + err := validateProviderURI(test.path) + if test.expErr != nil && !errors.Is(err, test.expErr) || + err != nil && test.expErr == nil { + t.Errorf("unexpected error occurred: %v", err) + + _, err := url.Parse(test.path) + if err != nil { + t.Errorf("url.Parse() of %q err: %v", test.path, err) + } + } + } + return testFunc + } + tf := closure(testUnit) + t.Run(fmt.Sprintf("%d->%q", i, testUnit.path), tf) + } +} + +type providerTestParams struct { + msg Provider + expErr error + delErr error +} + +func (test providerTestParams) testCreate() func(t *testing.T) { + msg := MsgCreateProvider{ + Owner: test.msg.Owner, + HostURI: test.msg.HostURI, + Attributes: test.msg.Attributes, + } + vErr := msg.ValidateBasic() + return func(t *testing.T) { + if test.expErr != nil && !errors.Is(vErr, test.expErr) { + t.Errorf("error expected: '%v' VS: %v", test.expErr, vErr) + return + } + sb := msg.GetSignBytes() + if len(sb) == 0 { + t.Error("no signed bytes returned") + } + } +} + +func (test providerTestParams) testUpdate() func(t *testing.T) { + msg := MsgUpdateProvider{ + Owner: test.msg.Owner, + HostURI: test.msg.HostURI, + Attributes: test.msg.Attributes, + } + vErr := msg.ValidateBasic() + return func(t *testing.T) { + if test.expErr != nil && !errors.Is(vErr, test.expErr) { + t.Errorf("error expected: '%v' VS: %v", test.expErr, vErr) + return + } + sb := msg.GetSignBytes() + if len(sb) == 0 { + t.Error("no signed bytes returned") + } + } +} + +func (test providerTestParams) testDelete() func(t *testing.T) { + msg := MsgDeleteProvider{ + Owner: test.msg.Owner, + } + vErr := msg.ValidateBasic() + return func(t *testing.T) { + if test.delErr != nil && !errors.Is(vErr, test.delErr) { + t.Errorf("error expected: '%v' VS: %v", test.expErr, vErr) + return + } + sb := msg.GetSignBytes() + if len(sb) == 0 { + t.Error("no signed bytes returned") + } + } +} + +var msgCreateTests = []providerTestParams{ + { + msg: Provider{ + Owner: sdk.AccAddress("hihi").String(), + HostURI: "https://localhost:3001", + Attributes: []types.Attribute{ + { + Key: "hihi", + Value: "neh", + }, + }, + }, + expErr: nil, + }, + { + msg: Provider{ + Owner: sdk.AccAddress("").String(), + HostURI: "https://localhost:3001", + Attributes: []types.Attribute{ + { + Key: "hihi", + Value: "neh", + }, + }, + }, + expErr: sdkerrors.ErrInvalidAddress, + delErr: sdkerrors.ErrInvalidAddress, + }, + { + msg: Provider{ + Owner: sdk.AccAddress("hihi").String(), + HostURI: "ht tp://foo.com", + Attributes: []types.Attribute{ + { + Key: "hihi", + Value: "neh", + }, + }, + }, + expErr: ErrInvalidProviderURI, + }, + { + msg: Provider{ + Owner: sdk.AccAddress("hihi").String(), + HostURI: "", + Attributes: []types.Attribute{ + { + Key: "hihi", + Value: "neh", + }, + }, + }, + expErr: ErrNotAbsProviderURI, + }, +} + +func TestMsgStarValidation(t *testing.T) { + for i, test := range msgCreateTests { + main := func(test providerTestParams) func(t *testing.T) { + return func(t *testing.T) { + t.Run("msg-create", test.testCreate()) + t.Run("msg-update", test.testUpdate()) + t.Run("msg-delete", test.testDelete()) + } + } + f := main(test) + t.Run(fmt.Sprintf("%d", i), f) + } +} diff --git a/go/node/provider/v1beta3/provider.pb.go b/go/node/provider/v1beta3/provider.pb.go new file mode 100644 index 00000000..8f5670e7 --- /dev/null +++ b/go/node/provider/v1beta3/provider.pb.go @@ -0,0 +1,2101 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta3/provider.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + github_com_akash_network_akash_api_go_node_types_v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// ProviderInfo +type ProviderInfo struct { + EMail string `protobuf:"bytes,1,opt,name=email,proto3" json:"email" yaml:"email"` + Website string `protobuf:"bytes,2,opt,name=website,proto3" json:"website" yaml:"website"` +} + +func (m *ProviderInfo) Reset() { *m = ProviderInfo{} } +func (m *ProviderInfo) String() string { return proto.CompactTextString(m) } +func (*ProviderInfo) ProtoMessage() {} +func (*ProviderInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{0} +} +func (m *ProviderInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProviderInfo.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 *ProviderInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderInfo.Merge(m, src) +} +func (m *ProviderInfo) XXX_Size() int { + return m.Size() +} +func (m *ProviderInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ProviderInfo proto.InternalMessageInfo + +func (m *ProviderInfo) GetEMail() string { + if m != nil { + return m.EMail + } + return "" +} + +func (m *ProviderInfo) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +// MsgCreateProvider defines an SDK message for creating a provider +type MsgCreateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgCreateProvider) Reset() { *m = MsgCreateProvider{} } +func (m *MsgCreateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProvider) ProtoMessage() {} +func (*MsgCreateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{1} +} +func (m *MsgCreateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProvider.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 *MsgCreateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProvider.Merge(m, src) +} +func (m *MsgCreateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProvider proto.InternalMessageInfo + +func (m *MsgCreateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgCreateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgCreateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgCreateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +type MsgCreateProviderResponse struct { +} + +func (m *MsgCreateProviderResponse) Reset() { *m = MsgCreateProviderResponse{} } +func (m *MsgCreateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateProviderResponse) ProtoMessage() {} +func (*MsgCreateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{2} +} +func (m *MsgCreateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateProviderResponse.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 *MsgCreateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateProviderResponse.Merge(m, src) +} +func (m *MsgCreateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateProviderResponse proto.InternalMessageInfo + +// MsgUpdateProvider defines an SDK message for updating a provider +type MsgUpdateProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *MsgUpdateProvider) Reset() { *m = MsgUpdateProvider{} } +func (m *MsgUpdateProvider) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProvider) ProtoMessage() {} +func (*MsgUpdateProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{3} +} +func (m *MsgUpdateProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProvider.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 *MsgUpdateProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProvider.Merge(m, src) +} +func (m *MsgUpdateProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProvider proto.InternalMessageInfo + +func (m *MsgUpdateProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgUpdateProvider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *MsgUpdateProvider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgUpdateProvider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +type MsgUpdateProviderResponse struct { +} + +func (m *MsgUpdateProviderResponse) Reset() { *m = MsgUpdateProviderResponse{} } +func (m *MsgUpdateProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateProviderResponse) ProtoMessage() {} +func (*MsgUpdateProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{4} +} +func (m *MsgUpdateProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateProviderResponse.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 *MsgUpdateProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateProviderResponse.Merge(m, src) +} +func (m *MsgUpdateProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateProviderResponse proto.InternalMessageInfo + +// MsgDeleteProvider defines an SDK message for deleting a provider +type MsgDeleteProvider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` +} + +func (m *MsgDeleteProvider) Reset() { *m = MsgDeleteProvider{} } +func (m *MsgDeleteProvider) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProvider) ProtoMessage() {} +func (*MsgDeleteProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{5} +} +func (m *MsgDeleteProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProvider.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 *MsgDeleteProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProvider.Merge(m, src) +} +func (m *MsgDeleteProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProvider proto.InternalMessageInfo + +func (m *MsgDeleteProvider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +type MsgDeleteProviderResponse struct { +} + +func (m *MsgDeleteProviderResponse) Reset() { *m = MsgDeleteProviderResponse{} } +func (m *MsgDeleteProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteProviderResponse) ProtoMessage() {} +func (*MsgDeleteProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{6} +} +func (m *MsgDeleteProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteProviderResponse.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 *MsgDeleteProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteProviderResponse.Merge(m, src) +} +func (m *MsgDeleteProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteProviderResponse proto.InternalMessageInfo + +// Provider stores owner and host details +type Provider struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"` + HostURI string `protobuf:"bytes,2,opt,name=host_uri,json=hostUri,proto3" json:"host_uri" yaml:"host_uri"` + Attributes github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes" json:"attributes" yaml:"attributes"` + Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_f65279e900573cf7, []int{7} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.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 *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func (m *Provider) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *Provider) GetHostURI() string { + if m != nil { + return m.HostURI + } + return "" +} + +func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Provider) GetInfo() ProviderInfo { + if m != nil { + return m.Info + } + return ProviderInfo{} +} + +func init() { + proto.RegisterType((*ProviderInfo)(nil), "akash.provider.v1beta3.ProviderInfo") + proto.RegisterType((*MsgCreateProvider)(nil), "akash.provider.v1beta3.MsgCreateProvider") + proto.RegisterType((*MsgCreateProviderResponse)(nil), "akash.provider.v1beta3.MsgCreateProviderResponse") + proto.RegisterType((*MsgUpdateProvider)(nil), "akash.provider.v1beta3.MsgUpdateProvider") + proto.RegisterType((*MsgUpdateProviderResponse)(nil), "akash.provider.v1beta3.MsgUpdateProviderResponse") + proto.RegisterType((*MsgDeleteProvider)(nil), "akash.provider.v1beta3.MsgDeleteProvider") + proto.RegisterType((*MsgDeleteProviderResponse)(nil), "akash.provider.v1beta3.MsgDeleteProviderResponse") + proto.RegisterType((*Provider)(nil), "akash.provider.v1beta3.Provider") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta3/provider.proto", fileDescriptor_f65279e900573cf7) +} + +var fileDescriptor_f65279e900573cf7 = []byte{ + // 575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x41, 0x6b, 0x13, 0x41, + 0x18, 0xdd, 0x6d, 0x12, 0x13, 0x27, 0xa5, 0xd2, 0x45, 0x24, 0x4d, 0xe9, 0x4e, 0x18, 0x14, 0xa2, + 0xe0, 0x2e, 0x4d, 0x0f, 0x4a, 0x3d, 0x99, 0x5a, 0xb0, 0x42, 0x40, 0x16, 0x72, 0xf1, 0x22, 0xbb, + 0x66, 0xba, 0x59, 0x9a, 0xec, 0x2c, 0x3b, 0x93, 0x86, 0x1e, 0xfd, 0x07, 0x82, 0x97, 0x1e, 0x7b, + 0x16, 0xfc, 0x1f, 0x3d, 0xf6, 0x22, 0x78, 0x1a, 0x25, 0xb9, 0x48, 0x8e, 0xf9, 0x05, 0xb2, 0x33, + 0xbb, 0xdb, 0x6c, 0x12, 0x83, 0xe2, 0xa5, 0x87, 0xde, 0x76, 0xde, 0xbc, 0xef, 0x7b, 0x1f, 0xdf, + 0x7b, 0x4c, 0x02, 0x1e, 0xd9, 0x27, 0x36, 0xed, 0x9a, 0x41, 0x48, 0x4e, 0xbd, 0x0e, 0x0e, 0xcd, + 0xd3, 0x5d, 0x07, 0x33, 0x7b, 0x2f, 0x05, 0x8c, 0x20, 0x24, 0x8c, 0x68, 0x0f, 0x04, 0xcd, 0x48, + 0xd1, 0x98, 0x56, 0xbd, 0xef, 0x12, 0x97, 0x08, 0x8a, 0x19, 0x7d, 0x49, 0x76, 0x15, 0xc9, 0xa6, + 0x8e, 0x4d, 0x71, 0xda, 0xd0, 0x66, 0x2c, 0xf4, 0x9c, 0x01, 0xc3, 0x92, 0x83, 0x3e, 0xaa, 0x60, + 0xfd, 0x6d, 0xdc, 0xee, 0xc8, 0x3f, 0x26, 0xda, 0x73, 0x50, 0xc0, 0x7d, 0xdb, 0xeb, 0x55, 0xd4, + 0x9a, 0x5a, 0xbf, 0xdb, 0x44, 0x23, 0x0e, 0x0b, 0x87, 0x2d, 0xdb, 0xeb, 0x4d, 0x38, 0x94, 0x37, + 0x53, 0x0e, 0xd7, 0xcf, 0xec, 0x7e, 0x6f, 0x1f, 0x89, 0x23, 0xb2, 0x24, 0xac, 0x3d, 0x03, 0xc5, + 0x21, 0x76, 0xa8, 0xc7, 0x70, 0x65, 0x4d, 0xd4, 0xee, 0x4c, 0x38, 0x4c, 0xa0, 0x29, 0x87, 0x1b, + 0xb2, 0x28, 0x06, 0x90, 0x95, 0x5c, 0xa1, 0xf3, 0x1c, 0xd8, 0x6c, 0x51, 0xf7, 0x20, 0xc4, 0x36, + 0xc3, 0xc9, 0x30, 0x9a, 0x09, 0x0a, 0x64, 0xe8, 0xe3, 0x30, 0x1e, 0x64, 0x2b, 0xd2, 0x17, 0xc0, + 0xb5, 0xbe, 0x38, 0x22, 0x4b, 0xc2, 0xda, 0x21, 0x28, 0x75, 0x09, 0x65, 0xef, 0x07, 0xa1, 0x17, + 0x0f, 0xf0, 0x64, 0xc4, 0x61, 0xf1, 0x35, 0xa1, 0xac, 0x6d, 0x1d, 0x4d, 0x38, 0x4c, 0xaf, 0xa7, + 0x1c, 0xde, 0x93, 0x1d, 0x12, 0x04, 0x59, 0xc5, 0xe8, 0xb3, 0x1d, 0x7a, 0xda, 0x57, 0x15, 0x80, + 0x74, 0x4b, 0xb4, 0x92, 0xab, 0xe5, 0xea, 0xe5, 0xc6, 0x8e, 0x21, 0x37, 0x1f, 0xed, 0x32, 0xd9, + 0xba, 0xf1, 0x32, 0x61, 0x35, 0xfd, 0x4b, 0x0e, 0x95, 0x09, 0x87, 0x33, 0x85, 0x53, 0x0e, 0x37, + 0xa5, 0xc6, 0x35, 0x86, 0xbe, 0xfc, 0x80, 0x07, 0xae, 0xc7, 0xba, 0x03, 0xc7, 0xf8, 0x40, 0xfa, + 0xa6, 0xe8, 0xf9, 0xd4, 0xc7, 0x6c, 0x48, 0xc2, 0x93, 0xf8, 0x64, 0x07, 0x9e, 0xe9, 0x12, 0xd3, + 0x27, 0x1d, 0x6c, 0xb2, 0xb3, 0x00, 0x53, 0x73, 0x41, 0x8e, 0x5a, 0x33, 0x3a, 0x5a, 0x1b, 0xe4, + 0x3d, 0xff, 0x98, 0x54, 0xf2, 0x35, 0xb5, 0x5e, 0x6e, 0x3c, 0x34, 0x96, 0x47, 0xc4, 0x98, 0x35, + 0xb9, 0xb9, 0x1d, 0xcf, 0x2b, 0x2a, 0xa7, 0x1c, 0x96, 0xe5, 0xa4, 0xd1, 0x09, 0x59, 0x02, 0xdc, + 0xcf, 0xff, 0xba, 0x80, 0x0a, 0xda, 0x06, 0x5b, 0x0b, 0xce, 0x58, 0x98, 0x06, 0xc4, 0xa7, 0xa9, + 0x6f, 0xed, 0xa0, 0x73, 0xeb, 0xdb, 0x8d, 0xf4, 0x2d, 0xeb, 0x4c, 0xea, 0xdb, 0x1b, 0x61, 0xdb, + 0x2b, 0xdc, 0xc3, 0xff, 0x61, 0x5b, 0x46, 0x28, 0xdb, 0x2b, 0x15, 0xfa, 0x9c, 0x03, 0xa5, 0xdb, + 0x5c, 0xdc, 0x8c, 0x5c, 0x94, 0xce, 0x2f, 0xa0, 0x12, 0x59, 0xd6, 0xf8, 0xb6, 0x06, 0x72, 0x2d, + 0xea, 0x6a, 0x3e, 0xd8, 0x98, 0x7b, 0x72, 0x1f, 0xff, 0x49, 0x6c, 0xe1, 0x0d, 0xa8, 0xee, 0xfe, + 0x35, 0x35, 0x49, 0x43, 0xa4, 0x37, 0xf7, 0x54, 0xac, 0xd2, 0xcb, 0x52, 0x57, 0xea, 0x2d, 0x8f, + 0x79, 0xa4, 0x37, 0x97, 0xf1, 0x55, 0x7a, 0x59, 0xea, 0x4a, 0xbd, 0xe5, 0x69, 0x6f, 0xb6, 0x2f, + 0x47, 0xba, 0x7a, 0x35, 0xd2, 0xd5, 0x9f, 0x23, 0x5d, 0xfd, 0x34, 0xd6, 0x95, 0xab, 0xb1, 0xae, + 0x7c, 0x1f, 0xeb, 0xca, 0xbb, 0x17, 0xff, 0x90, 0x91, 0xf9, 0xbf, 0x00, 0xce, 0x1d, 0xf1, 0x43, + 0xbd, 0xf7, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xca, 0xbb, 0x8f, 0x23, 0x08, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateProvider(ctx context.Context, in *MsgCreateProvider, opts ...grpc.CallOption) (*MsgCreateProviderResponse, error) { + out := new(MsgCreateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta3.Msg/CreateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateProvider(ctx context.Context, in *MsgUpdateProvider, opts ...grpc.CallOption) (*MsgUpdateProviderResponse, error) { + out := new(MsgUpdateProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta3.Msg/UpdateProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteProvider(ctx context.Context, in *MsgDeleteProvider, opts ...grpc.CallOption) (*MsgDeleteProviderResponse, error) { + out := new(MsgDeleteProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta3.Msg/DeleteProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateProvider defines a method that creates a provider given the proper inputs + CreateProvider(context.Context, *MsgCreateProvider) (*MsgCreateProviderResponse, error) + // UpdateProvider defines a method that updates a provider given the proper inputs + UpdateProvider(context.Context, *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) + // DeleteProvider defines a method that deletes a provider given the proper inputs + DeleteProvider(context.Context, *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateProvider(ctx context.Context, req *MsgCreateProvider) (*MsgCreateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProvider not implemented") +} +func (*UnimplementedMsgServer) UpdateProvider(ctx context.Context, req *MsgUpdateProvider) (*MsgUpdateProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProvider not implemented") +} +func (*UnimplementedMsgServer) DeleteProvider(ctx context.Context, req *MsgDeleteProvider) (*MsgDeleteProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProvider not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta3.Msg/CreateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateProvider(ctx, req.(*MsgCreateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta3.Msg/UpdateProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateProvider(ctx, req.(*MsgUpdateProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta3.Msg/DeleteProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteProvider(ctx, req.(*MsgDeleteProvider)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.provider.v1beta3.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateProvider", + Handler: _Msg_CreateProvider_Handler, + }, + { + MethodName: "UpdateProvider", + Handler: _Msg_UpdateProvider_Handler, + }, + { + MethodName: "DeleteProvider", + Handler: _Msg_DeleteProvider_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/provider/v1beta3/provider.proto", +} + +func (m *ProviderInfo) 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 *ProviderInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x12 + } + if len(m.EMail) > 0 { + i -= len(m.EMail) + copy(dAtA[i:], m.EMail) + i = encodeVarintProvider(dAtA, i, uint64(len(m.EMail))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProvider) 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 *MsgCreateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateProviderResponse) 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 *MsgCreateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProvider) 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 *MsgUpdateProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateProviderResponse) 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 *MsgUpdateProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProvider) 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 *MsgDeleteProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteProviderResponse) 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 *MsgDeleteProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *Provider) 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 *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintProvider(dAtA, i, uint64(len(m.HostURI))) + i-- + dAtA[i] = 0x12 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProvider(dAtA []byte, offset int, v uint64) int { + offset -= sovProvider(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProviderInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EMail) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgCreateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgCreateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func (m *MsgUpdateProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func (m *MsgDeleteProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProvider(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovProvider(uint64(l)) + return n +} + +func sovProvider(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProvider(x uint64) (n int) { + return sovProvider(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProviderInfo) 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 ErrIntOverflowProvider + } + 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: ProviderInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProviderInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EMail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EMail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProvider) 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 ErrIntOverflowProvider + } + 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: MsgCreateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgCreateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProvider) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgUpdateProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProvider) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProvider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteProviderResponse) 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 ErrIntOverflowProvider + } + 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: MsgDeleteProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Provider) 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 ErrIntOverflowProvider + } + 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: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: 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) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + 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 ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProvider(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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrIntOverflowProvider + } + 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, ErrInvalidLengthProvider + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProvider + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProvider + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProvider = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProvider = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProvider = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta3/query.pb.go b/go/node/provider/v1beta3/query.pb.go new file mode 100644 index 00000000..24fc0a2e --- /dev/null +++ b/go/node/provider/v1beta3/query.pb.go @@ -0,0 +1,1059 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta3/query.proto + +package v1beta3 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryProvidersRequest is request type for the Query/Providers RPC method +type QueryProvidersRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersRequest) Reset() { *m = QueryProvidersRequest{} } +func (m *QueryProvidersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersRequest) ProtoMessage() {} +func (*QueryProvidersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b2720b5eb3b981bc, []int{0} +} +func (m *QueryProvidersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersRequest.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 *QueryProvidersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersRequest.Merge(m, src) +} +func (m *QueryProvidersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersRequest proto.InternalMessageInfo + +func (m *QueryProvidersRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +type QueryProvidersResponse struct { + Providers Providers `protobuf:"bytes,1,rep,name=providers,proto3,castrepeated=Providers" json:"providers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersResponse) Reset() { *m = QueryProvidersResponse{} } +func (m *QueryProvidersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersResponse) ProtoMessage() {} +func (*QueryProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b2720b5eb3b981bc, []int{1} +} +func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersResponse.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 *QueryProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersResponse.Merge(m, src) +} +func (m *QueryProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo + +func (m *QueryProvidersResponse) GetProviders() Providers { + if m != nil { + return m.Providers + } + return nil +} + +func (m *QueryProvidersResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +type QueryProviderRequest struct { + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (m *QueryProviderRequest) Reset() { *m = QueryProviderRequest{} } +func (m *QueryProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderRequest) ProtoMessage() {} +func (*QueryProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b2720b5eb3b981bc, []int{2} +} +func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderRequest.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 *QueryProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderRequest.Merge(m, src) +} +func (m *QueryProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo + +func (m *QueryProviderRequest) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +// QueryProviderResponse is response type for the Query/Provider RPC method +type QueryProviderResponse struct { + Provider Provider `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider"` +} + +func (m *QueryProviderResponse) Reset() { *m = QueryProviderResponse{} } +func (m *QueryProviderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProviderResponse) ProtoMessage() {} +func (*QueryProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b2720b5eb3b981bc, []int{3} +} +func (m *QueryProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderResponse.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 *QueryProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderResponse.Merge(m, src) +} +func (m *QueryProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderResponse proto.InternalMessageInfo + +func (m *QueryProviderResponse) GetProvider() Provider { + if m != nil { + return m.Provider + } + return Provider{} +} + +func init() { + proto.RegisterType((*QueryProvidersRequest)(nil), "akash.provider.v1beta3.QueryProvidersRequest") + proto.RegisterType((*QueryProvidersResponse)(nil), "akash.provider.v1beta3.QueryProvidersResponse") + proto.RegisterType((*QueryProviderRequest)(nil), "akash.provider.v1beta3.QueryProviderRequest") + proto.RegisterType((*QueryProviderResponse)(nil), "akash.provider.v1beta3.QueryProviderResponse") +} + +func init() { + proto.RegisterFile("akash/provider/v1beta3/query.proto", fileDescriptor_b2720b5eb3b981bc) +} + +var fileDescriptor_b2720b5eb3b981bc = []byte{ + // 449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x81, 0xa2, 0xe6, 0x3a, 0x71, 0x0a, 0x55, 0x15, 0x21, 0x37, 0x18, 0x01, 0x2d, + 0x34, 0x77, 0x4a, 0x3a, 0xb2, 0x65, 0x80, 0xb5, 0xb5, 0xc4, 0x02, 0x03, 0x3a, 0xb7, 0xa7, 0xab, + 0x55, 0x7a, 0xcf, 0xf1, 0x39, 0x89, 0x10, 0x62, 0xe1, 0x13, 0x20, 0x21, 0x16, 0x3e, 0x02, 0x33, + 0x23, 0x1f, 0x20, 0x63, 0x24, 0x16, 0x26, 0x40, 0x09, 0x1f, 0x04, 0xf9, 0xee, 0x1c, 0x93, 0x34, + 0x91, 0xb3, 0xf9, 0xec, 0xff, 0xfb, 0xbf, 0xdf, 0xfb, 0x9f, 0x1f, 0x0e, 0xf8, 0x25, 0xd7, 0x17, + 0x2c, 0x49, 0x61, 0x18, 0x9f, 0x8b, 0x94, 0x0d, 0x3b, 0x91, 0xc8, 0xf8, 0x31, 0xeb, 0x0f, 0x44, + 0xfa, 0x96, 0x26, 0x29, 0x64, 0x40, 0x76, 0x8d, 0x86, 0x16, 0x1a, 0xea, 0x34, 0xcd, 0x86, 0x04, + 0x09, 0x46, 0xc2, 0xf2, 0x27, 0xab, 0x6e, 0xde, 0x95, 0x00, 0xf2, 0x8d, 0x60, 0x3c, 0x89, 0x19, + 0x57, 0x0a, 0x32, 0x9e, 0xc5, 0xa0, 0xb4, 0xfb, 0xfa, 0xf8, 0x0c, 0xf4, 0x15, 0x68, 0x16, 0x71, + 0x2d, 0x6c, 0x13, 0xd7, 0xb2, 0xc3, 0x12, 0x2e, 0x63, 0x65, 0xc4, 0x4e, 0xfb, 0x60, 0x0d, 0xdb, + 0x1c, 0xc4, 0xc8, 0x82, 0xd7, 0xf8, 0xce, 0x69, 0x6e, 0x74, 0xe2, 0x5e, 0xeb, 0x50, 0xf4, 0x07, + 0x42, 0x67, 0xe4, 0x19, 0xc6, 0xa5, 0xe7, 0x1e, 0x6a, 0xa1, 0x83, 0x9d, 0xee, 0x43, 0x6a, 0x01, + 0x68, 0x0e, 0x40, 0xed, 0x94, 0x0e, 0x80, 0x9e, 0x70, 0x29, 0x5c, 0x6d, 0xf8, 0x5f, 0x65, 0xf0, + 0x0d, 0xe1, 0xdd, 0xe5, 0x0e, 0x3a, 0x01, 0xa5, 0x05, 0x39, 0xc5, 0xf5, 0x82, 0x46, 0xef, 0xa1, + 0xd6, 0x8d, 0x83, 0x9d, 0x6e, 0x8b, 0xae, 0x8e, 0x8b, 0x16, 0xd5, 0xbd, 0xdb, 0xe3, 0x5f, 0xfb, + 0xde, 0xd7, 0xdf, 0xfb, 0xf5, 0xd2, 0xaf, 0x74, 0x21, 0xcf, 0x17, 0xa8, 0x6b, 0x86, 0xfa, 0x51, + 0x25, 0xb5, 0xe5, 0x59, 0xc0, 0x3e, 0xc2, 0x8d, 0x05, 0xea, 0x22, 0x96, 0x06, 0xde, 0x82, 0x91, + 0x12, 0xa9, 0x49, 0xa4, 0x1e, 0xda, 0x43, 0xf0, 0x6a, 0x29, 0xc5, 0xf9, 0x88, 0x3d, 0xbc, 0x5d, + 0xc0, 0xb9, 0x0c, 0xab, 0x27, 0xbc, 0x99, 0x4f, 0x18, 0xce, 0xeb, 0xba, 0xdf, 0x6b, 0x78, 0xcb, + 0xb8, 0x93, 0xcf, 0x08, 0x97, 0x63, 0x93, 0xf6, 0x3a, 0xa7, 0x95, 0x17, 0xda, 0xa4, 0x9b, 0xca, + 0x2d, 0x7a, 0x70, 0xf8, 0xe1, 0xc7, 0xdf, 0x4f, 0xb5, 0xfb, 0xe4, 0x1e, 0xab, 0xf8, 0x93, 0x34, + 0xf9, 0x82, 0xf0, 0x76, 0x61, 0x40, 0x8e, 0x36, 0xea, 0x53, 0x50, 0xb5, 0x37, 0x54, 0x3b, 0xa8, + 0x8e, 0x81, 0x7a, 0x42, 0x0e, 0x2b, 0xa1, 0xd8, 0x3b, 0x73, 0x35, 0xef, 0x7b, 0x2f, 0xc6, 0x53, + 0x1f, 0x4d, 0xa6, 0x3e, 0xfa, 0x33, 0xf5, 0xd1, 0xc7, 0x99, 0xef, 0x4d, 0x66, 0xbe, 0xf7, 0x73, + 0xe6, 0x7b, 0x2f, 0x9f, 0xca, 0x38, 0xbb, 0x18, 0x44, 0xf4, 0x0c, 0xae, 0xac, 0x5d, 0x5b, 0x89, + 0x6c, 0x04, 0xe9, 0xa5, 0x3b, 0xe5, 0x4b, 0x28, 0x81, 0x29, 0x38, 0x17, 0xd7, 0x1a, 0x45, 0xb7, + 0xcc, 0xfe, 0x1c, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x89, 0x43, 0x69, 0x04, 0x04, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Providers queries providers + Providers(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // Provider queries provider details + Provider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Providers(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta3.Query/Providers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Provider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) { + out := new(QueryProviderResponse) + err := c.cc.Invoke(ctx, "/akash.provider.v1beta3.Query/Provider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Providers queries providers + Providers(context.Context, *QueryProvidersRequest) (*QueryProvidersResponse, error) + // Provider queries provider details + Provider(context.Context, *QueryProviderRequest) (*QueryProviderResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Providers(ctx context.Context, req *QueryProvidersRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Providers not implemented") +} +func (*UnimplementedQueryServer) Provider(ctx context.Context, req *QueryProviderRequest) (*QueryProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Provider not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Providers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProvidersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Providers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta3.Query/Providers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Providers(ctx, req.(*QueryProvidersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Provider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Provider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/akash.provider.v1beta3.Query/Provider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Provider(ctx, req.(*QueryProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "akash.provider.v1beta3.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Providers", + Handler: _Query_Providers_Handler, + }, + { + MethodName: "Provider", + Handler: _Query_Provider_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "akash/provider/v1beta3/query.proto", +} + +func (m *QueryProvidersRequest) 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 *QueryProvidersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersRequest) 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 *QueryProvidersResponse) 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 *QueryProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersResponse) 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.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[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 (m *QueryProviderRequest) 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 *QueryProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderResponse) 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 *QueryProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Provider.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 *QueryProvidersRequest) 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 *QueryProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + 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 (m *QueryProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Provider.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryProvidersRequest) 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: QueryProvidersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersRequest: 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 *QueryProvidersResponse) 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: QueryProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", 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.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-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) + } + 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.PageResponse{} + } + 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 *QueryProviderRequest) 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: QueryProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderRequest: 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) + } + 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.Owner = 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 *QueryProviderResponse) 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: QueryProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", 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.Provider.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 skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta3/query.pb.gw.go b/go/node/provider/v1beta3/query.pb.gw.go new file mode 100644 index 00000000..e32be932 --- /dev/null +++ b/go/node/provider/v1beta3/query.pb.gw.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: akash/provider/v1beta3/query.proto + +/* +Package v1beta3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1beta3 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_Providers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Providers_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + 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_Providers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Providers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Providers_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + 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_Providers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Providers(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := client.Provider(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["owner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "owner") + } + + protoReq.Owner, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) + } + + msg, err := server.Provider(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. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Providers_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_Providers_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_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Provider_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_Provider_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_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Providers_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_Providers_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_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Provider_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_Provider_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_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta3", "providers"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta3", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Providers_0 = runtime.ForwardResponseMessage + + forward_Query_Provider_0 = runtime.ForwardResponseMessage +) diff --git a/go/node/provider/v1beta3/types.go b/go/node/provider/v1beta3/types.go new file mode 100644 index 00000000..28bc0352 --- /dev/null +++ b/go/node/provider/v1beta3/types.go @@ -0,0 +1,67 @@ +package v1beta3 + +import ( + "bytes" + "fmt" + "net/url" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// String implements the Stringer interface for a Provider object. +func (p Provider) String() string { + res := fmt.Sprintf(`Deployment + Owner: %s + HostURI: %s + Attributes: %v + `, p.Owner, p.HostURI, p.Attributes) + + if !p.Info.IsEmpty() { + res += fmt.Sprintf("Info: %v\n", p.Info) + } + return res +} + +// Providers is the collection of Provider +type Providers []Provider + +// String implements the Stringer interface for a Providers object. +func (obj Providers) String() string { + var buf bytes.Buffer + + const sep = "\n\n" + + for _, p := range obj { + buf.WriteString(p.String()) + buf.WriteString(sep) + } + + if len(obj) > 0 { + buf.Truncate(buf.Len() - len(sep)) + } + + return buf.String() +} + +// Address implements provider and returns owner of provider +func (p *Provider) Address() sdk.AccAddress { + owner, err := sdk.AccAddressFromBech32(p.Owner) + if err != nil { + panic(err) + } + + return owner +} + +func (m ProviderInfo) IsEmpty() bool { + return m.EMail == "" && m.Website == "" +} + +func (m ProviderInfo) Validate() error { + if m.Website != "" { + if _, err := url.Parse(m.Website); err != nil { + return ErrInvalidInfoWebsite + } + } + return nil +} diff --git a/go/node/types/unit/unit.go b/go/node/types/unit/unit.go new file mode 100644 index 00000000..cb5b09af --- /dev/null +++ b/go/node/types/unit/unit.go @@ -0,0 +1,33 @@ +package unit + +const ( + // K equals to 1000 + K = 1000 + // Ki equals to 1024 + Ki = 1024 + + // M equals to square of K + M = K * K + // Mi equals to square of Ki + Mi = Ki * Ki + + // G equals to M times of K + G = M * K + // Gi equals to Mi times of Ki + Gi = Mi * Ki + + // T equals to G times of K + T = G * K + // Ti equals to Gi times of Ki + Ti = Gi * Ki + + // P equals to T times of K + P = T * K + // Pi equals to Ti times of Ki + Pi = Ti * Ki + + // E equals to P times of K + E = P * K + // Ei equals to Pi times of Ki + Ei = Pi * Ki +) diff --git a/go/node/types/v1beta1/attribute.go b/go/node/types/v1beta1/attribute.go new file mode 100644 index 00000000..98aace15 --- /dev/null +++ b/go/node/types/v1beta1/attribute.go @@ -0,0 +1,138 @@ +package v1beta1 + +import ( + "errors" + "reflect" + "regexp" + + "gopkg.in/yaml.v3" +) + +const ( + attributeNameRegexpString = `^[a-zA-Z][\w-]{1,30}[a-zA-Z0-9]$` +) + +var ( + ErrAttributesDuplicateKeys = errors.New("attributes cannot have duplicate keys") + ErrInvalidAttributeKey = errors.New("attribute key does not match regexp " + attributeNameRegexpString) +) + +var ( + attributeNameRegexp = regexp.MustCompile(attributeNameRegexpString) +) + +/* +Attributes purpose of using this type in favor of Cosmos's sdk.Attribute is +ability to later extend it with operators to support querying on things like +cpu/memory/storage attributes +At this moment type though is same as sdk.Attributes but all akash libraries were +turned to use a new one +*/ +type Attributes []Attribute +type AttributeValue string + +func NewStringAttribute(key, val string) Attribute { + return Attribute{ + Key: key, + Value: val, + } +} + +func (m *Attribute) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *Attribute) Equal(rhs *Attribute) bool { + return reflect.DeepEqual(m, rhs) +} + +func (m Attribute) SubsetOf(rhs Attribute) bool { + if m.Key == rhs.Key && m.Value == rhs.Value { + return true + } + + return false +} + +func (attr Attributes) Validate() error { + store := make(map[string]bool) + + for i := range attr { + if !attributeNameRegexp.MatchString(attr[i].Key) { + return ErrInvalidAttributeKey + } + + if _, ok := store[attr[i].Key]; ok { + return ErrAttributesDuplicateKeys + } + + store[attr[i].Key] = true + } + + return nil +} + +// AttributesSubsetOf check if a is subset of that +// For example there are two yaml files being converted into these attributes +// example 1: a is subset of b +// --- +// // a +// // nolint: gofmt +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-1 +// - us-east-2 +// +// example 2: a is not subset of b +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// example 3: a is subset of b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +func AttributesSubsetOf(a, b Attributes) bool { +loop: + for _, req := range a { + for _, attr := range b { + if req.SubsetOf(attr) { + continue loop + } + } + return false + } + + return true +} + +func (attr Attributes) SubsetOf(that Attributes) bool { + return AttributesSubsetOf(attr, that) +} diff --git a/go/node/types/v1beta1/attribute.pb.go b/go/node/types/v1beta1/attribute.pb.go new file mode 100644 index 00000000..c286997a --- /dev/null +++ b/go/node/types/v1beta1/attribute.pb.go @@ -0,0 +1,812 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta1/attribute.proto + +package v1beta1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Attribute represents key value pair +type Attribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" yaml:"key"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"` +} + +func (m *Attribute) Reset() { *m = Attribute{} } +func (*Attribute) ProtoMessage() {} +func (*Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_90b8f964cf66c51d, []int{0} +} +func (m *Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Attribute.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 *Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attribute.Merge(m, src) +} +func (m *Attribute) XXX_Size() int { + return m.Size() +} +func (m *Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_Attribute proto.InternalMessageInfo + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +type SignedBy struct { + // all_of all keys in this list must have signed attributes + AllOf []string `protobuf:"bytes,1,rep,name=all_of,json=allOf,proto3" json:"all_of" yaml:"allOf"` + // any_of at least of of the keys from the list must have signed attributes + AnyOf []string `protobuf:"bytes,2,rep,name=any_of,json=anyOf,proto3" json:"any_of" yaml:"anyOf"` +} + +func (m *SignedBy) Reset() { *m = SignedBy{} } +func (*SignedBy) ProtoMessage() {} +func (*SignedBy) Descriptor() ([]byte, []int) { + return fileDescriptor_90b8f964cf66c51d, []int{1} +} +func (m *SignedBy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignedBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignedBy.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 *SignedBy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedBy.Merge(m, src) +} +func (m *SignedBy) XXX_Size() int { + return m.Size() +} +func (m *SignedBy) XXX_DiscardUnknown() { + xxx_messageInfo_SignedBy.DiscardUnknown(m) +} + +var xxx_messageInfo_SignedBy proto.InternalMessageInfo + +// PlacementRequirements +type PlacementRequirements struct { + // SignedBy list of keys that tenants expect to have signatures from + SignedBy SignedBy `protobuf:"bytes,1,opt,name=signed_by,json=signedBy,proto3" json:"signed_by" yaml:"signed_by"` + // Attribute list of attributes tenant expects from the provider + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *PlacementRequirements) Reset() { *m = PlacementRequirements{} } +func (*PlacementRequirements) ProtoMessage() {} +func (*PlacementRequirements) Descriptor() ([]byte, []int) { + return fileDescriptor_90b8f964cf66c51d, []int{2} +} +func (m *PlacementRequirements) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRequirements.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 *PlacementRequirements) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRequirements.Merge(m, src) +} +func (m *PlacementRequirements) XXX_Size() int { + return m.Size() +} +func (m *PlacementRequirements) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRequirements.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRequirements proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Attribute)(nil), "akash.base.v1beta1.Attribute") + proto.RegisterType((*SignedBy)(nil), "akash.base.v1beta1.SignedBy") + proto.RegisterType((*PlacementRequirements)(nil), "akash.base.v1beta1.PlacementRequirements") +} + +func init() { + proto.RegisterFile("akash/base/v1beta1/attribute.proto", fileDescriptor_90b8f964cf66c51d) +} + +var fileDescriptor_90b8f964cf66c51d = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0xce, 0xd3, 0x30, + 0x14, 0xc5, 0x93, 0xef, 0xa3, 0x55, 0xe3, 0x22, 0x54, 0x22, 0x90, 0xaa, 0x0a, 0xec, 0xca, 0x12, + 0xd0, 0x85, 0x58, 0x2d, 0x0b, 0xea, 0x46, 0x5e, 0x00, 0x14, 0xb6, 0x32, 0x14, 0xa7, 0x75, 0xd3, + 0x28, 0x69, 0x5c, 0x12, 0xa7, 0x28, 0x1b, 0x23, 0x23, 0x8f, 0xc0, 0xe3, 0x74, 0xec, 0xd8, 0x29, + 0x82, 0x74, 0x40, 0xea, 0x98, 0x27, 0x40, 0x71, 0xfe, 0x34, 0x12, 0x4c, 0x76, 0xce, 0x3d, 0xbf, + 0xdc, 0x7b, 0x6c, 0x03, 0x4c, 0x3d, 0x1a, 0x6d, 0x89, 0x4d, 0x23, 0x46, 0x0e, 0x53, 0x9b, 0x09, + 0x3a, 0x25, 0x54, 0x88, 0xd0, 0xb5, 0x63, 0xc1, 0x8c, 0x7d, 0xc8, 0x05, 0xd7, 0x75, 0xe9, 0x31, + 0x0a, 0x8f, 0x51, 0x79, 0x46, 0x4f, 0x1c, 0xee, 0x70, 0x59, 0x26, 0xc5, 0xae, 0x74, 0xe2, 0x4f, + 0x40, 0x7b, 0x57, 0xc3, 0xfa, 0x18, 0xdc, 0x7b, 0x2c, 0x19, 0xaa, 0x63, 0x75, 0xa2, 0x99, 0x8f, + 0xf2, 0x14, 0x81, 0x84, 0xee, 0xfc, 0x39, 0xf6, 0x58, 0x82, 0xad, 0xa2, 0xa4, 0xbf, 0x04, 0x9d, + 0x03, 0xf5, 0x63, 0x36, 0xbc, 0x93, 0x9e, 0x41, 0x9e, 0xa2, 0x87, 0xa5, 0x47, 0xca, 0xd8, 0x2a, + 0xcb, 0xf3, 0x07, 0xdf, 0x7f, 0x22, 0x05, 0x1f, 0x40, 0xef, 0xa3, 0xeb, 0x04, 0x6c, 0x6d, 0x26, + 0xfa, 0x14, 0x74, 0xa9, 0xef, 0x2f, 0xf9, 0x66, 0xa8, 0x8e, 0xef, 0x27, 0x9a, 0x39, 0xba, 0xa6, + 0xa8, 0x52, 0x6e, 0x3f, 0xa1, 0xbe, 0xff, 0x7e, 0x83, 0xad, 0x8e, 0x5c, 0x25, 0x12, 0x24, 0x05, + 0x72, 0xd7, 0x42, 0xa4, 0xd2, 0x42, 0x82, 0xa4, 0x44, 0x8a, 0xb5, 0xea, 0xfb, 0x47, 0x05, 0x4f, + 0x3f, 0xf8, 0x74, 0xc5, 0x76, 0x2c, 0x10, 0x16, 0xfb, 0x12, 0xbb, 0xa1, 0xdc, 0x46, 0xfa, 0x67, + 0xa0, 0x45, 0x72, 0xa2, 0xa5, 0x5d, 0xe6, 0xec, 0xcf, 0x9e, 0x19, 0xff, 0x1e, 0x96, 0x51, 0x8f, + 0x6d, 0xbe, 0x38, 0xa6, 0x48, 0xb9, 0xa6, 0xe8, 0x86, 0xe5, 0x29, 0x1a, 0x94, 0xad, 0x1b, 0x09, + 0x5b, 0xbd, 0xa8, 0xce, 0xb9, 0x01, 0xa0, 0xb9, 0x8d, 0x48, 0x0e, 0xde, 0x9f, 0x3d, 0xff, 0x5f, + 0x8b, 0xe6, 0xd8, 0xcd, 0x57, 0x55, 0x8f, 0x16, 0x98, 0xa7, 0xe8, 0x71, 0x95, 0xaf, 0xd1, 0xb0, + 0xd5, 0x32, 0x94, 0x49, 0xcd, 0xc5, 0xf9, 0x37, 0x54, 0xbe, 0x65, 0x50, 0x39, 0x66, 0x50, 0x3d, + 0x65, 0x50, 0xfd, 0x95, 0x41, 0xf5, 0xc7, 0x05, 0x2a, 0xa7, 0x0b, 0x54, 0xce, 0x17, 0xa8, 0x2c, + 0xde, 0x3a, 0xae, 0xd8, 0xc6, 0xb6, 0xb1, 0xe2, 0x3b, 0x22, 0xa7, 0x78, 0x1d, 0x30, 0xf1, 0x95, + 0x87, 0x5e, 0xf5, 0x45, 0xf7, 0x2e, 0x71, 0x38, 0x09, 0xf8, 0x9a, 0x11, 0x91, 0xec, 0x59, 0x54, + 0x3f, 0x2a, 0xbb, 0x2b, 0x5f, 0xc8, 0x9b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xf3, 0x05, + 0xbe, 0x71, 0x02, 0x00, 0x00, +} + +func (m *Attribute) 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 *Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignedBy) 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 *SignedBy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedBy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AnyOf) > 0 { + for iNdEx := len(m.AnyOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AnyOf[iNdEx]) + copy(dAtA[i:], m.AnyOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AnyOf[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.AllOf) > 0 { + for iNdEx := len(m.AllOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllOf[iNdEx]) + copy(dAtA[i:], m.AllOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AllOf[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PlacementRequirements) 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 *PlacementRequirements) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.SignedBy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAttribute(dAtA []byte, offset int, v uint64) int { + offset -= sovAttribute(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + return n +} + +func (m *SignedBy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AllOf) > 0 { + for _, s := range m.AllOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + if len(m.AnyOf) > 0 { + for _, s := range m.AnyOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func (m *PlacementRequirements) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SignedBy.Size() + n += 1 + l + sovAttribute(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func sovAttribute(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAttribute(x uint64) (n int) { + return sovAttribute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Attribute) 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 ErrIntOverflowAttribute + } + 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: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignedBy) 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 ErrIntOverflowAttribute + } + 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: SignedBy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignedBy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllOf = append(m.AllOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyOf = append(m.AnyOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRequirements) 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 ErrIntOverflowAttribute + } + 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: PlacementRequirements: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PlacementRequirements: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedBy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SignedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAttribute(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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrInvalidLengthAttribute + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAttribute + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAttribute + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAttribute = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAttribute = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAttribute = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta1/attribute_test.go b/go/node/types/v1beta1/attribute_test.go new file mode 100644 index 00000000..0a645fdf --- /dev/null +++ b/go/node/types/v1beta1/attribute_test.go @@ -0,0 +1,83 @@ +package v1beta1_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + types "github.com/akash-network/node/types/v1beta1" +) + +func TestAttributes_Validate(t *testing.T) { + attr := types.Attributes{ + {Key: "key"}, + {Key: "key"}, + } + + require.EqualError(t, attr.Validate(), types.ErrAttributesDuplicateKeys.Error()) + + // unsupported key symbol + attr = types.Attributes{ + {Key: "$"}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) + + // empty key + attr = types.Attributes{ + {Key: ""}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) + // to long key + attr = types.Attributes{ + {Key: "sdgkhaeirugaeroigheirghseiargfs3s"}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) +} + +func TestAttribute_Equal(t *testing.T) { + attr1 := &types.Attribute{Key: "key1", Value: "val1"} + attr2 := &types.Attribute{Key: "key1", Value: "val1"} + attr3 := &types.Attribute{Key: "key1", Value: "val2"} + + require.True(t, attr1.Equal(attr2)) + require.False(t, attr1.Equal(attr3)) +} + +func TestAttribute_SubsetOf(t *testing.T) { + attr1 := types.Attribute{Key: "key1", Value: "val1"} + attr2 := types.Attribute{Key: "key1", Value: "val1"} + attr3 := types.Attribute{Key: "key1", Value: "val2"} + + require.True(t, attr1.SubsetOf(attr2)) + require.False(t, attr1.SubsetOf(attr3)) +} + +func TestAttributes_SubsetOf(t *testing.T) { + attr1 := types.Attributes{ + {Key: "key1", Value: "val1"}, + } + + attr2 := types.Attributes{ + {Key: "key1", Value: "val1"}, + {Key: "key2", Value: "val2"}, + } + + attr3 := types.Attributes{ + {Key: "key1", Value: "val1"}, + {Key: "key2", Value: "val2"}, + {Key: "key3", Value: "val3"}, + {Key: "key4", Value: "val4"}, + } + + attr4 := types.Attributes{ + {Key: "key3", Value: "val3"}, + {Key: "key4", Value: "val4"}, + } + + require.True(t, attr1.SubsetOf(attr2)) + require.True(t, attr2.SubsetOf(attr3)) + require.False(t, attr1.SubsetOf(attr4)) +} diff --git a/go/node/types/v1beta1/endpoint.pb.go b/go/node/types/v1beta1/endpoint.pb.go new file mode 100644 index 00000000..accbd006 --- /dev/null +++ b/go/node/types/v1beta1/endpoint.pb.go @@ -0,0 +1,358 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta1/endpoint.proto + +package v1beta1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// This describes how the endpoint is implemented when the lease is deployed +type Endpoint_Kind int32 + +const ( + // Describes an endpoint that becomes a Kubernetes Ingress + Endpoint_SHARED_HTTP Endpoint_Kind = 0 + // Describes an endpoint that becomes a Kubernetes NodePort + Endpoint_RANDOM_PORT Endpoint_Kind = 1 +) + +var Endpoint_Kind_name = map[int32]string{ + 0: "SHARED_HTTP", + 1: "RANDOM_PORT", +} + +var Endpoint_Kind_value = map[string]int32{ + "SHARED_HTTP": 0, + "RANDOM_PORT": 1, +} + +func (x Endpoint_Kind) String() string { + return proto.EnumName(Endpoint_Kind_name, int32(x)) +} + +func (Endpoint_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_07fb133899333c18, []int{0, 0} +} + +// Endpoint describes a publicly accessible IP service +type Endpoint struct { + Kind Endpoint_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=akash.base.v1beta1.Endpoint_Kind" json:"kind,omitempty"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_07fb133899333c18, []int{0} +} +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Endpoint.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 *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return m.Size() +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetKind() Endpoint_Kind { + if m != nil { + return m.Kind + } + return Endpoint_SHARED_HTTP +} + +func init() { + proto.RegisterEnum("akash.base.v1beta1.Endpoint_Kind", Endpoint_Kind_name, Endpoint_Kind_value) + proto.RegisterType((*Endpoint)(nil), "akash.base.v1beta1.Endpoint") +} + +func init() { proto.RegisterFile("akash/base/v1beta1/endpoint.proto", fileDescriptor_07fb133899333c18) } + +var fileDescriptor_07fb133899333c18 = []byte{ + // 240 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, + 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, + 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, + 0x83, 0x58, 0x10, 0x95, 0x4a, 0x85, 0x5c, 0x1c, 0xae, 0x50, 0xbd, 0x42, 0xa6, 0x5c, 0x2c, 0xd9, + 0x99, 0x79, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x7c, 0x46, 0x8a, 0x7a, 0x98, 0x86, 0xe8, 0xc1, + 0xd4, 0xea, 0x79, 0x67, 0xe6, 0xa5, 0x04, 0x81, 0x95, 0x2b, 0x69, 0x70, 0xb1, 0x80, 0x78, 0x42, + 0xfc, 0x5c, 0xdc, 0xc1, 0x1e, 0x8e, 0x41, 0xae, 0x2e, 0xf1, 0x1e, 0x21, 0x21, 0x01, 0x02, 0x0c, + 0x20, 0x81, 0x20, 0x47, 0x3f, 0x17, 0x7f, 0xdf, 0xf8, 0x00, 0xff, 0xa0, 0x10, 0x01, 0x46, 0x2b, + 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0x82, 0x4e, 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, 0xca, 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0xb9, + 0x6e, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, 0x58, 0x90, 0xa9, 0x9f, 0x9e, 0xaf, + 0x9f, 0x97, 0x9f, 0x92, 0xaa, 0x5f, 0x52, 0x59, 0x90, 0x5a, 0x0c, 0xf3, 0x7f, 0x12, 0x1b, 0xd8, + 0x37, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0xa4, 0xd2, 0x76, 0x1c, 0x01, 0x00, 0x00, +} + +func (this *Endpoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Endpoint) + if !ok { + that2, ok := that.(Endpoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + return true +} +func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Kind != 0 { + i = encodeVarintEndpoint(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEndpoint(dAtA []byte, offset int, v uint64) int { + offset -= sovEndpoint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovEndpoint(uint64(m.Kind)) + } + return n +} + +func sovEndpoint(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEndpoint(x uint64) (n int) { + return sovEndpoint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Endpoint) 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 ErrIntOverflowEndpoint + } + 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: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEndpoint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= Endpoint_Kind(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEndpoint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEndpoint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEndpoint(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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrInvalidLengthEndpoint + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEndpoint + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEndpoint + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEndpoint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEndpoint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEndpoint = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta1/requirements.go b/go/node/types/v1beta1/requirements.go new file mode 100644 index 00000000..1e463bd0 --- /dev/null +++ b/go/node/types/v1beta1/requirements.go @@ -0,0 +1,15 @@ +package v1beta1 + +import ( + "gopkg.in/yaml.v3" +) + +func (m *SignedBy) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *PlacementRequirements) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} diff --git a/go/node/types/v1beta1/resource.go b/go/node/types/v1beta1/resource.go new file mode 100644 index 00000000..6e8aac92 --- /dev/null +++ b/go/node/types/v1beta1/resource.go @@ -0,0 +1,303 @@ +package v1beta1 + +import ( + "reflect" + + cosmos "github.com/cosmos/cosmos-sdk/types" +) + +type UnitType int + +type Unit interface { + String() string + equals(Unit) bool + add(Unit) error + sub(Unit) error + le(Unit) bool +} + +type ResUnit interface { + Equals(ResUnit) bool + Add(unit ResUnit) bool +} + +// Resources stores Unit details and Count value +type Resources struct { + Resources ResourceUnits `json:"resources"` + Count uint32 `json:"count"` +} + +// ResourceGroup is the interface that wraps GetName and GetResources methods +type ResourceGroup interface { + GetName() string + GetResources() []Resources +} + +var _ Unit = (*CPU)(nil) +var _ Unit = (*Memory)(nil) +var _ Unit = (*Storage)(nil) + +func (m ResourceUnits) deepcopy() ResourceUnits { + res := ResourceUnits{} + + if m.CPU != nil { + res.CPU = &CPU{ + Units: m.CPU.Units, + } + res.CPU.Attributes = make([]Attribute, len(m.CPU.Attributes)) + copy(res.CPU.Attributes, m.CPU.Attributes) + } else { + res.CPU = &CPU{ + Units: ResourceValue{ + Val: cosmos.NewInt(0), + }, + } + } + + if m.Memory != nil { + res.Memory = &Memory{ + Quantity: m.Memory.Quantity, + } + res.Memory.Attributes = make([]Attribute, len(m.Memory.Attributes)) + copy(res.Memory.Attributes, m.Memory.Attributes) + } else { + res.Memory = &Memory{ + Quantity: ResourceValue{ + Val: cosmos.NewInt(0), + }, + } + } + + if m.Storage != nil { + res.Storage = &Storage{ + Quantity: m.Storage.Quantity, + Attributes: nil, + } + res.Storage.Attributes = make([]Attribute, len(m.Storage.Attributes)) + copy(res.Storage.Attributes, m.Storage.Attributes) + } else { + res.Storage = &Storage{ + Quantity: ResourceValue{ + Val: cosmos.NewInt(0), + }, + } + } + + res.Endpoints = make([]Endpoint, len(m.Endpoints)) + copy(res.Endpoints, m.Endpoints) + + return res +} + +// AddUnit it rather searches for existing entry of the same type and sums values +// if type not found it appends +func (m ResourceUnits) Add(rhs ResourceUnits) (ResourceUnits, error) { + // Make a deep copy + res := m.deepcopy() + + if err := res.CPU.add(rhs.CPU); err != nil { + return ResourceUnits{}, err + } + + if err := res.Memory.add(rhs.Memory); err != nil { + return ResourceUnits{}, err + } + + if err := res.Storage.add(rhs.Storage); err != nil { + return ResourceUnits{}, err + } + + return res, nil +} + +// Sub tbd +func (m ResourceUnits) Sub(rhs ResourceUnits) (ResourceUnits, error) { + if (m.CPU == nil && rhs.CPU != nil) || + (m.Memory == nil && rhs.Memory != nil) || + (m.Storage == nil && rhs.Storage != nil) { + return ResourceUnits{}, errCannotSub + } + + // Make a deep copy + res := m.deepcopy() + + if err := res.CPU.sub(rhs.CPU); err != nil { + return ResourceUnits{}, err + } + + if err := res.Memory.sub(rhs.Memory); err != nil { + return ResourceUnits{}, err + } + + if err := res.Storage.sub(rhs.Storage); err != nil { + return ResourceUnits{}, err + } + + return res, nil +} + +func (m ResourceUnits) Equals(rhs ResourceUnits) bool { + return reflect.DeepEqual(m, rhs) +} + +func (m *CPU) equals(other Unit) bool { + rhs, valid := other.(*CPU) + if !valid { + return false + } + + if !m.Units.equals(rhs.Units) || len(m.Attributes) != len(rhs.Attributes) { + return false + } + + return reflect.DeepEqual(m.Attributes, rhs.Attributes) +} + +func (m *CPU) le(other Unit) bool { + rhs, valid := other.(*CPU) + if !valid { + return false + } + + return m.Units.le(rhs.Units) +} + +func (m *CPU) add(other Unit) error { + rhs, valid := other.(*CPU) + if !valid { + return nil + } + + res, err := m.Units.add(rhs.Units) + if err != nil { + return err + } + + m.Units = res + + return nil +} + +func (m *CPU) sub(other Unit) error { + rhs, valid := other.(*CPU) + if !valid { + return nil + } + + res, err := m.Units.sub(rhs.Units) + if err != nil { + return err + } + + m.Units = res + + return nil +} + +func (m *Memory) equals(other Unit) bool { + rhs, valid := other.(*Memory) + if !valid { + return false + } + + if !m.Quantity.equals(rhs.Quantity) || len(m.Attributes) != len(rhs.Attributes) { + return false + } + + return reflect.DeepEqual(m.Attributes, rhs.Attributes) +} + +func (m *Memory) le(other Unit) bool { + rhs, valid := other.(*Memory) + if !valid { + return false + } + + return m.Quantity.le(rhs.Quantity) +} + +func (m *Memory) add(other Unit) error { + rhs, valid := other.(*Memory) + if !valid { + return nil + } + + res, err := m.Quantity.add(rhs.Quantity) + if err != nil { + return err + } + + m.Quantity = res + + return nil +} + +func (m *Memory) sub(other Unit) error { + rhs, valid := other.(*Memory) + if !valid { + return nil + } + + res, err := m.Quantity.sub(rhs.Quantity) + if err != nil { + return err + } + + m.Quantity = res + + return nil +} + +func (m *Storage) equals(other Unit) bool { + rhs, valid := other.(*Storage) + if !valid { + return false + } + + if !m.Quantity.equals(rhs.Quantity) || len(m.Attributes) != len(rhs.Attributes) { + return false + } + + return reflect.DeepEqual(m.Attributes, rhs.Attributes) +} + +func (m *Storage) le(other Unit) bool { + rhs, valid := other.(*Storage) + if !valid { + return false + } + + return m.Quantity.le(rhs.Quantity) +} + +func (m *Storage) add(other Unit) error { + rhs, valid := other.(*Storage) + if !valid { + return nil + } + + res, err := m.Quantity.add(rhs.Quantity) + if err != nil { + return err + } + + m.Quantity = res + + return nil +} + +func (m *Storage) sub(other Unit) error { + rhs, valid := other.(*Storage) + if !valid { + return nil + } + + res, err := m.Quantity.sub(rhs.Quantity) + if err != nil { + return err + } + + m.Quantity = res + + return nil +} diff --git a/go/node/types/v1beta1/resource.pb.go b/go/node/types/v1beta1/resource.pb.go new file mode 100644 index 00000000..2bf7b211 --- /dev/null +++ b/go/node/types/v1beta1/resource.pb.go @@ -0,0 +1,1370 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta1/resource.proto + +package v1beta1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// CPU stores resource units and cpu config attributes +type CPU struct { + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" yaml:"cpu,omitempty"` +} + +func (m *CPU) Reset() { *m = CPU{} } +func (m *CPU) String() string { return proto.CompactTextString(m) } +func (*CPU) ProtoMessage() {} +func (*CPU) Descriptor() ([]byte, []int) { + return fileDescriptor_c018ae61a1e1b59b, []int{0} +} +func (m *CPU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPU.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 *CPU) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPU.Merge(m, src) +} +func (m *CPU) XXX_Size() int { + return m.Size() +} +func (m *CPU) XXX_DiscardUnknown() { + xxx_messageInfo_CPU.DiscardUnknown(m) +} + +var xxx_messageInfo_CPU proto.InternalMessageInfo + +func (m *CPU) GetUnits() ResourceValue { + if m != nil { + return m.Units + } + return ResourceValue{} +} + +func (m *CPU) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +// Memory stores resource quantity and memory attributes +type Memory struct { + Quantity ResourceValue `protobuf:"bytes,1,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" yaml:"cpu,omitempty"` +} + +func (m *Memory) Reset() { *m = Memory{} } +func (m *Memory) String() string { return proto.CompactTextString(m) } +func (*Memory) ProtoMessage() {} +func (*Memory) Descriptor() ([]byte, []int) { + return fileDescriptor_c018ae61a1e1b59b, []int{1} +} +func (m *Memory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Memory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Memory.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 *Memory) XXX_Merge(src proto.Message) { + xxx_messageInfo_Memory.Merge(m, src) +} +func (m *Memory) XXX_Size() int { + return m.Size() +} +func (m *Memory) XXX_DiscardUnknown() { + xxx_messageInfo_Memory.DiscardUnknown(m) +} + +var xxx_messageInfo_Memory proto.InternalMessageInfo + +func (m *Memory) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Memory) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +// Storage stores resource quantity and storage attributes +type Storage struct { + Quantity ResourceValue `protobuf:"bytes,1,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" yaml:"cpu,omitempty"` +} + +func (m *Storage) Reset() { *m = Storage{} } +func (m *Storage) String() string { return proto.CompactTextString(m) } +func (*Storage) ProtoMessage() {} +func (*Storage) Descriptor() ([]byte, []int) { + return fileDescriptor_c018ae61a1e1b59b, []int{2} +} +func (m *Storage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Storage.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 *Storage) XXX_Merge(src proto.Message) { + xxx_messageInfo_Storage.Merge(m, src) +} +func (m *Storage) XXX_Size() int { + return m.Size() +} +func (m *Storage) XXX_DiscardUnknown() { + xxx_messageInfo_Storage.DiscardUnknown(m) +} + +var xxx_messageInfo_Storage proto.InternalMessageInfo + +func (m *Storage) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Storage) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +type ResourceUnits struct { + CPU *CPU `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty" yaml:"cpu,omitempty"` + Memory *Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty" yaml:"memory,omitempty"` + Storage *Storage `protobuf:"bytes,3,opt,name=storage,proto3" json:"storage,omitempty" yaml:"storage,omitempty"` + Endpoints []Endpoint `protobuf:"bytes,4,rep,name=endpoints,proto3" json:"endpoints" yaml:"endpoints"` +} + +func (m *ResourceUnits) Reset() { *m = ResourceUnits{} } +func (m *ResourceUnits) String() string { return proto.CompactTextString(m) } +func (*ResourceUnits) ProtoMessage() {} +func (*ResourceUnits) Descriptor() ([]byte, []int) { + return fileDescriptor_c018ae61a1e1b59b, []int{3} +} +func (m *ResourceUnits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceUnits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceUnits.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 *ResourceUnits) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceUnits.Merge(m, src) +} +func (m *ResourceUnits) XXX_Size() int { + return m.Size() +} +func (m *ResourceUnits) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceUnits.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceUnits proto.InternalMessageInfo + +func (m *ResourceUnits) GetCPU() *CPU { + if m != nil { + return m.CPU + } + return nil +} + +func (m *ResourceUnits) GetMemory() *Memory { + if m != nil { + return m.Memory + } + return nil +} + +func (m *ResourceUnits) GetStorage() *Storage { + if m != nil { + return m.Storage + } + return nil +} + +func (m *ResourceUnits) GetEndpoints() []Endpoint { + if m != nil { + return m.Endpoints + } + return nil +} + +func init() { + proto.RegisterType((*CPU)(nil), "akash.base.v1beta1.CPU") + proto.RegisterType((*Memory)(nil), "akash.base.v1beta1.Memory") + proto.RegisterType((*Storage)(nil), "akash.base.v1beta1.Storage") + proto.RegisterType((*ResourceUnits)(nil), "akash.base.v1beta1.ResourceUnits") +} + +func init() { proto.RegisterFile("akash/base/v1beta1/resource.proto", fileDescriptor_c018ae61a1e1b59b) } + +var fileDescriptor_c018ae61a1e1b59b = []byte{ + // 517 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0x41, 0x6b, 0xd4, 0x40, + 0x14, 0xc7, 0x77, 0x9a, 0x75, 0xab, 0xb3, 0x14, 0x6a, 0x58, 0x68, 0xd8, 0x6a, 0xa6, 0x1d, 0x50, + 0x7a, 0xd0, 0x84, 0xb6, 0x0a, 0x52, 0xf0, 0x60, 0x8a, 0x47, 0xa1, 0x44, 0xd6, 0x43, 0x2f, 0x32, + 0xd9, 0x0e, 0x69, 0xe8, 0x26, 0x13, 0x33, 0x93, 0x4a, 0xfc, 0x14, 0x7e, 0x04, 0x3f, 0x82, 0xdf, + 0xc0, 0x6b, 0x8f, 0x3d, 0x7a, 0x8a, 0x65, 0xf7, 0x22, 0x7b, 0xdc, 0x4f, 0x20, 0x99, 0x99, 0xec, + 0xba, 0x6b, 0x14, 0x6f, 0x82, 0xb7, 0xcc, 0xbc, 0xff, 0x7b, 0xbf, 0xf7, 0xf8, 0xbf, 0x0c, 0xdc, + 0x25, 0x17, 0x84, 0x9f, 0xbb, 0x01, 0xe1, 0xd4, 0xbd, 0xdc, 0x0f, 0xa8, 0x20, 0xfb, 0x6e, 0x46, + 0x39, 0xcb, 0xb3, 0x21, 0x75, 0xd2, 0x8c, 0x09, 0x66, 0x9a, 0x52, 0xe2, 0x54, 0x12, 0x47, 0x4b, + 0xfa, 0xbd, 0x90, 0x85, 0x4c, 0x86, 0xdd, 0xea, 0x4b, 0x29, 0xfb, 0xb8, 0xa1, 0x18, 0x11, 0x22, + 0x8b, 0x82, 0x5c, 0xe8, 0x6a, 0xfd, 0x87, 0x7f, 0x00, 0x5e, 0x92, 0x51, 0x5e, 0xeb, 0x9a, 0x1a, + 0xa3, 0xc9, 0x59, 0xca, 0xa2, 0x44, 0x28, 0x09, 0xfe, 0x02, 0xa0, 0x71, 0x7c, 0x32, 0x30, 0x9f, + 0xc3, 0x5b, 0x79, 0x12, 0x09, 0x6e, 0x81, 0x1d, 0xb0, 0xd7, 0x3d, 0xd8, 0x75, 0x7e, 0x6d, 0xd8, + 0xf1, 0x35, 0xe2, 0x4d, 0x85, 0xf0, 0xda, 0x57, 0x25, 0x6a, 0xf9, 0x2a, 0xcb, 0xe4, 0x10, 0xce, + 0x9b, 0xe4, 0xd6, 0xda, 0x8e, 0xb1, 0xd7, 0x3d, 0xb8, 0xdf, 0x54, 0xe3, 0x45, 0xad, 0xf2, 0x9e, + 0x54, 0xf9, 0xd3, 0x12, 0xf5, 0x16, 0x89, 0x8f, 0x58, 0x1c, 0x09, 0x1a, 0xa7, 0xa2, 0x98, 0x95, + 0xa8, 0x57, 0x90, 0x78, 0x74, 0x84, 0x87, 0x69, 0xbe, 0xb8, 0xc6, 0xfe, 0x4f, 0x98, 0xa3, 0xf6, + 0xf7, 0x4f, 0x08, 0xe0, 0x6f, 0x00, 0x76, 0x5e, 0xd1, 0x98, 0x65, 0x85, 0x79, 0x0a, 0x6f, 0xbf, + 0xcb, 0x49, 0x22, 0x22, 0x51, 0xfc, 0xfd, 0x1c, 0xdb, 0xba, 0x8f, 0x36, 0x8f, 0x3e, 0xd0, 0x59, + 0x89, 0xba, 0x8a, 0x5b, 0x9d, 0xb0, 0x3f, 0xaf, 0xf7, 0x2f, 0x27, 0xbc, 0x01, 0x70, 0xfd, 0xb5, + 0x60, 0x19, 0x09, 0xe9, 0xff, 0x3a, 0xe2, 0x67, 0x03, 0x6e, 0xd4, 0x3d, 0x0f, 0xe4, 0x46, 0xbd, + 0x85, 0xc6, 0x30, 0xcd, 0xf5, 0x8c, 0x5b, 0x4d, 0x5d, 0x1c, 0x9f, 0x0c, 0x24, 0x1f, 0x8c, 0x4b, + 0x54, 0xed, 0xf0, 0xb4, 0x44, 0x1b, 0x4b, 0xa0, 0xdf, 0xf2, 0xab, 0xca, 0x66, 0x08, 0x3b, 0xb1, + 0x5c, 0x1b, 0x6b, 0x4d, 0x32, 0xfa, 0x4d, 0x0c, 0xb5, 0x58, 0xde, 0x61, 0x85, 0x99, 0x96, 0x68, + 0x53, 0x65, 0x2c, 0x21, 0xb6, 0x14, 0x62, 0x35, 0x82, 0x7d, 0x5d, 0xde, 0x1c, 0xc1, 0x75, 0xae, + 0xdc, 0xb3, 0x0c, 0x49, 0xda, 0x6e, 0x22, 0x69, 0x83, 0xbd, 0xa7, 0x1a, 0x75, 0x57, 0xe7, 0x2c, + 0xb1, 0x2c, 0x6d, 0xdc, 0x6a, 0x08, 0xfb, 0x35, 0xc2, 0x24, 0xf0, 0x4e, 0xfd, 0x8b, 0x73, 0xab, + 0x2d, 0x3d, 0xbc, 0xd7, 0xc4, 0x7b, 0xa9, 0x45, 0xde, 0x03, 0x6d, 0xe1, 0x22, 0x6d, 0x56, 0xa2, + 0x4d, 0x05, 0x9a, 0x5f, 0x61, 0x7f, 0x11, 0x56, 0x96, 0x79, 0xfe, 0xd5, 0xd8, 0x06, 0xd7, 0x63, + 0x1b, 0xdc, 0x8c, 0x6d, 0xf0, 0x71, 0x62, 0xb7, 0xae, 0x27, 0x76, 0xeb, 0xeb, 0xc4, 0x6e, 0x9d, + 0x3e, 0x0b, 0x23, 0x71, 0x9e, 0x07, 0xce, 0x90, 0xc5, 0xae, 0x24, 0x3f, 0x4e, 0xa8, 0x78, 0xcf, + 0xb2, 0x0b, 0x7d, 0x22, 0x69, 0xe4, 0x86, 0xcc, 0x4d, 0xd8, 0x19, 0x75, 0x45, 0x91, 0x52, 0x5e, + 0x3f, 0x4e, 0x41, 0x47, 0x3e, 0x4a, 0x87, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xbf, 0x30, + 0xf9, 0x52, 0x05, 0x00, 0x00, +} + +func (this *CPU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CPU) + if !ok { + that2, ok := that.(CPU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Units.Equal(&that1.Units) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (this *Memory) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Memory) + if !ok { + that2, ok := that.(Memory) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (this *Storage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Storage) + if !ok { + that2, ok := that.(Storage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (this *ResourceUnits) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceUnits) + if !ok { + that2, ok := that.(ResourceUnits) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CPU.Equal(that1.CPU) { + return false + } + if !this.Memory.Equal(that1.Memory) { + return false + } + if !this.Storage.Equal(that1.Storage) { + return false + } + if len(this.Endpoints) != len(that1.Endpoints) { + return false + } + for i := range this.Endpoints { + if !this.Endpoints[i].Equal(&that1.Endpoints[i]) { + return false + } + } + return true +} +func (m *CPU) 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 *CPU) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CPU) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Units.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Memory) 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 *Memory) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Memory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Storage) 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 *Storage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceUnits) 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 *ResourceUnits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceUnits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Endpoints) > 0 { + for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Storage != nil { + { + size, err := m.Storage.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Memory != nil { + { + size, err := m.Memory.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.CPU != nil { + { + size, err := m.CPU.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { + offset -= sovResource(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CPU) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Units.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func (m *Memory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func (m *Storage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func (m *ResourceUnits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CPU != nil { + l = m.CPU.Size() + n += 1 + l + sovResource(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovResource(uint64(l)) + } + if m.Storage != nil { + l = m.Storage.Size() + n += 1 + l + sovResource(uint64(l)) + } + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func sovResource(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CPU) 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 ErrIntOverflowResource + } + 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: CPU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CPU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Units.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Memory) 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 ErrIntOverflowResource + } + 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: Memory: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Memory: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Storage) 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 ErrIntOverflowResource + } + 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: Storage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Storage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceUnits) 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 ErrIntOverflowResource + } + 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: ResourceUnits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceUnits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CPU", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CPU == nil { + m.CPU = &CPU{} + } + if err := m.CPU.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &Memory{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Storage == nil { + m.Storage = &Storage{} + } + if err := m.Storage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, Endpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResource(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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrInvalidLengthResource + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResource + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResource + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta1/resourcevalue.go b/go/node/types/v1beta1/resourcevalue.go new file mode 100644 index 00000000..dcb58fd4 --- /dev/null +++ b/go/node/types/v1beta1/resourcevalue.go @@ -0,0 +1,80 @@ +package v1beta1 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +var ( + errOverflow = errors.Errorf("resource value overflow") + errCannotSub = errors.Errorf("cannot subtract resources when lhs does not have same units as rhs") + errNegativeResult = errors.Errorf("result of subtraction is negative") +) + +/* +ResourceValue the big point of this small change is to ensure math operations on resources +not resulting with negative value which panic on unsigned types as well as overflow which leads to panic too +instead reasonable error is returned. +Each resource using this type as value can take extra advantage of it to check upper bounds +For example in SDL v1 CPU units were handled as uint32 and operation like math.MaxUint32 + 2 +would cause application to panic. But nowadays + const CPULimit = math.MaxUint32 + + func (c *CPU) add(rhs CPU) error { + res, err := c.Units.add(rhs.Units) + if err != nil { + return err + } + + if res.Units.Value() > CPULimit { + return ErrOverflow + } + + c.Units = res + + return nil + } +*/ + +func NewResourceValue(val uint64) ResourceValue { + res := ResourceValue{ + Val: sdk.NewIntFromUint64(val), + } + + return res +} + +func (m ResourceValue) Value() uint64 { + return m.Val.Uint64() +} + +func (m ResourceValue) equals(rhs ResourceValue) bool { + return m.Val.Equal(rhs.Val) +} + +func (m ResourceValue) le(rhs ResourceValue) bool { + return m.Val.LTE(rhs.Val) +} + +func (m ResourceValue) add(rhs ResourceValue) (ResourceValue, error) { + res := m.Val + res = res.Add(rhs.Val) + + if res.Sign() == -1 { + return ResourceValue{}, errOverflow + } + + return ResourceValue{res}, nil +} + +func (m ResourceValue) sub(rhs ResourceValue) (ResourceValue, error) { + res := m.Val + + res = res.Sub(rhs.Val) + + if res.Sign() == -1 { + return ResourceValue{}, errNegativeResult + } + + return ResourceValue{res}, nil +} diff --git a/go/node/types/v1beta1/resourcevalue.pb.go b/go/node/types/v1beta1/resourcevalue.pb.go new file mode 100644 index 00000000..7b061a27 --- /dev/null +++ b/go/node/types/v1beta1/resourcevalue.pb.go @@ -0,0 +1,343 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta1/resourcevalue.proto + +package v1beta1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Unit stores cpu, memory and storage metrics +type ResourceValue struct { + Val github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=val,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"val"` +} + +func (m *ResourceValue) Reset() { *m = ResourceValue{} } +func (m *ResourceValue) String() string { return proto.CompactTextString(m) } +func (*ResourceValue) ProtoMessage() {} +func (*ResourceValue) Descriptor() ([]byte, []int) { + return fileDescriptor_85efdc01289cdacd, []int{0} +} +func (m *ResourceValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceValue.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 *ResourceValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceValue.Merge(m, src) +} +func (m *ResourceValue) XXX_Size() int { + return m.Size() +} +func (m *ResourceValue) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceValue proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ResourceValue)(nil), "akash.base.v1beta1.ResourceValue") +} + +func init() { + proto.RegisterFile("akash/base/v1beta1/resourcevalue.proto", fileDescriptor_85efdc01289cdacd) +} + +var fileDescriptor_85efdc01289cdacd = []byte{ + // 227 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, + 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xaa, 0x93, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0xe1, 0x5c, 0xbc, 0x41, 0x50, 0x03, + 0xc2, 0x40, 0x06, 0x08, 0x39, 0x70, 0x31, 0x97, 0x25, 0xe6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, + 0x38, 0xe9, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0xbc, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x31, 0x94, 0xd2, 0x2d, 0x4e, + 0xc9, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0xf3, 0xcc, 0x2b, 0x09, 0x02, 0x69, 0xb5, 0x62, + 0x79, 0xb1, 0x40, 0x9e, 0xd1, 0x29, 0xe8, 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, 0x2c, 0x90, 0x0c, 0x03, 0xbb, 0x53, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, + 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x18, 0x0d, 0xf3, 0x6a, + 0x12, 0x1b, 0xd8, 0xcd, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xf5, 0x4a, 0x29, 0x07, + 0x01, 0x00, 0x00, +} + +func (this *ResourceValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceValue) + if !ok { + that2, ok := that.(ResourceValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Val.Equal(that1.Val) { + return false + } + return true +} +func (m *ResourceValue) 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 *ResourceValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Val.Size() + i -= size + if _, err := m.Val.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintResourcevalue(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResourcevalue(dAtA []byte, offset int, v uint64) int { + offset -= sovResourcevalue(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Val.Size() + n += 1 + l + sovResourcevalue(uint64(l)) + return n +} + +func sovResourcevalue(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourcevalue(x uint64) (n int) { + return sovResourcevalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceValue) 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 ErrIntOverflowResourcevalue + } + 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: ResourceValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourcevalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthResourcevalue + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthResourcevalue + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Val.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResourcevalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourcevalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourcevalue(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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrInvalidLengthResourcevalue + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourcevalue + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourcevalue + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourcevalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourcevalue = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourcevalue = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta1/resourcevalue_test.go b/go/node/types/v1beta1/resourcevalue_test.go new file mode 100644 index 00000000..3f5f73ea --- /dev/null +++ b/go/node/types/v1beta1/resourcevalue_test.go @@ -0,0 +1,55 @@ +package v1beta1 + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestValidSum(t *testing.T) { + val1 := NewResourceValue(1) + val2 := NewResourceValue(1) + + res, err := val1.add(val2) + require.NoError(t, err) + require.Equal(t, uint64(2), res.Value()) +} + +func TestSubToNegative(t *testing.T) { + val1 := NewResourceValue(1) + val2 := NewResourceValue(2) + + _, err := val1.sub(val2) + require.Error(t, err) +} + +func TestResourceValueSubIsIdempotent(t *testing.T) { + val1 := NewResourceValue(100) + before := val1.String() + val2 := NewResourceValue(1) + + _, err := val1.sub(val2) + require.NoError(t, err) + after := val1.String() + + require.Equal(t, before, after) +} + +func TestCPUSubIsNotIdempotent(t *testing.T) { + val1 := &CPU{ + Units: NewResourceValue(100), + Attributes: nil, + } + + before := val1.String() + val2 := &CPU{ + Units: NewResourceValue(1), + Attributes: nil, + } + + err := val1.sub(val2) + require.NoError(t, err) + after := val1.String() + + require.NotEqual(t, before, after) +} diff --git a/go/node/types/v1beta2/attribute.go b/go/node/types/v1beta2/attribute.go new file mode 100644 index 00000000..a61b2859 --- /dev/null +++ b/go/node/types/v1beta2/attribute.go @@ -0,0 +1,285 @@ +package v1beta2 + +import ( + "errors" + "reflect" + "regexp" + "strconv" + "strings" + + "gopkg.in/yaml.v3" +) + +const ( + moduleName = "akash" + attributeNameRegexpString = `^([a-zA-Z][\w\/\.\-]{1,62}\w)$` +) + +const ( + errAttributesDuplicateKeys uint32 = iota + 1 + errInvalidAttributeKey +) + +var ( + ErrAttributesDuplicateKeys = errors.New("attributes cannot have duplicate keys") + ErrInvalidAttributeKey = errors.New("attribute key does not match regexp") +) + +var ( + attributeNameRegexp = regexp.MustCompile(attributeNameRegexpString) +) + +/* +Attributes purpose of using this type in favor of Cosmos's sdk.Attribute is +ability to later extend it with operators to support querying on things like +cpu/memory/storage attributes +At this moment type though is same as sdk.Attributes but all akash libraries were +turned to use a new one +*/ +type Attributes []Attribute + +type AttributesGroup []Attributes + +type AttributeValue interface { + AsBool() (bool, bool) + AsString() (string, bool) +} + +type attributeValue struct { + value string +} + +func (val attributeValue) AsBool() (bool, bool) { + if val.value == "" { + return false, false + } + + res, err := strconv.ParseBool(val.value) + if err != nil { + return false, false + } + + return res, true +} + +func (val attributeValue) AsString() (string, bool) { + if val.value == "" { + return "", false + } + + return val.value, true +} + +func NewStringAttribute(key, val string) Attribute { + return Attribute{ + Key: key, + Value: val, + } +} + +func (m *Attribute) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *Attribute) Equal(rhs *Attribute) bool { + return reflect.DeepEqual(m, rhs) +} + +func (m Attribute) SubsetOf(rhs Attribute) bool { + if m.Key == rhs.Key && m.Value == rhs.Value { + return true + } + + return false +} + +func (attr Attributes) Validate() error { + store := make(map[string]bool) + + for i := range attr { + if !attributeNameRegexp.MatchString(attr[i].Key) { + return ErrInvalidAttributeKey + } + + if _, ok := store[attr[i].Key]; ok { + return ErrAttributesDuplicateKeys + } + + store[attr[i].Key] = true + } + + return nil +} + +func (attr Attributes) Dup() Attributes { + res := make(Attributes, len(attr)) + + for _, pair := range attr { + res = append(res, Attribute{ + Key: pair.Key, + Value: pair.Value, + }) + } + + return res +} + +// AttributesSubsetOf check if a is subset of b +// nolint: gofmt +// For example there are two yaml files being converted into these attributes +// example 1: a is subset of b +// --- +// // a +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-1 +// - us-east-2 +// +// example 2: a is not subset of b +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// example 3: a is subset of b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +func AttributesSubsetOf(a, b Attributes) bool { +loop: + for _, req := range a { + for _, attr := range b { + if req.SubsetOf(attr) { + continue loop + } + } + return false + } + + return true +} + +func (attr Attributes) SubsetOf(b Attributes) bool { + return AttributesSubsetOf(attr, b) +} + +func (attr Attributes) Find(glob string) AttributeValue { + // todo wildcard + + var val attributeValue + + for i := range attr { + if glob == attr[i].Key { + val.value = attr[i].Value + break + } + } + + return val +} + +func (attr Attributes) Iterate(prefix string, fn func(group, key, value string)) { + for _, item := range attr { + if strings.HasPrefix(item.Key, prefix) { + tokens := strings.SplitAfter(item.Key, "/") + tokens = tokens[1:] + fn(tokens[1], tokens[2], item.Value) + } + } +} + +// GetCapabilitiesGroup +// +// example +// capabilities/storage/1/persistent: true +// capabilities/storage/1/class: io1 +// capabilities/storage/2/persistent: false +// +// nolint: gofmt +// returns +// - - persistent: true +// class: nvme +// - - persistent: false +func (attr Attributes) GetCapabilitiesGroup(prefix string) AttributesGroup { + var res AttributesGroup // nolint:prealloc + + groups := make(map[string]Attributes) + + for _, item := range attr { + if !strings.HasPrefix(item.Key, "capabilities/"+prefix) { + continue + } + + tokens := strings.SplitAfter(strings.TrimPrefix(item.Key, "capabilities/"), "/") + // skip malformed attributes. really? + if len(tokens) != 3 { + continue + } + + // filter out prefix name + tokens = tokens[1:] + + group := groups[tokens[0]] + if group == nil { + group = Attributes{} + } + + group = append(group, Attribute{ + Key: tokens[1], + Value: item.Value, + }) + + groups[tokens[0]] = group + } + + for _, group := range groups { + res = append(res, group) + } + + return res +} + +// IN check if given attributes are in attributes group +// AttributesGroup for storage +// - persistent: true +// class: beta1 +// - persistent: true +// class: beta2 +// +// that +// - persistent: true +// class: beta1 +func (attr Attributes) IN(group AttributesGroup) bool { + for _, group := range group { + if attr.SubsetOf(group) { + return true + } + } + return false +} diff --git a/go/node/types/v1beta2/attribute.pb.go b/go/node/types/v1beta2/attribute.pb.go new file mode 100644 index 00000000..b36fe547 --- /dev/null +++ b/go/node/types/v1beta2/attribute.pb.go @@ -0,0 +1,812 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta2/attribute.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Attribute represents key value pair +type Attribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" yaml:"key"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"` +} + +func (m *Attribute) Reset() { *m = Attribute{} } +func (*Attribute) ProtoMessage() {} +func (*Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_0a99fe9842d40254, []int{0} +} +func (m *Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Attribute.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 *Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attribute.Merge(m, src) +} +func (m *Attribute) XXX_Size() int { + return m.Size() +} +func (m *Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_Attribute proto.InternalMessageInfo + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +type SignedBy struct { + // all_of all keys in this list must have signed attributes + AllOf []string `protobuf:"bytes,1,rep,name=all_of,json=allOf,proto3" json:"all_of" yaml:"allOf"` + // any_of at least of of the keys from the list must have signed attributes + AnyOf []string `protobuf:"bytes,2,rep,name=any_of,json=anyOf,proto3" json:"any_of" yaml:"anyOf"` +} + +func (m *SignedBy) Reset() { *m = SignedBy{} } +func (*SignedBy) ProtoMessage() {} +func (*SignedBy) Descriptor() ([]byte, []int) { + return fileDescriptor_0a99fe9842d40254, []int{1} +} +func (m *SignedBy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignedBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignedBy.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 *SignedBy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedBy.Merge(m, src) +} +func (m *SignedBy) XXX_Size() int { + return m.Size() +} +func (m *SignedBy) XXX_DiscardUnknown() { + xxx_messageInfo_SignedBy.DiscardUnknown(m) +} + +var xxx_messageInfo_SignedBy proto.InternalMessageInfo + +// PlacementRequirements +type PlacementRequirements struct { + // SignedBy list of keys that tenants expect to have signatures from + SignedBy SignedBy `protobuf:"bytes,1,opt,name=signed_by,json=signedBy,proto3" json:"signed_by" yaml:"signed_by"` + // Attribute list of attributes tenant expects from the provider + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *PlacementRequirements) Reset() { *m = PlacementRequirements{} } +func (*PlacementRequirements) ProtoMessage() {} +func (*PlacementRequirements) Descriptor() ([]byte, []int) { + return fileDescriptor_0a99fe9842d40254, []int{2} +} +func (m *PlacementRequirements) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRequirements.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 *PlacementRequirements) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRequirements.Merge(m, src) +} +func (m *PlacementRequirements) XXX_Size() int { + return m.Size() +} +func (m *PlacementRequirements) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRequirements.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRequirements proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Attribute)(nil), "akash.base.v1beta2.Attribute") + proto.RegisterType((*SignedBy)(nil), "akash.base.v1beta2.SignedBy") + proto.RegisterType((*PlacementRequirements)(nil), "akash.base.v1beta2.PlacementRequirements") +} + +func init() { + proto.RegisterFile("akash/base/v1beta2/attribute.proto", fileDescriptor_0a99fe9842d40254) +} + +var fileDescriptor_0a99fe9842d40254 = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0xce, 0xd3, 0x30, + 0x14, 0xc5, 0x93, 0xef, 0xa3, 0x55, 0xe3, 0x22, 0x54, 0x22, 0x90, 0xaa, 0x0a, 0xec, 0xca, 0x12, + 0xd0, 0x85, 0x58, 0x2d, 0x0b, 0xea, 0x46, 0x5e, 0x00, 0x14, 0xb6, 0x32, 0x14, 0xa7, 0x75, 0xd3, + 0x28, 0x69, 0x5c, 0x12, 0xa7, 0x28, 0x1b, 0x23, 0x23, 0x8f, 0xc0, 0xe3, 0x74, 0xec, 0xd8, 0x29, + 0x82, 0x74, 0x40, 0xea, 0x98, 0x27, 0x40, 0x71, 0xfe, 0x34, 0x12, 0x4c, 0x76, 0xce, 0x3d, 0xbf, + 0xdc, 0x7b, 0x6c, 0x03, 0x4c, 0x3d, 0x1a, 0x6d, 0x89, 0x4d, 0x23, 0x46, 0x0e, 0x53, 0x9b, 0x09, + 0x3a, 0x23, 0x54, 0x88, 0xd0, 0xb5, 0x63, 0xc1, 0x8c, 0x7d, 0xc8, 0x05, 0xd7, 0x75, 0xe9, 0x31, + 0x0a, 0x8f, 0x51, 0x79, 0x46, 0x4f, 0x1c, 0xee, 0x70, 0x59, 0x26, 0xc5, 0xae, 0x74, 0xe2, 0x4f, + 0x40, 0x7b, 0x57, 0xc3, 0xfa, 0x18, 0xdc, 0x7b, 0x2c, 0x19, 0xaa, 0x63, 0x75, 0xa2, 0x99, 0x8f, + 0xf2, 0x14, 0x81, 0x84, 0xee, 0xfc, 0x39, 0xf6, 0x58, 0x82, 0xad, 0xa2, 0xa4, 0xbf, 0x04, 0x9d, + 0x03, 0xf5, 0x63, 0x36, 0xbc, 0x93, 0x9e, 0x41, 0x9e, 0xa2, 0x87, 0xa5, 0x47, 0xca, 0xd8, 0x2a, + 0xcb, 0xf3, 0x07, 0xdf, 0x7f, 0x22, 0x05, 0x1f, 0x40, 0xef, 0xa3, 0xeb, 0x04, 0x6c, 0x6d, 0x26, + 0xfa, 0x14, 0x74, 0xa9, 0xef, 0x2f, 0xf9, 0x66, 0xa8, 0x8e, 0xef, 0x27, 0x9a, 0x39, 0xba, 0xa6, + 0xa8, 0x52, 0x6e, 0x3f, 0xa1, 0xbe, 0xff, 0x7e, 0x83, 0xad, 0x8e, 0x5c, 0x25, 0x12, 0x24, 0x05, + 0x72, 0xd7, 0x42, 0xa4, 0xd2, 0x42, 0x82, 0xa4, 0x44, 0x8a, 0xb5, 0xea, 0xfb, 0x47, 0x05, 0x4f, + 0x3f, 0xf8, 0x74, 0xc5, 0x76, 0x2c, 0x10, 0x16, 0xfb, 0x12, 0xbb, 0xa1, 0xdc, 0x46, 0xfa, 0x67, + 0xa0, 0x45, 0x72, 0xa2, 0xa5, 0x5d, 0xe6, 0xec, 0xcf, 0x9e, 0x19, 0xff, 0x1e, 0x96, 0x51, 0x8f, + 0x6d, 0xbe, 0x38, 0xa6, 0x48, 0xb9, 0xa6, 0xe8, 0x86, 0xe5, 0x29, 0x1a, 0x94, 0xad, 0x1b, 0x09, + 0x5b, 0xbd, 0xa8, 0xce, 0xb9, 0x01, 0xa0, 0xb9, 0x8d, 0x48, 0x0e, 0xde, 0x9f, 0x3d, 0xff, 0x5f, + 0x8b, 0xe6, 0xd8, 0xcd, 0x57, 0x55, 0x8f, 0x16, 0x98, 0xa7, 0xe8, 0x71, 0x95, 0xaf, 0xd1, 0xb0, + 0xd5, 0x32, 0x94, 0x49, 0xcd, 0xc5, 0xf9, 0x37, 0x54, 0xbe, 0x65, 0x50, 0x39, 0x66, 0x50, 0x3d, + 0x65, 0x50, 0xfd, 0x95, 0x41, 0xf5, 0xc7, 0x05, 0x2a, 0xa7, 0x0b, 0x54, 0xce, 0x17, 0xa8, 0x2c, + 0xde, 0x3a, 0xae, 0xd8, 0xc6, 0xb6, 0xb1, 0xe2, 0x3b, 0x22, 0xa7, 0x78, 0x1d, 0x30, 0xf1, 0x95, + 0x87, 0x5e, 0xf5, 0x45, 0xf7, 0x2e, 0x71, 0x38, 0x09, 0xf8, 0x9a, 0x11, 0x91, 0xec, 0x59, 0x54, + 0x3f, 0x2a, 0xbb, 0x2b, 0x5f, 0xc8, 0x9b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xed, 0xef, 0xae, + 0x43, 0x71, 0x02, 0x00, 0x00, +} + +func (m *Attribute) 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 *Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignedBy) 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 *SignedBy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedBy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AnyOf) > 0 { + for iNdEx := len(m.AnyOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AnyOf[iNdEx]) + copy(dAtA[i:], m.AnyOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AnyOf[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.AllOf) > 0 { + for iNdEx := len(m.AllOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllOf[iNdEx]) + copy(dAtA[i:], m.AllOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AllOf[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PlacementRequirements) 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 *PlacementRequirements) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.SignedBy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAttribute(dAtA []byte, offset int, v uint64) int { + offset -= sovAttribute(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + return n +} + +func (m *SignedBy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AllOf) > 0 { + for _, s := range m.AllOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + if len(m.AnyOf) > 0 { + for _, s := range m.AnyOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func (m *PlacementRequirements) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SignedBy.Size() + n += 1 + l + sovAttribute(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func sovAttribute(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAttribute(x uint64) (n int) { + return sovAttribute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Attribute) 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 ErrIntOverflowAttribute + } + 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: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignedBy) 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 ErrIntOverflowAttribute + } + 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: SignedBy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignedBy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllOf = append(m.AllOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyOf = append(m.AnyOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRequirements) 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 ErrIntOverflowAttribute + } + 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: PlacementRequirements: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PlacementRequirements: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedBy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SignedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAttribute(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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrInvalidLengthAttribute + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAttribute + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAttribute + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAttribute = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAttribute = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAttribute = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta2/endpoint.go b/go/node/types/v1beta2/endpoint.go new file mode 100644 index 00000000..5d7a9e6e --- /dev/null +++ b/go/node/types/v1beta2/endpoint.go @@ -0,0 +1,11 @@ +package v1beta2 + +type Endpoints []Endpoint + +func (m Endpoints) Dup() Endpoints { + res := make(Endpoints, len(m)) + + copy(res, m) + + return res +} diff --git a/go/node/types/v1beta2/endpoint.pb.go b/go/node/types/v1beta2/endpoint.pb.go new file mode 100644 index 00000000..30dcc982 --- /dev/null +++ b/go/node/types/v1beta2/endpoint.pb.go @@ -0,0 +1,405 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta2/endpoint.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// This describes how the endpoint is implemented when the lease is deployed +type Endpoint_Kind int32 + +const ( + // Describes an endpoint that becomes a Kubernetes Ingress + Endpoint_SHARED_HTTP Endpoint_Kind = 0 + // Describes an endpoint that becomes a Kubernetes NodePort + Endpoint_RANDOM_PORT Endpoint_Kind = 1 + // Describes an endpoint that becomes a leased IP + Endpoint_LEASED_IP Endpoint_Kind = 2 +) + +var Endpoint_Kind_name = map[int32]string{ + 0: "SHARED_HTTP", + 1: "RANDOM_PORT", + 2: "LEASED_IP", +} + +var Endpoint_Kind_value = map[string]int32{ + "SHARED_HTTP": 0, + "RANDOM_PORT": 1, + "LEASED_IP": 2, +} + +func (x Endpoint_Kind) String() string { + return proto.EnumName(Endpoint_Kind_name, int32(x)) +} + +func (Endpoint_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4b446d601fc1bd00, []int{0, 0} +} + +// Endpoint describes a publicly accessible IP service +type Endpoint struct { + Kind Endpoint_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=akash.base.v1beta2.Endpoint_Kind" json:"kind,omitempty"` + SequenceNumber uint32 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number" yaml:"sequence_number"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_4b446d601fc1bd00, []int{0} +} +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Endpoint.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 *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return m.Size() +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetKind() Endpoint_Kind { + if m != nil { + return m.Kind + } + return Endpoint_SHARED_HTTP +} + +func (m *Endpoint) GetSequenceNumber() uint32 { + if m != nil { + return m.SequenceNumber + } + return 0 +} + +func init() { + proto.RegisterEnum("akash.base.v1beta2.Endpoint_Kind", Endpoint_Kind_name, Endpoint_Kind_value) + proto.RegisterType((*Endpoint)(nil), "akash.base.v1beta2.Endpoint") +} + +func init() { proto.RegisterFile("akash/base/v1beta2/endpoint.proto", fileDescriptor_4b446d601fc1bd00) } + +var fileDescriptor_4b446d601fc1bd00 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x4f, + 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, + 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, + 0x83, 0x58, 0x10, 0x95, 0x4a, 0xaf, 0x18, 0xb9, 0x38, 0x5c, 0xa1, 0x9a, 0x85, 0x4c, 0xb9, 0x58, + 0xb2, 0x33, 0xf3, 0x52, 0x24, 0x18, 0x15, 0x18, 0x35, 0xf8, 0x8c, 0x14, 0xf5, 0x30, 0x4d, 0xd1, + 0x83, 0xa9, 0xd5, 0xf3, 0xce, 0xcc, 0x4b, 0x09, 0x02, 0x2b, 0x17, 0xca, 0xe0, 0xe2, 0x2f, 0x4e, + 0x2d, 0x2c, 0x4d, 0xcd, 0x4b, 0x4e, 0x8d, 0xcf, 0x2b, 0xcd, 0x4d, 0x4a, 0x2d, 0x92, 0x60, 0x52, + 0x60, 0xd4, 0xe0, 0x75, 0xb2, 0x7f, 0x74, 0x4f, 0x9e, 0x2f, 0x18, 0x2a, 0xe5, 0x07, 0x96, 0x79, + 0x75, 0x4f, 0x1e, 0x5d, 0xf1, 0xa7, 0x7b, 0xf2, 0x62, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x68, + 0x12, 0x4a, 0x41, 0x7c, 0xc5, 0x28, 0x9a, 0x95, 0xcc, 0xb9, 0x58, 0x40, 0xf6, 0x0a, 0xf1, 0x73, + 0x71, 0x07, 0x7b, 0x38, 0x06, 0xb9, 0xba, 0xc4, 0x7b, 0x84, 0x84, 0x04, 0x08, 0x30, 0x80, 0x04, + 0x82, 0x1c, 0xfd, 0x5c, 0xfc, 0x7d, 0xe3, 0x03, 0xfc, 0x83, 0x42, 0x04, 0x18, 0x85, 0x78, 0xb9, + 0x38, 0x7d, 0x5c, 0x1d, 0x83, 0x5d, 0x5d, 0xe2, 0x3d, 0x03, 0x04, 0x98, 0xac, 0x58, 0x5e, 0x2c, + 0x90, 0x67, 0x74, 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, + 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x8b, + 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xaf, 0x75, 0xf3, 0x52, + 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, + 0x94, 0x54, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x58, 0xc8, 0x27, 0xb1, 0x81, 0xc3, 0xd1, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x28, 0xfc, 0xc4, 0x96, 0x01, 0x00, 0x00, +} + +func (this *Endpoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Endpoint) + if !ok { + that2, ok := that.(Endpoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + if this.SequenceNumber != that1.SequenceNumber { + return false + } + return true +} +func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SequenceNumber != 0 { + i = encodeVarintEndpoint(dAtA, i, uint64(m.SequenceNumber)) + i-- + dAtA[i] = 0x10 + } + if m.Kind != 0 { + i = encodeVarintEndpoint(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEndpoint(dAtA []byte, offset int, v uint64) int { + offset -= sovEndpoint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovEndpoint(uint64(m.Kind)) + } + if m.SequenceNumber != 0 { + n += 1 + sovEndpoint(uint64(m.SequenceNumber)) + } + return n +} + +func sovEndpoint(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEndpoint(x uint64) (n int) { + return sovEndpoint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Endpoint) 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 ErrIntOverflowEndpoint + } + 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: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEndpoint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= Endpoint_Kind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SequenceNumber", wireType) + } + m.SequenceNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEndpoint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SequenceNumber |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEndpoint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEndpoint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEndpoint(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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrInvalidLengthEndpoint + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEndpoint + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEndpoint + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEndpoint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEndpoint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEndpoint = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta2/migrate/v1beta1.go b/go/node/types/v1beta2/migrate/v1beta1.go new file mode 100644 index 00000000..19fbb07e --- /dev/null +++ b/go/node/types/v1beta2/migrate/v1beta1.go @@ -0,0 +1,96 @@ +package migrate + +import ( + "github.com/akash-network/node/types/v1beta1" + "github.com/akash-network/node/types/v1beta2" +) + +func ResourceValueFromV1Beta1(from v1beta1.ResourceValue) v1beta2.ResourceValue { + return v1beta2.NewResourceValue(from.Value()) +} + +func AttributesFromV1Beta1(from v1beta1.Attributes) v1beta2.Attributes { + res := make(v1beta2.Attributes, 0, len(from)) + + for _, attr := range from { + res = append(res, v1beta2.Attribute{ + Key: attr.Key, + Value: attr.Value, + }) + } + + return res +} + +func SignedByFromV1Beta1(from v1beta1.SignedBy) v1beta2.SignedBy { + return v1beta2.SignedBy{ + AllOf: from.AllOf, + AnyOf: from.AnyOf, + } +} + +func PlacementRequirementsFromV1Beta1(from v1beta1.PlacementRequirements) v1beta2.PlacementRequirements { + res := v1beta2.PlacementRequirements{ + SignedBy: SignedByFromV1Beta1(from.SignedBy), + Attributes: AttributesFromV1Beta1(from.Attributes), + } + + return res +} + +func CPUFromV1Beta1(from *v1beta1.CPU) *v1beta2.CPU { + if from == nil { + return nil + } + + return &v1beta2.CPU{ + Units: ResourceValueFromV1Beta1(from.Units), + Attributes: AttributesFromV1Beta1(from.Attributes), + } +} + +func MemoryFromV1Beta1(from *v1beta1.Memory) *v1beta2.Memory { + if from == nil { + return nil + } + + return &v1beta2.Memory{ + Quantity: ResourceValueFromV1Beta1(from.Quantity), + Attributes: AttributesFromV1Beta1(from.Attributes), + } +} + +func VolumesFromV1Beta1(from *v1beta1.Storage) v1beta2.Volumes { + var res v1beta2.Volumes + if from != nil { + res = append(res, v1beta2.Storage{ + Name: "default", + Quantity: ResourceValueFromV1Beta1(from.Quantity), + Attributes: AttributesFromV1Beta1(from.Attributes), + }) + } + + return res +} + +func EndpointsFromV1Beta1(from []v1beta1.Endpoint) []v1beta2.Endpoint { + res := make([]v1beta2.Endpoint, 0, len(from)) + + for _, endpoint := range from { + res = append(res, v1beta2.Endpoint{ + Kind: v1beta2.Endpoint_Kind(endpoint.Kind), + SequenceNumber: 0, // All previous data does not have a use for sequence number + }) + } + + return res +} + +func ResourceUnitsFromV1Beta1(from v1beta1.ResourceUnits) v1beta2.ResourceUnits { + return v1beta2.ResourceUnits{ + CPU: CPUFromV1Beta1(from.CPU), + Memory: MemoryFromV1Beta1(from.Memory), + Storage: VolumesFromV1Beta1(from.Storage), + Endpoints: EndpointsFromV1Beta1(from.Endpoints), + } +} diff --git a/go/node/types/v1beta2/requirements.go b/go/node/types/v1beta2/requirements.go new file mode 100644 index 00000000..625abcaf --- /dev/null +++ b/go/node/types/v1beta2/requirements.go @@ -0,0 +1,15 @@ +package v1beta2 + +import ( + "gopkg.in/yaml.v3" +) + +func (m *SignedBy) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *PlacementRequirements) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} diff --git a/go/node/types/v1beta2/resource.go b/go/node/types/v1beta2/resource.go new file mode 100644 index 00000000..ba5b317a --- /dev/null +++ b/go/node/types/v1beta2/resource.go @@ -0,0 +1,82 @@ +package v1beta2 + +type UnitType int + +type Unit interface { + String() string +} + +type ResUnit interface { + Equals(ResUnit) bool + Add(unit ResUnit) bool +} + +// Resources stores Unit details and Count value +type Resources struct { + Resources ResourceUnits `json:"resources"` + Count uint32 `json:"count"` +} + +// ResourceGroup is the interface that wraps GetName and GetResources methods +type ResourceGroup interface { + GetName() string + GetResources() []Resources +} + +type Volumes []Storage + +var _ Unit = (*CPU)(nil) +var _ Unit = (*Memory)(nil) +var _ Unit = (*Storage)(nil) + +func (m ResourceUnits) Dup() ResourceUnits { + res := ResourceUnits{ + CPU: m.CPU.Dup(), + Memory: m.Memory.Dup(), + Storage: m.Storage.Dup(), + Endpoints: m.Endpoints.Dup(), + } + + return res +} + +func (m CPU) Dup() *CPU { + return &CPU{ + Units: m.Units.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Memory) Dup() *Memory { + return &Memory{ + Quantity: m.Quantity.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Storage) Dup() *Storage { + return &Storage{ + Quantity: m.Quantity.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Volumes) Equal(rhs Volumes) bool { + for i := range m { + if !m[i].Equal(rhs[i]) { + return false + } + } + + return true +} + +func (m Volumes) Dup() Volumes { + res := make(Volumes, len(m)) + + for _, storage := range m { + res = append(res, *storage.Dup()) + } + + return res +} diff --git a/go/node/types/v1beta2/resource.pb.go b/go/node/types/v1beta2/resource.pb.go new file mode 100644 index 00000000..38a73300 --- /dev/null +++ b/go/node/types/v1beta2/resource.pb.go @@ -0,0 +1,1015 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta2/resource.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// CPU stores resource units and cpu config attributes +type CPU struct { + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *CPU) Reset() { *m = CPU{} } +func (m *CPU) String() string { return proto.CompactTextString(m) } +func (*CPU) ProtoMessage() {} +func (*CPU) Descriptor() ([]byte, []int) { + return fileDescriptor_d2022fd0bb546ad1, []int{0} +} +func (m *CPU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPU.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 *CPU) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPU.Merge(m, src) +} +func (m *CPU) XXX_Size() int { + return m.Size() +} +func (m *CPU) XXX_DiscardUnknown() { + xxx_messageInfo_CPU.DiscardUnknown(m) +} + +var xxx_messageInfo_CPU proto.InternalMessageInfo + +func (m *CPU) GetUnits() ResourceValue { + if m != nil { + return m.Units + } + return ResourceValue{} +} + +func (m *CPU) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// Memory stores resource quantity and memory attributes +type Memory struct { + Quantity ResourceValue `protobuf:"bytes,1,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *Memory) Reset() { *m = Memory{} } +func (m *Memory) String() string { return proto.CompactTextString(m) } +func (*Memory) ProtoMessage() {} +func (*Memory) Descriptor() ([]byte, []int) { + return fileDescriptor_d2022fd0bb546ad1, []int{1} +} +func (m *Memory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Memory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Memory.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 *Memory) XXX_Merge(src proto.Message) { + xxx_messageInfo_Memory.Merge(m, src) +} +func (m *Memory) XXX_Size() int { + return m.Size() +} +func (m *Memory) XXX_DiscardUnknown() { + xxx_messageInfo_Memory.DiscardUnknown(m) +} + +var xxx_messageInfo_Memory proto.InternalMessageInfo + +func (m *Memory) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Memory) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +// Storage stores resource quantity and storage attributes +type Storage struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Quantity ResourceValue `protobuf:"bytes,2,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *Storage) Reset() { *m = Storage{} } +func (m *Storage) String() string { return proto.CompactTextString(m) } +func (*Storage) ProtoMessage() {} +func (*Storage) Descriptor() ([]byte, []int) { + return fileDescriptor_d2022fd0bb546ad1, []int{2} +} +func (m *Storage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Storage.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 *Storage) XXX_Merge(src proto.Message) { + xxx_messageInfo_Storage.Merge(m, src) +} +func (m *Storage) XXX_Size() int { + return m.Size() +} +func (m *Storage) XXX_DiscardUnknown() { + xxx_messageInfo_Storage.DiscardUnknown(m) +} + +var xxx_messageInfo_Storage proto.InternalMessageInfo + +func (m *Storage) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Storage) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Storage) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*CPU)(nil), "akash.base.v1beta2.CPU") + proto.RegisterType((*Memory)(nil), "akash.base.v1beta2.Memory") + proto.RegisterType((*Storage)(nil), "akash.base.v1beta2.Storage") +} + +func init() { proto.RegisterFile("akash/base/v1beta2/resource.proto", fileDescriptor_d2022fd0bb546ad1) } + +var fileDescriptor_d2022fd0bb546ad1 = []byte{ + // 397 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x2f, + 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, + 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, + 0x83, 0x58, 0x10, 0x95, 0x52, 0x4a, 0x58, 0x0c, 0x4b, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, + 0x81, 0x9a, 0x26, 0xa5, 0x86, 0xc7, 0xc2, 0xb2, 0xc4, 0x9c, 0x52, 0xa8, 0x3a, 0xa5, 0xab, 0x8c, + 0x5c, 0xcc, 0xce, 0x01, 0xa1, 0x42, 0xb6, 0x5c, 0xac, 0xa5, 0x79, 0x99, 0x25, 0xc5, 0x12, 0x8c, + 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x8a, 0x7a, 0x98, 0xae, 0xd1, 0x0b, 0x82, 0xea, 0x0f, 0x03, 0xe9, + 0x77, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xa2, 0x4b, 0xa8, 0x83, 0x91, 0x8b, 0x0b, 0xee, + 0x84, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x59, 0x6c, 0x86, 0x38, 0xc2, 0x54, 0x39, + 0x79, 0x82, 0x0c, 0x78, 0x75, 0x4f, 0x5e, 0x04, 0xa1, 0x51, 0x27, 0x3f, 0x37, 0xb3, 0x24, 0x35, + 0xb7, 0xa0, 0xa4, 0xf2, 0xd3, 0x3d, 0x79, 0xe9, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, 0x6c, 0xb2, + 0x4a, 0xab, 0xee, 0xcb, 0x73, 0xc1, 0x4d, 0x2a, 0x0e, 0x42, 0xb2, 0xdb, 0x8a, 0xe5, 0xc5, 0x02, + 0x79, 0x46, 0xa5, 0xaf, 0x8c, 0x5c, 0x6c, 0xbe, 0xa9, 0xb9, 0xf9, 0x45, 0x95, 0x42, 0x51, 0x5c, + 0x1c, 0x85, 0xa5, 0x89, 0x79, 0x25, 0x99, 0x25, 0x95, 0xc4, 0xfb, 0x4e, 0x1a, 0xea, 0x38, 0x96, + 0xe2, 0xcc, 0xaa, 0xd4, 0x4f, 0xf7, 0xe4, 0xb9, 0x21, 0x8e, 0x01, 0xf1, 0x94, 0x82, 0xe0, 0xe6, + 0x0d, 0x3e, 0x7f, 0x2f, 0x66, 0xe2, 0x62, 0x0f, 0x2e, 0xc9, 0x2f, 0x4a, 0x4c, 0x4f, 0x15, 0xd2, + 0xe6, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x05, 0x7b, 0x9a, 0xd3, 0x49, 0x1c, 0xe4, 0x1b, 0x10, 0x1f, + 0xe1, 0x1b, 0x10, 0x4f, 0x29, 0x08, 0x2c, 0x88, 0x12, 0x4a, 0x4c, 0xb4, 0x0d, 0x25, 0xe6, 0x81, + 0x0e, 0x25, 0xa7, 0xa0, 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, 0xb2, 0x48, + 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0xbb, 0x4f, 0x37, 0x2f, 0xb5, + 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, + 0x49, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0xe5, 0xae, 0x24, 0x36, 0x70, 0x86, 0x32, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x02, 0x09, 0x18, 0xeb, 0x03, 0x00, 0x00, +} + +func (this *CPU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CPU) + if !ok { + that2, ok := that.(CPU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Units.Equal(&that1.Units) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (this *Memory) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Memory) + if !ok { + that2, ok := that.(Memory) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (this *Storage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Storage) + if !ok { + that2, ok := that.(Storage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (m *CPU) 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 *CPU) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CPU) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Units.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Memory) 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 *Memory) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Memory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Storage) 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 *Storage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintResource(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { + offset -= sovResource(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CPU) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Units.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func (m *Memory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func (m *Storage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovResource(uint64(l)) + } + l = m.Quantity.Size() + n += 1 + l + sovResource(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + return n +} + +func sovResource(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CPU) 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 ErrIntOverflowResource + } + 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: CPU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CPU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Units.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Memory) 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 ErrIntOverflowResource + } + 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: Memory: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Memory: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Storage) 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 ErrIntOverflowResource + } + 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: Storage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Storage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowResource + } + 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 ErrInvalidLengthResource + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResource(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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrIntOverflowResource + } + 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, ErrInvalidLengthResource + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResource + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResource + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta2/resourceunits.pb.go b/go/node/types/v1beta2/resourceunits.pb.go new file mode 100644 index 00000000..b95d7dc5 --- /dev/null +++ b/go/node/types/v1beta2/resourceunits.pb.go @@ -0,0 +1,571 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta2/resourceunits.proto + +package v1beta2 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +type ResourceUnits struct { + CPU *CPU `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty" yaml:"cpu,omitempty"` + Memory *Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty" yaml:"memory,omitempty"` + Storage Volumes `protobuf:"bytes,3,rep,name=storage,proto3,castrepeated=Volumes" json:"storage,omitempty" yaml:"storage,omitempty"` + Endpoints Endpoints `protobuf:"bytes,4,rep,name=endpoints,proto3,castrepeated=Endpoints" json:"endpoints" yaml:"endpoints"` +} + +func (m *ResourceUnits) Reset() { *m = ResourceUnits{} } +func (m *ResourceUnits) String() string { return proto.CompactTextString(m) } +func (*ResourceUnits) ProtoMessage() {} +func (*ResourceUnits) Descriptor() ([]byte, []int) { + return fileDescriptor_3a653b54b68ae16d, []int{0} +} +func (m *ResourceUnits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceUnits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceUnits.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 *ResourceUnits) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceUnits.Merge(m, src) +} +func (m *ResourceUnits) XXX_Size() int { + return m.Size() +} +func (m *ResourceUnits) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceUnits.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceUnits proto.InternalMessageInfo + +func (m *ResourceUnits) GetCPU() *CPU { + if m != nil { + return m.CPU + } + return nil +} + +func (m *ResourceUnits) GetMemory() *Memory { + if m != nil { + return m.Memory + } + return nil +} + +func (m *ResourceUnits) GetStorage() Volumes { + if m != nil { + return m.Storage + } + return nil +} + +func (m *ResourceUnits) GetEndpoints() Endpoints { + if m != nil { + return m.Endpoints + } + return nil +} + +func init() { + proto.RegisterType((*ResourceUnits)(nil), "akash.base.v1beta2.ResourceUnits") +} + +func init() { + proto.RegisterFile("akash/base/v1beta2/resourceunits.proto", fileDescriptor_3a653b54b68ae16d) +} + +var fileDescriptor_3a653b54b68ae16d = []byte{ + // 403 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0xaa, 0xda, 0x40, + 0x14, 0x87, 0x93, 0x46, 0x14, 0x23, 0x82, 0x0d, 0x82, 0xc1, 0x96, 0x8c, 0xcd, 0xa2, 0xb8, 0x68, + 0x33, 0x34, 0x76, 0x51, 0x5c, 0x95, 0x48, 0x97, 0x05, 0x49, 0xb1, 0x8b, 0x6e, 0x4a, 0x12, 0x87, + 0x18, 0x34, 0x99, 0x90, 0x99, 0x54, 0xf2, 0x16, 0x7d, 0x84, 0xae, 0xfb, 0x24, 0x59, 0xba, 0xbc, + 0xab, 0xb9, 0x97, 0xb8, 0xb9, 0xb8, 0xf4, 0x09, 0x2e, 0xf9, 0x77, 0xc5, 0xab, 0xb8, 0x4b, 0xce, + 0xf9, 0x7e, 0xe7, 0x3b, 0x0c, 0x47, 0x7c, 0x6f, 0xad, 0x2d, 0xb2, 0x82, 0xb6, 0x45, 0x10, 0xfc, + 0xf3, 0xc9, 0x46, 0xd4, 0xd2, 0x61, 0x84, 0x08, 0x8e, 0x23, 0x07, 0xc5, 0x81, 0x47, 0x89, 0x16, + 0x46, 0x98, 0x62, 0x49, 0x2a, 0x38, 0x2d, 0xe7, 0xb4, 0x8a, 0x1b, 0xf6, 0x5d, 0xec, 0xe2, 0xa2, + 0x0d, 0xf3, 0xaf, 0x92, 0x1c, 0xbe, 0xbb, 0x31, 0xf1, 0x06, 0x82, 0x82, 0x65, 0x88, 0xbd, 0x80, + 0x96, 0x88, 0x9a, 0x0a, 0x62, 0xd7, 0xac, 0x52, 0x8b, 0x7c, 0x0f, 0xe9, 0xb7, 0x28, 0x38, 0x61, + 0x2c, 0xf3, 0x23, 0x7e, 0xdc, 0xd1, 0x07, 0xda, 0xe5, 0x3e, 0xda, 0x6c, 0xbe, 0x30, 0x3e, 0xa7, + 0x0c, 0xf0, 0x19, 0x03, 0xc2, 0x6c, 0xbe, 0x38, 0x30, 0xd0, 0x75, 0xc2, 0xf8, 0x03, 0xf6, 0x3d, + 0x8a, 0xfc, 0x90, 0x26, 0x47, 0x06, 0xfa, 0x89, 0xe5, 0x6f, 0xa6, 0xea, 0x59, 0x59, 0x35, 0xf3, + 0xc9, 0x92, 0x2b, 0x36, 0x7d, 0xe4, 0xe3, 0x28, 0x91, 0x5f, 0x15, 0x8e, 0xe1, 0x35, 0xc7, 0xf7, + 0x82, 0x30, 0x26, 0xb9, 0xe6, 0xc0, 0x40, 0xaf, 0x4c, 0x9c, 0x29, 0x06, 0xa5, 0xe2, 0x65, 0x47, + 0x35, 0xab, 0xf1, 0xd2, 0x56, 0x6c, 0x11, 0x8a, 0x23, 0xcb, 0x45, 0xb2, 0x30, 0x12, 0xc6, 0x1d, + 0xfd, 0xcd, 0x35, 0xd3, 0x8f, 0x12, 0x31, 0xbe, 0xa6, 0x0c, 0x70, 0x07, 0x06, 0x5e, 0x57, 0x99, + 0x33, 0x97, 0x5c, 0xba, 0x2e, 0x5a, 0xea, 0xff, 0x7b, 0xd0, 0xfa, 0x89, 0x37, 0xb1, 0x8f, 0x88, + 0x59, 0xdb, 0xa4, 0x40, 0x6c, 0xd7, 0xcf, 0x4c, 0xe4, 0x46, 0xa1, 0x7e, 0x7b, 0x4d, 0xfd, 0xad, + 0x82, 0x0c, 0xbd, 0x72, 0x9f, 0x62, 0x47, 0x06, 0x7a, 0xa5, 0xf3, 0xb9, 0x94, 0xbb, 0xda, 0x75, + 0x84, 0x98, 0x27, 0x76, 0xda, 0x78, 0xfc, 0x07, 0x78, 0xc3, 0x4c, 0x33, 0x85, 0xdf, 0x65, 0x0a, + 0xff, 0x90, 0x29, 0xfc, 0xdf, 0xbd, 0xc2, 0xed, 0xf6, 0x0a, 0x77, 0xb7, 0x57, 0xb8, 0x5f, 0x5f, + 0x5c, 0x8f, 0xae, 0x62, 0x5b, 0x73, 0xb0, 0x0f, 0x8b, 0x35, 0x3e, 0x06, 0x88, 0x6e, 0x71, 0xb4, + 0xae, 0xfe, 0xac, 0xd0, 0x83, 0x2e, 0x86, 0x01, 0x5e, 0x22, 0x48, 0x93, 0x10, 0x91, 0xfa, 0x5a, + 0xec, 0x66, 0x71, 0x25, 0x93, 0xa7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x73, 0xe2, 0x78, 0xbf, + 0x02, 0x00, 0x00, +} + +func (this *ResourceUnits) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceUnits) + if !ok { + that2, ok := that.(ResourceUnits) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CPU.Equal(that1.CPU) { + return false + } + if !this.Memory.Equal(that1.Memory) { + return false + } + if len(this.Storage) != len(that1.Storage) { + return false + } + for i := range this.Storage { + if !this.Storage[i].Equal(&that1.Storage[i]) { + return false + } + } + if len(this.Endpoints) != len(that1.Endpoints) { + return false + } + for i := range this.Endpoints { + if !this.Endpoints[i].Equal(&that1.Endpoints[i]) { + return false + } + } + return true +} +func (m *ResourceUnits) 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 *ResourceUnits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceUnits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Endpoints) > 0 { + for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Storage) > 0 { + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Memory != nil { + { + size, err := m.Memory.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.CPU != nil { + { + size, err := m.CPU.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintResourceunits(dAtA []byte, offset int, v uint64) int { + offset -= sovResourceunits(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceUnits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CPU != nil { + l = m.CPU.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + if len(m.Storage) > 0 { + for _, e := range m.Storage { + l = e.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + } + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + } + return n +} + +func sovResourceunits(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourceunits(x uint64) (n int) { + return sovResourceunits(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceUnits) 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 ErrIntOverflowResourceunits + } + 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: ResourceUnits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceUnits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CPU", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CPU == nil { + m.CPU = &CPU{} + } + if err := m.CPU.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &Memory{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Storage = append(m.Storage, Storage{}) + if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, Endpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResourceunits(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourceunits + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourceunits(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, ErrIntOverflowResourceunits + } + 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, ErrIntOverflowResourceunits + } + 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, ErrIntOverflowResourceunits + } + 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, ErrInvalidLengthResourceunits + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourceunits + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourceunits + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourceunits = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourceunits = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourceunits = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta2/resourcevalue.go b/go/node/types/v1beta2/resourcevalue.go new file mode 100644 index 00000000..c9eb9d94 --- /dev/null +++ b/go/node/types/v1beta2/resourcevalue.go @@ -0,0 +1,57 @@ +package v1beta2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +var ( + ErrOverflow = errors.Errorf("resource value overflow") + ErrCannotSub = errors.Errorf("cannot subtract resources when lhs does not have same units as rhs") + ErrNegativeResult = errors.Errorf("result of subtraction is negative") +) + +/* +ResourceValue the big point of this small change is to ensure math operations on resources +not resulting with negative value which panic on unsigned types as well as overflow which leads to panic too +instead reasonable error is returned. +Each resource using this type as value can take extra advantage of it to check upper bounds +For example in SDL v1 CPU units were handled as uint32 and operation like math.MaxUint32 + 2 +would cause application to panic. But nowadays + const CPULimit = math.MaxUint32 + + func (c *CPU) add(rhs CPU) error { + res, err := c.Units.add(rhs.Units) + if err != nil { + return err + } + + if res.Units.Value() > CPULimit { + return ErrOverflow + } + + c.Units = res + + return nil + } +*/ + +func NewResourceValue(val uint64) ResourceValue { + res := ResourceValue{ + Val: sdk.NewIntFromUint64(val), + } + + return res +} + +func (m ResourceValue) Value() uint64 { + return m.Val.Uint64() +} + +func (m ResourceValue) Dup() ResourceValue { + res := ResourceValue{ + Val: sdk.NewIntFromBigInt(m.Val.BigInt()), + } + + return res +} diff --git a/go/node/types/v1beta2/resourcevalue.pb.go b/go/node/types/v1beta2/resourcevalue.pb.go new file mode 100644 index 00000000..3a3700b1 --- /dev/null +++ b/go/node/types/v1beta2/resourcevalue.pb.go @@ -0,0 +1,343 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta2/resourcevalue.proto + +package v1beta2 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Unit stores cpu, memory and storage metrics +type ResourceValue struct { + Val github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=val,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"val"` +} + +func (m *ResourceValue) Reset() { *m = ResourceValue{} } +func (m *ResourceValue) String() string { return proto.CompactTextString(m) } +func (*ResourceValue) ProtoMessage() {} +func (*ResourceValue) Descriptor() ([]byte, []int) { + return fileDescriptor_7fcaa1b8d61f9bc3, []int{0} +} +func (m *ResourceValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceValue.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 *ResourceValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceValue.Merge(m, src) +} +func (m *ResourceValue) XXX_Size() int { + return m.Size() +} +func (m *ResourceValue) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceValue proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ResourceValue)(nil), "akash.base.v1beta2.ResourceValue") +} + +func init() { + proto.RegisterFile("akash/base/v1beta2/resourcevalue.proto", fileDescriptor_7fcaa1b8d61f9bc3) +} + +var fileDescriptor_7fcaa1b8d61f9bc3 = []byte{ + // 227 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd2, 0x2f, + 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xaa, 0x93, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0xe1, 0x5c, 0xbc, 0x41, 0x50, 0x03, + 0xc2, 0x40, 0x06, 0x08, 0x39, 0x70, 0x31, 0x97, 0x25, 0xe6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, + 0x38, 0xe9, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0xbc, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x31, 0x94, 0xd2, 0x2d, 0x4e, + 0xc9, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0xf3, 0xcc, 0x2b, 0x09, 0x02, 0x69, 0xb5, 0x62, + 0x79, 0xb1, 0x40, 0x9e, 0xd1, 0x29, 0xe8, 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, 0x2c, 0x90, 0x0c, 0x03, 0xbb, 0x53, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, + 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x18, 0x0d, 0xf3, 0x6a, + 0x12, 0x1b, 0xd8, 0xcd, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x34, 0xdc, 0xf0, 0x8e, 0x07, + 0x01, 0x00, 0x00, +} + +func (this *ResourceValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceValue) + if !ok { + that2, ok := that.(ResourceValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Val.Equal(that1.Val) { + return false + } + return true +} +func (m *ResourceValue) 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 *ResourceValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Val.Size() + i -= size + if _, err := m.Val.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintResourcevalue(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResourcevalue(dAtA []byte, offset int, v uint64) int { + offset -= sovResourcevalue(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Val.Size() + n += 1 + l + sovResourcevalue(uint64(l)) + return n +} + +func sovResourcevalue(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourcevalue(x uint64) (n int) { + return sovResourcevalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceValue) 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 ErrIntOverflowResourcevalue + } + 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: ResourceValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourcevalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthResourcevalue + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthResourcevalue + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Val.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResourcevalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourcevalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourcevalue(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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrInvalidLengthResourcevalue + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourcevalue + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourcevalue + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourcevalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourcevalue = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourcevalue = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/attribute.go b/go/node/types/v1beta3/attribute.go new file mode 100644 index 00000000..90fd3ad9 --- /dev/null +++ b/go/node/types/v1beta3/attribute.go @@ -0,0 +1,285 @@ +package v1beta3 + +import ( + "reflect" + "regexp" + "strconv" + "strings" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "gopkg.in/yaml.v3" +) + +const ( + moduleName = "akash" + attributeNameRegexpString = `^([a-zA-Z][\w\/\.\-]{1,62}\w)$` +) + +const ( + errAttributesDuplicateKeys uint32 = iota + 1 + errInvalidAttributeKey +) + +var ( + ErrAttributesDuplicateKeys = sdkerrors.Register(moduleName, errAttributesDuplicateKeys, "attributes cannot have duplicate keys") + ErrInvalidAttributeKey = sdkerrors.Register(moduleName, errInvalidAttributeKey, "attribute key does not match regexp") +) + +var ( + attributeNameRegexp = regexp.MustCompile(attributeNameRegexpString) +) + +/* +Attributes purpose of using this type in favor of Cosmos's sdk.Attribute is +ability to later extend it with operators to support querying on things like +cpu/memory/storage attributes +At this moment type though is same as sdk.Attributes but all akash libraries were +turned to use a new one +*/ +type Attributes []Attribute + +type AttributesGroup []Attributes + +type AttributeValue interface { + AsBool() (bool, bool) + AsString() (string, bool) +} + +type attributeValue struct { + value string +} + +func (val attributeValue) AsBool() (bool, bool) { + if val.value == "" { + return false, false + } + + res, err := strconv.ParseBool(val.value) + if err != nil { + return false, false + } + + return res, true +} + +func (val attributeValue) AsString() (string, bool) { + if val.value == "" { + return "", false + } + + return val.value, true +} + +func NewStringAttribute(key, val string) Attribute { + return Attribute{ + Key: key, + Value: val, + } +} + +func (m *Attribute) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *Attribute) Equal(rhs *Attribute) bool { + return reflect.DeepEqual(m, rhs) +} + +func (m Attribute) SubsetOf(rhs Attribute) bool { + if m.Key == rhs.Key && m.Value == rhs.Value { + return true + } + + return false +} + +func (attr Attributes) Validate() error { + store := make(map[string]bool) + + for i := range attr { + if !attributeNameRegexp.MatchString(attr[i].Key) { + return ErrInvalidAttributeKey + } + + if _, ok := store[attr[i].Key]; ok { + return ErrAttributesDuplicateKeys + } + + store[attr[i].Key] = true + } + + return nil +} + +func (attr Attributes) Dup() Attributes { + res := make(Attributes, len(attr)) + + for _, pair := range attr { + res = append(res, Attribute{ + Key: pair.Key, + Value: pair.Value, + }) + } + + return res +} + +// AttributesSubsetOf check if a is subset of b +// nolint: gofmt +// For example there are two yaml files being converted into these attributes +// example 1: a is subset of b +// --- +// // a +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-1 +// - us-east-2 +// +// example 2: a is not subset of b +// attributes: +// +// region: +// - us-east-1 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// example 3: a is subset of b +// attributes: +// +// region: +// - us-east-2 +// - us-east-3 +// +// --- +// b +// attributes: +// +// region: +// - us-east-2 +func AttributesSubsetOf(a, b Attributes) bool { +loop: + for _, req := range a { + for _, attr := range b { + if req.SubsetOf(attr) { + continue loop + } + } + return false + } + + return true +} + +func (attr Attributes) SubsetOf(b Attributes) bool { + return AttributesSubsetOf(attr, b) +} + +func (attr Attributes) Find(glob string) AttributeValue { + // todo wildcard + + var val attributeValue + + for i := range attr { + if glob == attr[i].Key { + val.value = attr[i].Value + break + } + } + + return val +} + +func (attr Attributes) Iterate(prefix string, fn func(group, key, value string)) { + for _, item := range attr { + if strings.HasPrefix(item.Key, prefix) { + tokens := strings.SplitAfter(item.Key, "/") + tokens = tokens[1:] + fn(tokens[1], tokens[2], item.Value) + } + } +} + +// GetCapabilitiesGroup +// +// example +// capabilities/storage/1/persistent: true +// capabilities/storage/1/class: io1 +// capabilities/storage/2/persistent: false +// +// nolint: gofmt +// returns +// - - persistent: true +// class: nvme +// - - persistent: false +func (attr Attributes) GetCapabilitiesGroup(prefix string) AttributesGroup { + var res AttributesGroup // nolint:prealloc + + groups := make(map[string]Attributes) + + for _, item := range attr { + if !strings.HasPrefix(item.Key, "capabilities/"+prefix) { + continue + } + + tokens := strings.SplitAfter(strings.TrimPrefix(item.Key, "capabilities/"), "/") + // skip malformed attributes. really? + if len(tokens) != 3 { + continue + } + + // filter out prefix name + tokens = tokens[1:] + + group := groups[tokens[0]] + if group == nil { + group = Attributes{} + } + + group = append(group, Attribute{ + Key: tokens[1], + Value: item.Value, + }) + + groups[tokens[0]] = group + } + + for _, group := range groups { + res = append(res, group) + } + + return res +} + +// IN check if given attributes are in attributes group +// AttributesGroup for storage +// - persistent: true +// class: beta1 +// - persistent: true +// class: beta2 +// +// that +// - persistent: true +// class: beta1 +func (attr Attributes) IN(group AttributesGroup) bool { + for _, group := range group { + if attr.SubsetOf(group) { + return true + } + } + return false +} diff --git a/go/node/types/v1beta3/attribute.pb.go b/go/node/types/v1beta3/attribute.pb.go new file mode 100644 index 00000000..511eb72d --- /dev/null +++ b/go/node/types/v1beta3/attribute.pb.go @@ -0,0 +1,812 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/attribute.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Attribute represents key value pair +type Attribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" yaml:"key"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"` +} + +func (m *Attribute) Reset() { *m = Attribute{} } +func (*Attribute) ProtoMessage() {} +func (*Attribute) Descriptor() ([]byte, []int) { + return fileDescriptor_616f00266f4f7c96, []int{0} +} +func (m *Attribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Attribute.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 *Attribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attribute.Merge(m, src) +} +func (m *Attribute) XXX_Size() int { + return m.Size() +} +func (m *Attribute) XXX_DiscardUnknown() { + xxx_messageInfo_Attribute.DiscardUnknown(m) +} + +var xxx_messageInfo_Attribute proto.InternalMessageInfo + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +type SignedBy struct { + // all_of all keys in this list must have signed attributes + AllOf []string `protobuf:"bytes,1,rep,name=all_of,json=allOf,proto3" json:"all_of" yaml:"allOf"` + // any_of at least of of the keys from the list must have signed attributes + AnyOf []string `protobuf:"bytes,2,rep,name=any_of,json=anyOf,proto3" json:"any_of" yaml:"anyOf"` +} + +func (m *SignedBy) Reset() { *m = SignedBy{} } +func (*SignedBy) ProtoMessage() {} +func (*SignedBy) Descriptor() ([]byte, []int) { + return fileDescriptor_616f00266f4f7c96, []int{1} +} +func (m *SignedBy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignedBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignedBy.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 *SignedBy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedBy.Merge(m, src) +} +func (m *SignedBy) XXX_Size() int { + return m.Size() +} +func (m *SignedBy) XXX_DiscardUnknown() { + xxx_messageInfo_SignedBy.DiscardUnknown(m) +} + +var xxx_messageInfo_SignedBy proto.InternalMessageInfo + +// PlacementRequirements +type PlacementRequirements struct { + // SignedBy list of keys that tenants expect to have signatures from + SignedBy SignedBy `protobuf:"bytes,1,opt,name=signed_by,json=signedBy,proto3" json:"signed_by" yaml:"signed_by"` + // Attribute list of attributes tenant expects from the provider + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes" yaml:"attributes"` +} + +func (m *PlacementRequirements) Reset() { *m = PlacementRequirements{} } +func (*PlacementRequirements) ProtoMessage() {} +func (*PlacementRequirements) Descriptor() ([]byte, []int) { + return fileDescriptor_616f00266f4f7c96, []int{2} +} +func (m *PlacementRequirements) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlacementRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlacementRequirements.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 *PlacementRequirements) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlacementRequirements.Merge(m, src) +} +func (m *PlacementRequirements) XXX_Size() int { + return m.Size() +} +func (m *PlacementRequirements) XXX_DiscardUnknown() { + xxx_messageInfo_PlacementRequirements.DiscardUnknown(m) +} + +var xxx_messageInfo_PlacementRequirements proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Attribute)(nil), "akash.base.v1beta3.Attribute") + proto.RegisterType((*SignedBy)(nil), "akash.base.v1beta3.SignedBy") + proto.RegisterType((*PlacementRequirements)(nil), "akash.base.v1beta3.PlacementRequirements") +} + +func init() { + proto.RegisterFile("akash/base/v1beta3/attribute.proto", fileDescriptor_616f00266f4f7c96) +} + +var fileDescriptor_616f00266f4f7c96 = []byte{ + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0xae, 0xd3, 0x30, + 0x14, 0xc6, 0x93, 0x7b, 0xb9, 0x57, 0x8d, 0x8b, 0x50, 0x89, 0x40, 0xaa, 0x2a, 0xb0, 0x2b, 0x4b, + 0x40, 0x17, 0x62, 0xb5, 0x5d, 0x50, 0x37, 0xf2, 0x02, 0xa0, 0xb0, 0x95, 0xa1, 0x38, 0xad, 0x9b, + 0x46, 0x49, 0xe3, 0x92, 0x38, 0x45, 0xd9, 0x18, 0x19, 0x79, 0x04, 0x1e, 0xa7, 0x63, 0xc7, 0x4e, + 0x11, 0xa4, 0x03, 0x52, 0xc7, 0x3c, 0x01, 0x8a, 0xf3, 0xa7, 0x91, 0xb8, 0x93, 0x9d, 0xef, 0x7c, + 0xbf, 0x9c, 0xf3, 0xd9, 0x06, 0x98, 0x7a, 0x34, 0xda, 0x10, 0x9b, 0x46, 0x8c, 0xec, 0xc7, 0x36, + 0x13, 0x74, 0x4a, 0xa8, 0x10, 0xa1, 0x6b, 0xc7, 0x82, 0x19, 0xbb, 0x90, 0x0b, 0xae, 0xeb, 0xd2, + 0x63, 0x14, 0x1e, 0xa3, 0xf2, 0x0c, 0x9e, 0x39, 0xdc, 0xe1, 0xb2, 0x4c, 0x8a, 0x5d, 0xe9, 0xc4, + 0x9f, 0x81, 0xf6, 0xbe, 0x86, 0xf5, 0x21, 0xb8, 0xf5, 0x58, 0xd2, 0x57, 0x87, 0xea, 0x48, 0x33, + 0x9f, 0xe4, 0x29, 0x02, 0x09, 0xdd, 0xfa, 0x33, 0xec, 0xb1, 0x04, 0x5b, 0x45, 0x49, 0x7f, 0x0d, + 0xee, 0xf6, 0xd4, 0x8f, 0x59, 0xff, 0x46, 0x7a, 0x7a, 0x79, 0x8a, 0x1e, 0x97, 0x1e, 0x29, 0x63, + 0xab, 0x2c, 0xcf, 0x1e, 0xfd, 0xf8, 0x85, 0x14, 0xbc, 0x07, 0x9d, 0x4f, 0xae, 0x13, 0xb0, 0x95, + 0x99, 0xe8, 0x63, 0x70, 0x4f, 0x7d, 0x7f, 0xc1, 0xd7, 0x7d, 0x75, 0x78, 0x3b, 0xd2, 0xcc, 0xc1, + 0x25, 0x45, 0x95, 0x72, 0xfd, 0x09, 0xf5, 0xfd, 0x0f, 0x6b, 0x6c, 0xdd, 0xc9, 0x55, 0x22, 0x41, + 0x52, 0x20, 0x37, 0x2d, 0x44, 0x2a, 0x2d, 0x24, 0x48, 0x4a, 0xa4, 0x58, 0xab, 0xbe, 0x7f, 0x55, + 0xf0, 0xfc, 0xa3, 0x4f, 0x97, 0x6c, 0xcb, 0x02, 0x61, 0xb1, 0xaf, 0xb1, 0x1b, 0xca, 0x6d, 0xa4, + 0x7f, 0x01, 0x5a, 0x24, 0x27, 0x5a, 0xd8, 0x65, 0xce, 0xee, 0xe4, 0x85, 0xf1, 0xff, 0x61, 0x19, + 0xf5, 0xd8, 0xe6, 0xab, 0x43, 0x8a, 0x94, 0x4b, 0x8a, 0xae, 0x58, 0x9e, 0xa2, 0x5e, 0xd9, 0xba, + 0x91, 0xb0, 0xd5, 0x89, 0xea, 0x9c, 0x6b, 0x00, 0x9a, 0xdb, 0x88, 0xe4, 0xe0, 0xdd, 0xc9, 0xcb, + 0x87, 0x5a, 0x34, 0xc7, 0x6e, 0xbe, 0xa9, 0x7a, 0xb4, 0xc0, 0x3c, 0x45, 0x4f, 0xab, 0x7c, 0x8d, + 0x86, 0xad, 0x96, 0xa1, 0x4c, 0x6a, 0xce, 0x4f, 0x7f, 0xa0, 0xf2, 0x3d, 0x83, 0xca, 0x21, 0x83, + 0xea, 0x31, 0x83, 0xea, 0xef, 0x0c, 0xaa, 0x3f, 0xcf, 0x50, 0x39, 0x9e, 0xa1, 0x72, 0x3a, 0x43, + 0x65, 0xfe, 0xce, 0x71, 0xc5, 0x26, 0xb6, 0x8d, 0x25, 0xdf, 0x12, 0x39, 0xc5, 0xdb, 0x80, 0x89, + 0x6f, 0x3c, 0xf4, 0xaa, 0x2f, 0xba, 0x73, 0x89, 0xc3, 0x49, 0xc0, 0x57, 0x8c, 0x88, 0x64, 0xc7, + 0xa2, 0xfa, 0x51, 0xd9, 0xf7, 0xf2, 0x85, 0x4c, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x14, 0xe4, + 0x37, 0x17, 0x71, 0x02, 0x00, 0x00, +} + +func (m *Attribute) 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 *Attribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignedBy) 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 *SignedBy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedBy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AnyOf) > 0 { + for iNdEx := len(m.AnyOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AnyOf[iNdEx]) + copy(dAtA[i:], m.AnyOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AnyOf[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.AllOf) > 0 { + for iNdEx := len(m.AllOf) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllOf[iNdEx]) + copy(dAtA[i:], m.AllOf[iNdEx]) + i = encodeVarintAttribute(dAtA, i, uint64(len(m.AllOf[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PlacementRequirements) 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 *PlacementRequirements) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlacementRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.SignedBy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttribute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintAttribute(dAtA []byte, offset int, v uint64) int { + offset -= sovAttribute(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Attribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAttribute(uint64(l)) + } + return n +} + +func (m *SignedBy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AllOf) > 0 { + for _, s := range m.AllOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + if len(m.AnyOf) > 0 { + for _, s := range m.AnyOf { + l = len(s) + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func (m *PlacementRequirements) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SignedBy.Size() + n += 1 + l + sovAttribute(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovAttribute(uint64(l)) + } + } + return n +} + +func sovAttribute(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAttribute(x uint64) (n int) { + return sovAttribute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Attribute) 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 ErrIntOverflowAttribute + } + 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: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignedBy) 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 ErrIntOverflowAttribute + } + 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: SignedBy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignedBy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllOf = append(m.AllOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + 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 ErrInvalidLengthAttribute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyOf = append(m.AnyOf, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PlacementRequirements) 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 ErrIntOverflowAttribute + } + 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: PlacementRequirements: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PlacementRequirements: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedBy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SignedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttribute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttribute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttribute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttribute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttribute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAttribute(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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrIntOverflowAttribute + } + 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, ErrInvalidLengthAttribute + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAttribute + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAttribute + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAttribute = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAttribute = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAttribute = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/attribute_test.go b/go/node/types/v1beta3/attribute_test.go new file mode 100644 index 00000000..bf5a0dd4 --- /dev/null +++ b/go/node/types/v1beta3/attribute_test.go @@ -0,0 +1,83 @@ +package v1beta3_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + types "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +func TestAttributes_Validate(t *testing.T) { + attr := types.Attributes{ + {Key: "key"}, + {Key: "key"}, + } + + require.EqualError(t, attr.Validate(), types.ErrAttributesDuplicateKeys.Error()) + + // unsupported key symbol + attr = types.Attributes{ + {Key: "$"}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) + + // empty key + attr = types.Attributes{ + {Key: ""}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) + // to long key + attr = types.Attributes{ + {Key: "sdgkhaeirugaeroigheirghseiargfs3ssdgkhaeirugaeroigheirghseiargfs3"}, + } + + require.EqualError(t, attr.Validate(), types.ErrInvalidAttributeKey.Error()) +} + +func TestAttribute_Equal(t *testing.T) { + attr1 := &types.Attribute{Key: "key1", Value: "val1"} + attr2 := &types.Attribute{Key: "key1", Value: "val1"} + attr3 := &types.Attribute{Key: "key1", Value: "val2"} + + require.True(t, attr1.Equal(attr2)) + require.False(t, attr1.Equal(attr3)) +} + +func TestAttribute_SubsetOf(t *testing.T) { + attr1 := types.Attribute{Key: "key1", Value: "val1"} + attr2 := types.Attribute{Key: "key1", Value: "val1"} + attr3 := types.Attribute{Key: "key1", Value: "val2"} + + require.True(t, attr1.SubsetOf(attr2)) + require.False(t, attr1.SubsetOf(attr3)) +} + +func TestAttributes_SubsetOf(t *testing.T) { + attr1 := types.Attributes{ + {Key: "key1", Value: "val1"}, + } + + attr2 := types.Attributes{ + {Key: "key1", Value: "val1"}, + {Key: "key2", Value: "val2"}, + } + + attr3 := types.Attributes{ + {Key: "key1", Value: "val1"}, + {Key: "key2", Value: "val2"}, + {Key: "key3", Value: "val3"}, + {Key: "key4", Value: "val4"}, + } + + attr4 := types.Attributes{ + {Key: "key3", Value: "val3"}, + {Key: "key4", Value: "val4"}, + } + + require.True(t, attr1.SubsetOf(attr2)) + require.True(t, attr2.SubsetOf(attr3)) + require.False(t, attr1.SubsetOf(attr4)) +} diff --git a/go/node/types/v1beta3/cpu.pb.go b/go/node/types/v1beta3/cpu.pb.go new file mode 100644 index 00000000..b33f4897 --- /dev/null +++ b/go/node/types/v1beta3/cpu.pb.go @@ -0,0 +1,421 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/cpu.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// CPU stores resource units and cpu config attributes +type CPU struct { + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *CPU) Reset() { *m = CPU{} } +func (m *CPU) String() string { return proto.CompactTextString(m) } +func (*CPU) ProtoMessage() {} +func (*CPU) Descriptor() ([]byte, []int) { + return fileDescriptor_80ab47749737c9d3, []int{0} +} +func (m *CPU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPU.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 *CPU) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPU.Merge(m, src) +} +func (m *CPU) XXX_Size() int { + return m.Size() +} +func (m *CPU) XXX_DiscardUnknown() { + xxx_messageInfo_CPU.DiscardUnknown(m) +} + +var xxx_messageInfo_CPU proto.InternalMessageInfo + +func (m *CPU) GetUnits() ResourceValue { + if m != nil { + return m.Units + } + return ResourceValue{} +} + +func (m *CPU) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*CPU)(nil), "akash.base.v1beta3.CPU") +} + +func init() { proto.RegisterFile("akash/base/v1beta3/cpu.proto", fileDescriptor_80ab47749737c9d3) } + +var fileDescriptor_80ab47749737c9d3 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, + 0x2e, 0x28, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xcb, 0xea, 0x81, 0x64, 0xf5, + 0xa0, 0xb2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x69, 0x7d, 0x10, 0x0b, 0xa2, 0x52, 0x4a, + 0x09, 0x8b, 0x39, 0x89, 0x25, 0x25, 0x45, 0x99, 0x49, 0xa5, 0x25, 0xa9, 0x50, 0x35, 0x6a, 0x58, + 0xd4, 0x14, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0x96, 0x25, 0xe6, 0x94, 0x42, 0xd5, 0x29, + 0x5d, 0x65, 0xe4, 0x62, 0x76, 0x0e, 0x08, 0x15, 0xb2, 0xe5, 0x62, 0x2d, 0xcd, 0xcb, 0x2c, 0x29, + 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd4, 0xc3, 0x74, 0x8d, 0x5e, 0x10, 0x54, 0x7f, + 0x18, 0x48, 0xbf, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x10, 0x5d, 0x42, 0x1d, 0x8c, 0x5c, + 0x5c, 0x70, 0x27, 0x14, 0x4b, 0x30, 0x29, 0x30, 0x6b, 0x70, 0x1b, 0xc9, 0x62, 0x33, 0xc4, 0x11, + 0xa6, 0xca, 0xc9, 0x13, 0x64, 0xc0, 0xab, 0x7b, 0xf2, 0x22, 0x08, 0x8d, 0x3a, 0xf9, 0xb9, 0x99, + 0x25, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x9f, 0xee, 0xc9, 0x4b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, + 0x61, 0x93, 0x55, 0x5a, 0x75, 0x5f, 0x9e, 0x0b, 0x6e, 0x52, 0x71, 0x10, 0x92, 0xdd, 0x56, 0x2c, + 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0x05, 0x9d, 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, 0x45, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd8, 0x7d, 0xba, + 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, + 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x31, 0x2c, 0xfc, 0x92, 0xd8, 0xc0, 0x41, + 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x9a, 0x56, 0xd0, 0xc8, 0x01, 0x00, 0x00, +} + +func (this *CPU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CPU) + if !ok { + that2, ok := that.(CPU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Units.Equal(&that1.Units) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (m *CPU) 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 *CPU) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CPU) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCpu(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Units.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCpu(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintCpu(dAtA []byte, offset int, v uint64) int { + offset -= sovCpu(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CPU) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Units.Size() + n += 1 + l + sovCpu(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovCpu(uint64(l)) + } + } + return n +} + +func sovCpu(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCpu(x uint64) (n int) { + return sovCpu(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CPU) 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 ErrIntOverflowCpu + } + 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: CPU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CPU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCpu + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCpu + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCpu + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Units.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCpu + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCpu + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCpu + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCpu(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCpu + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCpu(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, ErrIntOverflowCpu + } + 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, ErrIntOverflowCpu + } + 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, ErrIntOverflowCpu + } + 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, ErrInvalidLengthCpu + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCpu + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCpu + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCpu = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCpu = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCpu = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/endpoint.go b/go/node/types/v1beta3/endpoint.go new file mode 100644 index 00000000..ed4ed839 --- /dev/null +++ b/go/node/types/v1beta3/endpoint.go @@ -0,0 +1,11 @@ +package v1beta3 + +type Endpoints []Endpoint + +func (m Endpoints) Dup() Endpoints { + res := make(Endpoints, len(m)) + + copy(res, m) + + return res +} diff --git a/go/node/types/v1beta3/endpoint.pb.go b/go/node/types/v1beta3/endpoint.pb.go new file mode 100644 index 00000000..6b2be720 --- /dev/null +++ b/go/node/types/v1beta3/endpoint.pb.go @@ -0,0 +1,405 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/endpoint.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// This describes how the endpoint is implemented when the lease is deployed +type Endpoint_Kind int32 + +const ( + // Describes an endpoint that becomes a Kubernetes Ingress + Endpoint_SHARED_HTTP Endpoint_Kind = 0 + // Describes an endpoint that becomes a Kubernetes NodePort + Endpoint_RANDOM_PORT Endpoint_Kind = 1 + // Describes an endpoint that becomes a leased IP + Endpoint_LEASED_IP Endpoint_Kind = 2 +) + +var Endpoint_Kind_name = map[int32]string{ + 0: "SHARED_HTTP", + 1: "RANDOM_PORT", + 2: "LEASED_IP", +} + +var Endpoint_Kind_value = map[string]int32{ + "SHARED_HTTP": 0, + "RANDOM_PORT": 1, + "LEASED_IP": 2, +} + +func (x Endpoint_Kind) String() string { + return proto.EnumName(Endpoint_Kind_name, int32(x)) +} + +func (Endpoint_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f12485ed8bcdc6e7, []int{0, 0} +} + +// Endpoint describes a publicly accessible IP service +type Endpoint struct { + Kind Endpoint_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=akash.base.v1beta3.Endpoint_Kind" json:"kind,omitempty"` + SequenceNumber uint32 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number" yaml:"sequence_number"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f12485ed8bcdc6e7, []int{0} +} +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Endpoint.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 *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return m.Size() +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetKind() Endpoint_Kind { + if m != nil { + return m.Kind + } + return Endpoint_SHARED_HTTP +} + +func (m *Endpoint) GetSequenceNumber() uint32 { + if m != nil { + return m.SequenceNumber + } + return 0 +} + +func init() { + proto.RegisterEnum("akash.base.v1beta3.Endpoint_Kind", Endpoint_Kind_name, Endpoint_Kind_value) + proto.RegisterType((*Endpoint)(nil), "akash.base.v1beta3.Endpoint") +} + +func init() { proto.RegisterFile("akash/base/v1beta3/endpoint.proto", fileDescriptor_f12485ed8bcdc6e7) } + +var fileDescriptor_f12485ed8bcdc6e7 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, + 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, + 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, + 0x83, 0x58, 0x10, 0x95, 0x4a, 0xaf, 0x18, 0xb9, 0x38, 0x5c, 0xa1, 0x9a, 0x85, 0x4c, 0xb9, 0x58, + 0xb2, 0x33, 0xf3, 0x52, 0x24, 0x18, 0x15, 0x18, 0x35, 0xf8, 0x8c, 0x14, 0xf5, 0x30, 0x4d, 0xd1, + 0x83, 0xa9, 0xd5, 0xf3, 0xce, 0xcc, 0x4b, 0x09, 0x02, 0x2b, 0x17, 0xca, 0xe0, 0xe2, 0x2f, 0x4e, + 0x2d, 0x2c, 0x4d, 0xcd, 0x4b, 0x4e, 0x8d, 0xcf, 0x2b, 0xcd, 0x4d, 0x4a, 0x2d, 0x92, 0x60, 0x52, + 0x60, 0xd4, 0xe0, 0x75, 0xb2, 0x7f, 0x74, 0x4f, 0x9e, 0x2f, 0x18, 0x2a, 0xe5, 0x07, 0x96, 0x79, + 0x75, 0x4f, 0x1e, 0x5d, 0xf1, 0xa7, 0x7b, 0xf2, 0x62, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x68, + 0x12, 0x4a, 0x41, 0x7c, 0xc5, 0x28, 0x9a, 0x95, 0xcc, 0xb9, 0x58, 0x40, 0xf6, 0x0a, 0xf1, 0x73, + 0x71, 0x07, 0x7b, 0x38, 0x06, 0xb9, 0xba, 0xc4, 0x7b, 0x84, 0x84, 0x04, 0x08, 0x30, 0x80, 0x04, + 0x82, 0x1c, 0xfd, 0x5c, 0xfc, 0x7d, 0xe3, 0x03, 0xfc, 0x83, 0x42, 0x04, 0x18, 0x85, 0x78, 0xb9, + 0x38, 0x7d, 0x5c, 0x1d, 0x83, 0x5d, 0x5d, 0xe2, 0x3d, 0x03, 0x04, 0x98, 0xac, 0x58, 0x5e, 0x2c, + 0x90, 0x67, 0x74, 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, + 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x8b, + 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xaf, 0x75, 0xf3, 0x52, + 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, + 0x94, 0x54, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x58, 0xc8, 0x27, 0xb1, 0x81, 0xc3, 0xd1, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xd8, 0x24, 0x46, 0x96, 0x01, 0x00, 0x00, +} + +func (this *Endpoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Endpoint) + if !ok { + that2, ok := that.(Endpoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + if this.SequenceNumber != that1.SequenceNumber { + return false + } + return true +} +func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SequenceNumber != 0 { + i = encodeVarintEndpoint(dAtA, i, uint64(m.SequenceNumber)) + i-- + dAtA[i] = 0x10 + } + if m.Kind != 0 { + i = encodeVarintEndpoint(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEndpoint(dAtA []byte, offset int, v uint64) int { + offset -= sovEndpoint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovEndpoint(uint64(m.Kind)) + } + if m.SequenceNumber != 0 { + n += 1 + sovEndpoint(uint64(m.SequenceNumber)) + } + return n +} + +func sovEndpoint(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEndpoint(x uint64) (n int) { + return sovEndpoint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Endpoint) 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 ErrIntOverflowEndpoint + } + 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: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEndpoint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= Endpoint_Kind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SequenceNumber", wireType) + } + m.SequenceNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEndpoint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SequenceNumber |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEndpoint(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEndpoint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEndpoint(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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrIntOverflowEndpoint + } + 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, ErrInvalidLengthEndpoint + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEndpoint + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEndpoint + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEndpoint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEndpoint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEndpoint = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/gpu.pb.go b/go/node/types/v1beta3/gpu.pb.go new file mode 100644 index 00000000..2768bd10 --- /dev/null +++ b/go/node/types/v1beta3/gpu.pb.go @@ -0,0 +1,421 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/gpu.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// GPU stores resource units and cpu config attributes +type GPU struct { + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *GPU) Reset() { *m = GPU{} } +func (m *GPU) String() string { return proto.CompactTextString(m) } +func (*GPU) ProtoMessage() {} +func (*GPU) Descriptor() ([]byte, []int) { + return fileDescriptor_629c4d148689a448, []int{0} +} +func (m *GPU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GPU.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 *GPU) XXX_Merge(src proto.Message) { + xxx_messageInfo_GPU.Merge(m, src) +} +func (m *GPU) XXX_Size() int { + return m.Size() +} +func (m *GPU) XXX_DiscardUnknown() { + xxx_messageInfo_GPU.DiscardUnknown(m) +} + +var xxx_messageInfo_GPU proto.InternalMessageInfo + +func (m *GPU) GetUnits() ResourceValue { + if m != nil { + return m.Units + } + return ResourceValue{} +} + +func (m *GPU) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*GPU)(nil), "akash.base.v1beta3.GPU") +} + +func init() { proto.RegisterFile("akash/base/v1beta3/gpu.proto", fileDescriptor_629c4d148689a448) } + +var fileDescriptor_629c4d148689a448 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, + 0x2f, 0x28, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xcb, 0xea, 0x81, 0x64, 0xf5, + 0xa0, 0xb2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x69, 0x7d, 0x10, 0x0b, 0xa2, 0x52, 0x4a, + 0x09, 0x8b, 0x39, 0x89, 0x25, 0x25, 0x45, 0x99, 0x49, 0xa5, 0x25, 0xa9, 0x50, 0x35, 0x6a, 0x58, + 0xd4, 0x14, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0x96, 0x25, 0xe6, 0x94, 0x42, 0xd5, 0x29, + 0x5d, 0x65, 0xe4, 0x62, 0x76, 0x0f, 0x08, 0x15, 0xb2, 0xe5, 0x62, 0x2d, 0xcd, 0xcb, 0x2c, 0x29, + 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd4, 0xc3, 0x74, 0x8d, 0x5e, 0x10, 0x54, 0x7f, + 0x18, 0x48, 0xbf, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x10, 0x5d, 0x42, 0x1d, 0x8c, 0x5c, + 0x5c, 0x70, 0x27, 0x14, 0x4b, 0x30, 0x29, 0x30, 0x6b, 0x70, 0x1b, 0xc9, 0x62, 0x33, 0xc4, 0x11, + 0xa6, 0xca, 0xc9, 0x13, 0x64, 0xc0, 0xab, 0x7b, 0xf2, 0x22, 0x08, 0x8d, 0x3a, 0xf9, 0xb9, 0x99, + 0x25, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x9f, 0xee, 0xc9, 0x4b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, + 0x61, 0x93, 0x55, 0x5a, 0x75, 0x5f, 0x9e, 0x0b, 0x6e, 0x52, 0x71, 0x10, 0x92, 0xdd, 0x56, 0x2c, + 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0x05, 0x9d, 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, 0x45, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd8, 0x7d, 0xba, + 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, + 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x31, 0x2c, 0xfc, 0x92, 0xd8, 0xc0, 0x41, + 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x21, 0x7f, 0x4a, 0x18, 0xc8, 0x01, 0x00, 0x00, +} + +func (this *GPU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*GPU) + if !ok { + that2, ok := that.(GPU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Units.Equal(&that1.Units) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (m *GPU) 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 *GPU) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GPU) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGpu(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Units.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGpu(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGpu(dAtA []byte, offset int, v uint64) int { + offset -= sovGpu(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GPU) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Units.Size() + n += 1 + l + sovGpu(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGpu(uint64(l)) + } + } + return n +} + +func sovGpu(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGpu(x uint64) (n int) { + return sovGpu(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GPU) 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 ErrIntOverflowGpu + } + 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: GPU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GPU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGpu + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGpu + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGpu + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Units.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGpu + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGpu + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGpu + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGpu(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGpu + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGpu(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, ErrIntOverflowGpu + } + 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, ErrIntOverflowGpu + } + 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, ErrIntOverflowGpu + } + 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, ErrInvalidLengthGpu + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGpu + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGpu + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGpu = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGpu = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGpu = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/memory.pb.go b/go/node/types/v1beta3/memory.pb.go new file mode 100644 index 00000000..93db63d0 --- /dev/null +++ b/go/node/types/v1beta3/memory.pb.go @@ -0,0 +1,423 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/memory.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Memory stores resource quantity and memory attributes +type Memory struct { + Quantity ResourceValue `protobuf:"bytes,1,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *Memory) Reset() { *m = Memory{} } +func (m *Memory) String() string { return proto.CompactTextString(m) } +func (*Memory) ProtoMessage() {} +func (*Memory) Descriptor() ([]byte, []int) { + return fileDescriptor_5f47c13a8ed1b91a, []int{0} +} +func (m *Memory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Memory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Memory.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 *Memory) XXX_Merge(src proto.Message) { + xxx_messageInfo_Memory.Merge(m, src) +} +func (m *Memory) XXX_Size() int { + return m.Size() +} +func (m *Memory) XXX_DiscardUnknown() { + xxx_messageInfo_Memory.DiscardUnknown(m) +} + +var xxx_messageInfo_Memory proto.InternalMessageInfo + +func (m *Memory) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Memory) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*Memory)(nil), "akash.base.v1beta3.Memory") +} + +func init() { proto.RegisterFile("akash/base/v1beta3/memory.proto", fileDescriptor_5f47c13a8ed1b91a) } + +var fileDescriptor_5f47c13a8ed1b91a = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x31, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0x7b, 0x4a, 0x88, 0x29, 0x5b, 0xc3, 0x40, 0x20, 0xf6, 0xb0, 0x83, 0x61, 0xd0, 0x5e, + 0x84, 0xc5, 0xb0, 0xc9, 0xe6, 0xe0, 0xd2, 0xc1, 0x81, 0xed, 0x8a, 0x97, 0x72, 0x81, 0xe3, 0xea, + 0xdd, 0x2b, 0xa6, 0x7e, 0x02, 0x47, 0x3f, 0x82, 0xb3, 0x9f, 0x84, 0x91, 0xd1, 0xa9, 0x1a, 0x58, + 0x8c, 0x23, 0x89, 0xbb, 0x69, 0x39, 0xd0, 0xc4, 0x6e, 0xf7, 0xf2, 0x7e, 0xf7, 0x7b, 0xff, 0xfc, + 0x6d, 0x4c, 0x27, 0x54, 0x8f, 0x49, 0x48, 0x35, 0x23, 0xf3, 0x8b, 0x90, 0x01, 0xed, 0x11, 0xc1, + 0x84, 0x54, 0xa9, 0x1f, 0x2b, 0x09, 0xd2, 0x71, 0x0a, 0xc0, 0xcf, 0x01, 0xdf, 0x00, 0xcd, 0x7a, + 0x24, 0x23, 0x59, 0xac, 0x49, 0xfe, 0xda, 0x92, 0x4d, 0xaf, 0x44, 0x45, 0x01, 0x14, 0x0f, 0x13, + 0x60, 0x86, 0x39, 0x2d, 0x61, 0x14, 0xd3, 0x32, 0x51, 0x23, 0x36, 0xa7, 0xd3, 0xc4, 0x70, 0xde, + 0x37, 0xb2, 0xab, 0x37, 0x45, 0x0c, 0x67, 0x68, 0x1f, 0xdd, 0x27, 0x74, 0x06, 0x1c, 0xd2, 0x06, + 0x6a, 0xa3, 0x4e, 0xad, 0x7b, 0xe2, 0xff, 0xcf, 0xe4, 0x07, 0xc6, 0x72, 0x9b, 0x5b, 0x06, 0xad, + 0x45, 0x86, 0xad, 0xaf, 0x0c, 0x57, 0x34, 0x7f, 0x64, 0x9b, 0x0c, 0xd7, 0x52, 0x2a, 0xa6, 0x7d, + 0x2f, 0x9f, 0xbc, 0x60, 0xef, 0x73, 0x9e, 0x90, 0x6d, 0xef, 0x23, 0xea, 0xc6, 0x41, 0xfb, 0xb0, + 0x53, 0xeb, 0x1e, 0x97, 0xe9, 0xaf, 0x76, 0xd4, 0xe0, 0xda, 0xa8, 0xeb, 0xbf, 0x1f, 0xcf, 0xa4, + 0xe0, 0xc0, 0x44, 0x0c, 0xe9, 0x26, 0xc3, 0xad, 0xed, 0xa9, 0xb2, 0xad, 0xf7, 0xfa, 0x8e, 0xed, + 0xbd, 0x49, 0x07, 0x7f, 0x6e, 0xf7, 0x2b, 0x9f, 0x2f, 0x18, 0x0d, 0x82, 0xc5, 0xca, 0x45, 0xcb, + 0x95, 0x8b, 0x3e, 0x56, 0x2e, 0x7a, 0x5e, 0xbb, 0xd6, 0x72, 0xed, 0x5a, 0x6f, 0x6b, 0xd7, 0x1a, + 0x5e, 0x46, 0x1c, 0xc6, 0x49, 0xe8, 0x8f, 0xa4, 0x20, 0x45, 0xbe, 0xf3, 0x19, 0x83, 0x07, 0xa9, + 0x26, 0x66, 0xa2, 0x31, 0x27, 0x91, 0x24, 0x33, 0x79, 0xc7, 0x08, 0xa4, 0x31, 0xd3, 0xbb, 0x7e, + 0xc3, 0x6a, 0x51, 0x69, 0xef, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xab, 0x65, 0x28, 0xeb, 0x01, + 0x00, 0x00, +} + +func (this *Memory) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Memory) + if !ok { + that2, ok := that.(Memory) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (m *Memory) 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 *Memory) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Memory) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMemory(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintMemory(dAtA []byte, offset int, v uint64) int { + offset -= sovMemory(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Memory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quantity.Size() + n += 1 + l + sovMemory(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMemory(uint64(l)) + } + } + return n +} + +func sovMemory(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMemory(x uint64) (n int) { + return sovMemory(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Memory) 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 ErrIntOverflowMemory + } + 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: Memory: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Memory: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMemory + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMemory + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMemory + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMemory(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMemory + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMemory(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, ErrIntOverflowMemory + } + 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, ErrIntOverflowMemory + } + 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, ErrIntOverflowMemory + } + 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, ErrInvalidLengthMemory + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMemory + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMemory + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMemory = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMemory = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMemory = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/migrate/v1beta2.go b/go/node/types/v1beta3/migrate/v1beta2.go new file mode 100644 index 00000000..3a3b274c --- /dev/null +++ b/go/node/types/v1beta3/migrate/v1beta2.go @@ -0,0 +1,97 @@ +package migrate + +import ( + "github.com/akash-network/akash-api/go/node/types/v1beta2" + "github.com/akash-network/akash-api/go/node/types/v1beta3" +) + +func ResourceValueFromV1Beta2(from v1beta2.ResourceValue) v1beta3.ResourceValue { + return v1beta3.NewResourceValue(from.Value()) +} + +func AttributesFromV1Beta2(from v1beta2.Attributes) v1beta3.Attributes { + res := make(v1beta3.Attributes, 0, len(from)) + + for _, attr := range from { + res = append(res, v1beta3.Attribute{ + Key: attr.Key, + Value: attr.Value, + }) + } + + return res +} + +func SignedByFromV1Beta2(from v1beta2.SignedBy) v1beta3.SignedBy { + return v1beta3.SignedBy{ + AllOf: from.AllOf, + AnyOf: from.AnyOf, + } +} + +func PlacementRequirementsFromV1Beta2(from v1beta2.PlacementRequirements) v1beta3.PlacementRequirements { + res := v1beta3.PlacementRequirements{ + SignedBy: SignedByFromV1Beta2(from.SignedBy), + Attributes: AttributesFromV1Beta2(from.Attributes), + } + + return res +} + +func CPUFromV1Beta2(from *v1beta2.CPU) *v1beta3.CPU { + if from == nil { + return nil + } + + return &v1beta3.CPU{ + Units: ResourceValueFromV1Beta2(from.Units), + Attributes: AttributesFromV1Beta2(from.Attributes), + } +} + +func MemoryFromV1Beta2(from *v1beta2.Memory) *v1beta3.Memory { + if from == nil { + return nil + } + + return &v1beta3.Memory{ + Quantity: ResourceValueFromV1Beta2(from.Quantity), + Attributes: AttributesFromV1Beta2(from.Attributes), + } +} + +func VolumesFromV1Beta2(from v1beta2.Volumes) v1beta3.Volumes { + res := make(v1beta3.Volumes, 0, len(from)) + + for _, storage := range from { + res = append(res, v1beta3.Storage{ + Name: "default", + Quantity: ResourceValueFromV1Beta2(storage.Quantity), + Attributes: AttributesFromV1Beta2(storage.Attributes), + }) + } + + return res +} + +func EndpointsFromV1Beta2(from []v1beta2.Endpoint) []v1beta3.Endpoint { + res := make([]v1beta3.Endpoint, 0, len(from)) + + for _, endpoint := range from { + res = append(res, v1beta3.Endpoint{ + Kind: v1beta3.Endpoint_Kind(endpoint.Kind), + SequenceNumber: 0, // All previous data does not have a use for sequence number + }) + } + + return res +} + +func ResourceUnitsFromV1Beta2(from v1beta2.ResourceUnits) v1beta3.ResourceUnits { + return v1beta3.ResourceUnits{ + CPU: CPUFromV1Beta2(from.CPU), + Memory: MemoryFromV1Beta2(from.Memory), + Storage: VolumesFromV1Beta2(from.Storage), + Endpoints: EndpointsFromV1Beta2(from.Endpoints), + } +} diff --git a/go/node/types/v1beta3/requirements.go b/go/node/types/v1beta3/requirements.go new file mode 100644 index 00000000..bc2ebeaf --- /dev/null +++ b/go/node/types/v1beta3/requirements.go @@ -0,0 +1,15 @@ +package v1beta3 + +import ( + "gopkg.in/yaml.v3" +) + +func (m *SignedBy) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} + +func (m *PlacementRequirements) String() string { + res, _ := yaml.Marshal(m) + return string(res) +} diff --git a/go/node/types/v1beta3/resource.go b/go/node/types/v1beta3/resource.go new file mode 100644 index 00000000..35676ff4 --- /dev/null +++ b/go/node/types/v1beta3/resource.go @@ -0,0 +1,91 @@ +package v1beta3 + +type UnitType int + +type Unit interface { + String() string +} + +type ResUnit interface { + Equals(ResUnit) bool + Add(unit ResUnit) bool +} + +// Resources stores Unit details and Count value +type Resources struct { + Resources ResourceUnits `json:"resources"` + Count uint32 `json:"count"` +} + +// ResourceGroup is the interface that wraps GetName and GetResources methods +type ResourceGroup interface { + GetName() string + GetResources() []Resources +} + +type Volumes []Storage + +var _ Unit = (*CPU)(nil) +var _ Unit = (*Memory)(nil) +var _ Unit = (*Storage)(nil) +var _ Unit = (*GPU)(nil) + +func (m ResourceUnits) Dup() ResourceUnits { + res := ResourceUnits{ + CPU: m.CPU.Dup(), + Memory: m.Memory.Dup(), + Storage: m.Storage.Dup(), + GPU: m.GPU.Dup(), + Endpoints: m.Endpoints.Dup(), + } + + return res +} + +func (m CPU) Dup() *CPU { + return &CPU{ + Units: m.Units.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Memory) Dup() *Memory { + return &Memory{ + Quantity: m.Quantity.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Storage) Dup() *Storage { + return &Storage{ + Quantity: m.Quantity.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m GPU) Dup() *GPU { + return &GPU{ + Units: m.Units.Dup(), + Attributes: m.Attributes.Dup(), + } +} + +func (m Volumes) Equal(rhs Volumes) bool { + for i := range m { + if !m[i].Equal(rhs[i]) { + return false + } + } + + return true +} + +func (m Volumes) Dup() Volumes { + res := make(Volumes, len(m)) + + for _, storage := range m { + res = append(res, *storage.Dup()) + } + + return res +} diff --git a/go/node/types/v1beta3/resource_test.go b/go/node/types/v1beta3/resource_test.go new file mode 100644 index 00000000..1cebcd4c --- /dev/null +++ b/go/node/types/v1beta3/resource_test.go @@ -0,0 +1,28 @@ +package v1beta3 + +// func TestResourceUnitsSubIsIdempotent(t *testing.T) { +// ru := ResourceUnits{ +// CPU: &CPU{Units: NewResourceValue(1000)}, +// Memory: &Memory{Quantity: NewResourceValue(10 * unit.Gi)}, +// Storage: Volumes{ +// Storage{Quantity: NewResourceValue(10 * unit.Gi)}, +// }, +// } +// cpuAsString := ru.CPU.String() +// newRu, err := ru.Sub( +// ResourceUnits{ +// CPU: &CPU{Units: NewResourceValue(1)}, +// Memory: &Memory{Quantity: NewResourceValue(0 * unit.Gi)}, +// Storage: Volumes{ +// Storage{Quantity: NewResourceValue(0 * unit.Gi)}, +// }, +// }, +// ) +// require.NoError(t, err) +// require.NotNil(t, newRu) +// +// cpuAsStringAfter := ru.CPU.String() +// require.Equal(t, cpuAsString, cpuAsStringAfter) +// +// require.Equal(t, newRu.CPU.GetUnits().Value(), uint64(999)) +// } diff --git a/go/node/types/v1beta3/resourceunits.pb.go b/go/node/types/v1beta3/resourceunits.pb.go new file mode 100644 index 00000000..97317c07 --- /dev/null +++ b/go/node/types/v1beta3/resourceunits.pb.go @@ -0,0 +1,637 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/resourceunits.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +type ResourceUnits struct { + CPU *CPU `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty" yaml:"cpu,omitempty"` + Memory *Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty" yaml:"memory,omitempty"` + Storage Volumes `protobuf:"bytes,3,rep,name=storage,proto3,castrepeated=Volumes" json:"storage,omitempty" yaml:"storage,omitempty"` + GPU *GPU `protobuf:"bytes,4,opt,name=gpu,proto3" json:"gpu,omitempty" yaml:"gpu,omitempty"` + Endpoints Endpoints `protobuf:"bytes,5,rep,name=endpoints,proto3,castrepeated=Endpoints" json:"endpoints" yaml:"endpoints"` +} + +func (m *ResourceUnits) Reset() { *m = ResourceUnits{} } +func (m *ResourceUnits) String() string { return proto.CompactTextString(m) } +func (*ResourceUnits) ProtoMessage() {} +func (*ResourceUnits) Descriptor() ([]byte, []int) { + return fileDescriptor_8e4047260f8e6b24, []int{0} +} +func (m *ResourceUnits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceUnits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceUnits.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 *ResourceUnits) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceUnits.Merge(m, src) +} +func (m *ResourceUnits) XXX_Size() int { + return m.Size() +} +func (m *ResourceUnits) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceUnits.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceUnits proto.InternalMessageInfo + +func (m *ResourceUnits) GetCPU() *CPU { + if m != nil { + return m.CPU + } + return nil +} + +func (m *ResourceUnits) GetMemory() *Memory { + if m != nil { + return m.Memory + } + return nil +} + +func (m *ResourceUnits) GetStorage() Volumes { + if m != nil { + return m.Storage + } + return nil +} + +func (m *ResourceUnits) GetGPU() *GPU { + if m != nil { + return m.GPU + } + return nil +} + +func (m *ResourceUnits) GetEndpoints() Endpoints { + if m != nil { + return m.Endpoints + } + return nil +} + +func init() { + proto.RegisterType((*ResourceUnits)(nil), "akash.base.v1beta3.ResourceUnits") +} + +func init() { + proto.RegisterFile("akash/base/v1beta3/resourceunits.proto", fileDescriptor_8e4047260f8e6b24) +} + +var fileDescriptor_8e4047260f8e6b24 = []byte{ + // 452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xb1, 0x6e, 0xd4, 0x30, + 0x1c, 0xc6, 0x2f, 0xe4, 0x68, 0xd5, 0x54, 0x95, 0x4a, 0x54, 0xa9, 0xd1, 0x51, 0xc5, 0x47, 0x06, + 0xd4, 0x01, 0x62, 0x71, 0xc7, 0x80, 0x3a, 0xa1, 0x54, 0xa8, 0x13, 0x52, 0x15, 0x74, 0x0c, 0x2c, + 0x28, 0x49, 0x2d, 0x37, 0x6a, 0x13, 0x5b, 0xb1, 0x4d, 0x95, 0xb7, 0xe0, 0x11, 0x58, 0xe1, 0x49, + 0x6e, 0xec, 0xc8, 0x64, 0x50, 0x6e, 0x41, 0x37, 0xf6, 0x09, 0x50, 0x62, 0xa7, 0xe5, 0x7a, 0xa6, + 0x5b, 0xe2, 0xef, 0xf7, 0xff, 0x7f, 0xf9, 0xbe, 0xd8, 0x79, 0x9e, 0x5c, 0x24, 0xec, 0x1c, 0xa6, + 0x09, 0x43, 0xf0, 0xcb, 0xab, 0x14, 0xf1, 0x64, 0x0a, 0x2b, 0xc4, 0x88, 0xa8, 0x32, 0x24, 0xca, + 0x9c, 0xb3, 0x90, 0x56, 0x84, 0x13, 0xd7, 0xed, 0xb8, 0xb0, 0xe5, 0x42, 0xcd, 0x8d, 0xf6, 0x30, + 0xc1, 0xa4, 0x93, 0x61, 0xfb, 0xa4, 0xc8, 0xd1, 0x81, 0x61, 0x63, 0x46, 0xc5, 0x03, 0x2a, 0xbe, + 0x55, 0x81, 0x41, 0x2d, 0x50, 0x41, 0xaa, 0x5a, 0x03, 0x63, 0x03, 0xc0, 0x38, 0xa9, 0x12, 0x8c, + 0x34, 0xf1, 0xcc, 0x40, 0xa0, 0xf2, 0x8c, 0x92, 0xbc, 0xe4, 0x0a, 0x09, 0xbe, 0x0f, 0x9d, 0x9d, + 0x58, 0x67, 0x9c, 0xb5, 0x19, 0xdd, 0xcf, 0x8e, 0x9d, 0x51, 0xe1, 0x59, 0x63, 0xeb, 0x70, 0x7b, + 0xb2, 0x1f, 0xae, 0x67, 0x0d, 0x8f, 0x4f, 0x67, 0xd1, 0xeb, 0xb9, 0x04, 0x56, 0x23, 0x81, 0x7d, + 0x7c, 0x3a, 0x5b, 0x4a, 0xb0, 0x93, 0x51, 0xf1, 0x82, 0x14, 0x39, 0x47, 0x05, 0xe5, 0xf5, 0x8d, + 0x04, 0x7b, 0x75, 0x52, 0x5c, 0x1e, 0x05, 0x2b, 0xc7, 0x41, 0xdc, 0x6e, 0x76, 0xb1, 0xb3, 0xa1, + 0x72, 0x78, 0x8f, 0x3a, 0x8f, 0x91, 0xc9, 0xe3, 0x7d, 0x47, 0x44, 0xd3, 0xd6, 0x66, 0x29, 0xc1, + 0xae, 0x9a, 0x58, 0xb1, 0xd8, 0x57, 0x16, 0xf7, 0x95, 0x20, 0xd6, 0xeb, 0xdd, 0x2b, 0x67, 0x53, + 0xf7, 0xe1, 0xd9, 0x63, 0xfb, 0x70, 0x7b, 0xf2, 0xd4, 0xe4, 0xf4, 0x41, 0x21, 0xd1, 0xdb, 0xb9, + 0x04, 0x83, 0xa5, 0x04, 0x4f, 0xf4, 0xcc, 0x8a, 0x97, 0xa7, 0xbc, 0xd6, 0xa4, 0xe0, 0xc7, 0x2f, + 0xb0, 0xf9, 0x91, 0x5c, 0x8a, 0x02, 0xb1, 0xb8, 0x77, 0x6b, 0x2b, 0xc4, 0x54, 0x78, 0xc3, 0xff, + 0x57, 0x78, 0xf2, 0x6f, 0x85, 0x27, 0xaa, 0x42, 0x6c, 0xae, 0x10, 0xdf, 0xab, 0x10, 0x53, 0xe1, + 0x96, 0xce, 0x56, 0xff, 0x1f, 0x99, 0xf7, 0xb8, 0xcb, 0x76, 0x60, 0xb2, 0x79, 0xa7, 0xa1, 0x68, + 0xa2, 0xc3, 0xdd, 0x8d, 0xdd, 0x48, 0xb0, 0xab, 0x0c, 0x6e, 0x8f, 0xda, 0x30, 0x5b, 0xfd, 0x08, + 0x8b, 0xef, 0xd8, 0xa3, 0xe1, 0x9f, 0x6f, 0xc0, 0x8a, 0xe2, 0x79, 0xe3, 0x5b, 0xd7, 0x8d, 0x6f, + 0xfd, 0x6e, 0x7c, 0xeb, 0xeb, 0xc2, 0x1f, 0x5c, 0x2f, 0xfc, 0xc1, 0xcf, 0x85, 0x3f, 0xf8, 0xf4, + 0x06, 0xe7, 0xfc, 0x5c, 0xa4, 0x61, 0x46, 0x0a, 0xd8, 0x7d, 0xc6, 0xcb, 0x12, 0xf1, 0x2b, 0x52, + 0x5d, 0xe8, 0xb7, 0x84, 0xe6, 0x10, 0x13, 0x58, 0x92, 0x33, 0x04, 0x79, 0x4d, 0x11, 0xeb, 0xaf, + 0x63, 0xba, 0xd1, 0x5d, 0xc3, 0xe9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0xbb, 0x74, 0xd7, + 0x7c, 0x03, 0x00, 0x00, +} + +func (this *ResourceUnits) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceUnits) + if !ok { + that2, ok := that.(ResourceUnits) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CPU.Equal(that1.CPU) { + return false + } + if !this.Memory.Equal(that1.Memory) { + return false + } + if len(this.Storage) != len(that1.Storage) { + return false + } + for i := range this.Storage { + if !this.Storage[i].Equal(&that1.Storage[i]) { + return false + } + } + if !this.GPU.Equal(that1.GPU) { + return false + } + if len(this.Endpoints) != len(that1.Endpoints) { + return false + } + for i := range this.Endpoints { + if !this.Endpoints[i].Equal(&that1.Endpoints[i]) { + return false + } + } + return true +} +func (m *ResourceUnits) 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 *ResourceUnits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceUnits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Endpoints) > 0 { + for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.GPU != nil { + { + size, err := m.GPU.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Storage) > 0 { + for iNdEx := len(m.Storage) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Storage[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Memory != nil { + { + size, err := m.Memory.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.CPU != nil { + { + size, err := m.CPU.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResourceunits(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintResourceunits(dAtA []byte, offset int, v uint64) int { + offset -= sovResourceunits(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceUnits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CPU != nil { + l = m.CPU.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + if len(m.Storage) > 0 { + for _, e := range m.Storage { + l = e.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + } + if m.GPU != nil { + l = m.GPU.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovResourceunits(uint64(l)) + } + } + return n +} + +func sovResourceunits(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourceunits(x uint64) (n int) { + return sovResourceunits(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceUnits) 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 ErrIntOverflowResourceunits + } + 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: ResourceUnits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceUnits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CPU", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CPU == nil { + m.CPU = &CPU{} + } + if err := m.CPU.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &Memory{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Storage = append(m.Storage, Storage{}) + if err := m.Storage[len(m.Storage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GPU", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GPU == nil { + m.GPU = &GPU{} + } + if err := m.GPU.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourceunits + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourceunits + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourceunits + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, Endpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResourceunits(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourceunits + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourceunits(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, ErrIntOverflowResourceunits + } + 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, ErrIntOverflowResourceunits + } + 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, ErrIntOverflowResourceunits + } + 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, ErrInvalidLengthResourceunits + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourceunits + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourceunits + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourceunits = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourceunits = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourceunits = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/resourcevalue.go b/go/node/types/v1beta3/resourcevalue.go new file mode 100644 index 00000000..0d96f8c3 --- /dev/null +++ b/go/node/types/v1beta3/resourcevalue.go @@ -0,0 +1,57 @@ +package v1beta3 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pkg/errors" +) + +var ( + ErrOverflow = errors.Errorf("resource value overflow") + ErrCannotSub = errors.Errorf("cannot subtract resources when lhs does not have same units as rhs") + ErrNegativeResult = errors.Errorf("result of subtraction is negative") +) + +/* +ResourceValue the big point of this small change is to ensure math operations on resources +not resulting with negative value which panic on unsigned types as well as overflow which leads to panic too +instead reasonable error is returned. +Each resource using this type as value can take extra advantage of it to check upper bounds +For example in SDL v1 CPU units were handled as uint32 and operation like math.MaxUint32 + 2 +would cause application to panic. But nowadays + const CPULimit = math.MaxUint32 + + func (c *CPU) add(rhs CPU) error { + res, err := c.Units.add(rhs.Units) + if err != nil { + return err + } + + if res.Units.Value() > CPULimit { + return ErrOverflow + } + + c.Units = res + + return nil + } +*/ + +func NewResourceValue(val uint64) ResourceValue { + res := ResourceValue{ + Val: sdk.NewIntFromUint64(val), + } + + return res +} + +func (m ResourceValue) Value() uint64 { + return m.Val.Uint64() +} + +func (m ResourceValue) Dup() ResourceValue { + res := ResourceValue{ + Val: sdk.NewIntFromBigInt(m.Val.BigInt()), + } + + return res +} diff --git a/go/node/types/v1beta3/resourcevalue.pb.go b/go/node/types/v1beta3/resourcevalue.pb.go new file mode 100644 index 00000000..887f0cee --- /dev/null +++ b/go/node/types/v1beta3/resourcevalue.pb.go @@ -0,0 +1,343 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/resourcevalue.proto + +package v1beta3 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Unit stores cpu, memory and storage metrics +type ResourceValue struct { + Val github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=val,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"val"` +} + +func (m *ResourceValue) Reset() { *m = ResourceValue{} } +func (m *ResourceValue) String() string { return proto.CompactTextString(m) } +func (*ResourceValue) ProtoMessage() {} +func (*ResourceValue) Descriptor() ([]byte, []int) { + return fileDescriptor_a8f01ca02b3f00f6, []int{0} +} +func (m *ResourceValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceValue.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 *ResourceValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceValue.Merge(m, src) +} +func (m *ResourceValue) XXX_Size() int { + return m.Size() +} +func (m *ResourceValue) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceValue proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ResourceValue)(nil), "akash.base.v1beta3.ResourceValue") +} + +func init() { + proto.RegisterFile("akash/base/v1beta3/resourcevalue.proto", fileDescriptor_a8f01ca02b3f00f6) +} + +var fileDescriptor_a8f01ca02b3f00f6 = []byte{ + // 227 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x2f, + 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xaa, 0x93, 0x12, 0x49, 0xcf, + 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0xe1, 0x5c, 0xbc, 0x41, 0x50, 0x03, + 0xc2, 0x40, 0x06, 0x08, 0x39, 0x70, 0x31, 0x97, 0x25, 0xe6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, + 0x38, 0xe9, 0x9d, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0xbc, 0x5a, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x31, 0x94, 0xd2, 0x2d, 0x4e, + 0xc9, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0xf3, 0xcc, 0x2b, 0x09, 0x02, 0x69, 0xb5, 0x62, + 0x79, 0xb1, 0x40, 0x9e, 0xd1, 0x29, 0xe8, 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, 0x2c, 0x90, 0x0c, 0x03, 0xbb, 0x53, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, + 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x18, 0x0d, 0xf3, 0x6a, + 0x12, 0x1b, 0xd8, 0xcd, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xc4, 0x66, 0xec, 0x07, + 0x01, 0x00, 0x00, +} + +func (this *ResourceValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceValue) + if !ok { + that2, ok := that.(ResourceValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Val.Equal(that1.Val) { + return false + } + return true +} +func (m *ResourceValue) 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 *ResourceValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Val.Size() + i -= size + if _, err := m.Val.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintResourcevalue(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResourcevalue(dAtA []byte, offset int, v uint64) int { + offset -= sovResourcevalue(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Val.Size() + n += 1 + l + sovResourcevalue(uint64(l)) + return n +} + +func sovResourcevalue(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourcevalue(x uint64) (n int) { + return sovResourcevalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceValue) 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 ErrIntOverflowResourcevalue + } + 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: ResourceValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourcevalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthResourcevalue + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthResourcevalue + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Val.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipResourcevalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourcevalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourcevalue(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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrIntOverflowResourcevalue + } + 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, ErrInvalidLengthResourcevalue + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourcevalue + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourcevalue + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourcevalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourcevalue = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourcevalue = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/types/v1beta3/resourcevalue_test.go b/go/node/types/v1beta3/resourcevalue_test.go new file mode 100644 index 00000000..654cc290 --- /dev/null +++ b/go/node/types/v1beta3/resourcevalue_test.go @@ -0,0 +1,49 @@ +package v1beta3 + +// func TestValidSum(t *testing.T) { +// val1 := NewResourceValue(1) +// val2 := NewResourceValue(1) +// +// res, err := val1.add(val2) +// require.NoError(t, err) +// require.Equal(t, uint64(2), res.Value()) +// } +// +// func TestSubToNegative(t *testing.T) { +// val1 := NewResourceValue(1) +// val2 := NewResourceValue(2) +// +// _, err := val1.sub(val2) +// require.Error(t, err) +// } + +// func TestResourceValueSubIsIdempotent(t *testing.T) { +// val1 := NewResourceValue(100) +// before := val1.String() +// val2 := NewResourceValue(1) +// +// _, err := val1.sub(val2) +// require.NoError(t, err) +// after := val1.String() +// +// require.Equal(t, before, after) +// } +// +// func TestCPUSubIsNotIdempotent(t *testing.T) { +// val1 := &CPU{ +// Units: NewResourceValue(100), +// Attributes: nil, +// } +// +// before := val1.String() +// val2 := &CPU{ +// Units: NewResourceValue(1), +// Attributes: nil, +// } +// +// err := val1.sub(val2) +// require.NoError(t, err) +// after := val1.String() +// +// require.NotEqual(t, before, after) +// } diff --git a/go/node/types/v1beta3/storage.pb.go b/go/node/types/v1beta3/storage.pb.go new file mode 100644 index 00000000..3f1d720d --- /dev/null +++ b/go/node/types/v1beta3/storage.pb.go @@ -0,0 +1,478 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/base/v1beta3/storage.proto + +package v1beta3 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + _ "github.com/gogo/protobuf/gogoproto" + 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 + +// Storage stores resource quantity and storage attributes +type Storage struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Quantity ResourceValue `protobuf:"bytes,2,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` +} + +func (m *Storage) Reset() { *m = Storage{} } +func (m *Storage) String() string { return proto.CompactTextString(m) } +func (*Storage) ProtoMessage() {} +func (*Storage) Descriptor() ([]byte, []int) { + return fileDescriptor_293fa891b98ded01, []int{0} +} +func (m *Storage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Storage.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 *Storage) XXX_Merge(src proto.Message) { + xxx_messageInfo_Storage.Merge(m, src) +} +func (m *Storage) XXX_Size() int { + return m.Size() +} +func (m *Storage) XXX_DiscardUnknown() { + xxx_messageInfo_Storage.DiscardUnknown(m) +} + +var xxx_messageInfo_Storage proto.InternalMessageInfo + +func (m *Storage) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Storage) GetQuantity() ResourceValue { + if m != nil { + return m.Quantity + } + return ResourceValue{} +} + +func (m *Storage) GetAttributes() Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func init() { + proto.RegisterType((*Storage)(nil), "akash.base.v1beta3.Storage") +} + +func init() { proto.RegisterFile("akash/base/v1beta3/storage.proto", fileDescriptor_293fa891b98ded01) } + +var fileDescriptor_293fa891b98ded01 = []byte{ + // 348 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3f, 0x4f, 0xc2, 0x40, + 0x18, 0xc6, 0x7b, 0x40, 0xfc, 0x73, 0x6c, 0x0d, 0x89, 0x04, 0x62, 0x5b, 0x3b, 0x18, 0x12, 0xb5, + 0x17, 0x61, 0x31, 0x6c, 0x76, 0x73, 0xad, 0x89, 0x03, 0xdb, 0x15, 0x2f, 0xa5, 0x81, 0xf6, 0x6a, + 0xef, 0x2d, 0xa6, 0x7e, 0x02, 0x47, 0x3f, 0x82, 0x89, 0x9b, 0x9f, 0x84, 0x91, 0xd1, 0xa9, 0x1a, + 0x58, 0x8c, 0x23, 0x9f, 0xc0, 0xb4, 0x1c, 0x48, 0x62, 0xb7, 0x3e, 0xbd, 0xdf, 0xfd, 0x9e, 0x7b, + 0xf3, 0x62, 0x83, 0x8e, 0xa9, 0x18, 0x11, 0x97, 0x0a, 0x46, 0xa6, 0x97, 0x2e, 0x03, 0xda, 0x23, + 0x02, 0x78, 0x4c, 0x3d, 0x66, 0x45, 0x31, 0x07, 0xae, 0xaa, 0x05, 0x61, 0xe5, 0x84, 0x25, 0x89, + 0x56, 0xc3, 0xe3, 0x1e, 0x2f, 0x8e, 0x49, 0xfe, 0xb5, 0x26, 0x5b, 0x66, 0x89, 0x8b, 0x02, 0xc4, + 0xbe, 0x9b, 0x80, 0xb4, 0xb5, 0x4e, 0x4b, 0x98, 0x98, 0x09, 0x9e, 0xc4, 0x43, 0x36, 0xa5, 0x93, + 0x44, 0x72, 0xe6, 0x5b, 0x05, 0xef, 0xdf, 0xae, 0xdf, 0xa1, 0x9e, 0xe1, 0x5a, 0x48, 0x03, 0xd6, + 0x44, 0x06, 0xea, 0x1c, 0xda, 0x47, 0x3f, 0x99, 0x5e, 0xe4, 0x55, 0xa6, 0xd7, 0x53, 0x1a, 0x4c, + 0xfa, 0x66, 0x9e, 0x4c, 0xa7, 0xf8, 0xa9, 0x0e, 0xf0, 0xc1, 0x43, 0x42, 0x43, 0xf0, 0x21, 0x6d, + 0x56, 0x0c, 0xd4, 0xa9, 0x77, 0x4f, 0xac, 0xff, 0x13, 0x58, 0x8e, 0xec, 0xbc, 0xcb, 0x3b, 0xed, + 0xf6, 0x2c, 0xd3, 0x95, 0xdc, 0x2b, 0xfc, 0xa7, 0x1d, 0x6f, 0x9e, 0x4c, 0x67, 0xeb, 0x53, 0x9f, + 0x11, 0xc6, 0xdb, 0x81, 0x44, 0xb3, 0x6a, 0x54, 0x3b, 0xf5, 0xee, 0x71, 0x99, 0xfe, 0x7a, 0x43, + 0xd9, 0x37, 0x52, 0xdd, 0xf8, 0xbb, 0x78, 0xce, 0x03, 0x1f, 0x58, 0x10, 0x41, 0xba, 0xca, 0xf4, + 0xf6, 0xba, 0xaa, 0xec, 0xd4, 0x7c, 0xff, 0xd4, 0xf1, 0xd6, 0x24, 0x9c, 0x9d, 0xee, 0x7e, 0xed, + 0xfb, 0x55, 0x47, 0xb6, 0x33, 0x5b, 0x68, 0x68, 0xbe, 0xd0, 0xd0, 0xd7, 0x42, 0x43, 0x2f, 0x4b, + 0x4d, 0x99, 0x2f, 0x35, 0xe5, 0x63, 0xa9, 0x29, 0x83, 0x2b, 0xcf, 0x87, 0x51, 0xe2, 0x5a, 0x43, + 0x1e, 0x90, 0xe2, 0x7d, 0x17, 0x21, 0x83, 0x47, 0x1e, 0x8f, 0x65, 0xa2, 0x91, 0x4f, 0x3c, 0x4e, + 0x42, 0x7e, 0xcf, 0x08, 0xa4, 0x11, 0x13, 0x9b, 0x6d, 0xb8, 0x7b, 0xc5, 0x02, 0x7a, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xda, 0x96, 0xa5, 0xba, 0x1a, 0x02, 0x00, 0x00, +} + +func (this *Storage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Storage) + if !ok { + that2, ok := that.(Storage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Quantity.Equal(&that1.Quantity) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + return true +} +func (m *Storage) 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 *Storage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Storage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + { + size, err := m.Quantity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintStorage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + offset -= sovStorage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Storage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + l = m.Quantity.Size() + n += 1 + l + sovStorage(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func sovStorage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStorage(x uint64) (n int) { + return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Storage) 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 ErrIntOverflowStorage + } + 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: Storage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Storage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowStorage + } + 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 ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quantity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStorage(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, ErrIntOverflowStorage + } + 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, ErrIntOverflowStorage + } + 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, ErrIntOverflowStorage + } + 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, ErrInvalidLengthStorage + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStorage + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStorage + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStorage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStorage = fmt.Errorf("proto: unexpected end of group") +) diff --git a/make/codegen.mk b/make/codegen.mk new file mode 100644 index 00000000..51a92992 --- /dev/null +++ b/make/codegen.mk @@ -0,0 +1,10 @@ +.PHONY: proto-gen +proto-gen: modvendor gogoproto $(BUF) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) + ./script/protocgen.sh + +.PHONY: proto-gen-swagger +proto-gen-swagger: modvendor $(PROTOC_GEN_GOCOSMOS) $(PROTOC_GEN_SWAGGER) $(SWAGGER_COMBINE) + ./script/protoc-gen-swagger.sh + +.PHONY: codegen +codegen: proto-gen diff --git a/make/lint.mk b/make/lint.mk new file mode 100644 index 00000000..a842ea91 --- /dev/null +++ b/make/lint.mk @@ -0,0 +1,11 @@ +.PHONY: lint +lint: $(BUF) + $(BUF) lint + +.PHONY: check-breaking +proto-check-breaking: $(BUF) + $(BUF) breaking --against '.git#branch=main' + +.PHONY: format +proto-format: + $(DOCKER_CLANG) find ./ ! -path "./vendor/*" -name *.proto -exec clang-format -i {} \; diff --git a/make/mod.mk b/make/mod.mk new file mode 100644 index 00000000..ec3660f5 --- /dev/null +++ b/make/mod.mk @@ -0,0 +1,38 @@ +# Golang modules and vendoring + +define VENDOR_BUF +version: v1 +lint: + use: + - DEFAULT + ignore: + - ibc + - cosmos + - tendermint + - gogoproto + - cosmos_proto + - google + - confio +endef + +.PHONY: deps-tidy +deps-tidy: + $(GO) mod tidy + +.PHONY: deps-vendor +deps-vendor: + go mod vendor + +.PHONY: modsensure +modsensure: deps-tidy deps-vendor + +.PHONY: modvendor +modvendor: export VENDOR_BUF:=$(VENDOR_BUF) +modvendor: $(MODVENDOR) modsensure + @echo "vendoring non-go files..." + $(MODVENDOR) -copy="**/*.proto" -include=github.com/cosmos/cosmos-sdk/proto,github.com/cosmos/cosmos-sdk/third_party/proto + $(MODVENDOR) -copy="**/Makefile" -include=github.com/cosmos/gogoproto + $(MODVENDOR) -copy="**/*.proto" -include=github.com/cosmos/cosmos-proto/proto + $(MODVENDOR) -copy="**/swagger.yaml" -include=github.com/cosmos/cosmos-proto/client/docs/swagger-ui + @echo "$${VENDOR_BUF}" > vendor/github.com/cosmos/cosmos-sdk/proto/buf.yaml + @echo "$${VENDOR_BUF}" > vendor/github.com/cosmos/cosmos-sdk/third_party/proto/buf.yaml diff --git a/make/setup-cache.mk b/make/setup-cache.mk new file mode 100644 index 00000000..39e1f5b6 --- /dev/null +++ b/make/setup-cache.mk @@ -0,0 +1,109 @@ +############################################################################### +### Protobuf ### +############################################################################### +ifeq ($(UNAME_OS),Linux) + PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-$(UNAME_ARCH).zip +endif +ifeq ($(UNAME_OS),Darwin) + PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-universal_binary.zip +endif + +$(AKASH_DEVCACHE): + @echo "creating .cache dir structure..." + mkdir -p $@ + mkdir -p $(AKASH_DEVCACHE_BIN) + mkdir -p $(AKASH_DEVCACHE_INCLUDE) + mkdir -p $(AKASH_DEVCACHE_VERSIONS) + mkdir -p $(AKASH_DEVCACHE_NODE_MODULES) + mkdir -p $(AKASH_DEVCACHE)/run +cache: $(AKASH_DEVCACHE) + +$(BUF_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing buf v$(BUF_VERSION) ..." + rm -f $(BUF) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/bufbuild/buf/cmd/buf@v$(BUF_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(BUF): $(BUF_VERSION_FILE) + +$(PROTOC_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing protoc compiler v$(PROTOC_VERSION) ..." + rm -f $(PROTOC) + (cd /tmp; \ + curl -sOL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ + unzip -oq ${PROTOC_ZIP} -d $(AKASH_DEVCACHE) bin/protoc; \ + unzip -oq ${PROTOC_ZIP} -d $(AKASH_DEVCACHE) 'include/*'; \ + rm -f ${PROTOC_ZIP}) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(PROTOC): $(PROTOC_VERSION_FILE) + +$(GOGOPROTO_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing gogoproto binaries $(GOGOPROTO_VERSION) ..." + rm -f $(BUF) + GOBIN=$(AKASH_DEVCACHE_BIN) make -C vendor/github.com/cosmos/gogoproto install + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +gogoproto: $(GOGOPROTO_VERSION_FILE) + +$(PROTOC_GEN_GO_PULSAR_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing protoc-gen-go-pulsar $(PROTOC_GEN_GO_PULSAR_VERSION) ..." + rm -f $(PROTOC_GEN_GO_PULSAR) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@$(PROTOC_GEN_GO_PULSAR_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(PROTOC_GEN_GO_PULSAR): $(PROTOC_GEN_GO_PULSAR_VERSION_FILE) + +$(PROTOC_GEN_GO_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing protoc-gen-go $(PROTOC_GEN_GOCOSMOS_VERSION) ..." + rm -f $(PROTOC_GEN_GO) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GEN_GO_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(PROTOC_GEN_GO): $(PROTOC_GEN_GO_VERSION_FILE) + +$(PROTOC_GEN_GRPC_GATEWAY_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "Installing protoc-gen-grpc-gateway $(PROTOC_GEN_GRPC_GATEWAY_VERSION) ..." + rm -f $(PROTOC_GEN_GRPC_GATEWAY) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@$(PROTOC_GEN_GRPC_GATEWAY_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(PROTOC_GEN_GRPC_GATEWAY): $(PROTOC_GEN_GRPC_GATEWAY_VERSION_FILE) + +$(PROTOC_GEN_SWAGGER_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "Installing protoc-gen-grpc-gateway $(PROTOC_GEN_SWAGGER_VERSION) ..." + rm -f $(PROTOC_GEN_GRPC_GATEWAY) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@$(PROTOC_GEN_SWAGGER_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(PROTOC_GEN_SWAGGER): $(PROTOC_GEN_SWAGGER_VERSION_FILE) + +$(MODVENDOR_VERSION_FILE): $(AKASH_DEVCACHE) + @echo "installing modvendor $(MODVENDOR_VERSION) ..." + rm -f $(MODVENDOR) + GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/goware/modvendor@$(MODVENDOR_VERSION) + rm -rf "$(dir $@)" + mkdir -p "$(dir $@)" + touch $@ +$(MODVENDOR): $(MODVENDOR_VERSION_FILE) + +$(NPM): +ifeq (, $(shell which $(NPM) 2>/dev/null)) + $(error "npm installation required") +endif + +$(SWAGGER_COMBINE): $(AKASH_DEVCACHE) $(NPM) +ifeq (, $(shell which swagger-combine 2>/dev/null)) + @echo "Installing swagger-combine..." + npm install swagger-combine --prefix $(AKASH_DEVCACHE_NODE_MODULES) + chmod +x $(SWAGGER_COMBINE) +else + @echo "swagger-combine already installed; skipping..." +endif diff --git a/make/test.mk b/make/test.mk new file mode 100644 index 00000000..c9c0b0cc --- /dev/null +++ b/make/test.mk @@ -0,0 +1,36 @@ +COVER_PACKAGES = $(shell go list ./... | grep -v mock | paste -sd, -) + +############################################################################### +### Misc tests ### +############################################################################### + +.PHONY: shellcheck +shellcheck: + docker run --rm \ + --volume ${PWD}:/shellcheck \ + --entrypoint sh \ + koalaman/shellcheck-alpine:stable \ + -x /shellcheck/script/shellcheck.sh + +.PHONY: test +test: + $(GO) test -timeout 300s ./... + +.PHONY: test-nocache +test-nocache: + $(GO) test -count=1 ./... + +.PHONY: test-full +test-full: + $(GO) test -race ./... + +.PHONY: test-coverage +test-coverage: + $(GO) test -coverprofile=coverage.txt \ + -covermode=count \ + -coverpkg="$(COVER_PACKAGES)" \ + ./... + +.PHONY: test-vet +test-vet: + $(GO) vet ./... diff --git a/proto/node/akash/audit/v1beta1/audit.proto b/proto/node/akash/audit/v1beta1/audit.proto new file mode 100644 index 00000000..0443e341 --- /dev/null +++ b/proto/node/akash/audit/v1beta1/audit.proto @@ -0,0 +1,126 @@ +syntax = "proto3"; +package akash.audit.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta1"; + +// Msg defines the provider Msg service +service Msg { + // SignProviderAttributes defines a method that signs provider attributes + rpc SignProviderAttributes(MsgSignProviderAttributes) returns (MsgSignProviderAttributesResponse); + + // DeleteProviderAttributes defines a method that deletes provider attributes + rpc DeleteProviderAttributes(MsgDeleteProviderAttributes) returns (MsgDeleteProviderAttributesResponse); +} + +// Provider stores owner auditor and attributes details +message Provider { + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + + repeated akash.base.v1beta1.Attribute attributes = 4 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// Attributes +message AuditedAttributes { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.v1beta1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// AttributesResponse represents details of deployment along with group details +message AttributesResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated AuditedAttributes attributes = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// AttributesFilters defines filters used to filter deployments +message AttributesFilters { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated string auditors = 1 [ + (gogoproto.jsontag) = "auditors", + (gogoproto.moretags) = "yaml:\"auditors\"" + ]; + repeated string owners = 2 [ + (gogoproto.jsontag) = "owners", + (gogoproto.moretags) = "yaml:\"owners\"" + ]; +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +message MsgSignProviderAttributes { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.v1beta1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +message MsgSignProviderAttributesResponse {} + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +message MsgDeleteProviderAttributes { + option (gogoproto.equal) = false; + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated string keys = 3 [ + (gogoproto.jsontag) = "keys", + (gogoproto.moretags) = "yaml:\"keys\"" + ]; +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +message MsgDeleteProviderAttributesResponse {} diff --git a/proto/node/akash/audit/v1beta2/audit.proto b/proto/node/akash/audit/v1beta2/audit.proto new file mode 100644 index 00000000..ca3fc86e --- /dev/null +++ b/proto/node/akash/audit/v1beta2/audit.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta2"; + +// Msg defines the provider Msg service +service Msg { + // SignProviderAttributes defines a method that signs provider attributes + rpc SignProviderAttributes(MsgSignProviderAttributes) returns (MsgSignProviderAttributesResponse); + + // DeleteProviderAttributes defines a method that deletes provider attributes + rpc DeleteProviderAttributes(MsgDeleteProviderAttributes) returns (MsgDeleteProviderAttributesResponse); +} + +// Provider stores owner auditor and attributes details +message Provider { + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + + string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; + + repeated akash.base.v1beta2.Attribute attributes = 4 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// Attributes +message AuditedAttributes { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + + string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; + + repeated akash.base.v1beta2.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// AttributesResponse represents details of deployment along with group details +message AttributesResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated AuditedAttributes attributes = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; +} + +// AttributesFilters defines filters used to filter deployments +message AttributesFilters { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated string auditors = 1 [(gogoproto.jsontag) = "auditors", (gogoproto.moretags) = "yaml:\"auditors\""]; + + repeated string owners = 2 [(gogoproto.jsontag) = "owners", (gogoproto.moretags) = "yaml:\"owners\""]; +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +message MsgSignProviderAttributes { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + + string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; + + repeated akash.base.v1beta2.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +message MsgSignProviderAttributesResponse {} + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +message MsgDeleteProviderAttributes { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + + string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; + + repeated string keys = 3 [(gogoproto.jsontag) = "keys", (gogoproto.moretags) = "yaml:\"keys\""]; +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +message MsgDeleteProviderAttributesResponse {} diff --git a/proto/node/akash/audit/v1beta2/genesis.proto b/proto/node/akash/audit/v1beta2/genesis.proto new file mode 100644 index 00000000..04cb43c9 --- /dev/null +++ b/proto/node/akash/audit/v1beta2/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/audit/v1beta2/audit.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta2"; + +// GenesisState defines the basic genesis state used by audit module +message GenesisState { + repeated AuditedAttributes attributes = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; +} diff --git a/proto/node/akash/audit/v1beta2/query.proto b/proto/node/akash/audit/v1beta2/query.proto new file mode 100644 index 00000000..bd29153b --- /dev/null +++ b/proto/node/akash/audit/v1beta2/query.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; + +// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/audit/v1beta2/audit.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc AllProvidersAttributes(QueryAllProvidersAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/list"; + } + + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc ProviderAttributes(QueryProviderAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/{owner}/list"; + } + + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc ProviderAuditorAttributes(QueryProviderAuditorRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/{auditor}/{owner}"; + } + + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc AuditorAttributes(QueryAuditorAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/provider/v1beta2/auditor/{auditor}/list"; + } +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryProvidersResponse { + repeated Provider providers = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Providers"]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +message QueryProviderRequest { + string auditor = 1; + string owner = 2; +} + +// QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method +message QueryAllProvidersAttributesRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryProviderAttributesRequest is request type for the Query/Provider RPC method +message QueryProviderAttributesRequest { + string owner = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryProviderAuditorRequest is request type for the Query/Providers RPC method +message QueryProviderAuditorRequest { + string auditor = 1; + string owner = 2; +} + +// QueryAuditorAttributesRequest is request type for the Query/Providers RPC method +message QueryAuditorAttributesRequest { + string auditor = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} diff --git a/proto/node/akash/audit/v1beta3/audit.proto b/proto/node/akash/audit/v1beta3/audit.proto new file mode 100644 index 00000000..ebe5c4ce --- /dev/null +++ b/proto/node/akash/audit/v1beta3/audit.proto @@ -0,0 +1,124 @@ +syntax = "proto3"; +package akash.audit.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta3"; + +// Msg defines the provider Msg service +service Msg { + // SignProviderAttributes defines a method that signs provider attributes + rpc SignProviderAttributes(MsgSignProviderAttributes) returns (MsgSignProviderAttributesResponse); + + // DeleteProviderAttributes defines a method that deletes provider attributes + rpc DeleteProviderAttributes(MsgDeleteProviderAttributes) returns (MsgDeleteProviderAttributesResponse); +} + +// Provider stores owner auditor and attributes details +message Provider { + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 4 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// Attributes +message AuditedAttributes { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// AttributesResponse represents details of deployment along with group details +message AttributesResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated AuditedAttributes attributes = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// AttributesFilters defines filters used to filter deployments +message AttributesFilters { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = true; + + repeated string auditors = 1 [ + (gogoproto.jsontag) = "auditors", + (gogoproto.moretags) = "yaml:\"auditors\"" + ]; + repeated string owners = 2 [ + (gogoproto.jsontag) = "owners", + (gogoproto.moretags) = "yaml:\"owners\"" + ]; +} + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +message MsgSignProviderAttributes { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. +message MsgSignProviderAttributesResponse {} + +// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes +message MsgDeleteProviderAttributes { + option (gogoproto.equal) = false; + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated string keys = 3 [ + (gogoproto.jsontag) = "keys", + (gogoproto.moretags) = "yaml:\"keys\"" + ]; +} + +// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. +message MsgDeleteProviderAttributesResponse {} diff --git a/proto/node/akash/audit/v1beta3/genesis.proto b/proto/node/akash/audit/v1beta3/genesis.proto new file mode 100644 index 00000000..c176f1a7 --- /dev/null +++ b/proto/node/akash/audit/v1beta3/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.audit.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/audit/v1beta3/audit.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta3"; + +// GenesisState defines the basic genesis state used by audit module +message GenesisState { + repeated AuditedAttributes attributes = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} diff --git a/proto/node/akash/audit/v1beta3/query.proto b/proto/node/akash/audit/v1beta3/query.proto new file mode 100644 index 00000000..9991acb4 --- /dev/null +++ b/proto/node/akash/audit/v1beta3/query.proto @@ -0,0 +1,82 @@ +syntax = "proto3"; + +// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + +package akash.audit.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/audit/v1beta3/audit.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // AllProvidersAttributes queries all providers + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc AllProvidersAttributes(QueryAllProvidersAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta3/audit/attributes/list"; + } + + // ProviderAttributes queries all provider signed attributes + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc ProviderAttributes(QueryProviderAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta3/audit/attributes/{owner}/list"; + } + + // ProviderAuditorAttributes queries provider signed attributes by specific auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc ProviderAuditorAttributes(QueryProviderAuditorRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/audit/v1beta3/audit/attributes/{auditor}/{owner}"; + } + + // AuditorAttributes queries all providers signed by this auditor + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + rpc AuditorAttributes(QueryAuditorAttributesRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/provider/v1beta3/auditor/{auditor}/list"; + } +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryProvidersResponse { + repeated Provider providers = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Providers" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +message QueryProviderRequest { + string auditor = 1; + string owner = 2; +} + +// QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method +message QueryAllProvidersAttributesRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryProviderAttributesRequest is request type for the Query/Provider RPC method +message QueryProviderAttributesRequest { + string owner = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryProviderAuditorRequest is request type for the Query/Providers RPC method +message QueryProviderAuditorRequest { + string auditor = 1; + string owner = 2; +} + +// QueryAuditorAttributesRequest is request type for the Query/Providers RPC method +message QueryAuditorAttributesRequest { + string auditor = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} diff --git a/proto/node/akash/base/v1beta1/attribute.proto b/proto/node/akash/base/v1beta1/attribute.proto new file mode 100644 index 00000000..f2a40fe5 --- /dev/null +++ b/proto/node/akash/base/v1beta1/attribute.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1"; + +// Attribute represents key value pair +message Attribute { + option (gogoproto.goproto_getters) = false; + string key = 1 [(gogoproto.moretags) = "yaml:\"key\""]; + string value = 2 [(gogoproto.moretags) = "yaml:\"value\""]; +} + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +message SignedBy { + option (gogoproto.goproto_getters) = false; + // all_of all keys in this list must have signed attributes + repeated string all_of = 1 [(gogoproto.jsontag) = "all_of", (gogoproto.moretags) = "yaml:\"allOf\""]; + // any_of at least of of the keys from the list must have signed attributes + repeated string any_of = 2 [(gogoproto.jsontag) = "any_of", (gogoproto.moretags) = "yaml:\"anyOf\""]; +} + +// PlacementRequirements +message PlacementRequirements { + option (gogoproto.goproto_getters) = false; + + // SignedBy list of keys that tenants expect to have signatures from + SignedBy signed_by = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "signed_by", (gogoproto.moretags) = "yaml:\"signed_by\""]; + + // Attribute list of attributes tenant expects from the provider + repeated Attribute attributes = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; +} diff --git a/proto/node/akash/base/v1beta1/endpoint.proto b/proto/node/akash/base/v1beta1/endpoint.proto new file mode 100644 index 00000000..f06c8161 --- /dev/null +++ b/proto/node/akash/base/v1beta1/endpoint.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1"; + +// Endpoint describes a publicly accessible IP service +message Endpoint { + option (gogoproto.equal) = true; + // This describes how the endpoint is implemented when the lease is deployed + enum Kind { + // Describes an endpoint that becomes a Kubernetes Ingress + SHARED_HTTP = 0; + // Describes an endpoint that becomes a Kubernetes NodePort + RANDOM_PORT = 1; + } + Kind kind = 1; +} diff --git a/proto/node/akash/base/v1beta1/resource.proto b/proto/node/akash/base/v1beta1/resource.proto new file mode 100644 index 00000000..9a969391 --- /dev/null +++ b/proto/node/akash/base/v1beta1/resource.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; +import "akash/base/v1beta1/resourcevalue.proto"; +import "akash/base/v1beta1/endpoint.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1"; + +// CPU stores resource units and cpu config attributes +message CPU { + option (gogoproto.equal) = true; + ResourceValue units = 1 [(gogoproto.nullable) = false]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; +} + +// Memory stores resource quantity and memory attributes +message Memory { + option (gogoproto.equal) = true; + ResourceValue quantity = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "size", (gogoproto.moretags) = "yaml:\"size\""]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; +} + +// Storage stores resource quantity and storage attributes +message Storage { + option (gogoproto.equal) = true; + ResourceValue quantity = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "size", (gogoproto.moretags) = "yaml:\"size\""]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; +} + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +message ResourceUnits { + option (gogoproto.equal) = true; + CPU cpu = 1 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "CPU", + (gogoproto.jsontag) = "cpu,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; + Memory memory = 2 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "memory,omitempty", + (gogoproto.moretags) = "yaml:\"memory,omitempty\"" + ]; + Storage storage = 3 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "storage,omitempty", + (gogoproto.moretags) = "yaml:\"storage,omitempty\"" + ]; + repeated akash.base.v1beta1.Endpoint endpoints = 4 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "endpoints", (gogoproto.moretags) = "yaml:\"endpoints\""]; +} diff --git a/proto/node/akash/base/v1beta1/resourcevalue.proto b/proto/node/akash/base/v1beta1/resourcevalue.proto new file mode 100644 index 00000000..7333afd2 --- /dev/null +++ b/proto/node/akash/base/v1beta1/resourcevalue.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta1"; + +// Unit stores cpu, memory and storage metrics +message ResourceValue { + option (gogoproto.equal) = true; + bytes val = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; +} diff --git a/proto/node/akash/base/v1beta2/attribute.proto b/proto/node/akash/base/v1beta2/attribute.proto new file mode 100644 index 00000000..b8bc9ad4 --- /dev/null +++ b/proto/node/akash/base/v1beta2/attribute.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2"; + +// Attribute represents key value pair +message Attribute { + option (gogoproto.goproto_getters) = false; + string key = 1 [(gogoproto.moretags) = "yaml:\"key\""]; + string value = 2 [(gogoproto.moretags) = "yaml:\"value\""]; +} + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +message SignedBy { + option (gogoproto.goproto_getters) = false; + // all_of all keys in this list must have signed attributes + repeated string all_of = 1 [(gogoproto.jsontag) = "all_of", (gogoproto.moretags) = "yaml:\"allOf\""]; + // any_of at least of of the keys from the list must have signed attributes + repeated string any_of = 2 [(gogoproto.jsontag) = "any_of", (gogoproto.moretags) = "yaml:\"anyOf\""]; +} + +// PlacementRequirements +message PlacementRequirements { + option (gogoproto.goproto_getters) = false; + + // SignedBy list of keys that tenants expect to have signatures from + SignedBy signed_by = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "signed_by", (gogoproto.moretags) = "yaml:\"signed_by\""]; + + // Attribute list of attributes tenant expects from the provider + repeated Attribute attributes = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; +} diff --git a/proto/node/akash/base/v1beta2/endpoint.proto b/proto/node/akash/base/v1beta2/endpoint.proto new file mode 100644 index 00000000..7f17000d --- /dev/null +++ b/proto/node/akash/base/v1beta2/endpoint.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2"; + +// Endpoint describes a publicly accessible IP service +message Endpoint { + option (gogoproto.equal) = true; + // This describes how the endpoint is implemented when the lease is deployed + enum Kind { + // Describes an endpoint that becomes a Kubernetes Ingress + SHARED_HTTP = 0; + // Describes an endpoint that becomes a Kubernetes NodePort + RANDOM_PORT = 1; + // Describes an endpoint that becomes a leased IP + LEASED_IP = 2; + } + Kind kind = 1; + uint32 sequence_number = 2 + [(gogoproto.customname) = "SequenceNumber", (gogoproto.jsontag) = "sequence_number", (gogoproto.moretags) = "yaml:\"sequence_number\""]; +} diff --git a/proto/node/akash/base/v1beta2/resource.proto b/proto/node/akash/base/v1beta2/resource.proto new file mode 100644 index 00000000..deb472f0 --- /dev/null +++ b/proto/node/akash/base/v1beta2/resource.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; +import "akash/base/v1beta2/resourcevalue.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2"; + +// CPU stores resource units and cpu config attributes +message CPU { + option (gogoproto.equal) = true; + ResourceValue units = 1 [(gogoproto.nullable) = false]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} + +// Memory stores resource quantity and memory attributes +message Memory { + option (gogoproto.equal) = true; + ResourceValue quantity = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "size", + (gogoproto.moretags) = "yaml:\"size\"" + ]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} + +// Storage stores resource quantity and storage attributes +message Storage { + option (gogoproto.equal) = true; + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + ResourceValue quantity = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "size", + (gogoproto.moretags) = "yaml:\"size\"" + ]; + repeated Attribute attributes = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} diff --git a/proto/node/akash/base/v1beta2/resourceunits.proto b/proto/node/akash/base/v1beta2/resourceunits.proto new file mode 100644 index 00000000..55c06141 --- /dev/null +++ b/proto/node/akash/base/v1beta2/resourceunits.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/resource.proto"; +import "akash/base/v1beta2/endpoint.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2"; + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +message ResourceUnits { + option (gogoproto.equal) = true; + CPU cpu = 1 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "CPU", + (gogoproto.jsontag) = "cpu,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; + Memory memory = 2 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "memory,omitempty", + (gogoproto.moretags) = "yaml:\"memory,omitempty\"" + ]; + repeated Storage storage = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Volumes", + (gogoproto.jsontag) = "storage,omitempty", + (gogoproto.moretags) = "yaml:\"storage,omitempty\"" + ]; + repeated akash.base.v1beta2.Endpoint endpoints = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Endpoints", + (gogoproto.jsontag) = "endpoints", + (gogoproto.moretags) = "yaml:\"endpoints\"" + ]; +} diff --git a/proto/node/akash/base/v1beta2/resourcevalue.proto b/proto/node/akash/base/v1beta2/resourcevalue.proto new file mode 100644 index 00000000..e8315484 --- /dev/null +++ b/proto/node/akash/base/v1beta2/resourcevalue.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta2"; + +// Unit stores cpu, memory and storage metrics +message ResourceValue { + option (gogoproto.equal) = true; + bytes val = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} diff --git a/proto/node/akash/base/v1beta3/attribute.proto b/proto/node/akash/base/v1beta3/attribute.proto new file mode 100644 index 00000000..9363bb5f --- /dev/null +++ b/proto/node/akash/base/v1beta3/attribute.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// Attribute represents key value pair +message Attribute { + option (gogoproto.goproto_getters) = false; + string key = 1 [(gogoproto.moretags) = "yaml:\"key\""]; + string value = 2 [(gogoproto.moretags) = "yaml:\"value\""]; +} + +// SignedBy represents validation accounts that tenant expects signatures for provider attributes +// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many +// entries there +// this behaviour to be discussed +message SignedBy { + option (gogoproto.goproto_getters) = false; + // all_of all keys in this list must have signed attributes + repeated string all_of = 1 [ + (gogoproto.jsontag) = "all_of", + (gogoproto.moretags) = "yaml:\"allOf\"" + ]; + // any_of at least of of the keys from the list must have signed attributes + repeated string any_of = 2 [ + (gogoproto.jsontag) = "any_of", + (gogoproto.moretags) = "yaml:\"anyOf\"" + ]; +} + +// PlacementRequirements +message PlacementRequirements { + option (gogoproto.goproto_getters) = false; + + // SignedBy list of keys that tenants expect to have signatures from + SignedBy signed_by = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "signed_by", + (gogoproto.moretags) = "yaml:\"signed_by\"" + ]; + + // Attribute list of attributes tenant expects from the provider + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/cpu.proto b/proto/node/akash/base/v1beta3/cpu.proto new file mode 100644 index 00000000..40ab2b33 --- /dev/null +++ b/proto/node/akash/base/v1beta3/cpu.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; +import "akash/base/v1beta3/resourcevalue.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// CPU stores resource units and cpu config attributes +message CPU { + option (gogoproto.equal) = true; + ResourceValue units = 1 [(gogoproto.nullable) = false]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/endpoint.proto b/proto/node/akash/base/v1beta3/endpoint.proto new file mode 100644 index 00000000..7273f215 --- /dev/null +++ b/proto/node/akash/base/v1beta3/endpoint.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// Endpoint describes a publicly accessible IP service +message Endpoint { + option (gogoproto.equal) = true; + // This describes how the endpoint is implemented when the lease is deployed + enum Kind { + // Describes an endpoint that becomes a Kubernetes Ingress + SHARED_HTTP = 0; + // Describes an endpoint that becomes a Kubernetes NodePort + RANDOM_PORT = 1; + // Describes an endpoint that becomes a leased IP + LEASED_IP = 2; + } + Kind kind = 1; + uint32 sequence_number = 2 [ + (gogoproto.customname) = "SequenceNumber", + (gogoproto.jsontag) = "sequence_number", + (gogoproto.moretags) = "yaml:\"sequence_number\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/gpu.proto b/proto/node/akash/base/v1beta3/gpu.proto new file mode 100644 index 00000000..8141d0bd --- /dev/null +++ b/proto/node/akash/base/v1beta3/gpu.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; +import "akash/base/v1beta3/resourcevalue.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// GPU stores resource units and cpu config attributes +message GPU { + option (gogoproto.equal) = true; + ResourceValue units = 1 [ + (gogoproto.nullable) = false + ]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/memory.proto b/proto/node/akash/base/v1beta3/memory.proto new file mode 100644 index 00000000..bc778a48 --- /dev/null +++ b/proto/node/akash/base/v1beta3/memory.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; +import "akash/base/v1beta3/resourcevalue.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// Memory stores resource quantity and memory attributes +message Memory { + option (gogoproto.equal) = true; + ResourceValue quantity = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "size", + (gogoproto.moretags) = "yaml:\"size\"" + ]; + repeated Attribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/resourceunits.proto b/proto/node/akash/base/v1beta3/resourceunits.proto new file mode 100644 index 00000000..8e94bdb9 --- /dev/null +++ b/proto/node/akash/base/v1beta3/resourceunits.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/cpu.proto"; +import "akash/base/v1beta3/gpu.proto"; +import "akash/base/v1beta3/memory.proto"; +import "akash/base/v1beta3/storage.proto"; +import "akash/base/v1beta3/endpoint.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// ResourceUnits describes all available resources types for deployment/node etc +// if field is nil resource is not present in the given data-structure +message ResourceUnits { + option (gogoproto.equal) = true; + CPU cpu = 1 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "CPU", + (gogoproto.jsontag) = "cpu,omitempty", + (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" + ]; + Memory memory = 2 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "memory,omitempty", + (gogoproto.moretags) = "yaml:\"memory,omitempty\"" + ]; + repeated Storage storage = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Volumes", + (gogoproto.jsontag) = "storage,omitempty", + (gogoproto.moretags) = "yaml:\"storage,omitempty\"" + ]; + GPU gpu = 4 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "GPU", + (gogoproto.jsontag) = "gpu,omitempty", + (gogoproto.moretags) = "yaml:\"gpu,omitempty\"" + ]; + repeated akash.base.v1beta3.Endpoint endpoints = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Endpoints", + (gogoproto.jsontag) = "endpoints", + (gogoproto.moretags) = "yaml:\"endpoints\"" + ]; +} diff --git a/proto/node/akash/base/v1beta3/resourcevalue.proto b/proto/node/akash/base/v1beta3/resourcevalue.proto new file mode 100644 index 00000000..9b4a1e91 --- /dev/null +++ b/proto/node/akash/base/v1beta3/resourcevalue.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// Unit stores cpu, memory and storage metrics +message ResourceValue { + option (gogoproto.equal) = true; + bytes val = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} diff --git a/proto/node/akash/base/v1beta3/storage.proto b/proto/node/akash/base/v1beta3/storage.proto new file mode 100644 index 00000000..a1d09e3c --- /dev/null +++ b/proto/node/akash/base/v1beta3/storage.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package akash.base.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; +import "akash/base/v1beta3/resourcevalue.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; + +// Storage stores resource quantity and storage attributes +message Storage { + option (gogoproto.equal) = true; + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + ResourceValue quantity = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "size", + (gogoproto.moretags) = "yaml:\"size\"" + ]; + repeated Attribute attributes = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Attributes", + (gogoproto.jsontag) = "attributes,omitempty", + (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" + ]; +} diff --git a/proto/node/akash/cert/v1beta2/cert.proto b/proto/node/akash/cert/v1beta2/cert.proto new file mode 100644 index 00000000..ddee422a --- /dev/null +++ b/proto/node/akash/cert/v1beta2/cert.proto @@ -0,0 +1,118 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta2"; + +// Msg defines the provider Msg service +service Msg { + // CreateCertificate defines a method to create new certificate given proper inputs. + rpc CreateCertificate(MsgCreateCertificate) returns(MsgCreateCertificateResponse); + // RevokeCertificate defines a method to revoke the certificate + rpc RevokeCertificate(MsgRevokeCertificate) returns(MsgRevokeCertificateResponse); +} + +// CertificateID stores owner and sequence number +message CertificateID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; +} + +// Certificate stores state, certificate and it's public key +message Certificate { + // State is an enum which refers to state of deployment + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "CertificateStateInvalid"]; + // CertificateValid denotes state for deployment active + valid = 1 [(gogoproto.enumvalue_customname) = "CertificateValid"]; + // CertificateRevoked denotes state for deployment closed + revoked = 2 [(gogoproto.enumvalue_customname) = "CertificateRevoked"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + bytes cert = 3 [ + (gogoproto.jsontag) = "cert", + (gogoproto.moretags) = "yaml:\"cert\"" + ]; + + bytes pubkey = 4 [ + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; +} + +// CertificateFilter defines filters used to filter certificates +message CertificateFilter { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; + + string state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} + +// MsgCreateCertificate defines an SDK message for creating certificate +message MsgCreateCertificate { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + bytes cert = 2 [ + (gogoproto.jsontag) = "cert", + (gogoproto.moretags) = "yaml:\"cert\"" + ]; + + bytes pubkey = 3 [ + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; +} + +// MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. +message MsgCreateCertificateResponse {} + +// MsgRevokeCertificate defines an SDK message for revoking certificate +message MsgRevokeCertificate { + option (gogoproto.equal) = false; + + CertificateID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. +message MsgRevokeCertificateResponse {} diff --git a/proto/node/akash/cert/v1beta2/genesis.proto b/proto/node/akash/cert/v1beta2/genesis.proto new file mode 100644 index 00000000..c0ff6f06 --- /dev/null +++ b/proto/node/akash/cert/v1beta2/genesis.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "akash/cert/v1beta2/cert.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta2"; + +// GenesisCertificate defines certificate entry at genesis +message GenesisCertificate { + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + Certificate certificate = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificate", + (gogoproto.moretags) = "yaml:\"certificate\"" + ]; +} + +// GenesisState defines the basic genesis state used by cert module +message GenesisState { + repeated GenesisCertificate certificates = 1 [ + (gogoproto.castrepeated) = "GenesisCertificates", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificates", + (gogoproto.moretags) = "yaml:\"certificates\"" + ]; +} diff --git a/proto/node/akash/cert/v1beta2/query.proto b/proto/node/akash/cert/v1beta2/query.proto new file mode 100644 index 00000000..4dd3391a --- /dev/null +++ b/proto/node/akash/cert/v1beta2/query.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/cert/v1beta2/cert.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // Certificates queries certificates + rpc Certificates(QueryCertificatesRequest) returns (QueryCertificatesResponse) { + option (google.api.http).get = "/akash/cert/v1beta3/certificates/list"; + } +} + +// CertificateResponse contains a single X509 certificate and its serial number +message CertificateResponse { + Certificate certificate = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificate", + (gogoproto.moretags) = "yaml:\"certificate\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +message QueryCertificatesRequest { + CertificateFilter filter = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryCertificatesResponse is response type for the Query/Certificates RPC method +message QueryCertificatesResponse { + repeated CertificateResponse certificates = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "CertificatesResponse" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/node/akash/cert/v1beta3/cert.proto b/proto/node/akash/cert/v1beta3/cert.proto new file mode 100644 index 00000000..07282aa1 --- /dev/null +++ b/proto/node/akash/cert/v1beta3/cert.proto @@ -0,0 +1,118 @@ +syntax = "proto3"; +package akash.cert.v1beta3; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3"; + +// Msg defines the provider Msg service +service Msg { + // CreateCertificate defines a method to create new certificate given proper inputs. + rpc CreateCertificate(MsgCreateCertificate) returns(MsgCreateCertificateResponse); + // RevokeCertificate defines a method to revoke the certificate + rpc RevokeCertificate(MsgRevokeCertificate) returns(MsgRevokeCertificateResponse); +} + +// CertificateID stores owner and sequence number +message CertificateID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; +} + +// Certificate stores state, certificate and it's public key +message Certificate { + // State is an enum which refers to state of deployment + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "CertificateStateInvalid"]; + // CertificateValid denotes state for deployment active + valid = 1 [(gogoproto.enumvalue_customname) = "CertificateValid"]; + // CertificateRevoked denotes state for deployment closed + revoked = 2 [(gogoproto.enumvalue_customname) = "CertificateRevoked"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + bytes cert = 3 [ + (gogoproto.jsontag) = "cert", + (gogoproto.moretags) = "yaml:\"cert\"" + ]; + + bytes pubkey = 4 [ + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; +} + +// CertificateFilter defines filters used to filter certificates +message CertificateFilter { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; + + string state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} + +// MsgCreateCertificate defines an SDK message for creating certificate +message MsgCreateCertificate { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + bytes cert = 2 [ + (gogoproto.jsontag) = "cert", + (gogoproto.moretags) = "yaml:\"cert\"" + ]; + + bytes pubkey = 3 [ + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; +} + +// MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. +message MsgCreateCertificateResponse {} + +// MsgRevokeCertificate defines an SDK message for revoking certificate +message MsgRevokeCertificate { + option (gogoproto.equal) = false; + + CertificateID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. +message MsgRevokeCertificateResponse {} diff --git a/proto/node/akash/cert/v1beta3/genesis.proto b/proto/node/akash/cert/v1beta3/genesis.proto new file mode 100644 index 00000000..1a6ae53d --- /dev/null +++ b/proto/node/akash/cert/v1beta3/genesis.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.cert.v1beta3; + +import "akash/cert/v1beta3/cert.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3"; + +// GenesisCertificate defines certificate entry at genesis +message GenesisCertificate { + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + Certificate certificate = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificate", + (gogoproto.moretags) = "yaml:\"certificate\"" + ]; +} + +// GenesisState defines the basic genesis state used by cert module +message GenesisState { + repeated GenesisCertificate certificates = 1 [ + (gogoproto.castrepeated) = "GenesisCertificates", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificates", + (gogoproto.moretags) = "yaml:\"certificates\"" + ]; +} diff --git a/proto/node/akash/cert/v1beta3/query.proto b/proto/node/akash/cert/v1beta3/query.proto new file mode 100644 index 00000000..d72129d9 --- /dev/null +++ b/proto/node/akash/cert/v1beta3/query.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package akash.cert.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/cert/v1beta3/cert.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // Certificates queries certificates + rpc Certificates(QueryCertificatesRequest) returns (QueryCertificatesResponse) { + option (google.api.http).get = "/akash/cert/v1beta3/certificates/list"; + } +} + +// CertificateResponse contains a single X509 certificate and its serial number +message CertificateResponse { + Certificate certificate = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "certificate", + (gogoproto.moretags) = "yaml:\"certificate\"" + ]; + + string serial = 2 [ + (gogoproto.jsontag) = "serial", + (gogoproto.moretags) = "yaml:\"serial\"" + ]; +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +message QueryCertificatesRequest { + CertificateFilter filter = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryCertificatesResponse is response type for the Query/Certificates RPC method +message QueryCertificatesResponse { + repeated CertificateResponse certificates = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "CertificatesResponse" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/node/akash/deployment/v1beta1/authz.proto b/proto/node/akash/deployment/v1beta1/authz.proto new file mode 100644 index 00000000..ed294bf8 --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/authz.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +message DepositDeploymentAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + cosmos.base.v1beta1.Coin spend_limit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spend_limit" + ]; +} diff --git a/proto/node/akash/deployment/v1beta1/deployment.proto b/proto/node/akash/deployment/v1beta1/deployment.proto new file mode 100644 index 00000000..0d4e811b --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/deployment.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// Msg defines the deployment Msg service. +service Msg { + // CreateDeployment defines a method to create new deployment given proper inputs. + rpc CreateDeployment(MsgCreateDeployment) returns (MsgCreateDeploymentResponse); + + // DepositDeployment deposits more funds into the deployment account + rpc DepositDeployment(MsgDepositDeployment) returns (MsgDepositDeploymentResponse); + + // UpdateDeployment defines a method to update a deployment given proper inputs. + rpc UpdateDeployment(MsgUpdateDeployment) returns (MsgUpdateDeploymentResponse); + + // CloseDeployment defines a method to close a deployment given proper inputs. + rpc CloseDeployment(MsgCloseDeployment) returns (MsgCloseDeploymentResponse); + + // CloseGroup defines a method to close a group of a deployment given proper inputs. + rpc CloseGroup(MsgCloseGroup) returns (MsgCloseGroupResponse); + + // PauseGroup defines a method to close a group of a deployment given proper inputs. + rpc PauseGroup(MsgPauseGroup) returns (MsgPauseGroupResponse); + + // StartGroup defines a method to close a group of a deployment given proper inputs. + rpc StartGroup(MsgStartGroup) returns (MsgStartGroupResponse); +} + +// MsgCreateDeployment defines an SDK message for creating deployment +message MsgCreateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + repeated GroupSpec groups = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""]; + bytes version = 3 [(gogoproto.jsontag) = "version", (gogoproto.moretags) = "yaml:\"version\""]; + + cosmos.base.v1beta1.Coin deposit = 4 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deposit", (gogoproto.moretags) = "yaml:\"deposit\""]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgCreateDeploymentResponse {} + +// MsgDepositDeployment deposits more funds into the deposit account +message MsgDepositDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + cosmos.base.v1beta1.Coin amount = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "amount", (gogoproto.moretags) = "yaml:\"amount\""]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgDepositDeploymentResponse {} + +// MsgUpdateDeployment defines an SDK message for updating deployment +message MsgUpdateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + repeated GroupSpec groups = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""]; + bytes version = 3 [(gogoproto.jsontag) = "version", (gogoproto.moretags) = "yaml:\"version\""]; +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +message MsgUpdateDeploymentResponse {} + +// MsgCloseDeployment defines an SDK message for closing deployment +message MsgCloseDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +message MsgCloseDeploymentResponse {} + +// DeploymentID stores owner and sequence number +message DeploymentID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; +} + +// Deployment stores deploymentID, state and version details +message Deployment { + option (gogoproto.equal) = false; + + DeploymentID deployment_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "DeploymentID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of deployment + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "DeploymentStateInvalid"]; + // DeploymentActive denotes state for deployment active + active = 1 [(gogoproto.enumvalue_customname) = "DeploymentActive"]; + // DeploymentClosed denotes state for deployment closed + closed = 2 [(gogoproto.enumvalue_customname) = "DeploymentClosed"]; + } + + State state = 2 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; + bytes version = 3 [(gogoproto.jsontag) = "version", (gogoproto.moretags) = "yaml:\"version\""]; + int64 created_at = 4; +} + +// DeploymentFilters defines filters used to filter deployments +message DeploymentFilters { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + string state = 3 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; +} diff --git a/proto/node/akash/deployment/v1beta1/genesis.proto b/proto/node/akash/deployment/v1beta1/genesis.proto new file mode 100644 index 00000000..81f74b56 --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/genesis.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta1/deployment.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "akash/deployment/v1beta1/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// GenesisDeployment defines the basic genesis state used by deployment module +message GenesisDeployment { + Deployment deployment = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deployment", (gogoproto.moretags) = "yaml:\"deployment\""]; + + repeated Group groups = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""]; +} + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + repeated GenesisDeployment deployments = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployments", + (gogoproto.moretags) = "yaml:\"deployments\"" + ]; + + Params params = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta1/group.proto b/proto/node/akash/deployment/v1beta1/group.proto new file mode 100644 index 00000000..7c27172e --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/group.proto @@ -0,0 +1,128 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/resource.proto"; +import "akash/base/v1beta1/attribute.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +message MsgCloseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +message MsgCloseGroupResponse {} + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +message MsgPauseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +message MsgPauseGroupResponse {} + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +message MsgStartGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +message MsgStartGroupResponse {} + +// GroupID stores owner, deployment sequence number and group sequence number +message GroupID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; +} + +// GroupSpec stores group specifications +message GroupSpec { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string name = 1 [(gogoproto.jsontag) = "name", (gogoproto.moretags) = "yaml:\"name\""]; + + akash.base.v1beta1.PlacementRequirements requirements = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "requirements", + (gogoproto.moretags) = "yaml:\"requirements\"" + ]; + + repeated Resource resources = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "resources", (gogoproto.moretags) = "yaml:\"resources\""]; +} + +// Group stores group id, state and specifications of group +message Group { + option (gogoproto.equal) = false; + + GroupID group_id = 1 [ + (gogoproto.customname) = "GroupID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of group + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "GroupStateInvalid"]; + // GroupOpen denotes state for group open + open = 1 [(gogoproto.enumvalue_customname) = "GroupOpen"]; + // GroupOrdered denotes state for group ordered + paused = 2 [(gogoproto.enumvalue_customname) = "GroupPaused"]; + // GroupInsufficientFunds denotes state for group insufficient_funds + insufficient_funds = 3 [(gogoproto.enumvalue_customname) = "GroupInsufficientFunds"]; + // GroupClosed denotes state for group closed + closed = 4 [(gogoproto.enumvalue_customname) = "GroupClosed"]; + } + + State state = 2 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; + GroupSpec group_spec = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "spec", (gogoproto.moretags) = "yaml:\"spec\""]; + + int64 created_at = 4; +} + +// Resource stores unit, total count and price of resource +message Resource { + option (gogoproto.equal) = false; + + akash.base.v1beta1.ResourceUnits resources = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "unit", (gogoproto.moretags) = "yaml:\"unit\""]; + uint32 count = 2 [(gogoproto.jsontag) = "count", (gogoproto.moretags) = "yaml:\"count\""]; + cosmos.base.v1beta1.Coin price = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "price", (gogoproto.moretags) = "yaml:\"price\""]; +} diff --git a/proto/node/akash/deployment/v1beta1/params.proto b/proto/node/akash/deployment/v1beta1/params.proto new file mode 100644 index 00000000..453c1ca7 --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/params.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// Params defines the parameters for the x/deployment package +message Params { + cosmos.base.v1beta1.Coin deployment_min_deposit = 1 [ + (gogoproto.customname) = "DeploymentMinDeposit", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment_min_deposit", + (gogoproto.moretags) = "yaml:\"deployment_min_deposit\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta1/query.proto b/proto/node/akash/deployment/v1beta1/query.proto new file mode 100644 index 00000000..8230a0e8 --- /dev/null +++ b/proto/node/akash/deployment/v1beta1/query.proto @@ -0,0 +1,71 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/deployment/v1beta1/deployment.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta1"; + +// Query defines the gRPC querier service +service Query { + // Deployments queries deployments + rpc Deployments(QueryDeploymentsRequest) returns (QueryDeploymentsResponse) { + option (google.api.http).get = "/akash/deployment/v1beta1/deployments/list"; + } + + // Deployment queries deployment details + rpc Deployment(QueryDeploymentRequest) returns (QueryDeploymentResponse) { + option (google.api.http).get = "/akash/deployment/v1beta1/deployments/info"; + } + + // Group queries group details + rpc Group(QueryGroupRequest) returns (QueryGroupResponse) { + option (google.api.http).get = "/akash/deployment/v1beta1/groups/info"; + } +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +message QueryDeploymentsRequest { + DeploymentFilters filters = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +message QueryDeploymentsResponse { + repeated QueryDeploymentResponse deployments = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DeploymentResponses"]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +message QueryDeploymentRequest { + DeploymentID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +message QueryDeploymentResponse { + option (gogoproto.equal) = false; + Deployment deployment = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deployment", (gogoproto.moretags) = "yaml:\"deployment\""]; + repeated Group groups = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""]; + akash.escrow.v1beta1.Account escrow_account = 3 [ + (gogoproto.nullable) = false + ]; +} + +// QueryGroupRequest is request type for the Query/Group RPC method +message QueryGroupRequest { + GroupID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryGroupResponse is response type for the Query/Group RPC method +message QueryGroupResponse { + Group group = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/node/akash/deployment/v1beta2/authz.proto b/proto/node/akash/deployment/v1beta2/authz.proto new file mode 100644 index 00000000..1862e8c4 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/authz.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +message DepositDeploymentAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + cosmos.base.v1beta1.Coin spend_limit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spend_limit" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/deployment.proto b/proto/node/akash/deployment/v1beta2/deployment.proto new file mode 100644 index 00000000..3a8973b8 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/deployment.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// DeploymentID stores owner and sequence number +message DeploymentID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; +} + +// Deployment stores deploymentID, state and version details +message Deployment { + option (gogoproto.equal) = false; + + DeploymentID deployment_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "DeploymentID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of deployment + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "DeploymentStateInvalid"]; + // DeploymentActive denotes state for deployment active + active = 1 [(gogoproto.enumvalue_customname) = "DeploymentActive"]; + // DeploymentClosed denotes state for deployment closed + closed = 2 [(gogoproto.enumvalue_customname) = "DeploymentClosed"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; + int64 created_at = 4; +} + +// DeploymentFilters defines filters used to filter deployments +message DeploymentFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + string state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/deploymentmsg.proto b/proto/node/akash/deployment/v1beta2/deploymentmsg.proto new file mode 100644 index 00000000..9ace46f4 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/deploymentmsg.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// MsgCreateDeployment defines an SDK message for creating deployment +message MsgCreateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + repeated GroupSpec groups = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; + cosmos.base.v1beta1.Coin deposit = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deposit", + (gogoproto.moretags) = "yaml:\"deposit\"" + ]; + // Depositor pays for the deposit + string depositor = 5 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgCreateDeploymentResponse {} + +// MsgDepositDeployment deposits more funds into the deposit account +message MsgDepositDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "amount", + (gogoproto.moretags) = "yaml:\"amount\"" + ]; + + // Depositor pays for the deposit + string depositor = 3 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgDepositDeploymentResponse {} + +// MsgUpdateDeployment defines an SDK message for updating deployment +message MsgUpdateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +message MsgUpdateDeploymentResponse {} + +// MsgCloseDeployment defines an SDK message for closing deployment +message MsgCloseDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +message MsgCloseDeploymentResponse {} diff --git a/proto/node/akash/deployment/v1beta2/genesis.proto b/proto/node/akash/deployment/v1beta2/genesis.proto new file mode 100644 index 00000000..0338d5f7 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/genesis.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/group.proto"; +import "akash/deployment/v1beta2/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// GenesisDeployment defines the basic genesis state used by deployment module +message GenesisDeployment { + Deployment deployment = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment", + (gogoproto.moretags) = "yaml:\"deployment\"" + ]; + + repeated Group groups = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" + ]; +} + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + repeated GenesisDeployment deployments = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployments", + (gogoproto.moretags) = "yaml:\"deployments\"" + ]; + + Params params = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/group.proto b/proto/node/akash/deployment/v1beta2/group.proto new file mode 100644 index 00000000..cfe341b1 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/group.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupid.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// Group stores group id, state and specifications of group +message Group { + option (gogoproto.equal) = false; + + GroupID group_id = 1 [ + (gogoproto.customname) = "GroupID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of group + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "GroupStateInvalid"]; + // GroupOpen denotes state for group open + open = 1 [(gogoproto.enumvalue_customname) = "GroupOpen"]; + // GroupOrdered denotes state for group ordered + paused = 2 [(gogoproto.enumvalue_customname) = "GroupPaused"]; + // GroupInsufficientFunds denotes state for group insufficient_funds + insufficient_funds = 3 [(gogoproto.enumvalue_customname) = "GroupInsufficientFunds"]; + // GroupClosed denotes state for group closed + closed = 4 [(gogoproto.enumvalue_customname) = "GroupClosed"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + GroupSpec group_spec = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spec", + (gogoproto.moretags) = "yaml:\"spec\"" + ]; + + int64 created_at = 4; +} diff --git a/proto/node/akash/deployment/v1beta2/groupid.proto b/proto/node/akash/deployment/v1beta2/groupid.proto new file mode 100644 index 00000000..f1247a59 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/groupid.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// GroupID stores owner, deployment sequence number and group sequence number +message GroupID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/groupmsg.proto b/proto/node/akash/deployment/v1beta2/groupmsg.proto new file mode 100644 index 00000000..04c85943 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/groupmsg.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupid.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +message MsgCloseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +message MsgCloseGroupResponse {} + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +message MsgPauseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +message MsgPauseGroupResponse {} + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +message MsgStartGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +message MsgStartGroupResponse {} diff --git a/proto/node/akash/deployment/v1beta2/groupspec.proto b/proto/node/akash/deployment/v1beta2/groupspec.proto new file mode 100644 index 00000000..9f5aa771 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/groupspec.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; +import "akash/deployment/v1beta2/resource.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// GroupSpec stores group specifications +message GroupSpec { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + + akash.base.v1beta2.PlacementRequirements requirements = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "requirements", + (gogoproto.moretags) = "yaml:\"requirements\"" + ]; + + repeated Resource resources = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resources", + (gogoproto.moretags) = "yaml:\"resources\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/params.proto b/proto/node/akash/deployment/v1beta2/params.proto new file mode 100644 index 00000000..c15181d8 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/params.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// Params defines the parameters for the x/deployment package +message Params { + cosmos.base.v1beta1.Coin deployment_min_deposit = 1 [ + (gogoproto.customname) = "DeploymentMinDeposit", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment_min_deposit", + (gogoproto.moretags) = "yaml:\"deployment_min_deposit\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/query.proto b/proto/node/akash/deployment/v1beta2/query.proto new file mode 100644 index 00000000..c2ccf115 --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/query.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/group.proto"; +import "akash/deployment/v1beta2/groupid.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // Deployments queries deployments + rpc Deployments(QueryDeploymentsRequest) returns (QueryDeploymentsResponse) { + option (google.api.http).get = "/akash/deployment/v1beta2/deployments/list"; + } + + // Deployment queries deployment details + rpc Deployment(QueryDeploymentRequest) returns (QueryDeploymentResponse) { + option (google.api.http).get = "/akash/deployment/v1beta2/deployments/info"; + } + + // Group queries group details + rpc Group(QueryGroupRequest) returns (QueryGroupResponse) { + option (google.api.http).get = "/akash/deployment/v1beta2/groups/info"; + } +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +message QueryDeploymentsRequest { + DeploymentFilters filters = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +message QueryDeploymentsResponse { + repeated QueryDeploymentResponse deployments = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DeploymentResponses"]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +message QueryDeploymentRequest { + DeploymentID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +message QueryDeploymentResponse { + option (gogoproto.equal) = false; + Deployment deployment = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deployment", (gogoproto.moretags) = "yaml:\"deployment\""]; + repeated Group groups = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "groups", (gogoproto.moretags) = "yaml:\"groups\""]; + akash.escrow.v1beta2.Account escrow_account = 3 [ + (gogoproto.nullable) = false + ]; +} + +// QueryGroupRequest is request type for the Query/Group RPC method +message QueryGroupRequest { + GroupID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryGroupResponse is response type for the Query/Group RPC method +message QueryGroupResponse { + Group group = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/node/akash/deployment/v1beta2/resource.proto b/proto/node/akash/deployment/v1beta2/resource.proto new file mode 100644 index 00000000..3610be2e --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/resource.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "akash/base/v1beta2/resourceunits.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// Resource stores unit, total count and price of resource +message Resource { + option (gogoproto.equal) = false; + + akash.base.v1beta2.ResourceUnits resources = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "unit", + (gogoproto.moretags) = "yaml:\"unit\"" + ]; + uint32 count = 2 [ + (gogoproto.jsontag) = "count", + (gogoproto.moretags) = "yaml:\"count\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta2/service.proto b/proto/node/akash/deployment/v1beta2/service.proto new file mode 100644 index 00000000..cea1aa2c --- /dev/null +++ b/proto/node/akash/deployment/v1beta2/service.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "akash/deployment/v1beta2/deploymentmsg.proto"; +import "akash/deployment/v1beta2/groupmsg.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta2"; + +// Msg defines the deployment Msg service. +service Msg { + // CreateDeployment defines a method to create new deployment given proper inputs. + rpc CreateDeployment(MsgCreateDeployment) returns (MsgCreateDeploymentResponse); + + // DepositDeployment deposits more funds into the deployment account + rpc DepositDeployment(MsgDepositDeployment) returns (MsgDepositDeploymentResponse); + + // UpdateDeployment defines a method to update a deployment given proper inputs. + rpc UpdateDeployment(MsgUpdateDeployment) returns (MsgUpdateDeploymentResponse); + + // CloseDeployment defines a method to close a deployment given proper inputs. + rpc CloseDeployment(MsgCloseDeployment) returns (MsgCloseDeploymentResponse); + + // CloseGroup defines a method to close a group of a deployment given proper inputs. + rpc CloseGroup(MsgCloseGroup) returns (MsgCloseGroupResponse); + + // PauseGroup defines a method to close a group of a deployment given proper inputs. + rpc PauseGroup(MsgPauseGroup) returns (MsgPauseGroupResponse); + + // StartGroup defines a method to close a group of a deployment given proper inputs. + rpc StartGroup(MsgStartGroup) returns (MsgStartGroupResponse); +} diff --git a/proto/node/akash/deployment/v1beta3/authz.proto b/proto/node/akash/deployment/v1beta3/authz.proto new file mode 100644 index 00000000..a52c520c --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/authz.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +message DepositDeploymentAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + cosmos.base.v1beta1.Coin spend_limit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spend_limit" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/deployment.proto b/proto/node/akash/deployment/v1beta3/deployment.proto new file mode 100644 index 00000000..5616cd66 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/deployment.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// DeploymentID stores owner and sequence number +message DeploymentID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; +} + +// Deployment stores deploymentID, state and version details +message Deployment { + option (gogoproto.equal) = false; + + DeploymentID deployment_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "DeploymentID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of deployment + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "DeploymentStateInvalid"]; + // DeploymentActive denotes state for deployment active + active = 1 [(gogoproto.enumvalue_customname) = "DeploymentActive"]; + // DeploymentClosed denotes state for deployment closed + closed = 2 [(gogoproto.enumvalue_customname) = "DeploymentClosed"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; + int64 created_at = 4; +} + +// DeploymentFilters defines filters used to filter deployments +message DeploymentFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + string state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/deploymentmsg.proto b/proto/node/akash/deployment/v1beta3/deploymentmsg.proto new file mode 100644 index 00000000..47443ae9 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/deploymentmsg.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; + +import "akash/deployment/v1beta3/deployment.proto"; +import "akash/deployment/v1beta3/groupspec.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// MsgCreateDeployment defines an SDK message for creating deployment +message MsgCreateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + repeated GroupSpec groups = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; + cosmos.base.v1beta1.Coin deposit = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deposit", + (gogoproto.moretags) = "yaml:\"deposit\"" + ]; + // Depositor pays for the deposit + string depositor = 5 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgCreateDeploymentResponse {} + +// MsgDepositDeployment deposits more funds into the deposit account +message MsgDepositDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "amount", + (gogoproto.moretags) = "yaml:\"amount\"" + ]; + + // Depositor pays for the deposit + string depositor = 3 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgDepositDeploymentResponse {} + +// MsgUpdateDeployment defines an SDK message for updating deployment +message MsgUpdateDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + bytes version = 3 [ + (gogoproto.jsontag) = "version", + (gogoproto.moretags) = "yaml:\"version\"" + ]; +} + +// MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. +message MsgUpdateDeploymentResponse {} + +// MsgCloseDeployment defines an SDK message for closing deployment +message MsgCloseDeployment { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. +message MsgCloseDeploymentResponse {} diff --git a/proto/node/akash/deployment/v1beta3/genesis.proto b/proto/node/akash/deployment/v1beta3/genesis.proto new file mode 100644 index 00000000..8375cb9a --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/genesis.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta3/deployment.proto"; +import "akash/deployment/v1beta3/group.proto"; +import "akash/deployment/v1beta3/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// GenesisDeployment defines the basic genesis state used by deployment module +message GenesisDeployment { + Deployment deployment = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment", + (gogoproto.moretags) = "yaml:\"deployment\"" + ]; + + repeated Group groups = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" + ]; +} + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + repeated GenesisDeployment deployments = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployments", + (gogoproto.moretags) = "yaml:\"deployments\"" + ]; + + Params params = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/group.proto b/proto/node/akash/deployment/v1beta3/group.proto new file mode 100644 index 00000000..2a9b1df6 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/group.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta3/groupid.proto"; +import "akash/deployment/v1beta3/groupspec.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// Group stores group id, state and specifications of group +message Group { + option (gogoproto.equal) = false; + + GroupID group_id = 1 [ + (gogoproto.customname) = "GroupID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of group + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [ + (gogoproto.enumvalue_customname) = "GroupStateInvalid" + ]; + // GroupOpen denotes state for group open + open = 1 [ + (gogoproto.enumvalue_customname) = "GroupOpen" + ]; + // GroupOrdered denotes state for group ordered + paused = 2 [ + (gogoproto.enumvalue_customname) = "GroupPaused" + ]; + // GroupInsufficientFunds denotes state for group insufficient_funds + insufficient_funds = 3 [ + (gogoproto.enumvalue_customname) = "GroupInsufficientFunds" + ]; + // GroupClosed denotes state for group closed + closed = 4 [ + (gogoproto.enumvalue_customname) = "GroupClosed" + ]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + GroupSpec group_spec = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spec", + (gogoproto.moretags) = "yaml:\"spec\"" + ]; + + int64 created_at = 4; +} diff --git a/proto/node/akash/deployment/v1beta3/groupid.proto b/proto/node/akash/deployment/v1beta3/groupid.proto new file mode 100644 index 00000000..01d8e5a3 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/groupid.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// GroupID stores owner, deployment sequence number and group sequence number +message GroupID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/groupmsg.proto b/proto/node/akash/deployment/v1beta3/groupmsg.proto new file mode 100644 index 00000000..ad647b84 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/groupmsg.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta3/groupid.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// MsgCloseGroup defines SDK message to close a single Group within a Deployment. +message MsgCloseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseGroupResponse defines the Msg/CloseGroup response type. +message MsgCloseGroupResponse {} + +// MsgPauseGroup defines SDK message to close a single Group within a Deployment. +message MsgPauseGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgPauseGroupResponse defines the Msg/PauseGroup response type. +message MsgPauseGroupResponse {} + +// MsgStartGroup defines SDK message to close a single Group within a Deployment. +message MsgStartGroup { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgStartGroupResponse defines the Msg/StartGroup response type. +message MsgStartGroupResponse {} diff --git a/proto/node/akash/deployment/v1beta3/groupspec.proto b/proto/node/akash/deployment/v1beta3/groupspec.proto new file mode 100644 index 00000000..c5266c6d --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/groupspec.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; +import "akash/deployment/v1beta3/resource.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// GroupSpec stores group specifications +message GroupSpec { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + + akash.base.v1beta3.PlacementRequirements requirements = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "requirements", + (gogoproto.moretags) = "yaml:\"requirements\"" + ]; + + repeated Resource resources = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resources", + (gogoproto.moretags) = "yaml:\"resources\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/params.proto b/proto/node/akash/deployment/v1beta3/params.proto new file mode 100644 index 00000000..99a8ceda --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/params.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// Params defines the parameters for the x/deployment package +message Params { + cosmos.base.v1beta1.Coin deployment_min_deposit = 1 [ + (gogoproto.customname) = "DeploymentMinDeposit", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment_min_deposit", + (gogoproto.moretags) = "yaml:\"deployment_min_deposit\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/query.proto b/proto/node/akash/deployment/v1beta3/query.proto new file mode 100644 index 00000000..d80d16eb --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/query.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/deployment/v1beta3/deployment.proto"; +import "akash/deployment/v1beta3/group.proto"; +import "akash/deployment/v1beta3/groupid.proto"; +import "akash/escrow/v1beta3/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // Deployments queries deployments + rpc Deployments(QueryDeploymentsRequest) returns (QueryDeploymentsResponse) { + option (google.api.http).get = "/akash/deployment/v1beta3/deployments/list"; + } + + // Deployment queries deployment details + rpc Deployment(QueryDeploymentRequest) returns (QueryDeploymentResponse) { + option (google.api.http).get = "/akash/deployment/v1beta3/deployments/info"; + } + + // Group queries group details + rpc Group(QueryGroupRequest) returns (QueryGroupResponse) { + option (google.api.http).get = "/akash/deployment/v1beta3/groups/info"; + } +} + +// QueryDeploymentsRequest is request type for the Query/Deployments RPC method +message QueryDeploymentsRequest { + DeploymentFilters filters = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDeploymentsResponse is response type for the Query/Deployments RPC method +message QueryDeploymentsResponse { + repeated QueryDeploymentResponse deployments = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "DeploymentResponses" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDeploymentRequest is request type for the Query/Deployment RPC method +message QueryDeploymentRequest { + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID" + ]; +} + +// QueryDeploymentResponse is response type for the Query/Deployment RPC method +message QueryDeploymentResponse { + option (gogoproto.equal) = false; + Deployment deployment = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deployment", + (gogoproto.moretags) = "yaml:\"deployment\"" + ]; + repeated Group groups = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" + ]; + akash.escrow.v1beta3.Account escrow_account = 3 [ + (gogoproto.nullable) = false + ]; +} + +// QueryGroupRequest is request type for the Query/Group RPC method +message QueryGroupRequest { + GroupID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID" + ]; +} + +// QueryGroupResponse is response type for the Query/Group RPC method +message QueryGroupResponse { + Group group = 1 [ + (gogoproto.nullable) = false + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/resource.proto b/proto/node/akash/deployment/v1beta3/resource.proto new file mode 100644 index 00000000..718bf1c7 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/resource.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/resourceunits.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// Resource stores unit, total count and price of resource +message Resource { + option (gogoproto.equal) = false; + + akash.base.v1beta3.ResourceUnits resources = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "unit", + (gogoproto.moretags) = "yaml:\"unit\"" + ]; + uint32 count = 2 [ + (gogoproto.jsontag) = "count", + (gogoproto.moretags) = "yaml:\"count\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; +} diff --git a/proto/node/akash/deployment/v1beta3/service.proto b/proto/node/akash/deployment/v1beta3/service.proto new file mode 100644 index 00000000..cf89f664 --- /dev/null +++ b/proto/node/akash/deployment/v1beta3/service.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta3; + +import "akash/deployment/v1beta3/deploymentmsg.proto"; +import "akash/deployment/v1beta3/groupmsg.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; + +// Msg defines the deployment Msg service. +service Msg { + // CreateDeployment defines a method to create new deployment given proper inputs. + rpc CreateDeployment(MsgCreateDeployment) returns (MsgCreateDeploymentResponse); + + // DepositDeployment deposits more funds into the deployment account + rpc DepositDeployment(MsgDepositDeployment) returns (MsgDepositDeploymentResponse); + + // UpdateDeployment defines a method to update a deployment given proper inputs. + rpc UpdateDeployment(MsgUpdateDeployment) returns (MsgUpdateDeploymentResponse); + + // CloseDeployment defines a method to close a deployment given proper inputs. + rpc CloseDeployment(MsgCloseDeployment) returns (MsgCloseDeploymentResponse); + + // CloseGroup defines a method to close a group of a deployment given proper inputs. + rpc CloseGroup(MsgCloseGroup) returns (MsgCloseGroupResponse); + + // PauseGroup defines a method to close a group of a deployment given proper inputs. + rpc PauseGroup(MsgPauseGroup) returns (MsgPauseGroupResponse); + + // StartGroup defines a method to close a group of a deployment given proper inputs. + rpc StartGroup(MsgStartGroup) returns (MsgStartGroupResponse); +} diff --git a/proto/node/akash/escrow/v1beta1/genesis.proto b/proto/node/akash/escrow/v1beta1/genesis.proto new file mode 100644 index 00000000..e02f21e9 --- /dev/null +++ b/proto/node/akash/escrow/v1beta1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta1"; + +// GenesisState defines the basic genesis state used by escrow module +message GenesisState { + repeated Account accounts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accounts", + (gogoproto.moretags) = "yaml:\"accounts\"" + ]; + + repeated Payment payments = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "payments", + (gogoproto.moretags) = "yaml:\"payments\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta1/query.proto b/proto/node/akash/escrow/v1beta1/query.proto new file mode 100644 index 00000000..7cf8ca3c --- /dev/null +++ b/proto/node/akash/escrow/v1beta1/query.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta1"; + +// Query defines the gRPC querier service +service Query { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta1/types/accounts/list"; + } + + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + rpc Payments(QueryPaymentsRequest) returns (QueryPaymentsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta1/types/payments/list"; + } +} + +// QueryAccountRequest is request type for the Query/Account RPC method +message QueryAccountsRequest { + string scope = 1; + string xid = 2; + string owner = 3; + string state = 4; + cosmos.base.query.v1beta1.PageRequest pagination = 5; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryAccountsResponse { + repeated Account accounts = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +message QueryPaymentsRequest { + string scope = 1; + string xid = 2; + string id = 3; + string owner = 4; + string state = 5; + cosmos.base.query.v1beta1.PageRequest pagination = 6; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryPaymentsResponse { + repeated Payment payments = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/node/akash/escrow/v1beta1/types.proto b/proto/node/akash/escrow/v1beta1/types.proto new file mode 100644 index 00000000..5f24fcd5 --- /dev/null +++ b/proto/node/akash/escrow/v1beta1/types.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta1"; + +// AccountID is the account identifier +message AccountID { + string scope = 1 [ + (gogoproto.jsontag) = "scope", + (gogoproto.moretags) = "yaml:\"scope\"" + ]; + string xid = 2 [ + (gogoproto.jsontag) = "xid", + (gogoproto.moretags) = "yaml:\"xid\"", + (gogoproto.customname) = "XID" + ]; +} + +// Account stores state for an escrow account +message Account { + + // State stores state for an escrow account + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // AccountStateInvalid is an invalid state + invalid = 0 [(gogoproto.enumvalue_customname) = "AccountStateInvalid"]; + // AccountOpen is the state when an account is open + open = 1 [(gogoproto.enumvalue_customname) = "AccountOpen"]; + // AccountClosed is the state when an account is closed + closed = 2 [(gogoproto.enumvalue_customname) = "AccountClosed"]; + // AccountOverdrawn is the state when an account is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "AccountOverdrawn"]; + } + + // unique identifier for this escrow account + AccountID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"", + (gogoproto.customname) = "ID" + ]; + + // bech32 encoded account address of the owner of this escrow account + string owner = 2 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // current state of this escrow account + State state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + // unspent coins received from the owner's wallet + cosmos.base.v1beta1.Coin balance = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + // total coins spent by this account + cosmos.base.v1beta1.Coin transferred = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "transferred", + (gogoproto.moretags) = "yaml:\"transferred\"" + ]; + + // block height at which this account was last settled + int64 settled_at = 6 [ + (gogoproto.jsontag) = "settledAt", + (gogoproto.moretags) = "yaml:\"settledAt\"", + (gogoproto.customname) = "SettledAt" + ]; +} + +// Payment stores state for a payment +message Payment { + option (gogoproto.goproto_stringer) = true; + + // Payment State + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // PaymentStateInvalid is the state when the payment is invalid + invalid = 0 [(gogoproto.enumvalue_customname) = "PaymentStateInvalid"]; + // PaymentStateOpen is the state when the payment is open + open = 1 [(gogoproto.enumvalue_customname) = "PaymentOpen"]; + // PaymentStateClosed is the state when the payment is closed + closed = 2 [(gogoproto.enumvalue_customname) = "PaymentClosed"]; + // PaymentStateOverdrawn is the state when the payment is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "PaymentOverdrawn"]; + } + + AccountID account_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accountID", + (gogoproto.moretags) = "yaml:\"accountID\"", + (gogoproto.customname) = "AccountID" + ]; + + string payment_id = 2 [ + (gogoproto.jsontag) = "paymentID", + (gogoproto.moretags) = "yaml:\"paymentID\"", + (gogoproto.customname) = "PaymentID" + ]; + + string owner = 3 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + State state = 4 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + cosmos.base.v1beta1.Coin rate = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "rate", + (gogoproto.moretags) = "yaml:\"rate\"" + ]; + + cosmos.base.v1beta1.Coin balance = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + cosmos.base.v1beta1.Coin withdrawn = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "withdrawn", + (gogoproto.moretags) = "yaml:\"withdrawn\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta2/genesis.proto b/proto/node/akash/escrow/v1beta2/genesis.proto new file mode 100644 index 00000000..e9a3a078 --- /dev/null +++ b/proto/node/akash/escrow/v1beta2/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta2"; + +// GenesisState defines the basic genesis state used by escrow module +message GenesisState { + repeated Account accounts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accounts", + (gogoproto.moretags) = "yaml:\"accounts\"" + ]; + + repeated FractionalPayment payments = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "payments", + (gogoproto.moretags) = "yaml:\"payments\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta2/query.proto b/proto/node/akash/escrow/v1beta2/query.proto new file mode 100644 index 00000000..df835805 --- /dev/null +++ b/proto/node/akash/escrow/v1beta2/query.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta2/types/accounts/list"; + } + + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + rpc Payments(QueryPaymentsRequest) returns (QueryPaymentsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta2/types/payments/list"; + } +} + +// QueryAccountRequest is request type for the Query/Account RPC method +message QueryAccountsRequest { + string scope = 1; + string xid = 2; + string owner = 3; + string state = 4; + cosmos.base.query.v1beta1.PageRequest pagination = 5; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryAccountsResponse { + repeated Account accounts = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +message QueryPaymentsRequest { + string scope = 1; + string xid = 2; + string id = 3; + string owner = 4; + string state = 5; + cosmos.base.query.v1beta1.PageRequest pagination = 6; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryPaymentsResponse { + repeated FractionalPayment payments = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/node/akash/escrow/v1beta2/types.proto b/proto/node/akash/escrow/v1beta2/types.proto new file mode 100644 index 00000000..c5ceeb1b --- /dev/null +++ b/proto/node/akash/escrow/v1beta2/types.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta2"; + +// AccountID is the account identifier +message AccountID { + string scope = 1 [ + (gogoproto.jsontag) = "scope", + (gogoproto.moretags) = "yaml:\"scope\"" + ]; + string xid = 2 [ + (gogoproto.jsontag) = "xid", + (gogoproto.moretags) = "yaml:\"xid\"", + (gogoproto.customname) = "XID" + ]; +} + +// Account stores state for an escrow account +message Account { + + // State stores state for an escrow account + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // AccountStateInvalid is an invalid state + invalid = 0 [(gogoproto.enumvalue_customname) = "AccountStateInvalid"]; + // AccountOpen is the state when an account is open + open = 1 [(gogoproto.enumvalue_customname) = "AccountOpen"]; + // AccountClosed is the state when an account is closed + closed = 2 [(gogoproto.enumvalue_customname) = "AccountClosed"]; + // AccountOverdrawn is the state when an account is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "AccountOverdrawn"]; + } + + // unique identifier for this escrow account + AccountID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"", + (gogoproto.customname) = "ID" + ]; + + // bech32 encoded account address of the owner of this escrow account + string owner = 2 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // current state of this escrow account + State state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + // unspent coins received from the owner's wallet + cosmos.base.v1beta1.DecCoin balance = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + // total coins spent by this account + cosmos.base.v1beta1.DecCoin transferred = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "transferred", + (gogoproto.moretags) = "yaml:\"transferred\"" + ]; + + // block height at which this account was last settled + int64 settled_at = 6 [ + (gogoproto.jsontag) = "settledAt", + (gogoproto.moretags) = "yaml:\"settledAt\"", + (gogoproto.customname) = "SettledAt" + ]; + + // bech32 encoded account address of the depositor. + // If depositor is same as the owner, then any incoming coins are added to the Balance. + // If depositor isn't same as the owner, then any incoming coins are added to the Funds. + string depositor = 7 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; + + // Funds are unspent coins received from the (non-Owner) Depositor's wallet. + // If there are any funds, they should be spent before spending the Balance. + cosmos.base.v1beta1.DecCoin funds = 8 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "funds", + (gogoproto.moretags) = "yaml:\"funds\"" + ]; +} + +// Payment stores state for a payment +message FractionalPayment { + option (gogoproto.goproto_stringer) = true; + + // Payment State + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // PaymentStateInvalid is the state when the payment is invalid + invalid = 0 [(gogoproto.enumvalue_customname) = "PaymentStateInvalid"]; + // PaymentStateOpen is the state when the payment is open + open = 1 [(gogoproto.enumvalue_customname) = "PaymentOpen"]; + // PaymentStateClosed is the state when the payment is closed + closed = 2 [(gogoproto.enumvalue_customname) = "PaymentClosed"]; + // PaymentStateOverdrawn is the state when the payment is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "PaymentOverdrawn"]; + } + + AccountID account_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accountID", + (gogoproto.moretags) = "yaml:\"accountID\"", + (gogoproto.customname) = "AccountID" + ]; + + string payment_id = 2 [ + (gogoproto.jsontag) = "paymentID", + (gogoproto.moretags) = "yaml:\"paymentID\"", + (gogoproto.customname) = "PaymentID" + ]; + + string owner = 3 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + State state = 4 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + cosmos.base.v1beta1.DecCoin rate = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "rate", + (gogoproto.moretags) = "yaml:\"rate\"" + ]; + + cosmos.base.v1beta1.DecCoin balance = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + cosmos.base.v1beta1.Coin withdrawn = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "withdrawn", + (gogoproto.moretags) = "yaml:\"withdrawn\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta3/genesis.proto b/proto/node/akash/escrow/v1beta3/genesis.proto new file mode 100644 index 00000000..e530adf8 --- /dev/null +++ b/proto/node/akash/escrow/v1beta3/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.escrow.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1beta3/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta3"; + +// GenesisState defines the basic genesis state used by escrow module +message GenesisState { + repeated Account accounts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accounts", + (gogoproto.moretags) = "yaml:\"accounts\"" + ]; + + repeated FractionalPayment payments = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "payments", + (gogoproto.moretags) = "yaml:\"payments\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta3/query.proto b/proto/node/akash/escrow/v1beta3/query.proto new file mode 100644 index 00000000..10062c29 --- /dev/null +++ b/proto/node/akash/escrow/v1beta3/query.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; + +package akash.escrow.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/escrow/v1beta3/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Accounts queries all accounts + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta3/types/accounts/list"; + } + + // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + // Payments queries all payments + rpc Payments(QueryPaymentsRequest) returns (QueryPaymentsResponse) { + option (google.api.http).get = "/akash/escrow/v1beta3/types/payments/list"; + } +} + +// QueryAccountRequest is request type for the Query/Account RPC method +message QueryAccountsRequest { + string scope = 1; + string xid = 2; + string owner = 3; + string state = 4; + cosmos.base.query.v1beta1.PageRequest pagination = 5; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryAccountsResponse { + repeated Account accounts = 1 [ + (gogoproto.nullable) = false + ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPaymentRequest is request type for the Query/Payment RPC method +message QueryPaymentsRequest { + string scope = 1; + string xid = 2; + string id = 3; + string owner = 4; + string state = 5; + cosmos.base.query.v1beta1.PageRequest pagination = 6; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryPaymentsResponse { + repeated FractionalPayment payments = 1 [ + (gogoproto.nullable) = false + ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/node/akash/escrow/v1beta3/types.proto b/proto/node/akash/escrow/v1beta3/types.proto new file mode 100644 index 00000000..f767a8a4 --- /dev/null +++ b/proto/node/akash/escrow/v1beta3/types.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package akash.escrow.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/escrow/v1beta3"; + +// AccountID is the account identifier +message AccountID { + string scope = 1 [ + (gogoproto.jsontag) = "scope", + (gogoproto.moretags) = "yaml:\"scope\"" + ]; + string xid = 2 [ + (gogoproto.jsontag) = "xid", + (gogoproto.moretags) = "yaml:\"xid\"", + (gogoproto.customname) = "XID" + ]; +} + +// Account stores state for an escrow account +message Account { + + // State stores state for an escrow account + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // AccountStateInvalid is an invalid state + invalid = 0 [(gogoproto.enumvalue_customname) = "AccountStateInvalid"]; + // AccountOpen is the state when an account is open + open = 1 [(gogoproto.enumvalue_customname) = "AccountOpen"]; + // AccountClosed is the state when an account is closed + closed = 2 [(gogoproto.enumvalue_customname) = "AccountClosed"]; + // AccountOverdrawn is the state when an account is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "AccountOverdrawn"]; + } + + // unique identifier for this escrow account + AccountID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"", + (gogoproto.customname) = "ID" + ]; + + // bech32 encoded account address of the owner of this escrow account + string owner = 2 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // current state of this escrow account + State state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + // unspent coins received from the owner's wallet + cosmos.base.v1beta1.DecCoin balance = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + // total coins spent by this account + cosmos.base.v1beta1.DecCoin transferred = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "transferred", + (gogoproto.moretags) = "yaml:\"transferred\"" + ]; + + // block height at which this account was last settled + int64 settled_at = 6 [ + (gogoproto.jsontag) = "settledAt", + (gogoproto.moretags) = "yaml:\"settledAt\"", + (gogoproto.customname) = "SettledAt" + ]; + + // bech32 encoded account address of the depositor. + // If depositor is same as the owner, then any incoming coins are added to the Balance. + // If depositor isn't same as the owner, then any incoming coins are added to the Funds. + string depositor = 7 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; + + // Funds are unspent coins received from the (non-Owner) Depositor's wallet. + // If there are any funds, they should be spent before spending the Balance. + cosmos.base.v1beta1.DecCoin funds = 8 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "funds", + (gogoproto.moretags) = "yaml:\"funds\"" + ]; +} + +// Payment stores state for a payment +message FractionalPayment { + option (gogoproto.goproto_stringer) = true; + + // Payment State + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // PaymentStateInvalid is the state when the payment is invalid + invalid = 0 [(gogoproto.enumvalue_customname) = "PaymentStateInvalid"]; + // PaymentStateOpen is the state when the payment is open + open = 1 [(gogoproto.enumvalue_customname) = "PaymentOpen"]; + // PaymentStateClosed is the state when the payment is closed + closed = 2 [(gogoproto.enumvalue_customname) = "PaymentClosed"]; + // PaymentStateOverdrawn is the state when the payment is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "PaymentOverdrawn"]; + } + + AccountID account_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accountID", + (gogoproto.moretags) = "yaml:\"accountID\"", + (gogoproto.customname) = "AccountID" + ]; + + string payment_id = 2 [ + (gogoproto.jsontag) = "paymentID", + (gogoproto.moretags) = "yaml:\"paymentID\"", + (gogoproto.customname) = "PaymentID" + ]; + + string owner = 3 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + State state = 4 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + cosmos.base.v1beta1.DecCoin rate = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "rate", + (gogoproto.moretags) = "yaml:\"rate\"" + ]; + + cosmos.base.v1beta1.DecCoin balance = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + cosmos.base.v1beta1.Coin withdrawn = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "withdrawn", + (gogoproto.moretags) = "yaml:\"withdrawn\"" + ]; +} diff --git a/proto/node/akash/inflation/v1beta2/genesis.proto b/proto/node/akash/inflation/v1beta2/genesis.proto new file mode 100644 index 00000000..9f66ece4 --- /dev/null +++ b/proto/node/akash/inflation/v1beta2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.inflation.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/inflation/v1beta2/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/inflation/types/v1beta2"; + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/inflation/v1beta2/params.proto b/proto/node/akash/inflation/v1beta2/params.proto new file mode 100644 index 00000000..c1e3b5b6 --- /dev/null +++ b/proto/node/akash/inflation/v1beta2/params.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package akash.inflation.v1beta2; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/inflation/types/v1beta2"; + +// Params defines the parameters for the x/deployment package +message Params { + // InflationDecayFactor is the number of years it takes inflation to halve. + string inflation_decay_factor = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InflationDecayFactor", + (gogoproto.jsontag) = "inflation_decay_factor", + (gogoproto.moretags) = "yaml:\"inflation_decay_factor\"" + ]; + + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + string initial_inflation = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InitialInflation", + (gogoproto.jsontag) = "initial_inflation", + (gogoproto.moretags) = "yaml:\"initial_inflation\"" + ]; + + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + string variance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "Variance", + (gogoproto.jsontag) = "variance", + (gogoproto.moretags) = "yaml:\"variance\"" + ]; +} diff --git a/proto/node/akash/inflation/v1beta3/genesis.proto b/proto/node/akash/inflation/v1beta3/genesis.proto new file mode 100644 index 00000000..2fa5fe9a --- /dev/null +++ b/proto/node/akash/inflation/v1beta3/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.inflation.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/inflation/v1beta3/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/inflation/v1beta3"; + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/inflation/v1beta3/params.proto b/proto/node/akash/inflation/v1beta3/params.proto new file mode 100644 index 00000000..87cc6feb --- /dev/null +++ b/proto/node/akash/inflation/v1beta3/params.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package akash.inflation.v1beta3; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/inflation/v1beta3"; + +// Params defines the parameters for the x/deployment package +message Params { + // InflationDecayFactor is the number of years it takes inflation to halve. + string inflation_decay_factor = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InflationDecayFactor", + (gogoproto.jsontag) = "inflation_decay_factor", + (gogoproto.moretags) = "yaml:\"inflation_decay_factor\"" + ]; + + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + string initial_inflation = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InitialInflation", + (gogoproto.jsontag) = "initial_inflation", + (gogoproto.moretags) = "yaml:\"initial_inflation\"" + ]; + + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + string variance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "Variance", + (gogoproto.jsontag) = "variance", + (gogoproto.moretags) = "yaml:\"variance\"" + ]; +} diff --git a/proto/node/akash/market/v1beta2/bid.proto b/proto/node/akash/market/v1beta2/bid.proto new file mode 100644 index 00000000..0cdab374 --- /dev/null +++ b/proto/node/akash/market/v1beta2/bid.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/market/v1beta2/order.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// MsgCreateBid defines an SDK message for creating Bid +message MsgCreateBid { + option (gogoproto.equal) = false; + + OrderID order = 1 [ + (gogoproto.customname) = "Order", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "order", + (gogoproto.moretags) = "yaml:\"order\"" + ]; + string provider = 2 [(gogoproto.jsontag) = "provider", (gogoproto.moretags) = "yaml:\"provider\""]; + cosmos.base.v1beta1.DecCoin price = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "price", (gogoproto.moretags) = "yaml:\"price\""]; + + cosmos.base.v1beta1.Coin deposit = 4 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "deposit", (gogoproto.moretags) = "yaml:\"deposit\""]; +} + +// MsgCreateBidResponse defines the Msg/CreateBid response type. +message MsgCreateBidResponse {} + +// MsgCloseBid defines an SDK message for closing bid +message MsgCloseBid { + option (gogoproto.equal) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseBidResponse defines the Msg/CloseBid response type. +message MsgCloseBidResponse {} + +// BidID stores owner and all other seq numbers +// A successful bid becomes a Lease(ID). +message BidID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; + string provider = 5 [(gogoproto.jsontag) = "provider", (gogoproto.moretags) = "yaml:\"provider\""]; +} + +// Bid stores BidID, state of bid and price +message Bid { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of bid + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "BidStateInvalid"]; + // BidOpen denotes state for bid open + open = 1 [(gogoproto.enumvalue_customname) = "BidOpen"]; + // BidMatched denotes state for bid open + active = 2 [(gogoproto.enumvalue_customname) = "BidActive"]; + // BidLost denotes state for bid lost + lost = 3 [(gogoproto.enumvalue_customname) = "BidLost"]; + // BidClosed denotes state for bid closed + closed = 4 [(gogoproto.enumvalue_customname) = "BidClosed"]; + } + + State state = 2 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; + cosmos.base.v1beta1.DecCoin price = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "price", (gogoproto.moretags) = "yaml:\"price\""]; + int64 created_at = 4; +} + +// BidFilters defines flags for bid list filter +message BidFilters { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; + string provider = 5 [(gogoproto.jsontag) = "provider", (gogoproto.moretags) = "yaml:\"provider\""]; + string state = 6 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; +} diff --git a/proto/node/akash/market/v1beta2/genesis.proto b/proto/node/akash/market/v1beta2/genesis.proto new file mode 100644 index 00000000..686ebff3 --- /dev/null +++ b/proto/node/akash/market/v1beta2/genesis.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/market/v1beta2/order.proto"; +import "akash/market/v1beta2/lease.proto"; +import "akash/market/v1beta2/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// GenesisState defines the basic genesis state used by market module +message GenesisState { + repeated Order orders = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "orders", (gogoproto.moretags) = "yaml:\"orders\""]; + + repeated Lease leases = 2 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "leases", (gogoproto.moretags) = "yaml:\"leases\""]; + + Params params = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/market/v1beta2/lease.proto b/proto/node/akash/market/v1beta2/lease.proto new file mode 100644 index 00000000..9aab0588 --- /dev/null +++ b/proto/node/akash/market/v1beta2/lease.proto @@ -0,0 +1,117 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "akash/market/v1beta2/bid.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// LeaseID stores bid details of lease +message LeaseID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; + string provider = 5 [(gogoproto.jsontag) = "provider", (gogoproto.moretags) = "yaml:\"provider\""]; +} + +// Lease stores LeaseID, state of lease and price +message Lease { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + LeaseID lease_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of lease + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "LeaseStateInvalid"]; + // LeaseActive denotes state for lease active + active = 1 [(gogoproto.enumvalue_customname) = "LeaseActive"]; + // LeaseInsufficientFunds denotes state for lease insufficient_funds + insufficient_funds = 2 [(gogoproto.enumvalue_customname) = "LeaseInsufficientFunds"]; + // LeaseClosed denotes state for lease closed + closed = 3 [(gogoproto.enumvalue_customname) = "LeaseClosed"]; + } + + State state = 2 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; + cosmos.base.v1beta1.DecCoin price = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "price", (gogoproto.moretags) = "yaml:\"price\""]; + int64 created_at = 4; + int64 closed_on = 5; +} + +// LeaseFilters defines flags for lease list filter +message LeaseFilters { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; + string provider = 5 [(gogoproto.jsontag) = "provider", (gogoproto.moretags) = "yaml:\"provider\""]; + string state = 6 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; +} + +// MsgCreateLease is sent to create a lease +message MsgCreateLease { + option (gogoproto.equal) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCreateLeaseResponse is the response from creating a lease +message MsgCreateLeaseResponse {} + +// MsgWithdrawLease defines an SDK message for closing bid +message MsgWithdrawLease { + option (gogoproto.equal) = false; + + LeaseID bid_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. +message MsgWithdrawLeaseResponse {} + + +// MsgCloseLease defines an SDK message for closing order +message MsgCloseLease { + option (gogoproto.equal) = false; + + LeaseID lease_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseLeaseResponse defines the Msg/CloseLease response type. +message MsgCloseLeaseResponse {} diff --git a/proto/node/akash/market/v1beta2/order.proto b/proto/node/akash/market/v1beta2/order.proto new file mode 100644 index 00000000..7822234c --- /dev/null +++ b/proto/node/akash/market/v1beta2/order.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// OrderID stores owner and all other seq numbers +message OrderID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; +} + +// Order stores orderID, state of order and other details +message Order { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + OrderID order_id = 1 [ + (gogoproto.customname) = "OrderID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of order + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "OrderStateInvalid"]; + // OrderOpen denotes state for order open + open = 1 [(gogoproto.enumvalue_customname) = "OrderOpen"]; + // OrderMatched denotes state for order matched + active = 2 [(gogoproto.enumvalue_customname) = "OrderActive"]; + // OrderClosed denotes state for order lost + closed = 3 [(gogoproto.enumvalue_customname) = "OrderClosed"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + akash.deployment.v1beta2.GroupSpec spec = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spec", + (gogoproto.moretags) = "yaml:\"spec\"" + ]; + + int64 created_at = 4; +} + +// OrderFilters defines flags for order list filter +message OrderFilters { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + uint64 dseq = 2 + [(gogoproto.customname) = "DSeq", (gogoproto.jsontag) = "dseq", (gogoproto.moretags) = "yaml:\"dseq\""]; + uint32 gseq = 3 + [(gogoproto.customname) = "GSeq", (gogoproto.jsontag) = "gseq", (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 + [(gogoproto.customname) = "OSeq", (gogoproto.jsontag) = "oseq", (gogoproto.moretags) = "yaml:\"oseq\""]; + string state = 5 [(gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\""]; +} diff --git a/proto/node/akash/market/v1beta2/params.proto b/proto/node/akash/market/v1beta2/params.proto new file mode 100644 index 00000000..2953b972 --- /dev/null +++ b/proto/node/akash/market/v1beta2/params.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.market.v1beta2; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// Params is the params for the x/market module +message Params { + cosmos.base.v1beta1.Coin bid_min_deposit = 1 [ + (gogoproto.customname) = "BidMinDeposit", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "bid_min_deposit", + (gogoproto.moretags) = "yaml:\"bid_min_deposit\"" + ]; + uint32 order_max_bids = 2 [ + (gogoproto.customname) = "OrderMaxBids", + (gogoproto.jsontag) = "order_max_bids", + (gogoproto.moretags) = "yaml:\"order_max_bids\"" + ]; +} diff --git a/proto/node/akash/market/v1beta2/query.proto b/proto/node/akash/market/v1beta2/query.proto new file mode 100644 index 00000000..fbacfc93 --- /dev/null +++ b/proto/node/akash/market/v1beta2/query.proto @@ -0,0 +1,123 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/market/v1beta2/order.proto"; +import "akash/market/v1beta2/bid.proto"; +import "akash/market/v1beta2/lease.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // Orders queries orders with filters + rpc Orders(QueryOrdersRequest) returns (QueryOrdersResponse) { + option (google.api.http).get = "/akash/market/v1beta2/orders/list"; + } + + // Order queries order details + rpc Order(QueryOrderRequest) returns (QueryOrderResponse) { + option (google.api.http).get = "/akash/market/v1beta2/orders/info"; + } + + // Bids queries bids with filters + rpc Bids(QueryBidsRequest) returns (QueryBidsResponse) { + option (google.api.http).get = "/akash/market/v1beta2/bids/list"; + } + + // Bid queries bid details + rpc Bid(QueryBidRequest) returns (QueryBidResponse) { + option (google.api.http).get = "/akash/market/v1beta2/bids/info"; + } + + // Leases queries leases with filters + rpc Leases(QueryLeasesRequest) returns (QueryLeasesResponse) { + option (google.api.http).get = "/akash/market/v1beta2/leases/list"; + } + + // Lease queries lease details + rpc Lease(QueryLeaseRequest) returns (QueryLeaseResponse) { + option (google.api.http).get = "/akash/market/v1beta2/leases/info"; + } +} + +// QueryOrdersRequest is request type for the Query/Orders RPC method +message QueryOrdersRequest { + OrderFilters filters = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryOrdersResponse is response type for the Query/Orders RPC method +message QueryOrdersResponse { + repeated Order orders = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Orders"]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryOrderRequest is request type for the Query/Order RPC method +message QueryOrderRequest { + OrderID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryOrderResponse is response type for the Query/Order RPC method +message QueryOrderResponse { + Order order = 1 [(gogoproto.nullable) = false]; +} + +// QueryBidsRequest is request type for the Query/Bids RPC method +message QueryBidsRequest { + BidFilters filters = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryBidsResponse is response type for the Query/Bids RPC method +message QueryBidsResponse { + repeated QueryBidResponse bids = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryBidRequest is request type for the Query/Bid RPC method +message QueryBidRequest { + BidID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryBidResponse is response type for the Query/Bid RPC method +message QueryBidResponse { + Bid bid = 1 [(gogoproto.nullable) = false]; + akash.escrow.v1beta2.Account escrow_account = 2 [ + (gogoproto.nullable) = false + ]; +} + +// QueryLeasesRequest is request type for the Query/Leases RPC method +message QueryLeasesRequest { + LeaseFilters filters = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryLeasesResponse is response type for the Query/Leases RPC method +message QueryLeasesResponse { + repeated QueryLeaseResponse leases = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryLeaseRequest is request type for the Query/Lease RPC method +message QueryLeaseRequest { + LeaseID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; +} + +// QueryLeaseResponse is response type for the Query/Lease RPC method +message QueryLeaseResponse { + Lease lease = 1 [(gogoproto.nullable) = false]; + akash.escrow.v1beta2.FractionalPayment escrow_payment = 2 [ + (gogoproto.nullable) = false + ]; +} diff --git a/proto/node/akash/market/v1beta2/service.proto b/proto/node/akash/market/v1beta2/service.proto new file mode 100644 index 00000000..b995f19c --- /dev/null +++ b/proto/node/akash/market/v1beta2/service.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "akash/market/v1beta2/bid.proto"; +import "akash/market/v1beta2/lease.proto"; +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta2"; + +// Msg defines the market Msg service +service Msg { + // CreateBid defines a method to create a bid given proper inputs. + rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse); + + // CloseBid defines a method to close a bid given proper inputs. + rpc CloseBid(MsgCloseBid) returns (MsgCloseBidResponse); + + // WithdrawLease withdraws accrued funds from the lease payment + rpc WithdrawLease(MsgWithdrawLease) returns (MsgWithdrawLeaseResponse); + + // CreateLease creates a new lease + rpc CreateLease(MsgCreateLease) returns (MsgCreateLeaseResponse); + + // CloseLease defines a method to close an order given proper inputs. + rpc CloseLease(MsgCloseLease) returns (MsgCloseLeaseResponse); +} diff --git a/proto/node/akash/market/v1beta3/bid.proto b/proto/node/akash/market/v1beta3/bid.proto new file mode 100644 index 00000000..9026c985 --- /dev/null +++ b/proto/node/akash/market/v1beta3/bid.proto @@ -0,0 +1,164 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "akash/market/v1beta3/order.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// MsgCreateBid defines an SDK message for creating Bid +message MsgCreateBid { + option (gogoproto.equal) = false; + + OrderID order = 1 [ + (gogoproto.customname) = "Order", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "order", + (gogoproto.moretags) = "yaml:\"order\"" + ]; + string provider = 2 [ + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; + cosmos.base.v1beta1.Coin deposit = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "deposit", + (gogoproto.moretags) = "yaml:\"deposit\"" + ]; +} + +// MsgCreateBidResponse defines the Msg/CreateBid response type. +message MsgCreateBidResponse {} + +// MsgCloseBid defines an SDK message for closing bid +message MsgCloseBid { + option (gogoproto.equal) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseBidResponse defines the Msg/CloseBid response type. +message MsgCloseBidResponse {} + +// BidID stores owner and all other seq numbers +// A successful bid becomes a Lease(ID). +message BidID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\""]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\""]; + string provider = 5 [ + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; +} + +// Bid stores BidID, state of bid and price +message Bid { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of bid + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [ + (gogoproto.enumvalue_customname) = "BidStateInvalid" + ]; + // BidOpen denotes state for bid open + open = 1 [ + (gogoproto.enumvalue_customname) = "BidOpen" + ]; + // BidMatched denotes state for bid open + active = 2 [ + (gogoproto.enumvalue_customname) = "BidActive" + ]; + // BidLost denotes state for bid lost + lost = 3 [ + (gogoproto.enumvalue_customname) = "BidLost" + ]; + // BidClosed denotes state for bid closed + closed = 4 [ + (gogoproto.enumvalue_customname) = "BidClosed" + ]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; + int64 created_at = 4; +} + +// BidFilters defines flags for bid list filter +message BidFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\"" + ]; + string provider = 5 [ + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; + string state = 6 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} diff --git a/proto/node/akash/market/v1beta3/genesis.proto b/proto/node/akash/market/v1beta3/genesis.proto new file mode 100644 index 00000000..62340e32 --- /dev/null +++ b/proto/node/akash/market/v1beta3/genesis.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/market/v1beta3/order.proto"; +import "akash/market/v1beta3/lease.proto"; +import "akash/market/v1beta3/params.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// GenesisState defines the basic genesis state used by market module +message GenesisState { + repeated Order orders = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "orders", + (gogoproto.moretags) = "yaml:\"orders\"" + ]; + repeated Lease leases = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "leases", + (gogoproto.moretags) = "yaml:\"leases\"" + ]; + + Params params = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/node/akash/market/v1beta3/lease.proto b/proto/node/akash/market/v1beta3/lease.proto new file mode 100644 index 00000000..023d28ff --- /dev/null +++ b/proto/node/akash/market/v1beta3/lease.proto @@ -0,0 +1,164 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "akash/market/v1beta3/bid.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// LeaseID stores bid details of lease +message LeaseID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\"" + ]; + string provider = 5 [ + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; +} + +// Lease stores LeaseID, state of lease and price +message Lease { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + LeaseID lease_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of lease + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [ + (gogoproto.enumvalue_customname) = "LeaseStateInvalid" + ]; + // LeaseActive denotes state for lease active + active = 1 [ + (gogoproto.enumvalue_customname) = "LeaseActive" + ]; + // LeaseInsufficientFunds denotes state for lease insufficient_funds + insufficient_funds = 2 [ + (gogoproto.enumvalue_customname) = "LeaseInsufficientFunds" + ]; + // LeaseClosed denotes state for lease closed + closed = 3 [ + (gogoproto.enumvalue_customname) = "LeaseClosed" + ]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; + int64 created_at = 4; + int64 closed_on = 5; +} + +// LeaseFilters defines flags for lease list filter +message LeaseFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\"" + ]; + string provider = 5 [ + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; + string state = 6 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} + +// MsgCreateLease is sent to create a lease +message MsgCreateLease { + option (gogoproto.equal) = false; + + BidID bid_id = 1 [ + (gogoproto.customname) = "BidID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCreateLeaseResponse is the response from creating a lease +message MsgCreateLeaseResponse {} + +// MsgWithdrawLease defines an SDK message for closing bid +message MsgWithdrawLease { + option (gogoproto.equal) = false; + + LeaseID bid_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. +message MsgWithdrawLeaseResponse {} + + +// MsgCloseLease defines an SDK message for closing order +message MsgCloseLease { + option (gogoproto.equal) = false; + + LeaseID lease_id = 1 [ + (gogoproto.customname) = "LeaseID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseLeaseResponse defines the Msg/CloseLease response type. +message MsgCloseLeaseResponse {} diff --git a/proto/node/akash/market/v1beta3/order.proto b/proto/node/akash/market/v1beta3/order.proto new file mode 100644 index 00000000..e019bf0e --- /dev/null +++ b/proto/node/akash/market/v1beta3/order.proto @@ -0,0 +1,101 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta3/groupspec.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// OrderID stores owner and all other seq numbers +message OrderID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\"" + ]; +} + +// Order stores orderID, state of order and other details +message Order { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + OrderID order_id = 1 [ + (gogoproto.customname) = "OrderID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + // State is an enum which refers to state of order + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + invalid = 0 [(gogoproto.enumvalue_customname) = "OrderStateInvalid"]; + // OrderOpen denotes state for order open + open = 1 [(gogoproto.enumvalue_customname) = "OrderOpen"]; + // OrderMatched denotes state for order matched + active = 2 [(gogoproto.enumvalue_customname) = "OrderActive"]; + // OrderClosed denotes state for order lost + closed = 3 [(gogoproto.enumvalue_customname) = "OrderClosed"]; + } + + State state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + akash.deployment.v1beta3.GroupSpec spec = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spec", + (gogoproto.moretags) = "yaml:\"spec\"" + ]; + + int64 created_at = 4; +} + +// OrderFilters defines flags for order list filter +message OrderFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + uint64 dseq = 2 [ + (gogoproto.customname) = "DSeq", + (gogoproto.jsontag) = "dseq", + (gogoproto.moretags) = "yaml:\"dseq\"" + ]; + uint32 gseq = 3 [ + (gogoproto.customname) = "GSeq", + (gogoproto.jsontag) = "gseq", + (gogoproto.moretags) = "yaml:\"gseq\"" + ]; + uint32 oseq = 4 [ + (gogoproto.customname) = "OSeq", + (gogoproto.jsontag) = "oseq", + (gogoproto.moretags) = "yaml:\"oseq\"" + ]; + string state = 5 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} diff --git a/proto/node/akash/market/v1beta3/params.proto b/proto/node/akash/market/v1beta3/params.proto new file mode 100644 index 00000000..d0e2bf34 --- /dev/null +++ b/proto/node/akash/market/v1beta3/params.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// Params is the params for the x/market module +message Params { + cosmos.base.v1beta1.Coin bid_min_deposit = 1 [ + (gogoproto.customname) = "BidMinDeposit", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "bid_min_deposit", + (gogoproto.moretags) = "yaml:\"bid_min_deposit\"" + ]; + uint32 order_max_bids = 2 [ + (gogoproto.customname) = "OrderMaxBids", + (gogoproto.jsontag) = "order_max_bids", + (gogoproto.moretags) = "yaml:\"order_max_bids\"" + ]; +} diff --git a/proto/node/akash/market/v1beta3/query.proto b/proto/node/akash/market/v1beta3/query.proto new file mode 100644 index 00000000..a42b973b --- /dev/null +++ b/proto/node/akash/market/v1beta3/query.proto @@ -0,0 +1,147 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/market/v1beta3/order.proto"; +import "akash/market/v1beta3/bid.proto"; +import "akash/market/v1beta3/lease.proto"; +import "akash/escrow/v1beta3/types.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // Orders queries orders with filters + rpc Orders(QueryOrdersRequest) returns (QueryOrdersResponse) { + option (google.api.http).get = "/akash/market/v1beta3/orders/list"; + } + + // Order queries order details + rpc Order(QueryOrderRequest) returns (QueryOrderResponse) { + option (google.api.http).get = "/akash/market/v1beta3/orders/info"; + } + + // Bids queries bids with filters + rpc Bids(QueryBidsRequest) returns (QueryBidsResponse) { + option (google.api.http).get = "/akash/market/v1beta3/bids/list"; + } + + // Bid queries bid details + rpc Bid(QueryBidRequest) returns (QueryBidResponse) { + option (google.api.http).get = "/akash/market/v1beta3/bids/info"; + } + + // Leases queries leases with filters + rpc Leases(QueryLeasesRequest) returns (QueryLeasesResponse) { + option (google.api.http).get = "/akash/market/v1beta3/leases/list"; + } + + // Lease queries lease details + rpc Lease(QueryLeaseRequest) returns (QueryLeaseResponse) { + option (google.api.http).get = "/akash/market/v1beta3/leases/info"; + } +} + +// QueryOrdersRequest is request type for the Query/Orders RPC method +message QueryOrdersRequest { + OrderFilters filters = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryOrdersResponse is response type for the Query/Orders RPC method +message QueryOrdersResponse { + repeated Order orders = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Orders" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryOrderRequest is request type for the Query/Order RPC method +message QueryOrderRequest { + OrderID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID" + ]; +} + +// QueryOrderResponse is response type for the Query/Order RPC method +message QueryOrderResponse { + Order order = 1 [ + (gogoproto.nullable) = false + ]; +} + +// QueryBidsRequest is request type for the Query/Bids RPC method +message QueryBidsRequest { + BidFilters filters = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryBidsResponse is response type for the Query/Bids RPC method +message QueryBidsResponse { + repeated QueryBidResponse bids = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryBidRequest is request type for the Query/Bid RPC method +message QueryBidRequest { + BidID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID" + ]; +} + +// QueryBidResponse is response type for the Query/Bid RPC method +message QueryBidResponse { + Bid bid = 1 [(gogoproto.nullable) = false]; + akash.escrow.v1beta3.Account escrow_account = 2 [ + (gogoproto.nullable) = false + ]; +} + +// QueryLeasesRequest is request type for the Query/Leases RPC method +message QueryLeasesRequest { + LeaseFilters filters = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryLeasesResponse is response type for the Query/Leases RPC method +message QueryLeasesResponse { + repeated QueryLeaseResponse leases = 1 [ + (gogoproto.nullable) = false + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryLeaseRequest is request type for the Query/Lease RPC method +message QueryLeaseRequest { + LeaseID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID" + ]; +} + +// QueryLeaseResponse is response type for the Query/Lease RPC method +message QueryLeaseResponse { + Lease lease = 1 [(gogoproto.nullable) = false]; + akash.escrow.v1beta3.FractionalPayment escrow_payment = 2 [ + (gogoproto.nullable) = false + ]; +} diff --git a/proto/node/akash/market/v1beta3/service.proto b/proto/node/akash/market/v1beta3/service.proto new file mode 100644 index 00000000..80fd62a1 --- /dev/null +++ b/proto/node/akash/market/v1beta3/service.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package akash.market.v1beta3; + +import "akash/market/v1beta3/bid.proto"; +import "akash/market/v1beta3/lease.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta3"; + +// Msg defines the market Msg service +service Msg { + // CreateBid defines a method to create a bid given proper inputs. + rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse); + + // CloseBid defines a method to close a bid given proper inputs. + rpc CloseBid(MsgCloseBid) returns (MsgCloseBidResponse); + + // WithdrawLease withdraws accrued funds from the lease payment + rpc WithdrawLease(MsgWithdrawLease) returns (MsgWithdrawLeaseResponse); + + // CreateLease creates a new lease + rpc CreateLease(MsgCreateLease) returns (MsgCreateLeaseResponse); + + // CloseLease defines a method to close an order given proper inputs. + rpc CloseLease(MsgCloseLease) returns (MsgCloseLeaseResponse); +} diff --git a/proto/node/akash/provider/v1beta1/provider.proto b/proto/node/akash/provider/v1beta1/provider.proto new file mode 100644 index 00000000..7b82effe --- /dev/null +++ b/proto/node/akash/provider/v1beta1/provider.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package akash.provider.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta1"; + +// Msg defines the provider Msg service +service Msg { + // CreateProvider defines a method that creates a provider given the proper inputs + rpc CreateProvider(MsgCreateProvider) returns (MsgCreateProviderResponse); + + // UpdateProvider defines a method that updates a provider given the proper inputs + rpc UpdateProvider(MsgUpdateProvider) returns (MsgUpdateProviderResponse); + + // DeleteProvider defines a method that deletes a provider given the proper inputs + rpc DeleteProvider(MsgDeleteProvider) returns (MsgDeleteProviderResponse); +} + +// ProviderInfo +message ProviderInfo { + string email = 1 [ + (gogoproto.customname) = "EMail", + (gogoproto.jsontag) = "email", + (gogoproto.moretags) = "yaml:\"email\"" + ]; + string website = 2 [ + (gogoproto.jsontag) = "website", + (gogoproto.moretags) = "yaml:\"website\"" + ]; +} + +// MsgCreateProvider defines an SDK message for creating a provider +message MsgCreateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +message MsgCreateProviderResponse {} + +// MsgUpdateProvider defines an SDK message for updating a provider +message MsgUpdateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +message MsgUpdateProviderResponse {} + +// MsgDeleteProvider defines an SDK message for deleting a provider +message MsgDeleteProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +message MsgDeleteProviderResponse {} + +// Provider stores owner and host details +message Provider { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} diff --git a/proto/node/akash/provider/v1beta2/genesis.proto b/proto/node/akash/provider/v1beta2/genesis.proto new file mode 100644 index 00000000..c2718c8d --- /dev/null +++ b/proto/node/akash/provider/v1beta2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/provider/v1beta2/provider.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta2"; + +// GenesisState defines the basic genesis state used by provider module +message GenesisState { + repeated Provider providers = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "providers", + (gogoproto.moretags) = "yaml:\"providers\"" + ]; +} diff --git a/proto/node/akash/provider/v1beta2/provider.proto b/proto/node/akash/provider/v1beta2/provider.proto new file mode 100644 index 00000000..01344ab7 --- /dev/null +++ b/proto/node/akash/provider/v1beta2/provider.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta2"; + +// Msg defines the provider Msg service +service Msg { + // CreateProvider defines a method that creates a provider given the proper inputs + rpc CreateProvider(MsgCreateProvider) returns (MsgCreateProviderResponse); + + // UpdateProvider defines a method that updates a provider given the proper inputs + rpc UpdateProvider(MsgUpdateProvider) returns (MsgUpdateProviderResponse); + + // DeleteProvider defines a method that deletes a provider given the proper inputs + rpc DeleteProvider(MsgDeleteProvider) returns (MsgDeleteProviderResponse); +} + +// ProviderInfo +message ProviderInfo { + string email = 1 [ + (gogoproto.customname) = "EMail", + (gogoproto.jsontag) = "email", + (gogoproto.moretags) = "yaml:\"email\"" + ]; + string website = 2 [ + (gogoproto.jsontag) = "website", + (gogoproto.moretags) = "yaml:\"website\"" + ]; +} + +// MsgCreateProvider defines an SDK message for creating a provider +message MsgCreateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta2.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +message MsgCreateProviderResponse {} + +// MsgUpdateProvider defines an SDK message for updating a provider +message MsgUpdateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta2.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +message MsgUpdateProviderResponse {} + +// MsgDeleteProvider defines an SDK message for deleting a provider +message MsgDeleteProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +message MsgDeleteProviderResponse {} + +// Provider stores owner and host details +message Provider { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta2.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta2.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} diff --git a/proto/node/akash/provider/v1beta2/query.proto b/proto/node/akash/provider/v1beta2/query.proto new file mode 100644 index 00000000..5b4cc1a8 --- /dev/null +++ b/proto/node/akash/provider/v1beta2/query.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/provider/v1beta2/provider.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // Providers queries providers + rpc Providers(QueryProvidersRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/provider/v1beta2/providers"; + } + + // Provider queries provider details + rpc Provider(QueryProviderRequest) returns (QueryProviderResponse) { + option (google.api.http).get = "/akash/provider/v1beta2/providers/{owner}"; + } +} + +// QueryProvidersRequest is request type for the Query/Providers RPC method +message QueryProvidersRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryProvidersResponse { + repeated Provider providers = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Providers"]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +message QueryProviderRequest { + string owner = 1; +} + +// QueryProviderResponse is response type for the Query/Provider RPC method +message QueryProviderResponse { + Provider provider = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/node/akash/provider/v1beta3/genesis.proto b/proto/node/akash/provider/v1beta3/genesis.proto new file mode 100644 index 00000000..703f215e --- /dev/null +++ b/proto/node/akash/provider/v1beta3/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.provider.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/provider/v1beta3/provider.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta3"; + +// GenesisState defines the basic genesis state used by provider module +message GenesisState { + repeated Provider providers = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "providers", + (gogoproto.moretags) = "yaml:\"providers\"" + ]; +} diff --git a/proto/node/akash/provider/v1beta3/provider.proto b/proto/node/akash/provider/v1beta3/provider.proto new file mode 100644 index 00000000..693a42f6 --- /dev/null +++ b/proto/node/akash/provider/v1beta3/provider.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package akash.provider.v1beta3; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta3/attribute.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta3"; + +// Msg defines the provider Msg service +service Msg { + // CreateProvider defines a method that creates a provider given the proper inputs + rpc CreateProvider(MsgCreateProvider) returns (MsgCreateProviderResponse); + + // UpdateProvider defines a method that updates a provider given the proper inputs + rpc UpdateProvider(MsgUpdateProvider) returns (MsgUpdateProviderResponse); + + // DeleteProvider defines a method that deletes a provider given the proper inputs + rpc DeleteProvider(MsgDeleteProvider) returns (MsgDeleteProviderResponse); +} + +// ProviderInfo +message ProviderInfo { + string email = 1 [ + (gogoproto.customname) = "EMail", + (gogoproto.jsontag) = "email", + (gogoproto.moretags) = "yaml:\"email\"" + ]; + string website = 2 [ + (gogoproto.jsontag) = "website", + (gogoproto.moretags) = "yaml:\"website\"" + ]; +} + +// MsgCreateProvider defines an SDK message for creating a provider +message MsgCreateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgCreateProviderResponse defines the Msg/CreateProvider response type. +message MsgCreateProviderResponse {} + +// MsgUpdateProvider defines an SDK message for updating a provider +message MsgUpdateProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} + +// MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. +message MsgUpdateProviderResponse {} + +// MsgDeleteProvider defines an SDK message for deleting a provider +message MsgDeleteProvider { + option (gogoproto.equal) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +message MsgDeleteProviderResponse {} + +// Provider stores owner and host details +message Provider { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; + string host_uri = 2 [ + (gogoproto.customname) = "HostURI", + (gogoproto.jsontag) = "host_uri", + (gogoproto.moretags) = "yaml:\"host_uri\"" + ]; + repeated akash.base.v1beta3.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + ProviderInfo info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "info", + (gogoproto.moretags) = "yaml:\"info\"" + ]; +} diff --git a/proto/node/akash/provider/v1beta3/query.proto b/proto/node/akash/provider/v1beta3/query.proto new file mode 100644 index 00000000..87a2e423 --- /dev/null +++ b/proto/node/akash/provider/v1beta3/query.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package akash.provider.v1beta3; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/provider/v1beta3/provider.proto"; + +option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta3"; + +// Query defines the gRPC querier service +service Query { + // Providers queries providers + rpc Providers(QueryProvidersRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/akash/provider/v1beta3/providers"; + } + + // Provider queries provider details + rpc Provider(QueryProviderRequest) returns (QueryProviderResponse) { + option (google.api.http).get = "/akash/provider/v1beta3/providers/{owner}"; + } +} + +// QueryProvidersRequest is request type for the Query/Providers RPC method +message QueryProvidersRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryProvidersResponse is response type for the Query/Providers RPC method +message QueryProvidersResponse { + repeated Provider providers = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Providers" + ]; + + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProviderRequest is request type for the Query/Provider RPC method +message QueryProviderRequest { + string owner = 1; +} + +// QueryProviderResponse is response type for the Query/Provider RPC method +message QueryProviderResponse { + Provider provider = 1 [ + (gogoproto.nullable) = false + ]; +} diff --git a/proto/node/buf.lock b/proto/node/buf.lock new file mode 100644 index 00000000..c91b5810 --- /dev/null +++ b/proto/node/buf.lock @@ -0,0 +1,2 @@ +# Generated by buf. DO NOT EDIT. +version: v1 diff --git a/proto/node/buf.yaml b/proto/node/buf.yaml new file mode 100644 index 00000000..64c72267 --- /dev/null +++ b/proto/node/buf.yaml @@ -0,0 +1,42 @@ +# This module represents buf.build/akash-network/node +version: v1 +name: buf.build/akash-network/node +#deps: +# - buf.build/cosmos/cosmos-proto +# - buf.build/cosmos/cosmos-sdk +# - buf.build/cosmos/gogo-proto +# - buf.build/googleapis/googleapis +breaking: + use: + - FILE +lint: + allow_comment_ignores: true + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - ENUM_VALUE_PREFIX + - ENUM_VALUE_UPPER_SNAKE_CASE + - ENUM_ZERO_VALUE_SUFFIX + - RPC_REQUEST_STANDARD_NAME + ignore: + - akash/audit/v1beta1/ + - akash/audit/v1beta2/ + - akash/base/v1beta1 + - akash/base/v1beta2 + - akash/cert/v1beta1 + - akash/cert/v1beta2 + - akash/escrow/v1beta1 + - akash/escrow/v1beta2 + - akash/inflation/v1beta1 + - akash/inflation/v1beta2 + - akash/market/v1beta1 + - akash/market/v1beta2 + - akash/deployment/v1beta1 + - akash/deployment/v1beta2 + - akash/provider/v1beta1 + - akash/provider/v1beta2 diff --git a/proto/provider/akash/manifest/v2beta2/group.proto b/proto/provider/akash/manifest/v2beta2/group.proto new file mode 100644 index 00000000..651a9f0f --- /dev/null +++ b/proto/provider/akash/manifest/v2beta2/group.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package akash.manifest.v2beta2; + +import "gogoproto/gogo.proto"; +import "akash/manifest/v2beta2/service.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2"; + +// Group store name and list of services +message Group { + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + repeated Service services = 2 [ + (gogoproto.jsontag) = "services", + (gogoproto.moretags) = "yaml:\"services\"" + ]; +} diff --git a/proto/provider/akash/manifest/v2beta2/httpoptions.proto b/proto/provider/akash/manifest/v2beta2/httpoptions.proto new file mode 100644 index 00000000..919080fb --- /dev/null +++ b/proto/provider/akash/manifest/v2beta2/httpoptions.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package akash.manifest.v2beta2; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2"; + +// ServiceExposeHTTPOptions +message ServiceExposeHTTPOptions { + uint32 max_body_size = 1 [ + (gogoproto.jsontag) = "maxBodySize", + (gogoproto.moretags) = "yaml:\"maxBodySize\"" + ]; + uint32 read_timeout = 2 [ + (gogoproto.jsontag) = "readTimeout", + (gogoproto.moretags) = "yaml:\"readTimeout\"" + ]; + uint32 send_timeout = 3 [ + (gogoproto.jsontag) = "sendTimeout", + (gogoproto.moretags) = "yaml:\"sendTimeout\"" + ]; + uint32 next_tries = 4 [ + (gogoproto.jsontag) = "nextTries", + (gogoproto.moretags) = "yaml:\"nextTries\"" + ]; + uint32 next_timeout = 5 [ + (gogoproto.jsontag) = "nextTimeout", + (gogoproto.moretags) = "yaml:\"nextTimeout\"" + ]; + repeated string next_cases = 6 [ + (gogoproto.jsontag) = "nextCases", + (gogoproto.moretags) = "yaml:\"nextCases\"" + ]; +} diff --git a/proto/provider/akash/manifest/v2beta2/service.proto b/proto/provider/akash/manifest/v2beta2/service.proto new file mode 100644 index 00000000..e81b6c69 --- /dev/null +++ b/proto/provider/akash/manifest/v2beta2/service.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package akash.manifest.v2beta2; + +import "gogoproto/gogo.proto"; +import "akash/manifest/v2beta2/serviceexpose.proto"; +import "akash/base/v1beta3/resourceunits.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2"; + +// StorageParams +message StorageParams { + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + string mount = 2 [ + (gogoproto.jsontag) = "mount", + (gogoproto.moretags) = "yaml:\"mount\"" + ]; + bool read_only = 3 [ + (gogoproto.jsontag) = "readOnly", + (gogoproto.moretags) = "yaml:\"readOnly\"" + ]; +} + +// ServiceParams +message ServiceParams { + repeated StorageParams storage = 1 [ + (gogoproto.jsontag) = "storage", + (gogoproto.moretags) = "yaml:\"storage\"" + ]; +} + +// Service stores name, image, args, env, unit, count and expose list of service +message Service { + string name = 1 [ + (gogoproto.jsontag) = "name", + (gogoproto.moretags) = "yaml:\"name\"" + ]; + string image = 2 [ + (gogoproto.jsontag) = "image", + (gogoproto.moretags) = "yaml:\"image\"" + ]; + repeated string command = 3 [ + (gogoproto.jsontag) = "command", + (gogoproto.moretags) = "yaml:\"command\"" + ]; + string args = 4 [ + (gogoproto.jsontag) = "args", + (gogoproto.moretags) = "yaml:\"args\"" + ]; + repeated string env = 5 [ + (gogoproto.jsontag) = "env", + (gogoproto.moretags) = "yaml:\"env\"" + ]; + akash.base.v1beta3.ResourceUnits resources = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resources", + (gogoproto.moretags) = "yaml:\"resources\"" + ]; + uint32 count = 7 [ + (gogoproto.jsontag) = "count", + (gogoproto.moretags) = "yaml:\"count\"" + ]; + repeated ServiceExpose expose = 8 [ + (gogoproto.jsontag) = "expose", + (gogoproto.moretags) = "yaml:\"expose\"" + ]; + ServiceParams params = 9 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/proto/provider/akash/manifest/v2beta2/serviceexpose.proto b/proto/provider/akash/manifest/v2beta2/serviceexpose.proto new file mode 100644 index 00000000..fe5c39ba --- /dev/null +++ b/proto/provider/akash/manifest/v2beta2/serviceexpose.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; + +package akash.manifest.v2beta2; + +import "gogoproto/gogo.proto"; +import "akash/manifest/v2beta2/httpoptions.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta2"; + +// State is an enum which refers to state of deployment +enum ServiceProtocol { + option (gogoproto.goproto_enum_prefix) = false; + // invalid describes unsupported protocol + invalid = 0 [(gogoproto.enumvalue_customname) = "InvalidProtocol"]; + // tcp + tcp = 1 [(gogoproto.enumvalue_customname) = "TCP"]; + // udp + udp = 2 [(gogoproto.enumvalue_customname) = "UDP"]; +} + +// ServiceExpose stores exposed ports and hosts details +message ServiceExpose { + // port on the container + uint32 port = 1 [ + (gogoproto.jsontag) = "port", + (gogoproto.moretags) = "yaml:\"port\"" + ]; + // port on the service definition + uint32 external_port = 2 [ + (gogoproto.jsontag) = "externalPort", + (gogoproto.moretags) = "yaml:\"externalPort\"" + ]; + ServiceProtocol proto = 3 [ + (gogoproto.jsontag) = "proto", + (gogoproto.moretags) = "yaml:\"proto\"" + ]; + string service = 4 [ + (gogoproto.jsontag) = "service", + (gogoproto.moretags) = "yaml:\"service\"" + ]; + bool global = 5 [ + (gogoproto.jsontag) = "global", + (gogoproto.moretags) = "yaml:\"global\"" + ]; + repeated string hosts = 6 [ + (gogoproto.jsontag) = "hosts", + (gogoproto.moretags) = "yaml:\"hosts\"" + ]; + ServiceExposeHTTPOptions http_options = 7 [ + (gogoproto.jsontag) = "httpOptions", + (gogoproto.moretags) = "yaml:\"httpOptions\"" + ]; + // The name of the IP address associated with this, if any + string ip = 8 [ + (gogoproto.jsontag) = "ip", + (gogoproto.moretags) = "yaml:\"ip\"" + ]; + // The sequence number of the associated endpoint in the on-chain data + uint32 endpoint_sequence_number = 9 [ + (gogoproto.jsontag) = "endpointSequenceNumber", + (gogoproto.moretags) = "yaml:\"endpointSequenceNumber\"" + ]; +} diff --git a/proto/provider/buf.lock b/proto/provider/buf.lock new file mode 100644 index 00000000..c91b5810 --- /dev/null +++ b/proto/provider/buf.lock @@ -0,0 +1,2 @@ +# Generated by buf. DO NOT EDIT. +version: v1 diff --git a/proto/provider/buf.yaml b/proto/provider/buf.yaml new file mode 100644 index 00000000..b2aed941 --- /dev/null +++ b/proto/provider/buf.yaml @@ -0,0 +1,23 @@ +# This module represents buf.build/akash-network/manifest +version: v1 +name: buf.build/akash-network/manifest +#deps: +# - buf.build/cosmos/cosmos-proto +# - buf.build/cosmos/cosmos-sdk +# - buf.build/cosmos/gogo-proto +# - buf.build/googleapis/googleapis +lint: + allow_comment_ignores: true + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - ENUM_VALUE_PREFIX + - ENUM_VALUE_UPPER_SNAKE_CASE + - ENUM_ZERO_VALUE_SUFFIX + - RPC_REQUEST_STANDARD_NAME diff --git a/script/protoc-gen-swagger.sh b/script/protoc-gen-swagger.sh new file mode 100755 index 00000000..78e473fe --- /dev/null +++ b/script/protoc-gen-swagger.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -eo pipefail + +workdir=./.cache/tmp/swagger-gen + +function cleanup { + rm -rf "$workdir" +} + +# clean swagger files +trap cleanup EXIT + +proto_files=$(find ./proto -type f \( -name 'service.proto' -o -name "query.proto" \) -print0 | xargs -0 -n1 | sort | uniq) + +for file in $proto_files; do + buf generate --template buf.gen.swagger.yaml "$file" +done + +mkdir -p ./docs/swagger-ui + +# combine swagger files +# uses nodejs package `swagger-combine`. +# all the individual swagger files need to be configured in `config.json` for merging +swagger-combine ./docs/config.json -o ./docs/swagger-ui/swagger.yaml -f yaml --continueOnConflictingPaths true --includeDefinitions true diff --git a/script/protocgen.sh b/script/protocgen.sh new file mode 100755 index 00000000..7c05ab6e --- /dev/null +++ b/script/protocgen.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -eo pipefail + +PATH=$(pwd)/.cache/bin:$PATH +export PATH=$PATH + +function cleanup { + rm -rf github.com +} + +trap cleanup EXIT + +proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +#shellcheck disable=SC2046 +for dir in $proto_dirs; do + while IFS= read -r -d '' file; do + buf generate --template buf.gen.gogo.yaml "$file" + done < <(find "${dir}" -maxdepth 1 -name '*.proto' -print0) +done + +# move proto files to the right places +cp -rv github.com/akash-network/akash-api/* ./ diff --git a/tools.go b/tools.go new file mode 100644 index 00000000..883506b6 --- /dev/null +++ b/tools.go @@ -0,0 +1,24 @@ +//go:build tools +// +build tools + +package api + +import ( + _ "github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "github.com/cosmos/gogoproto/gogoreplace" + _ "github.com/cosmos/gogoproto/jsonpb" + _ "github.com/cosmos/gogoproto/protoc-gen-combo" + _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" + _ "github.com/cosmos/gogoproto/protoc-gen-gofast" + _ "github.com/cosmos/gogoproto/protoc-gen-gogo" + _ "github.com/cosmos/gogoproto/protoc-gen-gogofast" + _ "github.com/cosmos/gogoproto/protoc-gen-gogofaster" + _ "github.com/cosmos/gogoproto/protoc-gen-gogoslick" + _ "github.com/cosmos/gogoproto/protoc-gen-gogotypes" + _ "github.com/cosmos/gogoproto/protoc-gen-gostring" + _ "github.com/cosmos/gogoproto/protoc-min-version" + _ "github.com/grpc-ecosystem/grpc-gateway/runtime" + _ "google.golang.org/grpc" +)