diff --git a/.env b/.env index 991422c8..4d4524df 100644 --- a/.env +++ b/.env @@ -12,6 +12,7 @@ AKASH_TS_ROOT=${AKASH_ROOT}/ts AKASH_TS_PACKAGE_FILE=${AKASH_TS_ROOT}/package.json AKASH_TS_NODE_MODULES=${AKASH_TS_ROOT}/node_modules AKASH_TS_NODE_BIN=${AKASH_TS_NODE_MODULES}/.bin -AKASH_DEVCACHE_TS_TMP=${AKASH_DEVCACHE_BASE}/tmp/ts -AKASH_DEVCACHE_TS_TMP_GRPC_JS=${AKASH_DEVCACHE_TS_TMP}/generated-grpc-js -AKASH_DEVCACHE_TS_TMP_PATCHES=${AKASH_DEVCACHE_TS_TMP}/patches \ No newline at end of file +AKASH_DEVCACHE_TMP=${AKASH_DEVCACHE_BASE}/tmp +AKASH_DEVCACHE_TMP_TS=${AKASH_DEVCACHE_TMP}/ts +AKASH_DEVCACHE_TMP_TS_GRPC_JS=${AKASH_DEVCACHE_TMP_TS}/generated-grpc-js +AKASH_DEVCACHE_TMP_TS_PATCHES=${AKASH_DEVCACHE_TMP_TS}/patches diff --git a/.golangci.yaml b/.golangci.yaml index 4ac032c1..553bbc20 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -6,11 +6,11 @@ issues: # Skip generated k8s code run: - skip-dirs: + exclude-dirs: - "^go/node/types/v1beta1" - "^go/node/types/v1beta2" - "^go/node/market/v1beta3" - skip-files: + exclude-files: - "\\.pb\\.go$" - "\\.pb\\.gw\\.go$" # Skip vendor/ etc diff --git a/Makefile b/Makefile index d4b0a541..580a1573 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ UNAME_OS := $(shell uname -s) UNAME_ARCH := $(shell uname -m) -PROTO_LEGACY ?= true ifeq (0, $(shell id -u)) $(warning "make was started with superuser privileges. it may cause issues with direnv") @@ -24,23 +23,25 @@ ifeq (, $(GOTOOLCHAIN)) $(error "GOTOOLCHAIN is not set") endif +GO_PKG := go +TS_PKG := ts + GO := GO111MODULE=$(GO111MODULE) go -GO_MOD_NAME := $(shell go list -m 2>/dev/null) +GO_MOD_NAME := $(shell cd $(GO_PKG); go list -m 2>/dev/null) BUF_VERSION ?= 1.28.1 -PROTOC_VERSION ?= 21.12 -GOGOPROTO_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/gogoproto) -# TODO https://github.com/akash-network/support/issues/77 -PROTOC_GEN_GOCOSMOS_VERSION ?= $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/regen-network/cosmos-proto) -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_DOC_VERSION := $(shell $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/pseudomuto/protoc-gen-doc) +PROTOC_VERSION ?= 26.1 +GOGOPROTO_VERSION ?= $(shell cd $(GO_PKG); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/gogoproto) +PROTOC_GEN_GOCOSMOS_VERSION ?= $(GOGOPROTO_VERSION) +PROTOC_GEN_GO_PULSAR_VERSION ?= $(shell cd $(GO_PKG); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/cosmos/cosmos-proto) +PROTOC_GEN_GO_VERSION ?= $(shell cd $(GO_PKG); $(GO) list -mod=readonly -m -f '{{ .Version }}' google.golang.org/protobuf) +PROTOC_GEN_GRPC_GATEWAY_VERSION := $(shell cd $(GO_PKG); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/grpc-ecosystem/grpc-gateway) +PROTOC_GEN_DOC_VERSION := $(shell cd $(GO_PKG); $(GO) list -mod=readonly -m -f '{{ .Version }}' github.com/pseudomuto/protoc-gen-doc) PROTOC_GEN_SWAGGER_VERSION := $(PROTOC_GEN_GRPC_GATEWAY_VERSION) MODVENDOR_VERSION ?= v0.5.0 MOCKERY_VERSION ?= 2.42.0 -GOLANGCI_LINT_VERSION ?= v1.56.1 +GOLANGCI_LINT_VERSION ?= v1.58.0 BUF_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/buf/$(BUF_VERSION) PROTOC_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/protoc/$(PROTOC_VERSION) @@ -58,8 +59,8 @@ GOLANGCI_LINT_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/golangci-lint BUF := $(AKASH_DEVCACHE_BIN)/buf PROTOC := $(AKASH_DEVCACHE_BIN)/protoc -# TODO https://github.com/akash-network/support/issues/77 -PROTOC_GEN_GOCOSMOS := $(AKASH_DEVCACHE_BIN)/legacy/protoc-gen-gocosmos +PROTOC_GEN_GOCOSMOS := $(AKASH_DEVCACHE_BIN)/protoc-gen-gocosmos +GOGOPROTO := $(AKASH_DEVCACHE_BIN)/gogoproto 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 diff --git a/buf.gen.gogo.yaml b/buf.gen.go.yaml similarity index 100% rename from buf.gen.gogo.yaml rename to buf.gen.go.yaml diff --git a/buf.gen.ts.yaml b/buf.gen.ts.yaml new file mode 100644 index 00000000..a7903f0b --- /dev/null +++ b/buf.gen.ts.yaml @@ -0,0 +1,6 @@ +version: v1 +plugins: + - name: ts + out: ./ts/src/generated + strategy: all + path: ./ts/node_modules/.bin/protoc-gen-ts_proto diff --git a/buf.work.yaml b/buf.work.yaml index b72eb84b..513a0f47 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -3,5 +3,3 @@ directories: - proto/node - proto/provider - .cache/include - - vendor/github.com/cosmos/cosmos-sdk/proto - - vendor/github.com/cosmos/cosmos-sdk/third_party/proto diff --git a/docs/config.yaml b/docs/config.yaml index 36dd3f8d..ef37639f 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -4,13 +4,13 @@ info: description: "A REST interface for state queries" 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: "./.cache/tmp/swagger-gen/akash/audit/v1/query.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/cert/v1/query.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/deployment/v1beta4/query.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/deployment/v1beta4/service.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/market/v1beta5/query.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/market/v1beta5/service.swagger.json" + - url: "./.cache/tmp/swagger-gen/akash/provider/v1beta4/query.swagger.json" - url: "./vendor/github.com/cosmos/cosmos-sdk/client/docs/swagger-ui/swagger.yaml" dereference: circular: "ignore" diff --git a/docs/proto/node.md b/docs/proto/node.md index bbeedbc7..0c733118 100644 --- a/docs/proto/node.md +++ b/docs/proto/node.md @@ -4,189 +4,135 @@ ## Table of Contents - - [akash/discovery/v1/client_info.proto](#akash/discovery/v1/client_info.proto) - - [ClientInfo](#akash.discovery.v1.ClientInfo) - - - [akash/discovery/v1/akash.proto](#akash/discovery/v1/akash.proto) - - [Akash](#akash.discovery.v1.Akash) - - - [akash/provider/v1beta4/query.proto](#akash/provider/v1beta4/query.proto) - - [QueryProviderRequest](#akash.provider.v1beta4.QueryProviderRequest) - - [QueryProviderResponse](#akash.provider.v1beta4.QueryProviderResponse) - - [QueryProvidersRequest](#akash.provider.v1beta4.QueryProvidersRequest) - - [QueryProvidersResponse](#akash.provider.v1beta4.QueryProvidersResponse) - - - [Query](#akash.provider.v1beta4.Query) + - [akash/base/attributes/v1/attribute.proto](#akash/base/attributes/v1/attribute.proto) + - [Attribute](#akash.base.attributes.v1.Attribute) + - [PlacementRequirements](#akash.base.attributes.v1.PlacementRequirements) + - [SignedBy](#akash.base.attributes.v1.SignedBy) - - [akash/provider/v1beta4/genesis.proto](#akash/provider/v1beta4/genesis.proto) - - [GenesisState](#akash.provider.v1beta4.GenesisState) + - [akash/audit/v1/audit.proto](#akash/audit/v1/audit.proto) + - [AttributesFilters](#akash.audit.v1.AttributesFilters) + - [AttributesResponse](#akash.audit.v1.AttributesResponse) + - [AuditedAttributes](#akash.audit.v1.AuditedAttributes) + - [Provider](#akash.audit.v1.Provider) - - [akash/provider/v1beta4/provider.proto](#akash/provider/v1beta4/provider.proto) - - [MsgCreateProvider](#akash.provider.v1beta4.MsgCreateProvider) - - [MsgCreateProviderResponse](#akash.provider.v1beta4.MsgCreateProviderResponse) - - [MsgDeleteProvider](#akash.provider.v1beta4.MsgDeleteProvider) - - [MsgDeleteProviderResponse](#akash.provider.v1beta4.MsgDeleteProviderResponse) - - [MsgUpdateProvider](#akash.provider.v1beta4.MsgUpdateProvider) - - [MsgUpdateProviderResponse](#akash.provider.v1beta4.MsgUpdateProviderResponse) - - [Provider](#akash.provider.v1beta4.Provider) - - [ProviderInfo](#akash.provider.v1beta4.ProviderInfo) + - [akash/audit/v1/genesis.proto](#akash/audit/v1/genesis.proto) + - [GenesisState](#akash.audit.v1.GenesisState) - - [Msg](#akash.provider.v1beta4.Msg) + - [akash/audit/v1/msg.proto](#akash/audit/v1/msg.proto) + - [MsgDeleteProviderAttributes](#akash.audit.v1.MsgDeleteProviderAttributes) + - [MsgDeleteProviderAttributesResponse](#akash.audit.v1.MsgDeleteProviderAttributesResponse) + - [MsgSignProviderAttributes](#akash.audit.v1.MsgSignProviderAttributes) + - [MsgSignProviderAttributesResponse](#akash.audit.v1.MsgSignProviderAttributesResponse) - - [akash/provider/v1beta3/query.proto](#akash/provider/v1beta3/query.proto) - - [QueryProviderRequest](#akash.provider.v1beta3.QueryProviderRequest) - - [QueryProviderResponse](#akash.provider.v1beta3.QueryProviderResponse) - - [QueryProvidersRequest](#akash.provider.v1beta3.QueryProvidersRequest) - - [QueryProvidersResponse](#akash.provider.v1beta3.QueryProvidersResponse) + - [akash/audit/v1/query.proto](#akash/audit/v1/query.proto) + - [QueryAllProvidersAttributesRequest](#akash.audit.v1.QueryAllProvidersAttributesRequest) + - [QueryAuditorAttributesRequest](#akash.audit.v1.QueryAuditorAttributesRequest) + - [QueryProviderAttributesRequest](#akash.audit.v1.QueryProviderAttributesRequest) + - [QueryProviderAuditorRequest](#akash.audit.v1.QueryProviderAuditorRequest) + - [QueryProviderRequest](#akash.audit.v1.QueryProviderRequest) + - [QueryProvidersResponse](#akash.audit.v1.QueryProvidersResponse) - - [Query](#akash.provider.v1beta3.Query) + - [Query](#akash.audit.v1.Query) - - [akash/provider/v1beta3/genesis.proto](#akash/provider/v1beta3/genesis.proto) - - [GenesisState](#akash.provider.v1beta3.GenesisState) + - [akash/audit/v1/service.proto](#akash/audit/v1/service.proto) + - [Msg](#akash.audit.v1.Msg) - - [akash/provider/v1beta3/provider.proto](#akash/provider/v1beta3/provider.proto) - - [MsgCreateProvider](#akash.provider.v1beta3.MsgCreateProvider) - - [MsgCreateProviderResponse](#akash.provider.v1beta3.MsgCreateProviderResponse) - - [MsgDeleteProvider](#akash.provider.v1beta3.MsgDeleteProvider) - - [MsgDeleteProviderResponse](#akash.provider.v1beta3.MsgDeleteProviderResponse) - - [MsgUpdateProvider](#akash.provider.v1beta3.MsgUpdateProvider) - - [MsgUpdateProviderResponse](#akash.provider.v1beta3.MsgUpdateProviderResponse) - - [Provider](#akash.provider.v1beta3.Provider) - - [ProviderInfo](#akash.provider.v1beta3.ProviderInfo) + - [akash/base/resources/v1beta4/resourcevalue.proto](#akash/base/resources/v1beta4/resourcevalue.proto) + - [ResourceValue](#akash.base.resources.v1beta4.ResourceValue) - - [Msg](#akash.provider.v1beta3.Msg) + - [akash/base/resources/v1beta4/cpu.proto](#akash/base/resources/v1beta4/cpu.proto) + - [CPU](#akash.base.resources.v1beta4.CPU) - - [akash/provider/v1beta2/query.proto](#akash/provider/v1beta2/query.proto) - - [QueryProviderRequest](#akash.provider.v1beta2.QueryProviderRequest) - - [QueryProviderResponse](#akash.provider.v1beta2.QueryProviderResponse) - - [QueryProvidersRequest](#akash.provider.v1beta2.QueryProvidersRequest) - - [QueryProvidersResponse](#akash.provider.v1beta2.QueryProvidersResponse) + - [akash/base/resources/v1beta4/endpoint.proto](#akash/base/resources/v1beta4/endpoint.proto) + - [Endpoint](#akash.base.resources.v1beta4.Endpoint) - - [Query](#akash.provider.v1beta2.Query) + - [Endpoint.Kind](#akash.base.resources.v1beta4.Endpoint.Kind) - - [akash/provider/v1beta2/genesis.proto](#akash/provider/v1beta2/genesis.proto) - - [GenesisState](#akash.provider.v1beta2.GenesisState) + - [akash/base/resources/v1beta4/gpu.proto](#akash/base/resources/v1beta4/gpu.proto) + - [GPU](#akash.base.resources.v1beta4.GPU) - - [akash/provider/v1beta2/provider.proto](#akash/provider/v1beta2/provider.proto) - - [MsgCreateProvider](#akash.provider.v1beta2.MsgCreateProvider) - - [MsgCreateProviderResponse](#akash.provider.v1beta2.MsgCreateProviderResponse) - - [MsgDeleteProvider](#akash.provider.v1beta2.MsgDeleteProvider) - - [MsgDeleteProviderResponse](#akash.provider.v1beta2.MsgDeleteProviderResponse) - - [MsgUpdateProvider](#akash.provider.v1beta2.MsgUpdateProvider) - - [MsgUpdateProviderResponse](#akash.provider.v1beta2.MsgUpdateProviderResponse) - - [Provider](#akash.provider.v1beta2.Provider) - - [ProviderInfo](#akash.provider.v1beta2.ProviderInfo) + - [akash/base/resources/v1beta4/memory.proto](#akash/base/resources/v1beta4/memory.proto) + - [Memory](#akash.base.resources.v1beta4.Memory) - - [Msg](#akash.provider.v1beta2.Msg) + - [akash/base/resources/v1beta4/storage.proto](#akash/base/resources/v1beta4/storage.proto) + - [Storage](#akash.base.resources.v1beta4.Storage) - - [akash/provider/v1beta1/provider.proto](#akash/provider/v1beta1/provider.proto) - - [MsgCreateProvider](#akash.provider.v1beta1.MsgCreateProvider) - - [MsgCreateProviderResponse](#akash.provider.v1beta1.MsgCreateProviderResponse) - - [MsgDeleteProvider](#akash.provider.v1beta1.MsgDeleteProvider) - - [MsgDeleteProviderResponse](#akash.provider.v1beta1.MsgDeleteProviderResponse) - - [MsgUpdateProvider](#akash.provider.v1beta1.MsgUpdateProvider) - - [MsgUpdateProviderResponse](#akash.provider.v1beta1.MsgUpdateProviderResponse) - - [Provider](#akash.provider.v1beta1.Provider) - - [ProviderInfo](#akash.provider.v1beta1.ProviderInfo) + - [akash/base/resources/v1beta4/resources.proto](#akash/base/resources/v1beta4/resources.proto) + - [Resources](#akash.base.resources.v1beta4.Resources) - - [Msg](#akash.provider.v1beta1.Msg) + - [akash/cert/v1/cert.proto](#akash/cert/v1/cert.proto) + - [Certificate](#akash.cert.v1.Certificate) + - [ID](#akash.cert.v1.ID) - - [akash/audit/v1beta4/audit.proto](#akash/audit/v1beta4/audit.proto) - - [AttributesFilters](#akash.audit.v1beta4.AttributesFilters) - - [AttributesResponse](#akash.audit.v1beta4.AttributesResponse) - - [AuditedAttributes](#akash.audit.v1beta4.AuditedAttributes) - - [MsgDeleteProviderAttributes](#akash.audit.v1beta4.MsgDeleteProviderAttributes) - - [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta4.MsgDeleteProviderAttributesResponse) - - [MsgSignProviderAttributes](#akash.audit.v1beta4.MsgSignProviderAttributes) - - [MsgSignProviderAttributesResponse](#akash.audit.v1beta4.MsgSignProviderAttributesResponse) - - [Provider](#akash.audit.v1beta4.Provider) + - [State](#akash.cert.v1.State) - - [Msg](#akash.audit.v1beta4.Msg) + - [akash/cert/v1/filters.proto](#akash/cert/v1/filters.proto) + - [CertificateFilter](#akash.cert.v1.CertificateFilter) - - [akash/audit/v1beta4/query.proto](#akash/audit/v1beta4/query.proto) - - [QueryAllProvidersAttributesRequest](#akash.audit.v1beta4.QueryAllProvidersAttributesRequest) - - [QueryAuditorAttributesRequest](#akash.audit.v1beta4.QueryAuditorAttributesRequest) - - [QueryProviderAttributesRequest](#akash.audit.v1beta4.QueryProviderAttributesRequest) - - [QueryProviderAuditorRequest](#akash.audit.v1beta4.QueryProviderAuditorRequest) - - [QueryProviderRequest](#akash.audit.v1beta4.QueryProviderRequest) - - [QueryProvidersResponse](#akash.audit.v1beta4.QueryProvidersResponse) + - [akash/cert/v1/genesis.proto](#akash/cert/v1/genesis.proto) + - [GenesisCertificate](#akash.cert.v1.GenesisCertificate) + - [GenesisState](#akash.cert.v1.GenesisState) - - [Query](#akash.audit.v1beta4.Query) + - [akash/cert/v1/msg.proto](#akash/cert/v1/msg.proto) + - [MsgCreateCertificate](#akash.cert.v1.MsgCreateCertificate) + - [MsgCreateCertificateResponse](#akash.cert.v1.MsgCreateCertificateResponse) + - [MsgRevokeCertificate](#akash.cert.v1.MsgRevokeCertificate) + - [MsgRevokeCertificateResponse](#akash.cert.v1.MsgRevokeCertificateResponse) - - [akash/audit/v1beta4/genesis.proto](#akash/audit/v1beta4/genesis.proto) - - [GenesisState](#akash.audit.v1beta4.GenesisState) + - [akash/cert/v1/query.proto](#akash/cert/v1/query.proto) + - [CertificateResponse](#akash.cert.v1.CertificateResponse) + - [QueryCertificatesRequest](#akash.cert.v1.QueryCertificatesRequest) + - [QueryCertificatesResponse](#akash.cert.v1.QueryCertificatesResponse) - - [akash/audit/v1beta3/audit.proto](#akash/audit/v1beta3/audit.proto) - - [AttributesFilters](#akash.audit.v1beta3.AttributesFilters) - - [AttributesResponse](#akash.audit.v1beta3.AttributesResponse) - - [AuditedAttributes](#akash.audit.v1beta3.AuditedAttributes) - - [MsgDeleteProviderAttributes](#akash.audit.v1beta3.MsgDeleteProviderAttributes) - - [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta3.MsgDeleteProviderAttributesResponse) - - [MsgSignProviderAttributes](#akash.audit.v1beta3.MsgSignProviderAttributes) - - [MsgSignProviderAttributesResponse](#akash.audit.v1beta3.MsgSignProviderAttributesResponse) - - [Provider](#akash.audit.v1beta3.Provider) + - [Query](#akash.cert.v1.Query) - - [Msg](#akash.audit.v1beta3.Msg) + - [akash/cert/v1/service.proto](#akash/cert/v1/service.proto) + - [Msg](#akash.cert.v1.Msg) - - [akash/audit/v1beta3/query.proto](#akash/audit/v1beta3/query.proto) - - [QueryAllProvidersAttributesRequest](#akash.audit.v1beta3.QueryAllProvidersAttributesRequest) - - [QueryAuditorAttributesRequest](#akash.audit.v1beta3.QueryAuditorAttributesRequest) - - [QueryProviderAttributesRequest](#akash.audit.v1beta3.QueryProviderAttributesRequest) - - [QueryProviderAuditorRequest](#akash.audit.v1beta3.QueryProviderAuditorRequest) - - [QueryProviderRequest](#akash.audit.v1beta3.QueryProviderRequest) - - [QueryProvidersResponse](#akash.audit.v1beta3.QueryProvidersResponse) + - [akash/deployment/v1/authz.proto](#akash/deployment/v1/authz.proto) + - [DepositAuthorization](#akash.deployment.v1.DepositAuthorization) - - [Query](#akash.audit.v1beta3.Query) + - [akash/deployment/v1/deployment.proto](#akash/deployment/v1/deployment.proto) + - [Deployment](#akash.deployment.v1.Deployment) + - [DeploymentID](#akash.deployment.v1.DeploymentID) - - [akash/audit/v1beta3/genesis.proto](#akash/audit/v1beta3/genesis.proto) - - [GenesisState](#akash.audit.v1beta3.GenesisState) + - [DeploymentState](#akash.deployment.v1.DeploymentState) - - [akash/audit/v1beta2/audit.proto](#akash/audit/v1beta2/audit.proto) - - [AttributesFilters](#akash.audit.v1beta2.AttributesFilters) - - [AttributesResponse](#akash.audit.v1beta2.AttributesResponse) - - [AuditedAttributes](#akash.audit.v1beta2.AuditedAttributes) - - [MsgDeleteProviderAttributes](#akash.audit.v1beta2.MsgDeleteProviderAttributes) - - [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta2.MsgDeleteProviderAttributesResponse) - - [MsgSignProviderAttributes](#akash.audit.v1beta2.MsgSignProviderAttributes) - - [MsgSignProviderAttributesResponse](#akash.audit.v1beta2.MsgSignProviderAttributesResponse) - - [Provider](#akash.audit.v1beta2.Provider) + - [akash/deployment/v1/group.proto](#akash/deployment/v1/group.proto) + - [GroupID](#akash.deployment.v1.GroupID) - - [Msg](#akash.audit.v1beta2.Msg) + - [akash/deployment/v1beta4/resourceunit.proto](#akash/deployment/v1beta4/resourceunit.proto) + - [ResourceUnit](#akash.deployment.v1beta4.ResourceUnit) - - [akash/audit/v1beta2/query.proto](#akash/audit/v1beta2/query.proto) - - [QueryAllProvidersAttributesRequest](#akash.audit.v1beta2.QueryAllProvidersAttributesRequest) - - [QueryAuditorAttributesRequest](#akash.audit.v1beta2.QueryAuditorAttributesRequest) - - [QueryProviderAttributesRequest](#akash.audit.v1beta2.QueryProviderAttributesRequest) - - [QueryProviderAuditorRequest](#akash.audit.v1beta2.QueryProviderAuditorRequest) - - [QueryProviderRequest](#akash.audit.v1beta2.QueryProviderRequest) - - [QueryProvidersResponse](#akash.audit.v1beta2.QueryProvidersResponse) + - [akash/deployment/v1beta4/groupspec.proto](#akash/deployment/v1beta4/groupspec.proto) + - [GroupSpec](#akash.deployment.v1beta4.GroupSpec) - - [Query](#akash.audit.v1beta2.Query) + - [akash/deployment/v1/msg.proto](#akash/deployment/v1/msg.proto) + - [MsgDepositDeployment](#akash.deployment.v1.MsgDepositDeployment) + - [MsgDepositDeploymentResponse](#akash.deployment.v1.MsgDepositDeploymentResponse) - - [akash/audit/v1beta2/genesis.proto](#akash/audit/v1beta2/genesis.proto) - - [GenesisState](#akash.audit.v1beta2.GenesisState) + - [akash/deployment/v1beta4/deploymentmsg.proto](#akash/deployment/v1beta4/deploymentmsg.proto) + - [MsgCloseDeployment](#akash.deployment.v1beta4.MsgCloseDeployment) + - [MsgCloseDeploymentResponse](#akash.deployment.v1beta4.MsgCloseDeploymentResponse) + - [MsgCreateDeployment](#akash.deployment.v1beta4.MsgCreateDeployment) + - [MsgCreateDeploymentResponse](#akash.deployment.v1beta4.MsgCreateDeploymentResponse) + - [MsgUpdateDeployment](#akash.deployment.v1beta4.MsgUpdateDeployment) + - [MsgUpdateDeploymentResponse](#akash.deployment.v1beta4.MsgUpdateDeploymentResponse) - - [akash/audit/v1beta1/audit.proto](#akash/audit/v1beta1/audit.proto) - - [AttributesFilters](#akash.audit.v1beta1.AttributesFilters) - - [AttributesResponse](#akash.audit.v1beta1.AttributesResponse) - - [AuditedAttributes](#akash.audit.v1beta1.AuditedAttributes) - - [MsgDeleteProviderAttributes](#akash.audit.v1beta1.MsgDeleteProviderAttributes) - - [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta1.MsgDeleteProviderAttributesResponse) - - [MsgSignProviderAttributes](#akash.audit.v1beta1.MsgSignProviderAttributes) - - [MsgSignProviderAttributesResponse](#akash.audit.v1beta1.MsgSignProviderAttributesResponse) - - [Provider](#akash.audit.v1beta1.Provider) + - [akash/deployment/v1beta4/filters.proto](#akash/deployment/v1beta4/filters.proto) + - [DeploymentFilters](#akash.deployment.v1beta4.DeploymentFilters) - - [Msg](#akash.audit.v1beta1.Msg) + - [akash/deployment/v1beta4/group.proto](#akash/deployment/v1beta4/group.proto) + - [Group](#akash.deployment.v1beta4.Group) - - [akash/take/v1beta3/query.proto](#akash/take/v1beta3/query.proto) - - [Query](#akash.take.v1beta3.Query) + - [GroupState](#akash.deployment.v1beta4.GroupState) - - [akash/take/v1beta3/genesis.proto](#akash/take/v1beta3/genesis.proto) - - [GenesisState](#akash.take.v1beta3.GenesisState) + - [akash/deployment/v1beta4/params.proto](#akash/deployment/v1beta4/params.proto) + - [Params](#akash.deployment.v1beta4.Params) - - [akash/take/v1beta3/params.proto](#akash/take/v1beta3/params.proto) - - [DenomTakeRate](#akash.take.v1beta3.DenomTakeRate) - - [Params](#akash.take.v1beta3.Params) + - [akash/deployment/v1beta4/genesis.proto](#akash/deployment/v1beta4/genesis.proto) + - [GenesisDeployment](#akash.deployment.v1beta4.GenesisDeployment) + - [GenesisState](#akash.deployment.v1beta4.GenesisState) - [akash/deployment/v1beta4/groupmsg.proto](#akash/deployment/v1beta4/groupmsg.proto) - [MsgCloseGroup](#akash.deployment.v1beta4.MsgCloseGroup) @@ -196,23 +142,13 @@ - [MsgStartGroup](#akash.deployment.v1beta4.MsgStartGroup) - [MsgStartGroupResponse](#akash.deployment.v1beta4.MsgStartGroupResponse) - - [akash/deployment/v1beta4/resourceunit.proto](#akash/deployment/v1beta4/resourceunit.proto) - - [ResourceUnit](#akash.deployment.v1beta4.ResourceUnit) - - - [akash/deployment/v1beta4/group.proto](#akash/deployment/v1beta4/group.proto) - - [Group](#akash.deployment.v1beta4.Group) - - - [Group.State](#akash.deployment.v1beta4.Group.State) + - [akash/escrow/v1/types.proto](#akash/escrow/v1/types.proto) + - [Account](#akash.escrow.v1.Account) + - [AccountID](#akash.escrow.v1.AccountID) + - [FractionalPayment](#akash.escrow.v1.FractionalPayment) - - [akash/deployment/v1beta4/groupid.proto](#akash/deployment/v1beta4/groupid.proto) - - [GroupID](#akash.deployment.v1beta4.GroupID) - - - [akash/deployment/v1beta4/deployment.proto](#akash/deployment/v1beta4/deployment.proto) - - [Deployment](#akash.deployment.v1beta4.Deployment) - - [DeploymentFilters](#akash.deployment.v1beta4.DeploymentFilters) - - [DeploymentID](#akash.deployment.v1beta4.DeploymentID) - - - [Deployment.State](#akash.deployment.v1beta4.Deployment.State) + - [AccountState](#akash.escrow.v1.AccountState) + - [FractionalPayment.State](#akash.escrow.v1.FractionalPayment.State) - [akash/deployment/v1beta4/query.proto](#akash/deployment/v1beta4/query.proto) - [QueryDeploymentRequest](#akash.deployment.v1beta4.QueryDeploymentRequest) @@ -224,498 +160,93 @@ - [Query](#akash.deployment.v1beta4.Query) - - [akash/deployment/v1beta4/deploymentmsg.proto](#akash/deployment/v1beta4/deploymentmsg.proto) - - [MsgCloseDeployment](#akash.deployment.v1beta4.MsgCloseDeployment) - - [MsgCloseDeploymentResponse](#akash.deployment.v1beta4.MsgCloseDeploymentResponse) - - [MsgCreateDeployment](#akash.deployment.v1beta4.MsgCreateDeployment) - - [MsgCreateDeploymentResponse](#akash.deployment.v1beta4.MsgCreateDeploymentResponse) - - [MsgDepositDeployment](#akash.deployment.v1beta4.MsgDepositDeployment) - - [MsgDepositDeploymentResponse](#akash.deployment.v1beta4.MsgDepositDeploymentResponse) - - [MsgUpdateDeployment](#akash.deployment.v1beta4.MsgUpdateDeployment) - - [MsgUpdateDeploymentResponse](#akash.deployment.v1beta4.MsgUpdateDeploymentResponse) - - [akash/deployment/v1beta4/service.proto](#akash/deployment/v1beta4/service.proto) - [Msg](#akash.deployment.v1beta4.Msg) - - [akash/deployment/v1beta4/authz.proto](#akash/deployment/v1beta4/authz.proto) - - [DepositDeploymentAuthorization](#akash.deployment.v1beta4.DepositDeploymentAuthorization) - - - [akash/deployment/v1beta4/genesis.proto](#akash/deployment/v1beta4/genesis.proto) - - [GenesisDeployment](#akash.deployment.v1beta4.GenesisDeployment) - - [GenesisState](#akash.deployment.v1beta4.GenesisState) - - - [akash/deployment/v1beta4/groupspec.proto](#akash/deployment/v1beta4/groupspec.proto) - - [GroupSpec](#akash.deployment.v1beta4.GroupSpec) - - - [akash/deployment/v1beta4/params.proto](#akash/deployment/v1beta4/params.proto) - - [Params](#akash.deployment.v1beta4.Params) - - - [akash/deployment/v1beta3/groupmsg.proto](#akash/deployment/v1beta3/groupmsg.proto) - - [MsgCloseGroup](#akash.deployment.v1beta3.MsgCloseGroup) - - [MsgCloseGroupResponse](#akash.deployment.v1beta3.MsgCloseGroupResponse) - - [MsgPauseGroup](#akash.deployment.v1beta3.MsgPauseGroup) - - [MsgPauseGroupResponse](#akash.deployment.v1beta3.MsgPauseGroupResponse) - - [MsgStartGroup](#akash.deployment.v1beta3.MsgStartGroup) - - [MsgStartGroupResponse](#akash.deployment.v1beta3.MsgStartGroupResponse) - - - [akash/deployment/v1beta3/resourceunit.proto](#akash/deployment/v1beta3/resourceunit.proto) - - [ResourceUnit](#akash.deployment.v1beta3.ResourceUnit) - - - [akash/deployment/v1beta3/group.proto](#akash/deployment/v1beta3/group.proto) - - [Group](#akash.deployment.v1beta3.Group) - - - [Group.State](#akash.deployment.v1beta3.Group.State) - - - [akash/deployment/v1beta3/groupid.proto](#akash/deployment/v1beta3/groupid.proto) - - [GroupID](#akash.deployment.v1beta3.GroupID) - - - [akash/deployment/v1beta3/deployment.proto](#akash/deployment/v1beta3/deployment.proto) - - [Deployment](#akash.deployment.v1beta3.Deployment) - - [DeploymentFilters](#akash.deployment.v1beta3.DeploymentFilters) - - [DeploymentID](#akash.deployment.v1beta3.DeploymentID) - - - [Deployment.State](#akash.deployment.v1beta3.Deployment.State) - - - [akash/deployment/v1beta3/query.proto](#akash/deployment/v1beta3/query.proto) - - [QueryDeploymentRequest](#akash.deployment.v1beta3.QueryDeploymentRequest) - - [QueryDeploymentResponse](#akash.deployment.v1beta3.QueryDeploymentResponse) - - [QueryDeploymentsRequest](#akash.deployment.v1beta3.QueryDeploymentsRequest) - - [QueryDeploymentsResponse](#akash.deployment.v1beta3.QueryDeploymentsResponse) - - [QueryGroupRequest](#akash.deployment.v1beta3.QueryGroupRequest) - - [QueryGroupResponse](#akash.deployment.v1beta3.QueryGroupResponse) - - - [Query](#akash.deployment.v1beta3.Query) - - - [akash/deployment/v1beta3/deploymentmsg.proto](#akash/deployment/v1beta3/deploymentmsg.proto) - - [MsgCloseDeployment](#akash.deployment.v1beta3.MsgCloseDeployment) - - [MsgCloseDeploymentResponse](#akash.deployment.v1beta3.MsgCloseDeploymentResponse) - - [MsgCreateDeployment](#akash.deployment.v1beta3.MsgCreateDeployment) - - [MsgCreateDeploymentResponse](#akash.deployment.v1beta3.MsgCreateDeploymentResponse) - - [MsgDepositDeployment](#akash.deployment.v1beta3.MsgDepositDeployment) - - [MsgDepositDeploymentResponse](#akash.deployment.v1beta3.MsgDepositDeploymentResponse) - - [MsgUpdateDeployment](#akash.deployment.v1beta3.MsgUpdateDeployment) - - [MsgUpdateDeploymentResponse](#akash.deployment.v1beta3.MsgUpdateDeploymentResponse) - - - [akash/deployment/v1beta3/service.proto](#akash/deployment/v1beta3/service.proto) - - [Msg](#akash.deployment.v1beta3.Msg) - - - [akash/deployment/v1beta3/authz.proto](#akash/deployment/v1beta3/authz.proto) - - [DepositDeploymentAuthorization](#akash.deployment.v1beta3.DepositDeploymentAuthorization) - - - [akash/deployment/v1beta3/genesis.proto](#akash/deployment/v1beta3/genesis.proto) - - [GenesisDeployment](#akash.deployment.v1beta3.GenesisDeployment) - - [GenesisState](#akash.deployment.v1beta3.GenesisState) - - - [akash/deployment/v1beta3/groupspec.proto](#akash/deployment/v1beta3/groupspec.proto) - - [GroupSpec](#akash.deployment.v1beta3.GroupSpec) - - - [akash/deployment/v1beta3/params.proto](#akash/deployment/v1beta3/params.proto) - - [Params](#akash.deployment.v1beta3.Params) - - - [akash/deployment/v1beta2/groupmsg.proto](#akash/deployment/v1beta2/groupmsg.proto) - - [MsgCloseGroup](#akash.deployment.v1beta2.MsgCloseGroup) - - [MsgCloseGroupResponse](#akash.deployment.v1beta2.MsgCloseGroupResponse) - - [MsgPauseGroup](#akash.deployment.v1beta2.MsgPauseGroup) - - [MsgPauseGroupResponse](#akash.deployment.v1beta2.MsgPauseGroupResponse) - - [MsgStartGroup](#akash.deployment.v1beta2.MsgStartGroup) - - [MsgStartGroupResponse](#akash.deployment.v1beta2.MsgStartGroupResponse) - - - [akash/deployment/v1beta2/group.proto](#akash/deployment/v1beta2/group.proto) - - [Group](#akash.deployment.v1beta2.Group) - - - [Group.State](#akash.deployment.v1beta2.Group.State) - - - [akash/deployment/v1beta2/groupid.proto](#akash/deployment/v1beta2/groupid.proto) - - [GroupID](#akash.deployment.v1beta2.GroupID) - - - [akash/deployment/v1beta2/deployment.proto](#akash/deployment/v1beta2/deployment.proto) - - [Deployment](#akash.deployment.v1beta2.Deployment) - - [DeploymentFilters](#akash.deployment.v1beta2.DeploymentFilters) - - [DeploymentID](#akash.deployment.v1beta2.DeploymentID) - - - [Deployment.State](#akash.deployment.v1beta2.Deployment.State) - - - [akash/deployment/v1beta2/query.proto](#akash/deployment/v1beta2/query.proto) - - [QueryDeploymentRequest](#akash.deployment.v1beta2.QueryDeploymentRequest) - - [QueryDeploymentResponse](#akash.deployment.v1beta2.QueryDeploymentResponse) - - [QueryDeploymentsRequest](#akash.deployment.v1beta2.QueryDeploymentsRequest) - - [QueryDeploymentsResponse](#akash.deployment.v1beta2.QueryDeploymentsResponse) - - [QueryGroupRequest](#akash.deployment.v1beta2.QueryGroupRequest) - - [QueryGroupResponse](#akash.deployment.v1beta2.QueryGroupResponse) - - - [Query](#akash.deployment.v1beta2.Query) - - - [akash/deployment/v1beta2/deploymentmsg.proto](#akash/deployment/v1beta2/deploymentmsg.proto) - - [MsgCloseDeployment](#akash.deployment.v1beta2.MsgCloseDeployment) - - [MsgCloseDeploymentResponse](#akash.deployment.v1beta2.MsgCloseDeploymentResponse) - - [MsgCreateDeployment](#akash.deployment.v1beta2.MsgCreateDeployment) - - [MsgCreateDeploymentResponse](#akash.deployment.v1beta2.MsgCreateDeploymentResponse) - - [MsgDepositDeployment](#akash.deployment.v1beta2.MsgDepositDeployment) - - [MsgDepositDeploymentResponse](#akash.deployment.v1beta2.MsgDepositDeploymentResponse) - - [MsgUpdateDeployment](#akash.deployment.v1beta2.MsgUpdateDeployment) - - [MsgUpdateDeploymentResponse](#akash.deployment.v1beta2.MsgUpdateDeploymentResponse) - - - [akash/deployment/v1beta2/service.proto](#akash/deployment/v1beta2/service.proto) - - [Msg](#akash.deployment.v1beta2.Msg) - - - [akash/deployment/v1beta2/authz.proto](#akash/deployment/v1beta2/authz.proto) - - [DepositDeploymentAuthorization](#akash.deployment.v1beta2.DepositDeploymentAuthorization) - - - [akash/deployment/v1beta2/genesis.proto](#akash/deployment/v1beta2/genesis.proto) - - [GenesisDeployment](#akash.deployment.v1beta2.GenesisDeployment) - - [GenesisState](#akash.deployment.v1beta2.GenesisState) - - - [akash/deployment/v1beta2/groupspec.proto](#akash/deployment/v1beta2/groupspec.proto) - - [GroupSpec](#akash.deployment.v1beta2.GroupSpec) - - - [akash/deployment/v1beta2/resource.proto](#akash/deployment/v1beta2/resource.proto) - - [Resource](#akash.deployment.v1beta2.Resource) - - - [akash/deployment/v1beta2/params.proto](#akash/deployment/v1beta2/params.proto) - - [Params](#akash.deployment.v1beta2.Params) - - - [akash/deployment/v1beta1/group.proto](#akash/deployment/v1beta1/group.proto) - - [Group](#akash.deployment.v1beta1.Group) - - [GroupID](#akash.deployment.v1beta1.GroupID) - - [GroupSpec](#akash.deployment.v1beta1.GroupSpec) - - [MsgCloseGroup](#akash.deployment.v1beta1.MsgCloseGroup) - - [MsgCloseGroupResponse](#akash.deployment.v1beta1.MsgCloseGroupResponse) - - [MsgPauseGroup](#akash.deployment.v1beta1.MsgPauseGroup) - - [MsgPauseGroupResponse](#akash.deployment.v1beta1.MsgPauseGroupResponse) - - [MsgStartGroup](#akash.deployment.v1beta1.MsgStartGroup) - - [MsgStartGroupResponse](#akash.deployment.v1beta1.MsgStartGroupResponse) - - [Resource](#akash.deployment.v1beta1.Resource) - - - [Group.State](#akash.deployment.v1beta1.Group.State) - - - [akash/deployment/v1beta1/deployment.proto](#akash/deployment/v1beta1/deployment.proto) - - [Deployment](#akash.deployment.v1beta1.Deployment) - - [DeploymentFilters](#akash.deployment.v1beta1.DeploymentFilters) - - [DeploymentID](#akash.deployment.v1beta1.DeploymentID) - - [MsgCloseDeployment](#akash.deployment.v1beta1.MsgCloseDeployment) - - [MsgCloseDeploymentResponse](#akash.deployment.v1beta1.MsgCloseDeploymentResponse) - - [MsgCreateDeployment](#akash.deployment.v1beta1.MsgCreateDeployment) - - [MsgCreateDeploymentResponse](#akash.deployment.v1beta1.MsgCreateDeploymentResponse) - - [MsgDepositDeployment](#akash.deployment.v1beta1.MsgDepositDeployment) - - [MsgDepositDeploymentResponse](#akash.deployment.v1beta1.MsgDepositDeploymentResponse) - - [MsgUpdateDeployment](#akash.deployment.v1beta1.MsgUpdateDeployment) - - [MsgUpdateDeploymentResponse](#akash.deployment.v1beta1.MsgUpdateDeploymentResponse) - - - [Deployment.State](#akash.deployment.v1beta1.Deployment.State) - - - [Msg](#akash.deployment.v1beta1.Msg) - - - [akash/deployment/v1beta1/query.proto](#akash/deployment/v1beta1/query.proto) - - [QueryDeploymentRequest](#akash.deployment.v1beta1.QueryDeploymentRequest) - - [QueryDeploymentResponse](#akash.deployment.v1beta1.QueryDeploymentResponse) - - [QueryDeploymentsRequest](#akash.deployment.v1beta1.QueryDeploymentsRequest) - - [QueryDeploymentsResponse](#akash.deployment.v1beta1.QueryDeploymentsResponse) - - [QueryGroupRequest](#akash.deployment.v1beta1.QueryGroupRequest) - - [QueryGroupResponse](#akash.deployment.v1beta1.QueryGroupResponse) - - - [Query](#akash.deployment.v1beta1.Query) - - - [akash/deployment/v1beta1/authz.proto](#akash/deployment/v1beta1/authz.proto) - - [DepositDeploymentAuthorization](#akash.deployment.v1beta1.DepositDeploymentAuthorization) - - - [akash/deployment/v1beta1/genesis.proto](#akash/deployment/v1beta1/genesis.proto) - - [GenesisDeployment](#akash.deployment.v1beta1.GenesisDeployment) - - [GenesisState](#akash.deployment.v1beta1.GenesisState) - - - [akash/deployment/v1beta1/params.proto](#akash/deployment/v1beta1/params.proto) - - [Params](#akash.deployment.v1beta1.Params) - - - [akash/staking/v1beta3/genesis.proto](#akash/staking/v1beta3/genesis.proto) - - [GenesisState](#akash.staking.v1beta3.GenesisState) - - - [akash/staking/v1beta3/params.proto](#akash/staking/v1beta3/params.proto) - - [Params](#akash.staking.v1beta3.Params) - - - [akash/cert/v1beta3/query.proto](#akash/cert/v1beta3/query.proto) - - [CertificateResponse](#akash.cert.v1beta3.CertificateResponse) - - [QueryCertificatesRequest](#akash.cert.v1beta3.QueryCertificatesRequest) - - [QueryCertificatesResponse](#akash.cert.v1beta3.QueryCertificatesResponse) - - - [Query](#akash.cert.v1beta3.Query) - - - [akash/cert/v1beta3/cert.proto](#akash/cert/v1beta3/cert.proto) - - [Certificate](#akash.cert.v1beta3.Certificate) - - [CertificateFilter](#akash.cert.v1beta3.CertificateFilter) - - [CertificateID](#akash.cert.v1beta3.CertificateID) - - [MsgCreateCertificate](#akash.cert.v1beta3.MsgCreateCertificate) - - [MsgCreateCertificateResponse](#akash.cert.v1beta3.MsgCreateCertificateResponse) - - [MsgRevokeCertificate](#akash.cert.v1beta3.MsgRevokeCertificate) - - [MsgRevokeCertificateResponse](#akash.cert.v1beta3.MsgRevokeCertificateResponse) - - - [Certificate.State](#akash.cert.v1beta3.Certificate.State) - - - [Msg](#akash.cert.v1beta3.Msg) - - - [akash/cert/v1beta3/genesis.proto](#akash/cert/v1beta3/genesis.proto) - - [GenesisCertificate](#akash.cert.v1beta3.GenesisCertificate) - - [GenesisState](#akash.cert.v1beta3.GenesisState) - - - [akash/cert/v1beta2/query.proto](#akash/cert/v1beta2/query.proto) - - [CertificateResponse](#akash.cert.v1beta2.CertificateResponse) - - [QueryCertificatesRequest](#akash.cert.v1beta2.QueryCertificatesRequest) - - [QueryCertificatesResponse](#akash.cert.v1beta2.QueryCertificatesResponse) - - - [Query](#akash.cert.v1beta2.Query) - - - [akash/cert/v1beta2/cert.proto](#akash/cert/v1beta2/cert.proto) - - [Certificate](#akash.cert.v1beta2.Certificate) - - [CertificateFilter](#akash.cert.v1beta2.CertificateFilter) - - [CertificateID](#akash.cert.v1beta2.CertificateID) - - [MsgCreateCertificate](#akash.cert.v1beta2.MsgCreateCertificate) - - [MsgCreateCertificateResponse](#akash.cert.v1beta2.MsgCreateCertificateResponse) - - [MsgRevokeCertificate](#akash.cert.v1beta2.MsgRevokeCertificate) - - [MsgRevokeCertificateResponse](#akash.cert.v1beta2.MsgRevokeCertificateResponse) - - - [Certificate.State](#akash.cert.v1beta2.Certificate.State) - - - [Msg](#akash.cert.v1beta2.Msg) - - - [akash/cert/v1beta2/genesis.proto](#akash/cert/v1beta2/genesis.proto) - - [GenesisCertificate](#akash.cert.v1beta2.GenesisCertificate) - - [GenesisState](#akash.cert.v1beta2.GenesisState) - - - [akash/escrow/v1beta3/types.proto](#akash/escrow/v1beta3/types.proto) - - [Account](#akash.escrow.v1beta3.Account) - - [AccountID](#akash.escrow.v1beta3.AccountID) - - [FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) - - - [Account.State](#akash.escrow.v1beta3.Account.State) - - [FractionalPayment.State](#akash.escrow.v1beta3.FractionalPayment.State) - - - [akash/escrow/v1beta3/query.proto](#akash/escrow/v1beta3/query.proto) - - [QueryAccountsRequest](#akash.escrow.v1beta3.QueryAccountsRequest) - - [QueryAccountsResponse](#akash.escrow.v1beta3.QueryAccountsResponse) - - [QueryPaymentsRequest](#akash.escrow.v1beta3.QueryPaymentsRequest) - - [QueryPaymentsResponse](#akash.escrow.v1beta3.QueryPaymentsResponse) - - - [Query](#akash.escrow.v1beta3.Query) - - - [akash/escrow/v1beta3/genesis.proto](#akash/escrow/v1beta3/genesis.proto) - - [GenesisState](#akash.escrow.v1beta3.GenesisState) - - - [akash/escrow/v1beta2/types.proto](#akash/escrow/v1beta2/types.proto) - - [Account](#akash.escrow.v1beta2.Account) - - [AccountID](#akash.escrow.v1beta2.AccountID) - - [FractionalPayment](#akash.escrow.v1beta2.FractionalPayment) - - - [Account.State](#akash.escrow.v1beta2.Account.State) - - [FractionalPayment.State](#akash.escrow.v1beta2.FractionalPayment.State) - - - [akash/escrow/v1beta2/query.proto](#akash/escrow/v1beta2/query.proto) - - [QueryAccountsRequest](#akash.escrow.v1beta2.QueryAccountsRequest) - - [QueryAccountsResponse](#akash.escrow.v1beta2.QueryAccountsResponse) - - [QueryPaymentsRequest](#akash.escrow.v1beta2.QueryPaymentsRequest) - - [QueryPaymentsResponse](#akash.escrow.v1beta2.QueryPaymentsResponse) - - - [Query](#akash.escrow.v1beta2.Query) - - - [akash/escrow/v1beta2/genesis.proto](#akash/escrow/v1beta2/genesis.proto) - - [GenesisState](#akash.escrow.v1beta2.GenesisState) - - - [akash/escrow/v1beta1/types.proto](#akash/escrow/v1beta1/types.proto) - - [Account](#akash.escrow.v1beta1.Account) - - [AccountID](#akash.escrow.v1beta1.AccountID) - - [Payment](#akash.escrow.v1beta1.Payment) - - - [Account.State](#akash.escrow.v1beta1.Account.State) - - [Payment.State](#akash.escrow.v1beta1.Payment.State) - - - [akash/escrow/v1beta1/query.proto](#akash/escrow/v1beta1/query.proto) - - [QueryAccountsRequest](#akash.escrow.v1beta1.QueryAccountsRequest) - - [QueryAccountsResponse](#akash.escrow.v1beta1.QueryAccountsResponse) - - [QueryPaymentsRequest](#akash.escrow.v1beta1.QueryPaymentsRequest) - - [QueryPaymentsResponse](#akash.escrow.v1beta1.QueryPaymentsResponse) - - - [Query](#akash.escrow.v1beta1.Query) - - - [akash/escrow/v1beta1/genesis.proto](#akash/escrow/v1beta1/genesis.proto) - - [GenesisState](#akash.escrow.v1beta1.GenesisState) - - - [akash/market/v1beta4/bid.proto](#akash/market/v1beta4/bid.proto) - - [Bid](#akash.market.v1beta4.Bid) - - [BidFilters](#akash.market.v1beta4.BidFilters) - - [BidID](#akash.market.v1beta4.BidID) - - [MsgCloseBid](#akash.market.v1beta4.MsgCloseBid) - - [MsgCloseBidResponse](#akash.market.v1beta4.MsgCloseBidResponse) - - [MsgCreateBid](#akash.market.v1beta4.MsgCreateBid) - - [MsgCreateBidResponse](#akash.market.v1beta4.MsgCreateBidResponse) - - [ResourceOffer](#akash.market.v1beta4.ResourceOffer) - - - [Bid.State](#akash.market.v1beta4.Bid.State) - - - [akash/market/v1beta4/query.proto](#akash/market/v1beta4/query.proto) - - [QueryBidRequest](#akash.market.v1beta4.QueryBidRequest) - - [QueryBidResponse](#akash.market.v1beta4.QueryBidResponse) - - [QueryBidsRequest](#akash.market.v1beta4.QueryBidsRequest) - - [QueryBidsResponse](#akash.market.v1beta4.QueryBidsResponse) - - [QueryLeaseRequest](#akash.market.v1beta4.QueryLeaseRequest) - - [QueryLeaseResponse](#akash.market.v1beta4.QueryLeaseResponse) - - [QueryLeasesRequest](#akash.market.v1beta4.QueryLeasesRequest) - - [QueryLeasesResponse](#akash.market.v1beta4.QueryLeasesResponse) - - [QueryOrderRequest](#akash.market.v1beta4.QueryOrderRequest) - - [QueryOrderResponse](#akash.market.v1beta4.QueryOrderResponse) - - [QueryOrdersRequest](#akash.market.v1beta4.QueryOrdersRequest) - - [QueryOrdersResponse](#akash.market.v1beta4.QueryOrdersResponse) - - - [Query](#akash.market.v1beta4.Query) - - - [akash/market/v1beta4/service.proto](#akash/market/v1beta4/service.proto) - - [Msg](#akash.market.v1beta4.Msg) - - - [akash/market/v1beta4/lease.proto](#akash/market/v1beta4/lease.proto) - - [Lease](#akash.market.v1beta4.Lease) - - [LeaseFilters](#akash.market.v1beta4.LeaseFilters) - - [LeaseID](#akash.market.v1beta4.LeaseID) - - [MsgCloseLease](#akash.market.v1beta4.MsgCloseLease) - - [MsgCloseLeaseResponse](#akash.market.v1beta4.MsgCloseLeaseResponse) - - [MsgCreateLease](#akash.market.v1beta4.MsgCreateLease) - - [MsgCreateLeaseResponse](#akash.market.v1beta4.MsgCreateLeaseResponse) - - [MsgWithdrawLease](#akash.market.v1beta4.MsgWithdrawLease) - - [MsgWithdrawLeaseResponse](#akash.market.v1beta4.MsgWithdrawLeaseResponse) - - - [Lease.State](#akash.market.v1beta4.Lease.State) - - - [akash/market/v1beta4/genesis.proto](#akash/market/v1beta4/genesis.proto) - - [GenesisState](#akash.market.v1beta4.GenesisState) - - - [akash/market/v1beta4/order.proto](#akash/market/v1beta4/order.proto) - - [Order](#akash.market.v1beta4.Order) - - [OrderFilters](#akash.market.v1beta4.OrderFilters) - - [OrderID](#akash.market.v1beta4.OrderID) - - - [Order.State](#akash.market.v1beta4.Order.State) - - - [akash/market/v1beta4/params.proto](#akash/market/v1beta4/params.proto) - - [Params](#akash.market.v1beta4.Params) - - - [akash/market/v1beta3/bid.proto](#akash/market/v1beta3/bid.proto) - - [Bid](#akash.market.v1beta3.Bid) - - [BidFilters](#akash.market.v1beta3.BidFilters) - - [BidID](#akash.market.v1beta3.BidID) - - [MsgCloseBid](#akash.market.v1beta3.MsgCloseBid) - - [MsgCloseBidResponse](#akash.market.v1beta3.MsgCloseBidResponse) - - [MsgCreateBid](#akash.market.v1beta3.MsgCreateBid) - - [MsgCreateBidResponse](#akash.market.v1beta3.MsgCreateBidResponse) - - - [Bid.State](#akash.market.v1beta3.Bid.State) - - - [akash/market/v1beta3/query.proto](#akash/market/v1beta3/query.proto) - - [QueryBidRequest](#akash.market.v1beta3.QueryBidRequest) - - [QueryBidResponse](#akash.market.v1beta3.QueryBidResponse) - - [QueryBidsRequest](#akash.market.v1beta3.QueryBidsRequest) - - [QueryBidsResponse](#akash.market.v1beta3.QueryBidsResponse) - - [QueryLeaseRequest](#akash.market.v1beta3.QueryLeaseRequest) - - [QueryLeaseResponse](#akash.market.v1beta3.QueryLeaseResponse) - - [QueryLeasesRequest](#akash.market.v1beta3.QueryLeasesRequest) - - [QueryLeasesResponse](#akash.market.v1beta3.QueryLeasesResponse) - - [QueryOrderRequest](#akash.market.v1beta3.QueryOrderRequest) - - [QueryOrderResponse](#akash.market.v1beta3.QueryOrderResponse) - - [QueryOrdersRequest](#akash.market.v1beta3.QueryOrdersRequest) - - [QueryOrdersResponse](#akash.market.v1beta3.QueryOrdersResponse) - - - [Query](#akash.market.v1beta3.Query) + - [akash/discovery/v1/client_info.proto](#akash/discovery/v1/client_info.proto) + - [ClientInfo](#akash.discovery.v1.ClientInfo) - - [akash/market/v1beta3/service.proto](#akash/market/v1beta3/service.proto) - - [Msg](#akash.market.v1beta3.Msg) + - [akash/discovery/v1/akash.proto](#akash/discovery/v1/akash.proto) + - [Akash](#akash.discovery.v1.Akash) - - [akash/market/v1beta3/lease.proto](#akash/market/v1beta3/lease.proto) - - [Lease](#akash.market.v1beta3.Lease) - - [LeaseFilters](#akash.market.v1beta3.LeaseFilters) - - [LeaseID](#akash.market.v1beta3.LeaseID) - - [MsgCloseLease](#akash.market.v1beta3.MsgCloseLease) - - [MsgCloseLeaseResponse](#akash.market.v1beta3.MsgCloseLeaseResponse) - - [MsgCreateLease](#akash.market.v1beta3.MsgCreateLease) - - [MsgCreateLeaseResponse](#akash.market.v1beta3.MsgCreateLeaseResponse) - - [MsgWithdrawLease](#akash.market.v1beta3.MsgWithdrawLease) - - [MsgWithdrawLeaseResponse](#akash.market.v1beta3.MsgWithdrawLeaseResponse) + - [akash/escrow/v1/genesis.proto](#akash/escrow/v1/genesis.proto) + - [GenesisState](#akash.escrow.v1.GenesisState) - - [Lease.State](#akash.market.v1beta3.Lease.State) + - [akash/escrow/v1/query.proto](#akash/escrow/v1/query.proto) + - [QueryAccountsRequest](#akash.escrow.v1.QueryAccountsRequest) + - [QueryAccountsResponse](#akash.escrow.v1.QueryAccountsResponse) + - [QueryPaymentsRequest](#akash.escrow.v1.QueryPaymentsRequest) + - [QueryPaymentsResponse](#akash.escrow.v1.QueryPaymentsResponse) - - [akash/market/v1beta3/genesis.proto](#akash/market/v1beta3/genesis.proto) - - [GenesisState](#akash.market.v1beta3.GenesisState) + - [Query](#akash.escrow.v1.Query) - - [akash/market/v1beta3/order.proto](#akash/market/v1beta3/order.proto) - - [Order](#akash.market.v1beta3.Order) - - [OrderFilters](#akash.market.v1beta3.OrderFilters) - - [OrderID](#akash.market.v1beta3.OrderID) + - [akash/gov/v1beta3/params.proto](#akash/gov/v1beta3/params.proto) + - [DepositParams](#akash.gov.v1beta3.DepositParams) - - [Order.State](#akash.market.v1beta3.Order.State) + - [akash/gov/v1beta3/genesis.proto](#akash/gov/v1beta3/genesis.proto) + - [GenesisState](#akash.gov.v1beta3.GenesisState) - - [akash/market/v1beta3/params.proto](#akash/market/v1beta3/params.proto) - - [Params](#akash.market.v1beta3.Params) + - [akash/inflation/v1beta2/params.proto](#akash/inflation/v1beta2/params.proto) + - [Params](#akash.inflation.v1beta2.Params) - - [akash/market/v1beta2/bid.proto](#akash/market/v1beta2/bid.proto) - - [Bid](#akash.market.v1beta2.Bid) - - [BidFilters](#akash.market.v1beta2.BidFilters) - - [BidID](#akash.market.v1beta2.BidID) - - [MsgCloseBid](#akash.market.v1beta2.MsgCloseBid) - - [MsgCloseBidResponse](#akash.market.v1beta2.MsgCloseBidResponse) - - [MsgCreateBid](#akash.market.v1beta2.MsgCreateBid) - - [MsgCreateBidResponse](#akash.market.v1beta2.MsgCreateBidResponse) + - [akash/inflation/v1beta2/genesis.proto](#akash/inflation/v1beta2/genesis.proto) + - [GenesisState](#akash.inflation.v1beta2.GenesisState) - - [Bid.State](#akash.market.v1beta2.Bid.State) + - [akash/inflation/v1beta3/params.proto](#akash/inflation/v1beta3/params.proto) + - [Params](#akash.inflation.v1beta3.Params) - - [akash/market/v1beta2/query.proto](#akash/market/v1beta2/query.proto) - - [QueryBidRequest](#akash.market.v1beta2.QueryBidRequest) - - [QueryBidResponse](#akash.market.v1beta2.QueryBidResponse) - - [QueryBidsRequest](#akash.market.v1beta2.QueryBidsRequest) - - [QueryBidsResponse](#akash.market.v1beta2.QueryBidsResponse) - - [QueryLeaseRequest](#akash.market.v1beta2.QueryLeaseRequest) - - [QueryLeaseResponse](#akash.market.v1beta2.QueryLeaseResponse) - - [QueryLeasesRequest](#akash.market.v1beta2.QueryLeasesRequest) - - [QueryLeasesResponse](#akash.market.v1beta2.QueryLeasesResponse) - - [QueryOrderRequest](#akash.market.v1beta2.QueryOrderRequest) - - [QueryOrderResponse](#akash.market.v1beta2.QueryOrderResponse) - - [QueryOrdersRequest](#akash.market.v1beta2.QueryOrdersRequest) - - [QueryOrdersResponse](#akash.market.v1beta2.QueryOrdersResponse) + - [akash/inflation/v1beta3/genesis.proto](#akash/inflation/v1beta3/genesis.proto) + - [GenesisState](#akash.inflation.v1beta3.GenesisState) - - [Query](#akash.market.v1beta2.Query) + - [akash/market/v1/bid.proto](#akash/market/v1/bid.proto) + - [BidID](#akash.market.v1.BidID) - - [akash/market/v1beta2/service.proto](#akash/market/v1beta2/service.proto) - - [Msg](#akash.market.v1beta2.Msg) + - [BidState](#akash.market.v1.BidState) - - [akash/market/v1beta2/lease.proto](#akash/market/v1beta2/lease.proto) - - [Lease](#akash.market.v1beta2.Lease) - - [LeaseFilters](#akash.market.v1beta2.LeaseFilters) - - [LeaseID](#akash.market.v1beta2.LeaseID) - - [MsgCloseLease](#akash.market.v1beta2.MsgCloseLease) - - [MsgCloseLeaseResponse](#akash.market.v1beta2.MsgCloseLeaseResponse) - - [MsgCreateLease](#akash.market.v1beta2.MsgCreateLease) - - [MsgCreateLeaseResponse](#akash.market.v1beta2.MsgCreateLeaseResponse) - - [MsgWithdrawLease](#akash.market.v1beta2.MsgWithdrawLease) - - [MsgWithdrawLeaseResponse](#akash.market.v1beta2.MsgWithdrawLeaseResponse) + - [akash/market/v1/lease.proto](#akash/market/v1/lease.proto) + - [Lease](#akash.market.v1.Lease) + - [LeaseID](#akash.market.v1.LeaseID) - - [Lease.State](#akash.market.v1beta2.Lease.State) + - [LeaseState](#akash.market.v1.LeaseState) - - [akash/market/v1beta2/genesis.proto](#akash/market/v1beta2/genesis.proto) - - [GenesisState](#akash.market.v1beta2.GenesisState) + - [akash/market/v1/order.proto](#akash/market/v1/order.proto) + - [OrderID](#akash.market.v1.OrderID) - - [akash/market/v1beta2/order.proto](#akash/market/v1beta2/order.proto) - - [Order](#akash.market.v1beta2.Order) - - [OrderFilters](#akash.market.v1beta2.OrderFilters) - - [OrderID](#akash.market.v1beta2.OrderID) + - [OrderState](#akash.market.v1.OrderState) - - [Order.State](#akash.market.v1beta2.Order.State) + - [akash/market/v1/filters.proto](#akash/market/v1/filters.proto) + - [BidFilters](#akash.market.v1.BidFilters) + - [LeaseFilters](#akash.market.v1.LeaseFilters) + - [OrderFilters](#akash.market.v1.OrderFilters) - - [akash/market/v1beta2/params.proto](#akash/market/v1beta2/params.proto) - - [Params](#akash.market.v1beta2.Params) + - [akash/market/v1beta5/resourcesoffer.proto](#akash/market/v1beta5/resourcesoffer.proto) + - [ResourceOffer](#akash.market.v1beta5.ResourceOffer) - [akash/market/v1beta5/bid.proto](#akash/market/v1beta5/bid.proto) - [Bid](#akash.market.v1beta5.Bid) - - [BidFilters](#akash.market.v1beta5.BidFilters) - - [BidID](#akash.market.v1beta5.BidID) + + - [akash/market/v1beta5/bidmsg.proto](#akash/market/v1beta5/bidmsg.proto) - [MsgCloseBid](#akash.market.v1beta5.MsgCloseBid) - [MsgCloseBidResponse](#akash.market.v1beta5.MsgCloseBidResponse) - [MsgCreateBid](#akash.market.v1beta5.MsgCreateBid) - [MsgCreateBidResponse](#akash.market.v1beta5.MsgCreateBidResponse) - - [ResourceOffer](#akash.market.v1beta5.ResourceOffer) - - [Bid.State](#akash.market.v1beta5.Bid.State) + - [akash/market/v1beta5/params.proto](#akash/market/v1beta5/params.proto) + - [Params](#akash.market.v1beta5.Params) + + - [akash/market/v1beta5/order.proto](#akash/market/v1beta5/order.proto) + - [Order](#akash.market.v1beta5.Order) + + - [akash/market/v1beta5/genesis.proto](#akash/market/v1beta5/genesis.proto) + - [GenesisState](#akash.market.v1beta5.GenesisState) + + - [akash/market/v1beta5/leasemsg.proto](#akash/market/v1beta5/leasemsg.proto) + - [MsgCloseLease](#akash.market.v1beta5.MsgCloseLease) + - [MsgCloseLeaseResponse](#akash.market.v1beta5.MsgCloseLeaseResponse) + - [MsgCreateLease](#akash.market.v1beta5.MsgCreateLease) + - [MsgCreateLeaseResponse](#akash.market.v1beta5.MsgCreateLeaseResponse) + - [MsgWithdrawLease](#akash.market.v1beta5.MsgWithdrawLease) + - [MsgWithdrawLeaseResponse](#akash.market.v1beta5.MsgWithdrawLeaseResponse) - [akash/market/v1beta5/query.proto](#akash/market/v1beta5/query.proto) - [QueryBidRequest](#akash.market.v1beta5.QueryBidRequest) @@ -736,288 +267,104 @@ - [akash/market/v1beta5/service.proto](#akash/market/v1beta5/service.proto) - [Msg](#akash.market.v1beta5.Msg) - - [akash/market/v1beta5/lease.proto](#akash/market/v1beta5/lease.proto) - - [Lease](#akash.market.v1beta5.Lease) - - [LeaseFilters](#akash.market.v1beta5.LeaseFilters) - - [LeaseID](#akash.market.v1beta5.LeaseID) - - [MsgCloseLease](#akash.market.v1beta5.MsgCloseLease) - - [MsgCloseLeaseResponse](#akash.market.v1beta5.MsgCloseLeaseResponse) - - [MsgCreateLease](#akash.market.v1beta5.MsgCreateLease) - - [MsgCreateLeaseResponse](#akash.market.v1beta5.MsgCreateLeaseResponse) - - [MsgWithdrawLease](#akash.market.v1beta5.MsgWithdrawLease) - - [MsgWithdrawLeaseResponse](#akash.market.v1beta5.MsgWithdrawLeaseResponse) - - - [Lease.State](#akash.market.v1beta5.Lease.State) - - - [akash/market/v1beta5/genesis.proto](#akash/market/v1beta5/genesis.proto) - - [GenesisState](#akash.market.v1beta5.GenesisState) - - - [akash/market/v1beta5/order.proto](#akash/market/v1beta5/order.proto) - - [Order](#akash.market.v1beta5.Order) - - [OrderFilters](#akash.market.v1beta5.OrderFilters) - - [OrderID](#akash.market.v1beta5.OrderID) - - - [Order.State](#akash.market.v1beta5.Order.State) - - - [akash/market/v1beta5/params.proto](#akash/market/v1beta5/params.proto) - - [Params](#akash.market.v1beta5.Params) - - - [akash/inflation/v1beta3/genesis.proto](#akash/inflation/v1beta3/genesis.proto) - - [GenesisState](#akash.inflation.v1beta3.GenesisState) - - - [akash/inflation/v1beta3/params.proto](#akash/inflation/v1beta3/params.proto) - - [Params](#akash.inflation.v1beta3.Params) - - - [akash/inflation/v1beta2/genesis.proto](#akash/inflation/v1beta2/genesis.proto) - - [GenesisState](#akash.inflation.v1beta2.GenesisState) - - - [akash/inflation/v1beta2/params.proto](#akash/inflation/v1beta2/params.proto) - - [Params](#akash.inflation.v1beta2.Params) + - [akash/provider/v1beta4/provider.proto](#akash/provider/v1beta4/provider.proto) + - [Info](#akash.provider.v1beta4.Info) + - [Provider](#akash.provider.v1beta4.Provider) - - [akash/base/v1beta3/memory.proto](#akash/base/v1beta3/memory.proto) - - [Memory](#akash.base.v1beta3.Memory) + - [akash/provider/v1beta4/genesis.proto](#akash/provider/v1beta4/genesis.proto) + - [GenesisState](#akash.provider.v1beta4.GenesisState) - - [akash/base/v1beta3/cpu.proto](#akash/base/v1beta3/cpu.proto) - - [CPU](#akash.base.v1beta3.CPU) + - [akash/provider/v1beta4/msg.proto](#akash/provider/v1beta4/msg.proto) + - [MsgCreateProvider](#akash.provider.v1beta4.MsgCreateProvider) + - [MsgCreateProviderResponse](#akash.provider.v1beta4.MsgCreateProviderResponse) + - [MsgDeleteProvider](#akash.provider.v1beta4.MsgDeleteProvider) + - [MsgDeleteProviderResponse](#akash.provider.v1beta4.MsgDeleteProviderResponse) + - [MsgUpdateProvider](#akash.provider.v1beta4.MsgUpdateProvider) + - [MsgUpdateProviderResponse](#akash.provider.v1beta4.MsgUpdateProviderResponse) - - [akash/base/v1beta3/resources.proto](#akash/base/v1beta3/resources.proto) - - [Resources](#akash.base.v1beta3.Resources) + - [akash/provider/v1beta4/query.proto](#akash/provider/v1beta4/query.proto) + - [QueryProviderRequest](#akash.provider.v1beta4.QueryProviderRequest) + - [QueryProviderResponse](#akash.provider.v1beta4.QueryProviderResponse) + - [QueryProvidersRequest](#akash.provider.v1beta4.QueryProvidersRequest) + - [QueryProvidersResponse](#akash.provider.v1beta4.QueryProvidersResponse) - - [akash/base/v1beta3/attribute.proto](#akash/base/v1beta3/attribute.proto) - - [Attribute](#akash.base.v1beta3.Attribute) - - [PlacementRequirements](#akash.base.v1beta3.PlacementRequirements) - - [SignedBy](#akash.base.v1beta3.SignedBy) + - [Query](#akash.provider.v1beta4.Query) - - [akash/base/v1beta3/endpoint.proto](#akash/base/v1beta3/endpoint.proto) - - [Endpoint](#akash.base.v1beta3.Endpoint) + - [akash/provider/v1beta4/service.proto](#akash/provider/v1beta4/service.proto) + - [Msg](#akash.provider.v1beta4.Msg) - - [Endpoint.Kind](#akash.base.v1beta3.Endpoint.Kind) + - [akash/staking/v1beta3/params.proto](#akash/staking/v1beta3/params.proto) + - [Params](#akash.staking.v1beta3.Params) - - [akash/base/v1beta3/gpu.proto](#akash/base/v1beta3/gpu.proto) - - [GPU](#akash.base.v1beta3.GPU) + - [akash/staking/v1beta3/genesis.proto](#akash/staking/v1beta3/genesis.proto) + - [GenesisState](#akash.staking.v1beta3.GenesisState) - - [akash/base/v1beta3/storage.proto](#akash/base/v1beta3/storage.proto) - - [Storage](#akash.base.v1beta3.Storage) + - [akash/take/v1beta3/params.proto](#akash/take/v1beta3/params.proto) + - [DenomTakeRate](#akash.take.v1beta3.DenomTakeRate) + - [Params](#akash.take.v1beta3.Params) - - [akash/base/v1beta3/resourcevalue.proto](#akash/base/v1beta3/resourcevalue.proto) - - [ResourceValue](#akash.base.v1beta3.ResourceValue) + - [akash/take/v1beta3/genesis.proto](#akash/take/v1beta3/genesis.proto) + - [GenesisState](#akash.take.v1beta3.GenesisState) - - [akash/base/v1beta2/resourceunits.proto](#akash/base/v1beta2/resourceunits.proto) - - [ResourceUnits](#akash.base.v1beta2.ResourceUnits) - - - [akash/base/v1beta2/attribute.proto](#akash/base/v1beta2/attribute.proto) - - [Attribute](#akash.base.v1beta2.Attribute) - - [PlacementRequirements](#akash.base.v1beta2.PlacementRequirements) - - [SignedBy](#akash.base.v1beta2.SignedBy) - - - [akash/base/v1beta2/endpoint.proto](#akash/base/v1beta2/endpoint.proto) - - [Endpoint](#akash.base.v1beta2.Endpoint) - - - [Endpoint.Kind](#akash.base.v1beta2.Endpoint.Kind) - - - [akash/base/v1beta2/resource.proto](#akash/base/v1beta2/resource.proto) - - [CPU](#akash.base.v1beta2.CPU) - - [Memory](#akash.base.v1beta2.Memory) - - [Storage](#akash.base.v1beta2.Storage) - - - [akash/base/v1beta2/resourcevalue.proto](#akash/base/v1beta2/resourcevalue.proto) - - [ResourceValue](#akash.base.v1beta2.ResourceValue) - - - [akash/base/v1beta1/attribute.proto](#akash/base/v1beta1/attribute.proto) - - [Attribute](#akash.base.v1beta1.Attribute) - - [PlacementRequirements](#akash.base.v1beta1.PlacementRequirements) - - [SignedBy](#akash.base.v1beta1.SignedBy) - - - [akash/base/v1beta1/endpoint.proto](#akash/base/v1beta1/endpoint.proto) - - [Endpoint](#akash.base.v1beta1.Endpoint) - - - [Endpoint.Kind](#akash.base.v1beta1.Endpoint.Kind) - - - [akash/base/v1beta1/resource.proto](#akash/base/v1beta1/resource.proto) - - [CPU](#akash.base.v1beta1.CPU) - - [Memory](#akash.base.v1beta1.Memory) - - [ResourceUnits](#akash.base.v1beta1.ResourceUnits) - - [Storage](#akash.base.v1beta1.Storage) - - - [akash/base/v1beta1/resourcevalue.proto](#akash/base/v1beta1/resourcevalue.proto) - - [ResourceValue](#akash.base.v1beta1.ResourceValue) - - - [akash/gov/v1beta3/genesis.proto](#akash/gov/v1beta3/genesis.proto) - - [GenesisState](#akash.gov.v1beta3.GenesisState) - - - [akash/gov/v1beta3/params.proto](#akash/gov/v1beta3/params.proto) - - [DepositParams](#akash.gov.v1beta3.DepositParams) + - [akash/take/v1beta3/query.proto](#akash/take/v1beta3/query.proto) + - [Query](#akash.take.v1beta3.Query) - [Scalar Value Types](#scalar-value-types) - -

Top

- - ## akash/discovery/v1/client_info.proto - - - - - - ### ClientInfo - ClientInfo akash specific client info - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `api_version` | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/discovery/v1/akash.proto - - - - - - ### Akash - Akash akash specific RPC parameters - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `client_info` | [ClientInfo](#akash.discovery.v1.ClientInfo) | | | - - - - - - - - - - - - - - - - +

Top

- ## akash/provider/v1beta4/query.proto - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderResponse - QueryProviderResponse is response type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `provider` | [Provider](#akash.provider.v1beta4.Provider) | | | - - - + ## akash/base/attributes/v1/attribute.proto - + - ### QueryProvidersRequest - QueryProvidersRequest is request type for the Query/Providers RPC method + ### Attribute + Attribute represents key value pair | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + | `key` | [string](#string) | | | + | `value` | [string](#string) | | | - + - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method + ### PlacementRequirements + PlacementRequirements | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta4.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - + | `signed_by` | [SignedBy](#akash.base.attributes.v1.SignedBy) | | SignedBy list of keys that tenants expect to have signatures from | + | `attributes` | [Attribute](#akash.base.attributes.v1.Attribute) | repeated | Attribute list of attributes tenant expects from the provider | - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Providers` | [QueryProvidersRequest](#akash.provider.v1beta4.QueryProvidersRequest) | [QueryProvidersResponse](#akash.provider.v1beta4.QueryProvidersResponse) | Providers queries providers | GET|/akash/provider/v1beta4/providers| - | `Provider` | [QueryProviderRequest](#akash.provider.v1beta4.QueryProviderRequest) | [QueryProviderResponse](#akash.provider.v1beta4.QueryProviderResponse) | Provider queries provider details | GET|/akash/provider/v1beta4/providers/{owner}| - - - - - -

Top

- ## akash/provider/v1beta4/genesis.proto - + - ### GenesisState - GenesisState defines the basic genesis state used by provider module + ### SignedBy + 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 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta4.Provider) | repeated | | + | `all_of` | [string](#string) | repeated | all_of all keys in this list must have signed attributes | + | `any_of` | [string](#string) | repeated | any_of at least of of the keys from the list must have signed attributes | @@ -1033,6550 +380,79 @@ - +

Top

- ## akash/provider/v1beta4/provider.proto + ## akash/audit/v1/audit.proto - + - ### MsgCreateProvider - MsgCreateProvider defines an SDK message for creating a provider + ### AttributesFilters + AttributesFilters defines filters used to filter deployments | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta4.ProviderInfo) | | | - - - - - + | `auditors` | [string](#string) | repeated | | + | `owners` | [string](#string) | repeated | | - - - ### MsgCreateProviderResponse - MsgCreateProviderResponse defines the Msg/CreateProvider response type. - - + - ### MsgDeleteProvider - MsgDeleteProvider defines an SDK message for deleting a provider + ### AttributesResponse + AttributesResponse represents details of deployment along with group details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - + | `attributes` | [AuditedAttributes](#akash.audit.v1.AuditedAttributes) | repeated | | - - - - - - - ### MsgDeleteProviderResponse - MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. - - + - ### MsgUpdateProvider - MsgUpdateProvider defines an SDK message for updating a provider + ### AuditedAttributes + Attributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | + | `auditor` | [string](#string) | | | | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta4.ProviderInfo) | | | - - - ### MsgUpdateProviderResponse - MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. - - - - - - - + ### Provider - Provider stores owner and host details + Provider stores owner auditor and attributes details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | + | `auditor` | [string](#string) | | | | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta4.ProviderInfo) | | | - - - - - - - - ### ProviderInfo - ProviderInfo - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `email` | [string](#string) | | | - | `website` | [string](#string) | | | - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateProvider` | [MsgCreateProvider](#akash.provider.v1beta4.MsgCreateProvider) | [MsgCreateProviderResponse](#akash.provider.v1beta4.MsgCreateProviderResponse) | CreateProvider defines a method that creates a provider given the proper inputs | | - | `UpdateProvider` | [MsgUpdateProvider](#akash.provider.v1beta4.MsgUpdateProvider) | [MsgUpdateProviderResponse](#akash.provider.v1beta4.MsgUpdateProviderResponse) | UpdateProvider defines a method that updates a provider given the proper inputs | | - | `DeleteProvider` | [MsgDeleteProvider](#akash.provider.v1beta4.MsgDeleteProvider) | [MsgDeleteProviderResponse](#akash.provider.v1beta4.MsgDeleteProviderResponse) | DeleteProvider defines a method that deletes a provider given the proper inputs | | - - - - - - -

Top

- - ## akash/provider/v1beta3/query.proto - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderResponse - QueryProviderResponse is response type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `provider` | [Provider](#akash.provider.v1beta3.Provider) | | | - - - - - - - - - ### QueryProvidersRequest - QueryProvidersRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta3.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Providers` | [QueryProvidersRequest](#akash.provider.v1beta3.QueryProvidersRequest) | [QueryProvidersResponse](#akash.provider.v1beta3.QueryProvidersResponse) | Providers queries providers | GET|/akash/provider/v1beta3/providers| - | `Provider` | [QueryProviderRequest](#akash.provider.v1beta3.QueryProviderRequest) | [QueryProviderResponse](#akash.provider.v1beta3.QueryProviderResponse) | Provider queries provider details | GET|/akash/provider/v1beta3/providers/{owner}| - - - - - - -

Top

- - ## akash/provider/v1beta3/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by provider module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta3.Provider) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/provider/v1beta3/provider.proto - - - - - - ### MsgCreateProvider - MsgCreateProvider defines an SDK message for creating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta3.ProviderInfo) | | | - - - - - - - - - ### MsgCreateProviderResponse - MsgCreateProviderResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### MsgDeleteProvider - MsgDeleteProvider defines an SDK message for deleting a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### MsgDeleteProviderResponse - MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. - - - - - - - - - ### MsgUpdateProvider - MsgUpdateProvider defines an SDK message for updating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta3.ProviderInfo) | | | - - - - - - - - - ### MsgUpdateProviderResponse - MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. - - - - - - - - - ### Provider - Provider stores owner and host details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta3.ProviderInfo) | | | - - - - - - - - - ### ProviderInfo - ProviderInfo - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `email` | [string](#string) | | | - | `website` | [string](#string) | | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateProvider` | [MsgCreateProvider](#akash.provider.v1beta3.MsgCreateProvider) | [MsgCreateProviderResponse](#akash.provider.v1beta3.MsgCreateProviderResponse) | CreateProvider defines a method that creates a provider given the proper inputs | | - | `UpdateProvider` | [MsgUpdateProvider](#akash.provider.v1beta3.MsgUpdateProvider) | [MsgUpdateProviderResponse](#akash.provider.v1beta3.MsgUpdateProviderResponse) | UpdateProvider defines a method that updates a provider given the proper inputs | | - | `DeleteProvider` | [MsgDeleteProvider](#akash.provider.v1beta3.MsgDeleteProvider) | [MsgDeleteProviderResponse](#akash.provider.v1beta3.MsgDeleteProviderResponse) | DeleteProvider defines a method that deletes a provider given the proper inputs | | - - - - - - -

Top

- - ## akash/provider/v1beta2/query.proto - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderResponse - QueryProviderResponse is response type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `provider` | [Provider](#akash.provider.v1beta2.Provider) | | | - - - - - - - - - ### QueryProvidersRequest - QueryProvidersRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta2.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Providers` | [QueryProvidersRequest](#akash.provider.v1beta2.QueryProvidersRequest) | [QueryProvidersResponse](#akash.provider.v1beta2.QueryProvidersResponse) | Providers queries providers | GET|/akash/provider/v1beta2/providers| - | `Provider` | [QueryProviderRequest](#akash.provider.v1beta2.QueryProviderRequest) | [QueryProviderResponse](#akash.provider.v1beta2.QueryProviderResponse) | Provider queries provider details | GET|/akash/provider/v1beta2/providers/{owner}| - - - - - - -

Top

- - ## akash/provider/v1beta2/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by provider module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.provider.v1beta2.Provider) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/provider/v1beta2/provider.proto - - - - - - ### MsgCreateProvider - MsgCreateProvider defines an SDK message for creating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta2.ProviderInfo) | | | - - - - - - - - - ### MsgCreateProviderResponse - MsgCreateProviderResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### MsgDeleteProvider - MsgDeleteProvider defines an SDK message for deleting a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### MsgDeleteProviderResponse - MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. - - - - - - - - - ### MsgUpdateProvider - MsgUpdateProvider defines an SDK message for updating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta2.ProviderInfo) | | | - - - - - - - - - ### MsgUpdateProviderResponse - MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. - - - - - - - - - ### Provider - Provider stores owner and host details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta2.ProviderInfo) | | | - - - - - - - - - ### ProviderInfo - ProviderInfo - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `email` | [string](#string) | | | - | `website` | [string](#string) | | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateProvider` | [MsgCreateProvider](#akash.provider.v1beta2.MsgCreateProvider) | [MsgCreateProviderResponse](#akash.provider.v1beta2.MsgCreateProviderResponse) | CreateProvider defines a method that creates a provider given the proper inputs | | - | `UpdateProvider` | [MsgUpdateProvider](#akash.provider.v1beta2.MsgUpdateProvider) | [MsgUpdateProviderResponse](#akash.provider.v1beta2.MsgUpdateProviderResponse) | UpdateProvider defines a method that updates a provider given the proper inputs | | - | `DeleteProvider` | [MsgDeleteProvider](#akash.provider.v1beta2.MsgDeleteProvider) | [MsgDeleteProviderResponse](#akash.provider.v1beta2.MsgDeleteProviderResponse) | DeleteProvider defines a method that deletes a provider given the proper inputs | | - - - - - - -

Top

- - ## akash/provider/v1beta1/provider.proto - - - - - - ### MsgCreateProvider - MsgCreateProvider defines an SDK message for creating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta1.ProviderInfo) | | | - - - - - - - - - ### MsgCreateProviderResponse - MsgCreateProviderResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### MsgDeleteProvider - MsgDeleteProvider defines an SDK message for deleting a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - - - - - - - - - ### MsgDeleteProviderResponse - MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. - - - - - - - - - ### MsgUpdateProvider - MsgUpdateProvider defines an SDK message for updating a provider - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta1.ProviderInfo) | | | - - - - - - - - - ### MsgUpdateProviderResponse - MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. - - - - - - - - - ### Provider - Provider stores owner and host details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `host_uri` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - | `info` | [ProviderInfo](#akash.provider.v1beta1.ProviderInfo) | | | - - - - - - - - - ### ProviderInfo - ProviderInfo - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `email` | [string](#string) | | | - | `website` | [string](#string) | | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateProvider` | [MsgCreateProvider](#akash.provider.v1beta1.MsgCreateProvider) | [MsgCreateProviderResponse](#akash.provider.v1beta1.MsgCreateProviderResponse) | CreateProvider defines a method that creates a provider given the proper inputs | | - | `UpdateProvider` | [MsgUpdateProvider](#akash.provider.v1beta1.MsgUpdateProvider) | [MsgUpdateProviderResponse](#akash.provider.v1beta1.MsgUpdateProviderResponse) | UpdateProvider defines a method that updates a provider given the proper inputs | | - | `DeleteProvider` | [MsgDeleteProvider](#akash.provider.v1beta1.MsgDeleteProvider) | [MsgDeleteProviderResponse](#akash.provider.v1beta1.MsgDeleteProviderResponse) | DeleteProvider defines a method that deletes a provider given the proper inputs | | - - - - - - -

Top

- - ## akash/audit/v1beta4/audit.proto - - - - - - ### AttributesFilters - AttributesFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditors` | [string](#string) | repeated | | - | `owners` | [string](#string) | repeated | | - - - - - - - - - ### AttributesResponse - AttributesResponse represents details of deployment along with group details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta4.AuditedAttributes) | repeated | | - - - - - - - - - ### AuditedAttributes - Attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributes - MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `keys` | [string](#string) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributesResponse - MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. - - - - - - - - - ### MsgSignProviderAttributes - MsgSignProviderAttributes defines an SDK message for signing a provider attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - - - - - - - - ### MsgSignProviderAttributesResponse - MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### Provider - Provider stores owner auditor and attributes details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `SignProviderAttributes` | [MsgSignProviderAttributes](#akash.audit.v1beta4.MsgSignProviderAttributes) | [MsgSignProviderAttributesResponse](#akash.audit.v1beta4.MsgSignProviderAttributesResponse) | SignProviderAttributes defines a method that signs provider attributes | | - | `DeleteProviderAttributes` | [MsgDeleteProviderAttributes](#akash.audit.v1beta4.MsgDeleteProviderAttributes) | [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta4.MsgDeleteProviderAttributesResponse) | DeleteProviderAttributes defines a method that deletes provider attributes | | - - - - - - -

Top

- - ## akash/audit/v1beta4/query.proto - - - - - - ### QueryAllProvidersAttributesRequest - QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAuditorAttributesRequest - QueryAuditorAttributesRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAttributesRequest - QueryProviderAttributesRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAuditorRequest - QueryProviderAuditorRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.audit.v1beta4.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `AllProvidersAttributes` | [QueryAllProvidersAttributesRequest](#akash.audit.v1beta4.QueryAllProvidersAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta4.QueryProvidersResponse) | AllProvidersAttributes queries all providers buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta4/audit/attributes/list| - | `ProviderAttributes` | [QueryProviderAttributesRequest](#akash.audit.v1beta4.QueryProviderAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta4.QueryProvidersResponse) | ProviderAttributes queries all provider signed attributes buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta4/audit/attributes/{owner}/list| - | `ProviderAuditorAttributes` | [QueryProviderAuditorRequest](#akash.audit.v1beta4.QueryProviderAuditorRequest) | [QueryProvidersResponse](#akash.audit.v1beta4.QueryProvidersResponse) | ProviderAuditorAttributes queries provider signed attributes by specific auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta4/audit/attributes/{auditor}/{owner}| - | `AuditorAttributes` | [QueryAuditorAttributesRequest](#akash.audit.v1beta4.QueryAuditorAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta4.QueryProvidersResponse) | AuditorAttributes queries all providers signed by this auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/provider/v1beta4/auditor/{auditor}/list| - - - - - - -

Top

- - ## akash/audit/v1beta4/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by audit module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta4.AuditedAttributes) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/audit/v1beta3/audit.proto - - - - - - ### AttributesFilters - AttributesFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditors` | [string](#string) | repeated | | - | `owners` | [string](#string) | repeated | | - - - - - - - - - ### AttributesResponse - AttributesResponse represents details of deployment along with group details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta3.AuditedAttributes) | repeated | | - - - - - - - - - ### AuditedAttributes - Attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributes - MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `keys` | [string](#string) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributesResponse - MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. - - - - - - - - - ### MsgSignProviderAttributes - MsgSignProviderAttributes defines an SDK message for signing a provider attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - - - - - - - - - ### MsgSignProviderAttributesResponse - MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### Provider - Provider stores owner auditor and attributes details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `SignProviderAttributes` | [MsgSignProviderAttributes](#akash.audit.v1beta3.MsgSignProviderAttributes) | [MsgSignProviderAttributesResponse](#akash.audit.v1beta3.MsgSignProviderAttributesResponse) | SignProviderAttributes defines a method that signs provider attributes | | - | `DeleteProviderAttributes` | [MsgDeleteProviderAttributes](#akash.audit.v1beta3.MsgDeleteProviderAttributes) | [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta3.MsgDeleteProviderAttributesResponse) | DeleteProviderAttributes defines a method that deletes provider attributes | | - - - - - - -

Top

- - ## akash/audit/v1beta3/query.proto - - - - - - ### QueryAllProvidersAttributesRequest - QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAuditorAttributesRequest - QueryAuditorAttributesRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAttributesRequest - QueryProviderAttributesRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAuditorRequest - QueryProviderAuditorRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.audit.v1beta3.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `AllProvidersAttributes` | [QueryAllProvidersAttributesRequest](#akash.audit.v1beta3.QueryAllProvidersAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta3.QueryProvidersResponse) | AllProvidersAttributes queries all providers buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta3/audit/attributes/list| - | `ProviderAttributes` | [QueryProviderAttributesRequest](#akash.audit.v1beta3.QueryProviderAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta3.QueryProvidersResponse) | ProviderAttributes queries all provider signed attributes buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta3/audit/attributes/{owner}/list| - | `ProviderAuditorAttributes` | [QueryProviderAuditorRequest](#akash.audit.v1beta3.QueryProviderAuditorRequest) | [QueryProvidersResponse](#akash.audit.v1beta3.QueryProvidersResponse) | ProviderAuditorAttributes queries provider signed attributes by specific auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta3/audit/attributes/{auditor}/{owner}| - | `AuditorAttributes` | [QueryAuditorAttributesRequest](#akash.audit.v1beta3.QueryAuditorAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta3.QueryProvidersResponse) | AuditorAttributes queries all providers signed by this auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/provider/v1beta3/auditor/{auditor}/list| - - - - - - -

Top

- - ## akash/audit/v1beta3/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by audit module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta3.AuditedAttributes) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/audit/v1beta2/audit.proto - - - - - - ### AttributesFilters - AttributesFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditors` | [string](#string) | repeated | | - | `owners` | [string](#string) | repeated | | - - - - - - - - - ### AttributesResponse - AttributesResponse represents details of deployment along with group details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta2.AuditedAttributes) | repeated | | - - - - - - - - - ### AuditedAttributes - Attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributes - MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `keys` | [string](#string) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributesResponse - MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. - - - - - - - - - ### MsgSignProviderAttributes - MsgSignProviderAttributes defines an SDK message for signing a provider attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - - - - - - - - - ### MsgSignProviderAttributesResponse - MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### Provider - Provider stores owner auditor and attributes details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta2.Attribute](#akash.base.v1beta2.Attribute) | repeated | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `SignProviderAttributes` | [MsgSignProviderAttributes](#akash.audit.v1beta2.MsgSignProviderAttributes) | [MsgSignProviderAttributesResponse](#akash.audit.v1beta2.MsgSignProviderAttributesResponse) | SignProviderAttributes defines a method that signs provider attributes | | - | `DeleteProviderAttributes` | [MsgDeleteProviderAttributes](#akash.audit.v1beta2.MsgDeleteProviderAttributes) | [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta2.MsgDeleteProviderAttributesResponse) | DeleteProviderAttributes defines a method that deletes provider attributes | | - - - - - - -

Top

- - ## akash/audit/v1beta2/query.proto - - - - - - ### QueryAllProvidersAttributesRequest - QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAuditorAttributesRequest - QueryAuditorAttributesRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAttributesRequest - QueryProviderAttributesRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryProviderAuditorRequest - QueryProviderAuditorRequest is request type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProviderRequest - QueryProviderRequest is request type for the Query/Provider RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditor` | [string](#string) | | | - | `owner` | [string](#string) | | | - - - - - - - - - ### QueryProvidersResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `providers` | [Provider](#akash.audit.v1beta2.Provider) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `AllProvidersAttributes` | [QueryAllProvidersAttributesRequest](#akash.audit.v1beta2.QueryAllProvidersAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta2.QueryProvidersResponse) | AllProvidersAttributes queries all providers buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta2/audit/attributes/list| - | `ProviderAttributes` | [QueryProviderAttributesRequest](#akash.audit.v1beta2.QueryProviderAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta2.QueryProvidersResponse) | ProviderAttributes queries all provider signed attributes buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta2/audit/attributes/{owner}/list| - | `ProviderAuditorAttributes` | [QueryProviderAuditorRequest](#akash.audit.v1beta2.QueryProviderAuditorRequest) | [QueryProvidersResponse](#akash.audit.v1beta2.QueryProvidersResponse) | ProviderAuditorAttributes queries provider signed attributes by specific auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1beta2/audit/attributes/{auditor}/{owner}| - | `AuditorAttributes` | [QueryAuditorAttributesRequest](#akash.audit.v1beta2.QueryAuditorAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1beta2.QueryProvidersResponse) | AuditorAttributes queries all providers signed by this auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/provider/v1beta2/auditor/{auditor}/list| - - - - - - -

Top

- - ## akash/audit/v1beta2/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by audit module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta2.AuditedAttributes) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/audit/v1beta1/audit.proto - - - - - - ### AttributesFilters - AttributesFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `auditors` | [string](#string) | repeated | | - | `owners` | [string](#string) | repeated | | - - - - - - - - - ### AttributesResponse - AttributesResponse represents details of deployment along with group details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `attributes` | [AuditedAttributes](#akash.audit.v1beta1.AuditedAttributes) | repeated | | - - - - - - - - - ### AuditedAttributes - Attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributes - MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `keys` | [string](#string) | repeated | | - - - - - - - - - ### MsgDeleteProviderAttributesResponse - MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. - - - - - - - - - ### MsgSignProviderAttributes - MsgSignProviderAttributes defines an SDK message for signing a provider attributes - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - - - - - - - - - ### MsgSignProviderAttributesResponse - MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. - - - - - - - - - ### Provider - Provider stores owner auditor and attributes details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `auditor` | [string](#string) | | | - | `attributes` | [akash.base.v1beta1.Attribute](#akash.base.v1beta1.Attribute) | repeated | | - - - - - - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `SignProviderAttributes` | [MsgSignProviderAttributes](#akash.audit.v1beta1.MsgSignProviderAttributes) | [MsgSignProviderAttributesResponse](#akash.audit.v1beta1.MsgSignProviderAttributesResponse) | SignProviderAttributes defines a method that signs provider attributes | | - | `DeleteProviderAttributes` | [MsgDeleteProviderAttributes](#akash.audit.v1beta1.MsgDeleteProviderAttributes) | [MsgDeleteProviderAttributesResponse](#akash.audit.v1beta1.MsgDeleteProviderAttributesResponse) | DeleteProviderAttributes defines a method that deletes provider attributes | | - - - - - - -

Top

- - ## akash/take/v1beta3/query.proto - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - - - - - - -

Top

- - ## akash/take/v1beta3/genesis.proto - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.take.v1beta3.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/take/v1beta3/params.proto - - - - - - ### DenomTakeRate - DenomTakeRate describes take rate for specified denom - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `denom` | [string](#string) | | | - | `rate` | [uint32](#uint32) | | | - - - - - - - - - ### Params - Params defines the parameters for the x/take package - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `denom_take_rates` | [DenomTakeRate](#akash.take.v1beta3.DenomTakeRate) | repeated | denom -> % take rate | - | `default_take_rate` | [uint32](#uint32) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/groupmsg.proto - - - - - - ### MsgCloseGroup - MsgCloseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta4.GroupID) | | | - - - - - - - - - ### MsgCloseGroupResponse - MsgCloseGroupResponse defines the Msg/CloseGroup response type. - - - - - - - - - ### MsgPauseGroup - MsgPauseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta4.GroupID) | | | - - - - - - - - - ### MsgPauseGroupResponse - MsgPauseGroupResponse defines the Msg/PauseGroup response type. - - - - - - - - - ### MsgStartGroup - MsgStartGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta4.GroupID) | | | - - - - - - - - - ### MsgStartGroupResponse - MsgStartGroupResponse defines the Msg/StartGroup response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/resourceunit.proto - - - - - - ### ResourceUnit - ResourceUnit extends Resources and adds Count along with the Price - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `resource` | [akash.base.resources.v1.Resources](#akash.base.resources.v1.Resources) | | | - | `count` | [uint32](#uint32) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/group.proto - - - - - - ### Group - Group stores group id, state and specifications of group - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group_id` | [GroupID](#akash.deployment.v1beta4.GroupID) | | | - | `state` | [Group.State](#akash.deployment.v1beta4.Group.State) | | | - | `group_spec` | [GroupSpec](#akash.deployment.v1beta4.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - - - ### Group.State - State is an enum which refers to state of group - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | GroupOpen denotes state for group open | - | paused | 2 | GroupOrdered denotes state for group ordered | - | insufficient_funds | 3 | GroupInsufficientFunds denotes state for group insufficient_funds | - | closed | 4 | GroupClosed denotes state for group closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/groupid.proto - - - - - - ### GroupID - GroupID stores owner, deployment sequence number and group sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/deployment.proto - - - - - - ### Deployment - Deployment stores deploymentID, state and version details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - | `state` | [Deployment.State](#akash.deployment.v1beta4.Deployment.State) | | | - | `version` | [bytes](#bytes) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - ### DeploymentFilters - DeploymentFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### DeploymentID - DeploymentID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - - - - - - - - - - - ### Deployment.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | DeploymentActive denotes state for deployment active | - | closed | 2 | DeploymentClosed denotes state for deployment closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/query.proto - - - - - - ### QueryDeploymentRequest - QueryDeploymentRequest is request type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - - - - - - - - - ### QueryDeploymentResponse - QueryDeploymentResponse is response type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta4.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta4.Group) | repeated | | - | `escrow_account` | [akash.escrow.v1beta3.Account](#akash.escrow.v1beta3.Account) | | | - - - - - - - - - ### QueryDeploymentsRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [DeploymentFilters](#akash.deployment.v1beta4.DeploymentFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryDeploymentsResponse - QueryDeploymentsResponse is response type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [QueryDeploymentResponse](#akash.deployment.v1beta4.QueryDeploymentResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryGroupRequest - QueryGroupRequest is request type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta4.GroupID) | | | - - - - - - - - - ### QueryGroupResponse - QueryGroupResponse is response type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group` | [Group](#akash.deployment.v1beta4.Group) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Deployments` | [QueryDeploymentsRequest](#akash.deployment.v1beta4.QueryDeploymentsRequest) | [QueryDeploymentsResponse](#akash.deployment.v1beta4.QueryDeploymentsResponse) | Deployments queries deployments | GET|/akash/deployment/v1beta4/deployments/list| - | `Deployment` | [QueryDeploymentRequest](#akash.deployment.v1beta4.QueryDeploymentRequest) | [QueryDeploymentResponse](#akash.deployment.v1beta4.QueryDeploymentResponse) | Deployment queries deployment details | GET|/akash/deployment/v1beta4/deployments/info| - | `Group` | [QueryGroupRequest](#akash.deployment.v1beta4.QueryGroupRequest) | [QueryGroupResponse](#akash.deployment.v1beta4.QueryGroupResponse) | Group queries group details | GET|/akash/deployment/v1beta4/groups/info| - - - - - - -

Top

- - ## akash/deployment/v1beta4/deploymentmsg.proto - - - - - - ### MsgCloseDeployment - MsgCloseDeployment defines an SDK message for closing deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - - - - - - - - - ### MsgCloseDeploymentResponse - MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. - - - - - - - - - ### MsgCreateDeployment - MsgCreateDeployment defines an SDK message for creating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - | `groups` | [GroupSpec](#akash.deployment.v1beta4.GroupSpec) | repeated | | - | `version` | [bytes](#bytes) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgCreateDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgDepositDeployment - MsgDepositDeployment deposits more funds into the deposit account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgDepositDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgUpdateDeployment - MsgUpdateDeployment defines an SDK message for updating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta4.DeploymentID) | | | - | `version` | [bytes](#bytes) | | | - - - - - - - - - ### MsgUpdateDeploymentResponse - MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/service.proto - - - - - - - - - - - - ### Msg - Msg defines the deployment Msg service. - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateDeployment` | [MsgCreateDeployment](#akash.deployment.v1beta4.MsgCreateDeployment) | [MsgCreateDeploymentResponse](#akash.deployment.v1beta4.MsgCreateDeploymentResponse) | CreateDeployment defines a method to create new deployment given proper inputs. | | - | `DepositDeployment` | [MsgDepositDeployment](#akash.deployment.v1beta4.MsgDepositDeployment) | [MsgDepositDeploymentResponse](#akash.deployment.v1beta4.MsgDepositDeploymentResponse) | DepositDeployment deposits more funds into the deployment account | | - | `UpdateDeployment` | [MsgUpdateDeployment](#akash.deployment.v1beta4.MsgUpdateDeployment) | [MsgUpdateDeploymentResponse](#akash.deployment.v1beta4.MsgUpdateDeploymentResponse) | UpdateDeployment defines a method to update a deployment given proper inputs. | | - | `CloseDeployment` | [MsgCloseDeployment](#akash.deployment.v1beta4.MsgCloseDeployment) | [MsgCloseDeploymentResponse](#akash.deployment.v1beta4.MsgCloseDeploymentResponse) | CloseDeployment defines a method to close a deployment given proper inputs. | | - | `CloseGroup` | [MsgCloseGroup](#akash.deployment.v1beta4.MsgCloseGroup) | [MsgCloseGroupResponse](#akash.deployment.v1beta4.MsgCloseGroupResponse) | CloseGroup defines a method to close a group of a deployment given proper inputs. | | - | `PauseGroup` | [MsgPauseGroup](#akash.deployment.v1beta4.MsgPauseGroup) | [MsgPauseGroupResponse](#akash.deployment.v1beta4.MsgPauseGroupResponse) | PauseGroup defines a method to close a group of a deployment given proper inputs. | | - | `StartGroup` | [MsgStartGroup](#akash.deployment.v1beta4.MsgStartGroup) | [MsgStartGroupResponse](#akash.deployment.v1beta4.MsgStartGroupResponse) | StartGroup defines a method to close a group of a deployment given proper inputs. | | - - - - - - -

Top

- - ## akash/deployment/v1beta4/authz.proto - - - - - - ### DepositDeploymentAuthorization - DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from -the granter's account for a deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | SpendLimit is the amount the grantee is authorized to spend from the granter's account for the purpose of deployment. | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/genesis.proto - - - - - - ### GenesisDeployment - GenesisDeployment defines the basic genesis state used by deployment module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta4.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta4.Group) | repeated | | - - - - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [GenesisDeployment](#akash.deployment.v1beta4.GenesisDeployment) | repeated | | - | `params` | [Params](#akash.deployment.v1beta4.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/groupspec.proto - - - - - - ### GroupSpec - GroupSpec stores group specifications - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `requirements` | [akash.base.attributes.v1.PlacementRequirements](#akash.base.attributes.v1.PlacementRequirements) | | | - | `resources` | [ResourceUnit](#akash.deployment.v1beta4.ResourceUnit) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta4/params.proto - - - - - - ### Params - Params defines the parameters for the x/deployment package - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `min_deposits` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/groupmsg.proto - - - - - - ### MsgCloseGroup - MsgCloseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta3.GroupID) | | | - - - - - - - - - ### MsgCloseGroupResponse - MsgCloseGroupResponse defines the Msg/CloseGroup response type. - - - - - - - - - ### MsgPauseGroup - MsgPauseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta3.GroupID) | | | - - - - - - - - - ### MsgPauseGroupResponse - MsgPauseGroupResponse defines the Msg/PauseGroup response type. - - - - - - - - - ### MsgStartGroup - MsgStartGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta3.GroupID) | | | - - - - - - - - - ### MsgStartGroupResponse - MsgStartGroupResponse defines the Msg/StartGroup response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/resourceunit.proto - - - - - - ### ResourceUnit - ResourceUnit extends Resources and adds Count along with the Price - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `resource` | [akash.base.v1beta3.Resources](#akash.base.v1beta3.Resources) | | | - | `count` | [uint32](#uint32) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/group.proto - - - - - - ### Group - Group stores group id, state and specifications of group - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group_id` | [GroupID](#akash.deployment.v1beta3.GroupID) | | | - | `state` | [Group.State](#akash.deployment.v1beta3.Group.State) | | | - | `group_spec` | [GroupSpec](#akash.deployment.v1beta3.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - - - ### Group.State - State is an enum which refers to state of group - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | GroupOpen denotes state for group open | - | paused | 2 | GroupOrdered denotes state for group ordered | - | insufficient_funds | 3 | GroupInsufficientFunds denotes state for group insufficient_funds | - | closed | 4 | GroupClosed denotes state for group closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/groupid.proto - - - - - - ### GroupID - GroupID stores owner, deployment sequence number and group sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/deployment.proto - - - - - - ### Deployment - Deployment stores deploymentID, state and version details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - | `state` | [Deployment.State](#akash.deployment.v1beta3.Deployment.State) | | | - | `version` | [bytes](#bytes) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - ### DeploymentFilters - DeploymentFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### DeploymentID - DeploymentID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - - - - - - - - - - - ### Deployment.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | DeploymentActive denotes state for deployment active | - | closed | 2 | DeploymentClosed denotes state for deployment closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/query.proto - - - - - - ### QueryDeploymentRequest - QueryDeploymentRequest is request type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - - - - - - - - - ### QueryDeploymentResponse - QueryDeploymentResponse is response type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta3.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta3.Group) | repeated | | - | `escrow_account` | [akash.escrow.v1beta3.Account](#akash.escrow.v1beta3.Account) | | | - - - - - - - - - ### QueryDeploymentsRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [DeploymentFilters](#akash.deployment.v1beta3.DeploymentFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryDeploymentsResponse - QueryDeploymentsResponse is response type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [QueryDeploymentResponse](#akash.deployment.v1beta3.QueryDeploymentResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryGroupRequest - QueryGroupRequest is request type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta3.GroupID) | | | - - - - - - - - - ### QueryGroupResponse - QueryGroupResponse is response type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group` | [Group](#akash.deployment.v1beta3.Group) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Deployments` | [QueryDeploymentsRequest](#akash.deployment.v1beta3.QueryDeploymentsRequest) | [QueryDeploymentsResponse](#akash.deployment.v1beta3.QueryDeploymentsResponse) | Deployments queries deployments | GET|/akash/deployment/v1beta3/deployments/list| - | `Deployment` | [QueryDeploymentRequest](#akash.deployment.v1beta3.QueryDeploymentRequest) | [QueryDeploymentResponse](#akash.deployment.v1beta3.QueryDeploymentResponse) | Deployment queries deployment details | GET|/akash/deployment/v1beta3/deployments/info| - | `Group` | [QueryGroupRequest](#akash.deployment.v1beta3.QueryGroupRequest) | [QueryGroupResponse](#akash.deployment.v1beta3.QueryGroupResponse) | Group queries group details | GET|/akash/deployment/v1beta3/groups/info| - - - - - - -

Top

- - ## akash/deployment/v1beta3/deploymentmsg.proto - - - - - - ### MsgCloseDeployment - MsgCloseDeployment defines an SDK message for closing deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - - - - - - - - - ### MsgCloseDeploymentResponse - MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. - - - - - - - - - ### MsgCreateDeployment - MsgCreateDeployment defines an SDK message for creating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - | `groups` | [GroupSpec](#akash.deployment.v1beta3.GroupSpec) | repeated | | - | `version` | [bytes](#bytes) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgCreateDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgDepositDeployment - MsgDepositDeployment deposits more funds into the deposit account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgDepositDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgUpdateDeployment - MsgUpdateDeployment defines an SDK message for updating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta3.DeploymentID) | | | - | `version` | [bytes](#bytes) | | | - - - - - - - - - ### MsgUpdateDeploymentResponse - MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/service.proto - - - - - - - - - - - - ### Msg - Msg defines the deployment Msg service. - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateDeployment` | [MsgCreateDeployment](#akash.deployment.v1beta3.MsgCreateDeployment) | [MsgCreateDeploymentResponse](#akash.deployment.v1beta3.MsgCreateDeploymentResponse) | CreateDeployment defines a method to create new deployment given proper inputs. | | - | `DepositDeployment` | [MsgDepositDeployment](#akash.deployment.v1beta3.MsgDepositDeployment) | [MsgDepositDeploymentResponse](#akash.deployment.v1beta3.MsgDepositDeploymentResponse) | DepositDeployment deposits more funds into the deployment account | | - | `UpdateDeployment` | [MsgUpdateDeployment](#akash.deployment.v1beta3.MsgUpdateDeployment) | [MsgUpdateDeploymentResponse](#akash.deployment.v1beta3.MsgUpdateDeploymentResponse) | UpdateDeployment defines a method to update a deployment given proper inputs. | | - | `CloseDeployment` | [MsgCloseDeployment](#akash.deployment.v1beta3.MsgCloseDeployment) | [MsgCloseDeploymentResponse](#akash.deployment.v1beta3.MsgCloseDeploymentResponse) | CloseDeployment defines a method to close a deployment given proper inputs. | | - | `CloseGroup` | [MsgCloseGroup](#akash.deployment.v1beta3.MsgCloseGroup) | [MsgCloseGroupResponse](#akash.deployment.v1beta3.MsgCloseGroupResponse) | CloseGroup defines a method to close a group of a deployment given proper inputs. | | - | `PauseGroup` | [MsgPauseGroup](#akash.deployment.v1beta3.MsgPauseGroup) | [MsgPauseGroupResponse](#akash.deployment.v1beta3.MsgPauseGroupResponse) | PauseGroup defines a method to close a group of a deployment given proper inputs. | | - | `StartGroup` | [MsgStartGroup](#akash.deployment.v1beta3.MsgStartGroup) | [MsgStartGroupResponse](#akash.deployment.v1beta3.MsgStartGroupResponse) | StartGroup defines a method to close a group of a deployment given proper inputs. | | - - - - - - -

Top

- - ## akash/deployment/v1beta3/authz.proto - - - - - - ### DepositDeploymentAuthorization - DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from -the granter's account for a deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | SpendLimit is the amount the grantee is authorized to spend from the granter's account for the purpose of deployment. | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/genesis.proto - - - - - - ### GenesisDeployment - GenesisDeployment defines the basic genesis state used by deployment module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta3.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta3.Group) | repeated | | - - - - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [GenesisDeployment](#akash.deployment.v1beta3.GenesisDeployment) | repeated | | - | `params` | [Params](#akash.deployment.v1beta3.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/groupspec.proto - - - - - - ### GroupSpec - GroupSpec stores group specifications - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `requirements` | [akash.base.v1beta3.PlacementRequirements](#akash.base.v1beta3.PlacementRequirements) | | | - | `resources` | [ResourceUnit](#akash.deployment.v1beta3.ResourceUnit) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta3/params.proto - - - - - - ### Params - Params defines the parameters for the x/deployment package - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `min_deposits` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/groupmsg.proto - - - - - - ### MsgCloseGroup - MsgCloseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta2.GroupID) | | | - - - - - - - - - ### MsgCloseGroupResponse - MsgCloseGroupResponse defines the Msg/CloseGroup response type. - - - - - - - - - ### MsgPauseGroup - MsgPauseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta2.GroupID) | | | - - - - - - - - - ### MsgPauseGroupResponse - MsgPauseGroupResponse defines the Msg/PauseGroup response type. - - - - - - - - - ### MsgStartGroup - MsgStartGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta2.GroupID) | | | - - - - - - - - - ### MsgStartGroupResponse - MsgStartGroupResponse defines the Msg/StartGroup response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/group.proto - - - - - - ### Group - Group stores group id, state and specifications of group - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group_id` | [GroupID](#akash.deployment.v1beta2.GroupID) | | | - | `state` | [Group.State](#akash.deployment.v1beta2.Group.State) | | | - | `group_spec` | [GroupSpec](#akash.deployment.v1beta2.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - - - ### Group.State - State is an enum which refers to state of group - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | GroupOpen denotes state for group open | - | paused | 2 | GroupOrdered denotes state for group ordered | - | insufficient_funds | 3 | GroupInsufficientFunds denotes state for group insufficient_funds | - | closed | 4 | GroupClosed denotes state for group closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/groupid.proto - - - - - - ### GroupID - GroupID stores owner, deployment sequence number and group sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/deployment.proto - - - - - - ### Deployment - Deployment stores deploymentID, state and version details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - | `state` | [Deployment.State](#akash.deployment.v1beta2.Deployment.State) | | | - | `version` | [bytes](#bytes) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - ### DeploymentFilters - DeploymentFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### DeploymentID - DeploymentID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - - - - - - - - - - - ### Deployment.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | DeploymentActive denotes state for deployment active | - | closed | 2 | DeploymentClosed denotes state for deployment closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/query.proto - - - - - - ### QueryDeploymentRequest - QueryDeploymentRequest is request type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - - - - - - - - - ### QueryDeploymentResponse - QueryDeploymentResponse is response type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta2.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta2.Group) | repeated | | - | `escrow_account` | [akash.escrow.v1beta2.Account](#akash.escrow.v1beta2.Account) | | | - - - - - - - - - ### QueryDeploymentsRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [DeploymentFilters](#akash.deployment.v1beta2.DeploymentFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryDeploymentsResponse - QueryDeploymentsResponse is response type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [QueryDeploymentResponse](#akash.deployment.v1beta2.QueryDeploymentResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryGroupRequest - QueryGroupRequest is request type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta2.GroupID) | | | - - - - - - - - - ### QueryGroupResponse - QueryGroupResponse is response type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group` | [Group](#akash.deployment.v1beta2.Group) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Deployments` | [QueryDeploymentsRequest](#akash.deployment.v1beta2.QueryDeploymentsRequest) | [QueryDeploymentsResponse](#akash.deployment.v1beta2.QueryDeploymentsResponse) | Deployments queries deployments | GET|/akash/deployment/v1beta2/deployments/list| - | `Deployment` | [QueryDeploymentRequest](#akash.deployment.v1beta2.QueryDeploymentRequest) | [QueryDeploymentResponse](#akash.deployment.v1beta2.QueryDeploymentResponse) | Deployment queries deployment details | GET|/akash/deployment/v1beta2/deployments/info| - | `Group` | [QueryGroupRequest](#akash.deployment.v1beta2.QueryGroupRequest) | [QueryGroupResponse](#akash.deployment.v1beta2.QueryGroupResponse) | Group queries group details | GET|/akash/deployment/v1beta2/groups/info| - - - - - - -

Top

- - ## akash/deployment/v1beta2/deploymentmsg.proto - - - - - - ### MsgCloseDeployment - MsgCloseDeployment defines an SDK message for closing deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - - - - - - - - - ### MsgCloseDeploymentResponse - MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. - - - - - - - - - ### MsgCreateDeployment - MsgCreateDeployment defines an SDK message for creating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - | `groups` | [GroupSpec](#akash.deployment.v1beta2.GroupSpec) | repeated | | - | `version` | [bytes](#bytes) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgCreateDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgDepositDeployment - MsgDepositDeployment deposits more funds into the deposit account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `depositor` | [string](#string) | | Depositor pays for the deposit | - - - - - - - - - ### MsgDepositDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgUpdateDeployment - MsgUpdateDeployment defines an SDK message for updating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta2.DeploymentID) | | | - | `version` | [bytes](#bytes) | | | - - - - - - - - - ### MsgUpdateDeploymentResponse - MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/service.proto - - - - - - - - - - - - ### Msg - Msg defines the deployment Msg service. - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateDeployment` | [MsgCreateDeployment](#akash.deployment.v1beta2.MsgCreateDeployment) | [MsgCreateDeploymentResponse](#akash.deployment.v1beta2.MsgCreateDeploymentResponse) | CreateDeployment defines a method to create new deployment given proper inputs. | | - | `DepositDeployment` | [MsgDepositDeployment](#akash.deployment.v1beta2.MsgDepositDeployment) | [MsgDepositDeploymentResponse](#akash.deployment.v1beta2.MsgDepositDeploymentResponse) | DepositDeployment deposits more funds into the deployment account | | - | `UpdateDeployment` | [MsgUpdateDeployment](#akash.deployment.v1beta2.MsgUpdateDeployment) | [MsgUpdateDeploymentResponse](#akash.deployment.v1beta2.MsgUpdateDeploymentResponse) | UpdateDeployment defines a method to update a deployment given proper inputs. | | - | `CloseDeployment` | [MsgCloseDeployment](#akash.deployment.v1beta2.MsgCloseDeployment) | [MsgCloseDeploymentResponse](#akash.deployment.v1beta2.MsgCloseDeploymentResponse) | CloseDeployment defines a method to close a deployment given proper inputs. | | - | `CloseGroup` | [MsgCloseGroup](#akash.deployment.v1beta2.MsgCloseGroup) | [MsgCloseGroupResponse](#akash.deployment.v1beta2.MsgCloseGroupResponse) | CloseGroup defines a method to close a group of a deployment given proper inputs. | | - | `PauseGroup` | [MsgPauseGroup](#akash.deployment.v1beta2.MsgPauseGroup) | [MsgPauseGroupResponse](#akash.deployment.v1beta2.MsgPauseGroupResponse) | PauseGroup defines a method to close a group of a deployment given proper inputs. | | - | `StartGroup` | [MsgStartGroup](#akash.deployment.v1beta2.MsgStartGroup) | [MsgStartGroupResponse](#akash.deployment.v1beta2.MsgStartGroupResponse) | StartGroup defines a method to close a group of a deployment given proper inputs. | | - - - - - - -

Top

- - ## akash/deployment/v1beta2/authz.proto - - - - - - ### DepositDeploymentAuthorization - DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from -the granter's account for a deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | SpendLimit is the amount the grantee is authorized to spend from the granter's account for the purpose of deployment. | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/genesis.proto - - - - - - ### GenesisDeployment - GenesisDeployment defines the basic genesis state used by deployment module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta2.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta2.Group) | repeated | | - - - - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [GenesisDeployment](#akash.deployment.v1beta2.GenesisDeployment) | repeated | | - | `params` | [Params](#akash.deployment.v1beta2.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/groupspec.proto - - - - - - ### GroupSpec - GroupSpec stores group specifications - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `requirements` | [akash.base.v1beta2.PlacementRequirements](#akash.base.v1beta2.PlacementRequirements) | | | - | `resources` | [Resource](#akash.deployment.v1beta2.Resource) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/resource.proto - - - - - - ### Resource - Resource stores unit, total count and price of resource - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `resources` | [akash.base.v1beta2.ResourceUnits](#akash.base.v1beta2.ResourceUnits) | | | - | `count` | [uint32](#uint32) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta2/params.proto - - - - - - ### Params - Params defines the parameters for the x/deployment package - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta1/group.proto - - - - - - ### Group - Group stores group id, state and specifications of group - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group_id` | [GroupID](#akash.deployment.v1beta1.GroupID) | | | - | `state` | [Group.State](#akash.deployment.v1beta1.Group.State) | | | - | `group_spec` | [GroupSpec](#akash.deployment.v1beta1.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - ### GroupID - GroupID stores owner, deployment sequence number and group sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - - - - - - - - - ### GroupSpec - GroupSpec stores group specifications - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `requirements` | [akash.base.v1beta1.PlacementRequirements](#akash.base.v1beta1.PlacementRequirements) | | | - | `resources` | [Resource](#akash.deployment.v1beta1.Resource) | repeated | | - - - - - - - - - ### MsgCloseGroup - MsgCloseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta1.GroupID) | | | - - - - - - - - - ### MsgCloseGroupResponse - MsgCloseGroupResponse defines the Msg/CloseGroup response type. - - - - - - - - - ### MsgPauseGroup - MsgPauseGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta1.GroupID) | | | - - - - - - - - - ### MsgPauseGroupResponse - MsgPauseGroupResponse defines the Msg/PauseGroup response type. - - - - - - - - - ### MsgStartGroup - MsgStartGroup defines SDK message to close a single Group within a Deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta1.GroupID) | | | - - - - - - - - - ### MsgStartGroupResponse - MsgStartGroupResponse defines the Msg/StartGroup response type. - - - - - - - - - ### Resource - Resource stores unit, total count and price of resource - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `resources` | [akash.base.v1beta1.ResourceUnits](#akash.base.v1beta1.ResourceUnits) | | | - | `count` | [uint32](#uint32) | | | - | `price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - ### Group.State - State is an enum which refers to state of group - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | GroupOpen denotes state for group open | - | paused | 2 | GroupOrdered denotes state for group ordered | - | insufficient_funds | 3 | GroupInsufficientFunds denotes state for group insufficient_funds | - | closed | 4 | GroupClosed denotes state for group closed | - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta1/deployment.proto - - - - - - ### Deployment - Deployment stores deploymentID, state and version details - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - | `state` | [Deployment.State](#akash.deployment.v1beta1.Deployment.State) | | | - | `version` | [bytes](#bytes) | | | - | `created_at` | [int64](#int64) | | | - - - - - - - - - ### DeploymentFilters - DeploymentFilters defines filters used to filter deployments - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### DeploymentID - DeploymentID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - - - - - - - - - ### MsgCloseDeployment - MsgCloseDeployment defines an SDK message for closing deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - - - - - - - - - ### MsgCloseDeploymentResponse - MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. - - - - - - - - - ### MsgCreateDeployment - MsgCreateDeployment defines an SDK message for creating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - | `groups` | [GroupSpec](#akash.deployment.v1beta1.GroupSpec) | repeated | | - | `version` | [bytes](#bytes) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - ### MsgCreateDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgDepositDeployment - MsgDepositDeployment deposits more funds into the deposit account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - ### MsgDepositDeploymentResponse - MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - - - - - - - - - ### MsgUpdateDeployment - MsgUpdateDeployment defines an SDK message for updating deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - | `groups` | [GroupSpec](#akash.deployment.v1beta1.GroupSpec) | repeated | | - | `version` | [bytes](#bytes) | | | - - - - - - - - - ### MsgUpdateDeploymentResponse - MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. - - - - - - - - - - - ### Deployment.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | DeploymentActive denotes state for deployment active | - | closed | 2 | DeploymentClosed denotes state for deployment closed | - - - - - - - - - - ### Msg - Msg defines the deployment Msg service. - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateDeployment` | [MsgCreateDeployment](#akash.deployment.v1beta1.MsgCreateDeployment) | [MsgCreateDeploymentResponse](#akash.deployment.v1beta1.MsgCreateDeploymentResponse) | CreateDeployment defines a method to create new deployment given proper inputs. | | - | `DepositDeployment` | [MsgDepositDeployment](#akash.deployment.v1beta1.MsgDepositDeployment) | [MsgDepositDeploymentResponse](#akash.deployment.v1beta1.MsgDepositDeploymentResponse) | DepositDeployment deposits more funds into the deployment account | | - | `UpdateDeployment` | [MsgUpdateDeployment](#akash.deployment.v1beta1.MsgUpdateDeployment) | [MsgUpdateDeploymentResponse](#akash.deployment.v1beta1.MsgUpdateDeploymentResponse) | UpdateDeployment defines a method to update a deployment given proper inputs. | | - | `CloseDeployment` | [MsgCloseDeployment](#akash.deployment.v1beta1.MsgCloseDeployment) | [MsgCloseDeploymentResponse](#akash.deployment.v1beta1.MsgCloseDeploymentResponse) | CloseDeployment defines a method to close a deployment given proper inputs. | | - | `CloseGroup` | [MsgCloseGroup](#akash.deployment.v1beta1.MsgCloseGroup) | [MsgCloseGroupResponse](#akash.deployment.v1beta1.MsgCloseGroupResponse) | CloseGroup defines a method to close a group of a deployment given proper inputs. | | - | `PauseGroup` | [MsgPauseGroup](#akash.deployment.v1beta1.MsgPauseGroup) | [MsgPauseGroupResponse](#akash.deployment.v1beta1.MsgPauseGroupResponse) | PauseGroup defines a method to close a group of a deployment given proper inputs. | | - | `StartGroup` | [MsgStartGroup](#akash.deployment.v1beta1.MsgStartGroup) | [MsgStartGroupResponse](#akash.deployment.v1beta1.MsgStartGroupResponse) | StartGroup defines a method to close a group of a deployment given proper inputs. | | - - - - - - -

Top

- - ## akash/deployment/v1beta1/query.proto - - - - - - ### QueryDeploymentRequest - QueryDeploymentRequest is request type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [DeploymentID](#akash.deployment.v1beta1.DeploymentID) | | | - - - - - - - - - ### QueryDeploymentResponse - QueryDeploymentResponse is response type for the Query/Deployment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta1.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta1.Group) | repeated | | - | `escrow_account` | [akash.escrow.v1beta1.Account](#akash.escrow.v1beta1.Account) | | | - - - - - - - - - ### QueryDeploymentsRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [DeploymentFilters](#akash.deployment.v1beta1.DeploymentFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryDeploymentsResponse - QueryDeploymentsResponse is response type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [QueryDeploymentResponse](#akash.deployment.v1beta1.QueryDeploymentResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryGroupRequest - QueryGroupRequest is request type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [GroupID](#akash.deployment.v1beta1.GroupID) | | | - - - - - - - - - ### QueryGroupResponse - QueryGroupResponse is response type for the Query/Group RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `group` | [Group](#akash.deployment.v1beta1.Group) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Deployments` | [QueryDeploymentsRequest](#akash.deployment.v1beta1.QueryDeploymentsRequest) | [QueryDeploymentsResponse](#akash.deployment.v1beta1.QueryDeploymentsResponse) | Deployments queries deployments | GET|/akash/deployment/v1beta1/deployments/list| - | `Deployment` | [QueryDeploymentRequest](#akash.deployment.v1beta1.QueryDeploymentRequest) | [QueryDeploymentResponse](#akash.deployment.v1beta1.QueryDeploymentResponse) | Deployment queries deployment details | GET|/akash/deployment/v1beta1/deployments/info| - | `Group` | [QueryGroupRequest](#akash.deployment.v1beta1.QueryGroupRequest) | [QueryGroupResponse](#akash.deployment.v1beta1.QueryGroupResponse) | Group queries group details | GET|/akash/deployment/v1beta1/groups/info| - - - - - - -

Top

- - ## akash/deployment/v1beta1/authz.proto - - - - - - ### DepositDeploymentAuthorization - DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from -the granter's account for a deployment. - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | SpendLimit is the amount the grantee is authorized to spend from the granter's account for the purpose of deployment. | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta1/genesis.proto - - - - - - ### GenesisDeployment - GenesisDeployment defines the basic genesis state used by deployment module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment` | [Deployment](#akash.deployment.v1beta1.Deployment) | | | - | `groups` | [Group](#akash.deployment.v1beta1.Group) | repeated | | - - - - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [GenesisDeployment](#akash.deployment.v1beta1.GenesisDeployment) | repeated | | - | `params` | [Params](#akash.deployment.v1beta1.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/deployment/v1beta1/params.proto - - - - - - ### Params - Params defines the parameters for the x/deployment package - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployment_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/staking/v1beta3/genesis.proto - - - - - - ### GenesisState - GenesisState stores slice of genesis deployment instance - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.staking.v1beta3.Params) | | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/staking/v1beta3/params.proto - - - - - - ### Params - Params extends the parameters for the x/staking module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `min_commission_rate` | [string](#string) | | min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators | - - - - - - - - - - - - - - - - -

Top

- - ## akash/cert/v1beta3/query.proto - - - - - - ### CertificateResponse - CertificateResponse contains a single X509 certificate and its serial number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificate` | [Certificate](#akash.cert.v1beta3.Certificate) | | | - | `serial` | [string](#string) | | | - - - - - - - - - ### QueryCertificatesRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filter` | [CertificateFilter](#akash.cert.v1beta3.CertificateFilter) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryCertificatesResponse - QueryCertificatesResponse is response type for the Query/Certificates RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificates` | [CertificateResponse](#akash.cert.v1beta3.CertificateResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Certificates` | [QueryCertificatesRequest](#akash.cert.v1beta3.QueryCertificatesRequest) | [QueryCertificatesResponse](#akash.cert.v1beta3.QueryCertificatesResponse) | Certificates queries certificates | GET|/akash/cert/v1beta3/certificates/list| - - - - - - -

Top

- - ## akash/cert/v1beta3/cert.proto - - - - - - ### Certificate - Certificate stores state, certificate and it's public key - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `state` | [Certificate.State](#akash.cert.v1beta3.Certificate.State) | | | - | `cert` | [bytes](#bytes) | | | - | `pubkey` | [bytes](#bytes) | | | - - - - - - - - - ### CertificateFilter - CertificateFilter defines filters used to filter certificates - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `serial` | [string](#string) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### CertificateID - CertificateID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `serial` | [string](#string) | | | - - - - - - - - - ### MsgCreateCertificate - MsgCreateCertificate defines an SDK message for creating certificate - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `cert` | [bytes](#bytes) | | | - | `pubkey` | [bytes](#bytes) | | | - - - - - - - - - ### MsgCreateCertificateResponse - MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. - - - - - - - - - ### MsgRevokeCertificate - MsgRevokeCertificate defines an SDK message for revoking certificate - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [CertificateID](#akash.cert.v1beta3.CertificateID) | | | - - - - - - - - - ### MsgRevokeCertificateResponse - MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. - - - - - - - - - - - ### Certificate.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | valid | 1 | CertificateValid denotes state for deployment active | - | revoked | 2 | CertificateRevoked denotes state for deployment closed | - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateCertificate` | [MsgCreateCertificate](#akash.cert.v1beta3.MsgCreateCertificate) | [MsgCreateCertificateResponse](#akash.cert.v1beta3.MsgCreateCertificateResponse) | CreateCertificate defines a method to create new certificate given proper inputs. | | - | `RevokeCertificate` | [MsgRevokeCertificate](#akash.cert.v1beta3.MsgRevokeCertificate) | [MsgRevokeCertificateResponse](#akash.cert.v1beta3.MsgRevokeCertificateResponse) | RevokeCertificate defines a method to revoke the certificate | | - - - - - - -

Top

- - ## akash/cert/v1beta3/genesis.proto - - - - - - ### GenesisCertificate - GenesisCertificate defines certificate entry at genesis - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `certificate` | [Certificate](#akash.cert.v1beta3.Certificate) | | | - - - - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by cert module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificates` | [GenesisCertificate](#akash.cert.v1beta3.GenesisCertificate) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/cert/v1beta2/query.proto - - - - - - ### CertificateResponse - CertificateResponse contains a single X509 certificate and its serial number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificate` | [Certificate](#akash.cert.v1beta2.Certificate) | | | - | `serial` | [string](#string) | | | - - - - - - - - - ### QueryCertificatesRequest - QueryDeploymentsRequest is request type for the Query/Deployments RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filter` | [CertificateFilter](#akash.cert.v1beta2.CertificateFilter) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryCertificatesResponse - QueryCertificatesResponse is response type for the Query/Certificates RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificates` | [CertificateResponse](#akash.cert.v1beta2.CertificateResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Certificates` | [QueryCertificatesRequest](#akash.cert.v1beta2.QueryCertificatesRequest) | [QueryCertificatesResponse](#akash.cert.v1beta2.QueryCertificatesResponse) | Certificates queries certificates | GET|/akash/cert/v1beta3/certificates/list| - - - - - - -

Top

- - ## akash/cert/v1beta2/cert.proto - - - - - - ### Certificate - Certificate stores state, certificate and it's public key - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `state` | [Certificate.State](#akash.cert.v1beta2.Certificate.State) | | | - | `cert` | [bytes](#bytes) | | | - | `pubkey` | [bytes](#bytes) | | | - - - - - - - - - ### CertificateFilter - CertificateFilter defines filters used to filter certificates - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `serial` | [string](#string) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### CertificateID - CertificateID stores owner and sequence number - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `serial` | [string](#string) | | | - - - - - - - - - ### MsgCreateCertificate - MsgCreateCertificate defines an SDK message for creating certificate - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `cert` | [bytes](#bytes) | | | - | `pubkey` | [bytes](#bytes) | | | - - - - - - - - - ### MsgCreateCertificateResponse - MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. - - - - - - - - - ### MsgRevokeCertificate - MsgRevokeCertificate defines an SDK message for revoking certificate - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [CertificateID](#akash.cert.v1beta2.CertificateID) | | | - - - - - - - - - ### MsgRevokeCertificateResponse - MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. - - - - - - - - - - - ### Certificate.State - State is an enum which refers to state of deployment - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | valid | 1 | CertificateValid denotes state for deployment active | - | revoked | 2 | CertificateRevoked denotes state for deployment closed | - - - - - - - - - - ### Msg - Msg defines the provider Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateCertificate` | [MsgCreateCertificate](#akash.cert.v1beta2.MsgCreateCertificate) | [MsgCreateCertificateResponse](#akash.cert.v1beta2.MsgCreateCertificateResponse) | CreateCertificate defines a method to create new certificate given proper inputs. | | - | `RevokeCertificate` | [MsgRevokeCertificate](#akash.cert.v1beta2.MsgRevokeCertificate) | [MsgRevokeCertificateResponse](#akash.cert.v1beta2.MsgRevokeCertificateResponse) | RevokeCertificate defines a method to revoke the certificate | | - - - - - - -

Top

- - ## akash/cert/v1beta2/genesis.proto - - - - - - ### GenesisCertificate - GenesisCertificate defines certificate entry at genesis - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `certificate` | [Certificate](#akash.cert.v1beta2.Certificate) | | | - - - - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by cert module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `certificates` | [GenesisCertificate](#akash.cert.v1beta2.GenesisCertificate) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta3/types.proto - - - - - - ### Account - Account stores state for an escrow account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [AccountID](#akash.escrow.v1beta3.AccountID) | | unique identifier for this escrow account | - | `owner` | [string](#string) | | bech32 encoded account address of the owner of this escrow account | - | `state` | [Account.State](#akash.escrow.v1beta3.Account.State) | | current state of this escrow account | - | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | unspent coins received from the owner's wallet | - | `transferred` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | total coins spent by this account | - | `settled_at` | [int64](#int64) | | block height at which this account was last settled | - | `depositor` | [string](#string) | | 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` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | 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. | - - - - - - - - - ### AccountID - AccountID is the account identifier - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - - - - - - - - - ### FractionalPayment - Payment stores state for a payment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `account_id` | [AccountID](#akash.escrow.v1beta3.AccountID) | | | - | `payment_id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [FractionalPayment.State](#akash.escrow.v1beta3.FractionalPayment.State) | | | - | `rate` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `withdrawn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - ### Account.State - State stores state for an escrow account - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | AccountStateInvalid is an invalid state | - | open | 1 | AccountOpen is the state when an account is open | - | closed | 2 | AccountClosed is the state when an account is closed | - | overdrawn | 3 | AccountOverdrawn is the state when an account is overdrawn | - - - - - - ### FractionalPayment.State - Payment State - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | PaymentStateInvalid is the state when the payment is invalid | - | open | 1 | PaymentStateOpen is the state when the payment is open | - | closed | 2 | PaymentStateClosed is the state when the payment is closed | - | overdrawn | 3 | PaymentStateOverdrawn is the state when the payment is overdrawn | - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta3/query.proto - - - - - - ### QueryAccountsRequest - QueryAccountRequest is request type for the Query/Account RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAccountsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta3.Account) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryPaymentsRequest - QueryPaymentRequest is request type for the Query/Payment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryPaymentsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `payments` | [FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Accounts` | [QueryAccountsRequest](#akash.escrow.v1beta3.QueryAccountsRequest) | [QueryAccountsResponse](#akash.escrow.v1beta3.QueryAccountsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Accounts queries all accounts | GET|/akash/escrow/v1beta3/types/accounts/list| - | `Payments` | [QueryPaymentsRequest](#akash.escrow.v1beta3.QueryPaymentsRequest) | [QueryPaymentsResponse](#akash.escrow.v1beta3.QueryPaymentsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Payments queries all payments | GET|/akash/escrow/v1beta3/types/payments/list| - - - - - - -

Top

- - ## akash/escrow/v1beta3/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by escrow module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta3.Account) | repeated | | - | `payments` | [FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta2/types.proto - - - - - - ### Account - Account stores state for an escrow account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [AccountID](#akash.escrow.v1beta2.AccountID) | | unique identifier for this escrow account | - | `owner` | [string](#string) | | bech32 encoded account address of the owner of this escrow account | - | `state` | [Account.State](#akash.escrow.v1beta2.Account.State) | | current state of this escrow account | - | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | unspent coins received from the owner's wallet | - | `transferred` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | total coins spent by this account | - | `settled_at` | [int64](#int64) | | block height at which this account was last settled | - | `depositor` | [string](#string) | | 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` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | 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. | - - - - - - - - - ### AccountID - AccountID is the account identifier - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - - - - - - - - - ### FractionalPayment - Payment stores state for a payment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `account_id` | [AccountID](#akash.escrow.v1beta2.AccountID) | | | - | `payment_id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [FractionalPayment.State](#akash.escrow.v1beta2.FractionalPayment.State) | | | - | `rate` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `withdrawn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - ### Account.State - State stores state for an escrow account - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | AccountStateInvalid is an invalid state | - | open | 1 | AccountOpen is the state when an account is open | - | closed | 2 | AccountClosed is the state when an account is closed | - | overdrawn | 3 | AccountOverdrawn is the state when an account is overdrawn | - - - - - - ### FractionalPayment.State - Payment State - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | PaymentStateInvalid is the state when the payment is invalid | - | open | 1 | PaymentStateOpen is the state when the payment is open | - | closed | 2 | PaymentStateClosed is the state when the payment is closed | - | overdrawn | 3 | PaymentStateOverdrawn is the state when the payment is overdrawn | - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta2/query.proto - - - - - - ### QueryAccountsRequest - QueryAccountRequest is request type for the Query/Account RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAccountsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta2.Account) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryPaymentsRequest - QueryPaymentRequest is request type for the Query/Payment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryPaymentsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `payments` | [FractionalPayment](#akash.escrow.v1beta2.FractionalPayment) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Accounts` | [QueryAccountsRequest](#akash.escrow.v1beta2.QueryAccountsRequest) | [QueryAccountsResponse](#akash.escrow.v1beta2.QueryAccountsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Accounts queries all accounts | GET|/akash/escrow/v1beta2/types/accounts/list| - | `Payments` | [QueryPaymentsRequest](#akash.escrow.v1beta2.QueryPaymentsRequest) | [QueryPaymentsResponse](#akash.escrow.v1beta2.QueryPaymentsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Payments queries all payments | GET|/akash/escrow/v1beta2/types/payments/list| - - - - - - -

Top

- - ## akash/escrow/v1beta2/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by escrow module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta2.Account) | repeated | | - | `payments` | [FractionalPayment](#akash.escrow.v1beta2.FractionalPayment) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta1/types.proto - - - - - - ### Account - Account stores state for an escrow account - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [AccountID](#akash.escrow.v1beta1.AccountID) | | unique identifier for this escrow account | - | `owner` | [string](#string) | | bech32 encoded account address of the owner of this escrow account | - | `state` | [Account.State](#akash.escrow.v1beta1.Account.State) | | current state of this escrow account | - | `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | unspent coins received from the owner's wallet | - | `transferred` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | total coins spent by this account | - | `settled_at` | [int64](#int64) | | block height at which this account was last settled | - - - - - - - - - ### AccountID - AccountID is the account identifier - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - - - - - - - - - ### Payment - Payment stores state for a payment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `account_id` | [AccountID](#akash.escrow.v1beta1.AccountID) | | | - | `payment_id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [Payment.State](#akash.escrow.v1beta1.Payment.State) | | | - | `rate` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `withdrawn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - ### Account.State - State stores state for an escrow account - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | AccountStateInvalid is an invalid state | - | open | 1 | AccountOpen is the state when an account is open | - | closed | 2 | AccountClosed is the state when an account is closed | - | overdrawn | 3 | AccountOverdrawn is the state when an account is overdrawn | - - - - - - ### Payment.State - Payment State - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | PaymentStateInvalid is the state when the payment is invalid | - | open | 1 | PaymentStateOpen is the state when the payment is open | - | closed | 2 | PaymentStateClosed is the state when the payment is closed | - | overdrawn | 3 | PaymentStateOverdrawn is the state when the payment is overdrawn | - - - - - - - - - - - -

Top

- - ## akash/escrow/v1beta1/query.proto - - - - - - ### QueryAccountsRequest - QueryAccountRequest is request type for the Query/Account RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryAccountsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta1.Account) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryPaymentsRequest - QueryPaymentRequest is request type for the Query/Payment RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `scope` | [string](#string) | | | - | `xid` | [string](#string) | | | - | `id` | [string](#string) | | | - | `owner` | [string](#string) | | | - | `state` | [string](#string) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryPaymentsResponse - QueryProvidersResponse is response type for the Query/Providers RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `payments` | [Payment](#akash.escrow.v1beta1.Payment) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Accounts` | [QueryAccountsRequest](#akash.escrow.v1beta1.QueryAccountsRequest) | [QueryAccountsResponse](#akash.escrow.v1beta1.QueryAccountsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Accounts queries all accounts | GET|/akash/escrow/v1beta1/types/accounts/list| - | `Payments` | [QueryPaymentsRequest](#akash.escrow.v1beta1.QueryPaymentsRequest) | [QueryPaymentsResponse](#akash.escrow.v1beta1.QueryPaymentsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Payments queries all payments | GET|/akash/escrow/v1beta1/types/payments/list| - - - - - - -

Top

- - ## akash/escrow/v1beta1/genesis.proto - - - - - - ### GenesisState - GenesisState defines the basic genesis state used by escrow module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `accounts` | [Account](#akash.escrow.v1beta1.Account) | repeated | | - | `payments` | [Payment](#akash.escrow.v1beta1.Payment) | repeated | | - - - - - - - - - - - - - - - - -

Top

- - ## akash/market/v1beta4/bid.proto - - - - - - ### Bid - Bid stores BidID, state of bid and price - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta4.BidID) | | | - | `state` | [Bid.State](#akash.market.v1beta4.Bid.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `resources_offer` | [ResourceOffer](#akash.market.v1beta4.ResourceOffer) | repeated | | - - - - - - - - - ### BidFilters - BidFilters defines flags for bid list filter - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### BidID - BidID stores owner and all other seq numbers -A successful bid becomes a Lease(ID). - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - - - - - - - - - ### MsgCloseBid - MsgCloseBid defines an SDK message for closing bid - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta4.BidID) | | | - - - - - - - - - ### MsgCloseBidResponse - MsgCloseBidResponse defines the Msg/CloseBid response type. - - - - - - - - - ### MsgCreateBid - MsgCreateBid defines an SDK message for creating Bid - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `order` | [OrderID](#akash.market.v1beta4.OrderID) | | | - | `provider` | [string](#string) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `resources_offer` | [ResourceOffer](#akash.market.v1beta4.ResourceOffer) | repeated | | - - - - - - - - - ### MsgCreateBidResponse - MsgCreateBidResponse defines the Msg/CreateBid response type. - - - - - - - - - ### ResourceOffer - ResourceOffer describes resources that provider is offering -for deployment - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `resources` | [akash.base.v1beta3.Resources](#akash.base.v1beta3.Resources) | | | - | `count` | [uint32](#uint32) | | | - - - - - - - - - - - ### Bid.State - State is an enum which refers to state of bid - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | BidOpen denotes state for bid open | - | active | 2 | BidMatched denotes state for bid open | - | lost | 3 | BidLost denotes state for bid lost | - | closed | 4 | BidClosed denotes state for bid closed | - - - - - - - - - - - -

Top

- - ## akash/market/v1beta4/query.proto - - - - - - ### QueryBidRequest - QueryBidRequest is request type for the Query/Bid RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [BidID](#akash.market.v1beta4.BidID) | | | - - - - - - - - - ### QueryBidResponse - QueryBidResponse is response type for the Query/Bid RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid` | [Bid](#akash.market.v1beta4.Bid) | | | - | `escrow_account` | [akash.escrow.v1beta3.Account](#akash.escrow.v1beta3.Account) | | | - - - - - - - - - ### QueryBidsRequest - QueryBidsRequest is request type for the Query/Bids RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [BidFilters](#akash.market.v1beta4.BidFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryBidsResponse - QueryBidsResponse is response type for the Query/Bids RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bids` | [QueryBidResponse](#akash.market.v1beta4.QueryBidResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryLeaseRequest - QueryLeaseRequest is request type for the Query/Lease RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [LeaseID](#akash.market.v1beta4.LeaseID) | | | - - - - - - - - - ### QueryLeaseResponse - QueryLeaseResponse is response type for the Query/Lease RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease` | [Lease](#akash.market.v1beta4.Lease) | | | - | `escrow_payment` | [akash.escrow.v1beta3.FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) | | | - - - - - - - - - ### QueryLeasesRequest - QueryLeasesRequest is request type for the Query/Leases RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [LeaseFilters](#akash.market.v1beta4.LeaseFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryLeasesResponse - QueryLeasesResponse is response type for the Query/Leases RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `leases` | [QueryLeaseResponse](#akash.market.v1beta4.QueryLeaseResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - ### QueryOrderRequest - QueryOrderRequest is request type for the Query/Order RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [OrderID](#akash.market.v1beta4.OrderID) | | | - - - - - - - - - ### QueryOrderResponse - QueryOrderResponse is response type for the Query/Order RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `order` | [Order](#akash.market.v1beta4.Order) | | | - - - - - - - - - ### QueryOrdersRequest - QueryOrdersRequest is request type for the Query/Orders RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [OrderFilters](#akash.market.v1beta4.OrderFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - - ### QueryOrdersResponse - QueryOrdersResponse is response type for the Query/Orders RPC method - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `orders` | [Order](#akash.market.v1beta4.Order) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Orders` | [QueryOrdersRequest](#akash.market.v1beta4.QueryOrdersRequest) | [QueryOrdersResponse](#akash.market.v1beta4.QueryOrdersResponse) | Orders queries orders with filters | GET|/akash/market/v1beta4/orders/list| - | `Order` | [QueryOrderRequest](#akash.market.v1beta4.QueryOrderRequest) | [QueryOrderResponse](#akash.market.v1beta4.QueryOrderResponse) | Order queries order details | GET|/akash/market/v1beta4/orders/info| - | `Bids` | [QueryBidsRequest](#akash.market.v1beta4.QueryBidsRequest) | [QueryBidsResponse](#akash.market.v1beta4.QueryBidsResponse) | Bids queries bids with filters | GET|/akash/market/v1beta4/bids/list| - | `Bid` | [QueryBidRequest](#akash.market.v1beta4.QueryBidRequest) | [QueryBidResponse](#akash.market.v1beta4.QueryBidResponse) | Bid queries bid details | GET|/akash/market/v1beta4/bids/info| - | `Leases` | [QueryLeasesRequest](#akash.market.v1beta4.QueryLeasesRequest) | [QueryLeasesResponse](#akash.market.v1beta4.QueryLeasesResponse) | Leases queries leases with filters | GET|/akash/market/v1beta4/leases/list| - | `Lease` | [QueryLeaseRequest](#akash.market.v1beta4.QueryLeaseRequest) | [QueryLeaseResponse](#akash.market.v1beta4.QueryLeaseResponse) | Lease queries lease details | GET|/akash/market/v1beta4/leases/info| - - - - - - -

Top

- - ## akash/market/v1beta4/service.proto - - - - - - - - - - - - ### Msg - Msg defines the market Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateBid` | [MsgCreateBid](#akash.market.v1beta4.MsgCreateBid) | [MsgCreateBidResponse](#akash.market.v1beta4.MsgCreateBidResponse) | CreateBid defines a method to create a bid given proper inputs. | | - | `CloseBid` | [MsgCloseBid](#akash.market.v1beta4.MsgCloseBid) | [MsgCloseBidResponse](#akash.market.v1beta4.MsgCloseBidResponse) | CloseBid defines a method to close a bid given proper inputs. | | - | `WithdrawLease` | [MsgWithdrawLease](#akash.market.v1beta4.MsgWithdrawLease) | [MsgWithdrawLeaseResponse](#akash.market.v1beta4.MsgWithdrawLeaseResponse) | WithdrawLease withdraws accrued funds from the lease payment | | - | `CreateLease` | [MsgCreateLease](#akash.market.v1beta4.MsgCreateLease) | [MsgCreateLeaseResponse](#akash.market.v1beta4.MsgCreateLeaseResponse) | CreateLease creates a new lease | | - | `CloseLease` | [MsgCloseLease](#akash.market.v1beta4.MsgCloseLease) | [MsgCloseLeaseResponse](#akash.market.v1beta4.MsgCloseLeaseResponse) | CloseLease defines a method to close an order given proper inputs. | | - - - - - - -

Top

- - ## akash/market/v1beta4/lease.proto - - - - - - ### Lease - Lease stores LeaseID, state of lease and price - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta4.LeaseID) | | | - | `state` | [Lease.State](#akash.market.v1beta4.Lease.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `closed_on` | [int64](#int64) | | | - - - - - - - - - ### LeaseFilters - LeaseFilters defines flags for lease list filter - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | - - - - - - - - - ### LeaseID - LeaseID stores bid details of lease - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - - - - - - - - - ### MsgCloseLease - MsgCloseLease defines an SDK message for closing order - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta4.LeaseID) | | | - - - - - - - - - ### MsgCloseLeaseResponse - MsgCloseLeaseResponse defines the Msg/CloseLease response type. - - - - - - - - - ### MsgCreateLease - MsgCreateLease is sent to create a lease - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta4.BidID) | | | - - - - - - - - - ### MsgCreateLeaseResponse - MsgCreateLeaseResponse is the response from creating a lease - - - - - - - - - ### MsgWithdrawLease - MsgWithdrawLease defines an SDK message for closing bid - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid_id` | [LeaseID](#akash.market.v1beta4.LeaseID) | | | - - - - - - - - - ### MsgWithdrawLeaseResponse - MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. - - - - - - - - - - - ### Lease.State - State is an enum which refers to state of lease - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | LeaseActive denotes state for lease active | - | insufficient_funds | 2 | LeaseInsufficientFunds denotes state for lease insufficient_funds | - | closed | 3 | LeaseClosed denotes state for lease closed | + + @@ -7585,25 +461,22 @@ for deployment - +

Top

- ## akash/market/v1beta4/genesis.proto + ## akash/audit/v1/genesis.proto - + ### GenesisState - GenesisState defines the basic genesis state used by market module + GenesisState defines the basic genesis state used by audit module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.market.v1beta4.Params) | | | - | `orders` | [Order](#akash.market.v1beta4.Order) | repeated | | - | `leases` | [Lease](#akash.market.v1beta4.Lease) | repeated | | - | `bids` | [Bid](#akash.market.v1beta4.Bid) | repeated | | + | `attributes` | [AuditedAttributes](#akash.audit.v1.AuditedAttributes) | repeated | | @@ -7619,83 +492,68 @@ for deployment - +

Top

- ## akash/market/v1beta4/order.proto + ## akash/audit/v1/msg.proto - + - ### Order - Order stores orderID, state of order and other details + ### MsgDeleteProviderAttributes + MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order_id` | [OrderID](#akash.market.v1beta4.OrderID) | | | - | `state` | [Order.State](#akash.market.v1beta4.Order.State) | | | - | `spec` | [akash.deployment.v1beta3.GroupSpec](#akash.deployment.v1beta3.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | + | `owner` | [string](#string) | | | + | `auditor` | [string](#string) | | | + | `keys` | [string](#string) | repeated | | - + - ### OrderFilters - OrderFilters defines flags for order list filter + ### MsgDeleteProviderAttributesResponse + MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `state` | [string](#string) | | | - - - + - ### OrderID - OrderID stores owner and all other seq numbers + ### MsgSignProviderAttributes + MsgSignProviderAttributes defines an SDK message for signing a provider attributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | + | `auditor` | [string](#string) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - - + - ### Order.State - State is an enum which refers to state of order + ### MsgSignProviderAttributesResponse + MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. + + - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | OrderOpen denotes state for order open | - | active | 2 | OrderMatched denotes state for order matched | - | closed | 3 | OrderClosed denotes state for order lost | + + @@ -7704,172 +562,212 @@ for deployment - +

Top

- ## akash/market/v1beta4/params.proto + ## akash/audit/v1/query.proto - + - ### Params - Params is the params for the x/market module + ### QueryAllProvidersAttributesRequest + QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `order_max_bids` | [uint32](#uint32) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - + + - + ### QueryAuditorAttributesRequest + QueryAuditorAttributesRequest is request type for the Query/Providers RPC method + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `auditor` | [string](#string) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + - -

Top

- ## akash/market/v1beta3/bid.proto - + - ### Bid - Bid stores BidID, state of bid and price + ### QueryProviderAttributesRequest + QueryProviderAttributesRequest is request type for the Query/Provider RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta3.BidID) | | | - | `state` | [Bid.State](#akash.market.v1beta3.Bid.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | + | `owner` | [string](#string) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + - ### BidFilters - BidFilters defines flags for bid list filter + ### QueryProviderAuditorRequest + QueryProviderAuditorRequest is request type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | + | `auditor` | [string](#string) | | | | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | - + - ### BidID - BidID stores owner and all other seq numbers -A successful bid becomes a Lease(ID). + ### QueryProviderRequest + QueryProviderRequest is request type for the Query/Provider RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | + | `auditor` | [string](#string) | | | | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - + - ### MsgCloseBid - MsgCloseBid defines an SDK message for closing bid + ### QueryProvidersResponse + QueryProvidersResponse is response type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta3.BidID) | | | + | `providers` | [Provider](#akash.audit.v1.Provider) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + + + + + + - + - ### MsgCloseBidResponse - MsgCloseBidResponse defines the Msg/CloseBid response type. + ### Query + Query defines the gRPC querier service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `AllProvidersAttributes` | [QueryAllProvidersAttributesRequest](#akash.audit.v1.QueryAllProvidersAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1.QueryProvidersResponse) | AllProvidersAttributes queries all providers buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1/audit/attributes/list| + | `ProviderAttributes` | [QueryProviderAttributesRequest](#akash.audit.v1.QueryProviderAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1.QueryProvidersResponse) | ProviderAttributes queries all provider signed attributes buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1/audit/attributes/{owner}/list| + | `ProviderAuditorAttributes` | [QueryProviderAuditorRequest](#akash.audit.v1.QueryProviderAuditorRequest) | [QueryProvidersResponse](#akash.audit.v1.QueryProvidersResponse) | ProviderAuditorAttributes queries provider signed attributes by specific auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/audit/v1/audit/attributes/{auditor}/{owner}| + | `AuditorAttributes` | [QueryAuditorAttributesRequest](#akash.audit.v1.QueryAuditorAttributesRequest) | [QueryProvidersResponse](#akash.audit.v1.QueryProvidersResponse) | AuditorAttributes queries all providers signed by this auditor buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/akash/provider/v1/auditor/{auditor}/list| + + + +

Top

+ ## akash/audit/v1/service.proto - - ### MsgCreateBid - MsgCreateBid defines an SDK message for creating Bid + + + + + - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `order` | [OrderID](#akash.market.v1beta3.OrderID) | | | - | `provider` | [string](#string) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + ### Msg + Msg defines the provider Msg service + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `SignProviderAttributes` | [MsgSignProviderAttributes](#akash.audit.v1.MsgSignProviderAttributes) | [MsgSignProviderAttributesResponse](#akash.audit.v1.MsgSignProviderAttributesResponse) | SignProviderAttributes defines a method that signs provider attributes | | + | `DeleteProviderAttributes` | [MsgDeleteProviderAttributes](#akash.audit.v1.MsgDeleteProviderAttributes) | [MsgDeleteProviderAttributesResponse](#akash.audit.v1.MsgDeleteProviderAttributesResponse) | DeleteProviderAttributes defines a method that deletes provider attributes | | + + + + +

Top

+ ## akash/base/resources/v1beta4/resourcevalue.proto - + - ### MsgCreateBidResponse - MsgCreateBidResponse defines the Msg/CreateBid response type. + ### ResourceValue + Unit stores cpu, memory and storage metrics + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `val` | [bytes](#bytes) | | | + + + + + + + + - + + +

Top

- ### Bid.State - State is an enum which refers to state of bid + ## akash/base/resources/v1beta4/cpu.proto + - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | BidOpen denotes state for bid open | - | active | 2 | BidMatched denotes state for bid open | - | lost | 3 | BidLost denotes state for bid lost | - | closed | 4 | BidClosed denotes state for bid closed | + + + + ### CPU + CPU stores resource units and cpu config attributes + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `units` | [ResourceValue](#akash.base.resources.v1beta4.ResourceValue) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | + + + + + @@ -7878,195 +776,219 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta3/query.proto + ## akash/base/resources/v1beta4/endpoint.proto - + - ### QueryBidRequest - QueryBidRequest is request type for the Query/Bid RPC method + ### Endpoint + Endpoint describes a publicly accessible IP service | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [BidID](#akash.market.v1beta3.BidID) | | | + | `kind` | [Endpoint.Kind](#akash.base.resources.v1beta4.Endpoint.Kind) | | | + | `sequence_number` | [uint32](#uint32) | | | + + - + - ### QueryBidResponse - QueryBidResponse is response type for the Query/Bid RPC method + ### Endpoint.Kind + This describes how the endpoint is implemented when the lease is deployed + | Name | Number | Description | + | ---- | ------ | ----------- | + | SHARED_HTTP | 0 | Describes an endpoint that becomes a Kubernetes Ingress | + | RANDOM_PORT | 1 | Describes an endpoint that becomes a Kubernetes NodePort | + | LEASED_IP | 2 | Describes an endpoint that becomes a leased IP | - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid` | [Bid](#akash.market.v1beta3.Bid) | | | - | `escrow_account` | [akash.escrow.v1beta3.Account](#akash.escrow.v1beta3.Account) | | | + + + + + + + + +

Top

+ ## akash/base/resources/v1beta4/gpu.proto - + - ### QueryBidsRequest - QueryBidsRequest is request type for the Query/Bids RPC method + ### GPU + GPU stores resource units and cpu config attributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `filters` | [BidFilters](#akash.market.v1beta3.BidFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + | `units` | [ResourceValue](#akash.base.resources.v1beta4.ResourceValue) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - + - ### QueryBidsResponse - QueryBidsResponse is response type for the Query/Bids RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bids` | [QueryBidResponse](#akash.market.v1beta3.QueryBidResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +

Top

+ ## akash/base/resources/v1beta4/memory.proto - + - ### QueryLeaseRequest - QueryLeaseRequest is request type for the Query/Lease RPC method + ### Memory + Memory stores resource quantity and memory attributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [LeaseID](#akash.market.v1beta3.LeaseID) | | | + | `quantity` | [ResourceValue](#akash.base.resources.v1beta4.ResourceValue) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - + - ### QueryLeaseResponse - QueryLeaseResponse is response type for the Query/Lease RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease` | [Lease](#akash.market.v1beta3.Lease) | | | - | `escrow_payment` | [akash.escrow.v1beta3.FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) | | | + +

Top

+ ## akash/base/resources/v1beta4/storage.proto - + - ### QueryLeasesRequest - QueryLeasesRequest is request type for the Query/Leases RPC method + ### Storage + Storage stores resource quantity and storage attributes | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `filters` | [LeaseFilters](#akash.market.v1beta3.LeaseFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + | `name` | [string](#string) | | | + | `quantity` | [ResourceValue](#akash.base.resources.v1beta4.ResourceValue) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | - - + - ### QueryLeasesResponse - QueryLeasesResponse is response type for the Query/Leases RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `leases` | [QueryLeaseResponse](#akash.market.v1beta3.QueryLeaseResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + +

Top

+ ## akash/base/resources/v1beta4/resources.proto - + - ### QueryOrderRequest - QueryOrderRequest is request type for the Query/Order RPC method + ### Resources + Resources describes all available resources types for deployment/node etc +if field is nil resource is not present in the given data-structure | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [OrderID](#akash.market.v1beta3.OrderID) | | | + | `id` | [uint32](#uint32) | | | + | `cpu` | [CPU](#akash.base.resources.v1beta4.CPU) | | | + | `memory` | [Memory](#akash.base.resources.v1beta4.Memory) | | | + | `storage` | [Storage](#akash.base.resources.v1beta4.Storage) | repeated | | + | `gpu` | [GPU](#akash.base.resources.v1beta4.GPU) | | | + | `endpoints` | [Endpoint](#akash.base.resources.v1beta4.Endpoint) | repeated | | - - + - ### QueryOrderResponse - QueryOrderResponse is response type for the Query/Order RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `order` | [Order](#akash.market.v1beta3.Order) | | | + +

Top

+ ## akash/cert/v1/cert.proto - + - ### QueryOrdersRequest - QueryOrdersRequest is request type for the Query/Orders RPC method + ### Certificate + Certificate stores state, certificate and it's public key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `filters` | [OrderFilters](#akash.market.v1beta3.OrderFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + | `state` | [State](#akash.cert.v1.State) | | | + | `cert` | [bytes](#bytes) | | | + | `pubkey` | [bytes](#bytes) | | | - + - ### QueryOrdersResponse - QueryOrdersResponse is response type for the Query/Orders RPC method + ### ID + ID stores owner and sequence number | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `orders` | [Order](#akash.market.v1beta3.Order) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + | `owner` | [string](#string) | | | + | `serial` | [string](#string) | | | @@ -8074,193 +996,160 @@ A successful bid becomes a Lease(ID). - - - - - - - - ### Query - Query defines the gRPC querier service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Orders` | [QueryOrdersRequest](#akash.market.v1beta3.QueryOrdersRequest) | [QueryOrdersResponse](#akash.market.v1beta3.QueryOrdersResponse) | Orders queries orders with filters | GET|/akash/market/v1beta3/orders/list| - | `Order` | [QueryOrderRequest](#akash.market.v1beta3.QueryOrderRequest) | [QueryOrderResponse](#akash.market.v1beta3.QueryOrderResponse) | Order queries order details | GET|/akash/market/v1beta3/orders/info| - | `Bids` | [QueryBidsRequest](#akash.market.v1beta3.QueryBidsRequest) | [QueryBidsResponse](#akash.market.v1beta3.QueryBidsResponse) | Bids queries bids with filters | GET|/akash/market/v1beta3/bids/list| - | `Bid` | [QueryBidRequest](#akash.market.v1beta3.QueryBidRequest) | [QueryBidResponse](#akash.market.v1beta3.QueryBidResponse) | Bid queries bid details | GET|/akash/market/v1beta3/bids/info| - | `Leases` | [QueryLeasesRequest](#akash.market.v1beta3.QueryLeasesRequest) | [QueryLeasesResponse](#akash.market.v1beta3.QueryLeasesResponse) | Leases queries leases with filters | GET|/akash/market/v1beta3/leases/list| - | `Lease` | [QueryLeaseRequest](#akash.market.v1beta3.QueryLeaseRequest) | [QueryLeaseResponse](#akash.market.v1beta3.QueryLeaseResponse) | Lease queries lease details | GET|/akash/market/v1beta3/leases/info| - + - - - -

Top

+ ### State + State is an enum which refers to state of deployment - ## akash/market/v1beta3/service.proto + | Name | Number | Description | + | ---- | ------ | ----------- | + | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | valid | 1 | CertificateValid denotes state for deployment active | + | revoked | 2 | CertificateRevoked denotes state for deployment closed | - - - - - - ### Msg - Msg defines the market Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateBid` | [MsgCreateBid](#akash.market.v1beta3.MsgCreateBid) | [MsgCreateBidResponse](#akash.market.v1beta3.MsgCreateBidResponse) | CreateBid defines a method to create a bid given proper inputs. | | - | `CloseBid` | [MsgCloseBid](#akash.market.v1beta3.MsgCloseBid) | [MsgCloseBidResponse](#akash.market.v1beta3.MsgCloseBidResponse) | CloseBid defines a method to close a bid given proper inputs. | | - | `WithdrawLease` | [MsgWithdrawLease](#akash.market.v1beta3.MsgWithdrawLease) | [MsgWithdrawLeaseResponse](#akash.market.v1beta3.MsgWithdrawLeaseResponse) | WithdrawLease withdraws accrued funds from the lease payment | | - | `CreateLease` | [MsgCreateLease](#akash.market.v1beta3.MsgCreateLease) | [MsgCreateLeaseResponse](#akash.market.v1beta3.MsgCreateLeaseResponse) | CreateLease creates a new lease | | - | `CloseLease` | [MsgCloseLease](#akash.market.v1beta3.MsgCloseLease) | [MsgCloseLeaseResponse](#akash.market.v1beta3.MsgCloseLeaseResponse) | CloseLease defines a method to close an order given proper inputs. | | - - +

Top

- ## akash/market/v1beta3/lease.proto + ## akash/cert/v1/filters.proto - + - ### Lease - Lease stores LeaseID, state of lease and price + ### CertificateFilter + CertificateFilter defines filters used to filter certificates | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta3.LeaseID) | | | - | `state` | [Lease.State](#akash.market.v1beta3.Lease.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `closed_on` | [int64](#int64) | | | + | `owner` | [string](#string) | | | + | `serial` | [string](#string) | | | + | `state` | [State](#akash.cert.v1.State) | | | - - + - ### LeaseFilters - LeaseFilters defines flags for lease list filter + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | + +

Top

+ ## akash/cert/v1/genesis.proto - + - ### LeaseID - LeaseID stores bid details of lease + ### GenesisCertificate + GenesisCertificate defines certificate entry at genesis | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | + | `certificate` | [Certificate](#akash.cert.v1.Certificate) | | | - + - ### MsgCloseLease - MsgCloseLease defines an SDK message for closing order + ### GenesisState + GenesisState defines the basic genesis state used by cert module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta3.LeaseID) | | | + | `certificates` | [GenesisCertificate](#akash.cert.v1.GenesisCertificate) | repeated | | - - + - ### MsgCloseLeaseResponse - MsgCloseLeaseResponse defines the Msg/CloseLease response type. + + + + + + + +

Top

+ ## akash/cert/v1/msg.proto - + - ### MsgCreateLease - MsgCreateLease is sent to create a lease + ### MsgCreateCertificate + MsgCreateCertificate defines an SDK message for creating certificate | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta3.BidID) | | | + | `owner` | [string](#string) | | | + | `cert` | [bytes](#bytes) | | | + | `pubkey` | [bytes](#bytes) | | | - + - ### MsgCreateLeaseResponse - MsgCreateLeaseResponse is the response from creating a lease + ### MsgCreateCertificateResponse + MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. - + - ### MsgWithdrawLease - MsgWithdrawLease defines an SDK message for closing bid + ### MsgRevokeCertificate + MsgRevokeCertificate defines an SDK message for revoking certificate | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [LeaseID](#akash.market.v1beta3.LeaseID) | | | + | `id` | [ID](#akash.cert.v1.ID) | | | - + - ### MsgWithdrawLeaseResponse - MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. + ### MsgRevokeCertificateResponse + MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. @@ -8268,20 +1157,6 @@ A successful bid becomes a Lease(ID). - - - - ### Lease.State - State is an enum which refers to state of lease - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | LeaseActive denotes state for lease active | - | insufficient_funds | 2 | LeaseInsufficientFunds denotes state for lease insufficient_funds | - | closed | 3 | LeaseClosed denotes state for lease closed | - - @@ -8290,142 +1165,124 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta3/genesis.proto + ## akash/cert/v1/query.proto - + - ### GenesisState - GenesisState defines the basic genesis state used by market module + ### CertificateResponse + CertificateResponse contains a single X509 certificate and its serial number | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.market.v1beta3.Params) | | | - | `orders` | [Order](#akash.market.v1beta3.Order) | repeated | | - | `leases` | [Lease](#akash.market.v1beta3.Lease) | repeated | | - | `bids` | [Bid](#akash.market.v1beta3.Bid) | repeated | | - - - - - - - - - - - - - + | `certificate` | [Certificate](#akash.cert.v1.Certificate) | | | + | `serial` | [string](#string) | | | - -

Top

- ## akash/market/v1beta3/order.proto - + - ### Order - Order stores orderID, state of order and other details + ### QueryCertificatesRequest + QueryDeploymentsRequest is request type for the Query/Deployments RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order_id` | [OrderID](#akash.market.v1beta3.OrderID) | | | - | `state` | [Order.State](#akash.market.v1beta3.Order.State) | | | - | `spec` | [akash.deployment.v1beta3.GroupSpec](#akash.deployment.v1beta3.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | + | `filter` | [CertificateFilter](#akash.cert.v1.CertificateFilter) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + - ### OrderFilters - OrderFilters defines flags for order list filter + ### QueryCertificatesResponse + QueryCertificatesResponse is response type for the Query/Certificates RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `state` | [string](#string) | | | + | `certificates` | [CertificateResponse](#akash.cert.v1.CertificateResponse) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + + + + + + - + - ### OrderID - OrderID stores owner and all other seq numbers + ### Query + Query defines the gRPC querier service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `Certificates` | [QueryCertificatesRequest](#akash.cert.v1.QueryCertificatesRequest) | [QueryCertificatesResponse](#akash.cert.v1.QueryCertificatesResponse) | Certificates queries certificates | GET|/akash/cert/1/certificates/list| - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | + + + +

Top

+ ## akash/cert/v1/service.proto - - + - ### Order.State - State is an enum which refers to state of order + - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | OrderOpen denotes state for order open | - | active | 2 | OrderMatched denotes state for order matched | - | closed | 3 | OrderClosed denotes state for order lost | + - - - + ### Msg + Msg defines the provider Msg service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `CreateCertificate` | [MsgCreateCertificate](#akash.cert.v1.MsgCreateCertificate) | [MsgCreateCertificateResponse](#akash.cert.v1.MsgCreateCertificateResponse) | CreateCertificate defines a method to create new certificate given proper inputs. | | + | `RevokeCertificate` | [MsgRevokeCertificate](#akash.cert.v1.MsgRevokeCertificate) | [MsgRevokeCertificateResponse](#akash.cert.v1.MsgRevokeCertificateResponse) | RevokeCertificate defines a method to revoke the certificate | | + - +

Top

- ## akash/market/v1beta3/params.proto + ## akash/deployment/v1/authz.proto - + - ### Params - Params is the params for the x/market module + ### DepositAuthorization + DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +the granter's account for a deployment. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `order_max_bids` | [uint32](#uint32) | | | + | `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | SpendLimit is the amount the grantee is authorized to spend from the granter's account for the purpose of deployment. | @@ -8441,24 +1298,24 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta2/bid.proto + ## akash/deployment/v1/deployment.proto - + - ### Bid - Bid stores BidID, state of bid and price + ### Deployment + Deployment stores deploymentID, state and version details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta2.BidID) | | | - | `state` | [Bid.State](#akash.market.v1beta2.Bid.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `id` | [DeploymentID](#akash.deployment.v1.DeploymentID) | | | + | `state` | [DeploymentState](#akash.deployment.v1.DeploymentState) | | | + | `hash` | [bytes](#bytes) | | | | `created_at` | [int64](#int64) | | | @@ -8466,31 +1323,55 @@ A successful bid becomes a Lease(ID). - + - ### BidFilters - BidFilters defines flags for bid list filter + ### DeploymentID + DeploymentID stores owner and sequence number + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `owner` | [string](#string) | | | + | `dseq` | [uint64](#uint64) | | | + + + + + + + + + + + ### DeploymentState + DeploymentState is an enum which refers to state of deployment + + | Name | Number | Description | + | ---- | ------ | ----------- | + | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | active | 1 | DeploymentActive denotes state for deployment active | + | closed | 2 | DeploymentClosed denotes state for deployment closed | + + + + + + + - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | - + +

Top

+ ## akash/deployment/v1/group.proto - + - ### BidID - BidID stores owner and all other seq numbers -A successful bid becomes a Lease(ID). + ### GroupID + GroupID stores owner, deployment sequence number and group sequence number | Field | Type | Label | Description | @@ -8498,83 +1379,46 @@ A successful bid becomes a Lease(ID). | `owner` | [string](#string) | | | | `dseq` | [uint64](#uint64) | | | | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - - + - ### MsgCloseBid - MsgCloseBid defines an SDK message for closing bid + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta2.BidID) | | | - - + - + - - - ### MsgCloseBidResponse - MsgCloseBidResponse defines the Msg/CloseBid response type. - + +

Top

+ ## akash/deployment/v1beta4/resourceunit.proto - + - ### MsgCreateBid - MsgCreateBid defines an SDK message for creating Bid + ### ResourceUnit + ResourceUnit extends Resources and adds Count along with the Price | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order` | [OrderID](#akash.market.v1beta2.OrderID) | | | - | `provider` | [string](#string) | | | + | `resource` | [akash.base.resources.v1beta4.Resources](#akash.base.resources.v1beta4.Resources) | | | + | `count` | [uint32](#uint32) | | | | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - ### MsgCreateBidResponse - MsgCreateBidResponse defines the Msg/CreateBid response type. - - - - - ### Bid.State - State is an enum which refers to state of bid - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | BidOpen denotes state for bid open | - | active | 2 | BidMatched denotes state for bid open | - | lost | 3 | BidLost denotes state for bid lost | - | closed | 4 | BidClosed denotes state for bid closed | - - @@ -8583,195 +1427,196 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta2/query.proto + ## akash/deployment/v1beta4/groupspec.proto - + - ### QueryBidRequest - QueryBidRequest is request type for the Query/Bid RPC method + ### GroupSpec + Spec stores group specifications | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [BidID](#akash.market.v1beta2.BidID) | | | + | `name` | [string](#string) | | | + | `requirements` | [akash.base.attributes.v1.PlacementRequirements](#akash.base.attributes.v1.PlacementRequirements) | | | + | `resources` | [ResourceUnit](#akash.deployment.v1beta4.ResourceUnit) | repeated | | - - + - ### QueryBidResponse - QueryBidResponse is response type for the Query/Bid RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bid` | [Bid](#akash.market.v1beta2.Bid) | | | - | `escrow_account` | [akash.escrow.v1beta2.Account](#akash.escrow.v1beta2.Account) | | | + +

Top

+ ## akash/deployment/v1/msg.proto - + - ### QueryBidsRequest - QueryBidsRequest is request type for the Query/Bids RPC method + ### MsgDepositDeployment + MsgDepositDeployment deposits more funds into the deposit account | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `filters` | [BidFilters](#akash.market.v1beta2.BidFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + | `id` | [DeploymentID](#akash.deployment.v1.DeploymentID) | | | + | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + | `depositor` | [string](#string) | | Depositor pays for the deposit | - + - ### QueryBidsResponse - QueryBidsResponse is response type for the Query/Bids RPC method + ### MsgDepositDeploymentResponse + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `bids` | [QueryBidResponse](#akash.market.v1beta2.QueryBidResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - + - ### QueryLeaseRequest - QueryLeaseRequest is request type for the Query/Lease RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [LeaseID](#akash.market.v1beta2.LeaseID) | | | + +

Top

+ ## akash/deployment/v1beta4/deploymentmsg.proto - + - ### QueryLeaseResponse - QueryLeaseResponse is response type for the Query/Lease RPC method + ### MsgCloseDeployment + MsgCloseDeployment defines an SDK message for closing deployment | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease` | [Lease](#akash.market.v1beta2.Lease) | | | - | `escrow_payment` | [akash.escrow.v1beta2.FractionalPayment](#akash.escrow.v1beta2.FractionalPayment) | | | + | `id` | [akash.deployment.v1.DeploymentID](#akash.deployment.v1.DeploymentID) | | | - + - ### QueryLeasesRequest - QueryLeasesRequest is request type for the Query/Leases RPC method + ### MsgCloseDeploymentResponse + MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [LeaseFilters](#akash.market.v1beta2.LeaseFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - + - ### QueryLeasesResponse - QueryLeasesResponse is response type for the Query/Leases RPC method + ### MsgCreateDeployment + MsgCreateDeployment defines an SDK message for creating deployment | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `leases` | [QueryLeaseResponse](#akash.market.v1beta2.QueryLeaseResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + | `id` | [akash.deployment.v1.DeploymentID](#akash.deployment.v1.DeploymentID) | | | + | `groups` | [GroupSpec](#akash.deployment.v1beta4.GroupSpec) | repeated | | + | `hash` | [bytes](#bytes) | | | + | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + | `depositor` | [string](#string) | | Depositor pays for the deposit | - + - ### QueryOrderRequest - QueryOrderRequest is request type for the Query/Order RPC method + ### MsgCreateDeploymentResponse + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [OrderID](#akash.market.v1beta2.OrderID) | | | - - - + - ### QueryOrderResponse - QueryOrderResponse is response type for the Query/Order RPC method + ### MsgUpdateDeployment + MsgUpdateDeployment defines an SDK message for updating deployment | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order` | [Order](#akash.market.v1beta2.Order) | | | + | `id` | [akash.deployment.v1.DeploymentID](#akash.deployment.v1.DeploymentID) | | | + | `hash` | [bytes](#bytes) | | | - + - ### QueryOrdersRequest - QueryOrdersRequest is request type for the Query/Orders RPC method + ### MsgUpdateDeploymentResponse + MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [OrderFilters](#akash.market.v1beta2.OrderFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + + + + + + + + + + + + +

Top

+ ## akash/deployment/v1beta4/filters.proto - + - ### QueryOrdersResponse - QueryOrdersResponse is response type for the Query/Orders RPC method + ### DeploymentFilters + DeploymentFilters defines filters used to filter deployments | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `orders` | [Order](#akash.market.v1beta2.Order) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + | `owner` | [string](#string) | | | + | `dseq` | [uint64](#uint64) | | | + | `state` | [akash.deployment.v1.DeploymentState](#akash.deployment.v1.DeploymentState) | | | @@ -8783,238 +1628,216 @@ A successful bid becomes a Lease(ID). + + + - + +

Top

- ### Query - Query defines the gRPC querier service + ## akash/deployment/v1beta4/group.proto + - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Orders` | [QueryOrdersRequest](#akash.market.v1beta2.QueryOrdersRequest) | [QueryOrdersResponse](#akash.market.v1beta2.QueryOrdersResponse) | Orders queries orders with filters | GET|/akash/market/v1beta2/orders/list| - | `Order` | [QueryOrderRequest](#akash.market.v1beta2.QueryOrderRequest) | [QueryOrderResponse](#akash.market.v1beta2.QueryOrderResponse) | Order queries order details | GET|/akash/market/v1beta2/orders/info| - | `Bids` | [QueryBidsRequest](#akash.market.v1beta2.QueryBidsRequest) | [QueryBidsResponse](#akash.market.v1beta2.QueryBidsResponse) | Bids queries bids with filters | GET|/akash/market/v1beta2/bids/list| - | `Bid` | [QueryBidRequest](#akash.market.v1beta2.QueryBidRequest) | [QueryBidResponse](#akash.market.v1beta2.QueryBidResponse) | Bid queries bid details | GET|/akash/market/v1beta2/bids/info| - | `Leases` | [QueryLeasesRequest](#akash.market.v1beta2.QueryLeasesRequest) | [QueryLeasesResponse](#akash.market.v1beta2.QueryLeasesResponse) | Leases queries leases with filters | GET|/akash/market/v1beta2/leases/list| - | `Lease` | [QueryLeaseRequest](#akash.market.v1beta2.QueryLeaseRequest) | [QueryLeaseResponse](#akash.market.v1beta2.QueryLeaseResponse) | Lease queries lease details | GET|/akash/market/v1beta2/leases/info| - + + + ### Group + Group stores group id, state and specifications of group + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `id` | [akash.deployment.v1.GroupID](#akash.deployment.v1.GroupID) | | | + | `state` | [GroupState](#akash.deployment.v1beta4.GroupState) | | | + | `group_spec` | [GroupSpec](#akash.deployment.v1beta4.GroupSpec) | | | + | `created_at` | [int64](#int64) | | | + - -

Top

- ## akash/market/v1beta2/service.proto - + + - + ### GroupState + GroupState is an enum which refers to state of group + | Name | Number | Description | + | ---- | ------ | ----------- | + | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | open | 1 | GroupOpen denotes state for group open | + | paused | 2 | GroupOrdered denotes state for group ordered | + | insufficient_funds | 3 | GroupInsufficientFunds denotes state for group insufficient_funds | + | closed | 4 | GroupClosed denotes state for group closed | - - ### Msg - Msg defines the market Msg service + + + - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateBid` | [MsgCreateBid](#akash.market.v1beta2.MsgCreateBid) | [MsgCreateBidResponse](#akash.market.v1beta2.MsgCreateBidResponse) | CreateBid defines a method to create a bid given proper inputs. | | - | `CloseBid` | [MsgCloseBid](#akash.market.v1beta2.MsgCloseBid) | [MsgCloseBidResponse](#akash.market.v1beta2.MsgCloseBidResponse) | CloseBid defines a method to close a bid given proper inputs. | | - | `WithdrawLease` | [MsgWithdrawLease](#akash.market.v1beta2.MsgWithdrawLease) | [MsgWithdrawLeaseResponse](#akash.market.v1beta2.MsgWithdrawLeaseResponse) | WithdrawLease withdraws accrued funds from the lease payment | | - | `CreateLease` | [MsgCreateLease](#akash.market.v1beta2.MsgCreateLease) | [MsgCreateLeaseResponse](#akash.market.v1beta2.MsgCreateLeaseResponse) | CreateLease creates a new lease | | - | `CloseLease` | [MsgCloseLease](#akash.market.v1beta2.MsgCloseLease) | [MsgCloseLeaseResponse](#akash.market.v1beta2.MsgCloseLeaseResponse) | CloseLease defines a method to close an order given proper inputs. | | - - +

Top

- ## akash/market/v1beta2/lease.proto + ## akash/deployment/v1beta4/params.proto - + - ### Lease - Lease stores LeaseID, state of lease and price + ### Params + Params defines the parameters for the x/deployment package | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta2.LeaseID) | | | - | `state` | [Lease.State](#akash.market.v1beta2.Lease.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `closed_on` | [int64](#int64) | | | + | `min_deposits` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - + - ### LeaseFilters - LeaseFilters defines flags for lease list filter + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | + +

Top

+ ## akash/deployment/v1beta4/genesis.proto - + - ### LeaseID - LeaseID stores bid details of lease + ### GenesisDeployment + GenesisDeployment defines the basic genesis state used by deployment module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | + | `deployment` | [akash.deployment.v1.Deployment](#akash.deployment.v1.Deployment) | | | + | `groups` | [Group](#akash.deployment.v1beta4.Group) | repeated | | - + - ### MsgCloseLease - MsgCloseLease defines an SDK message for closing order + ### GenesisState + GenesisState stores slice of genesis deployment instance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta2.LeaseID) | | | + | `deployments` | [GenesisDeployment](#akash.deployment.v1beta4.GenesisDeployment) | repeated | | + | `params` | [Params](#akash.deployment.v1beta4.Params) | | | - - + - ### MsgCloseLeaseResponse - MsgCloseLeaseResponse defines the Msg/CloseLease response type. + + + + + + + +

Top

+ ## akash/deployment/v1beta4/groupmsg.proto - + - ### MsgCreateLease - MsgCreateLease is sent to create a lease + ### MsgCloseGroup + MsgCloseGroup defines SDK message to close a single Group within a Deployment. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta2.BidID) | | | + | `id` | [akash.deployment.v1.GroupID](#akash.deployment.v1.GroupID) | | | - + - ### MsgCreateLeaseResponse - MsgCreateLeaseResponse is the response from creating a lease + ### MsgCloseGroupResponse + MsgCloseGroupResponse defines the Msg/CloseGroup response type. - + - ### MsgWithdrawLease - MsgWithdrawLease defines an SDK message for closing bid + ### MsgPauseGroup + MsgPauseGroup defines SDK message to close a single Group within a Deployment. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [LeaseID](#akash.market.v1beta2.LeaseID) | | | + | `id` | [akash.deployment.v1.GroupID](#akash.deployment.v1.GroupID) | | | - + - ### MsgWithdrawLeaseResponse - MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. + ### MsgPauseGroupResponse + MsgPauseGroupResponse defines the Msg/PauseGroup response type. - - - + - ### Lease.State - State is an enum which refers to state of lease + ### MsgStartGroup + MsgStartGroup defines SDK message to close a single Group within a Deployment. - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | LeaseActive denotes state for lease active | - | insufficient_funds | 2 | LeaseInsufficientFunds denotes state for lease insufficient_funds | - | closed | 3 | LeaseClosed denotes state for lease closed | - - - - - - - + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `id` | [akash.deployment.v1.GroupID](#akash.deployment.v1.GroupID) | | | - -

Top

- ## akash/market/v1beta2/genesis.proto - + - ### GenesisState - GenesisState defines the basic genesis state used by market module + ### MsgStartGroupResponse + MsgStartGroupResponse defines the Msg/StartGroup response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `orders` | [Order](#akash.market.v1beta2.Order) | repeated | | - | `leases` | [Lease](#akash.market.v1beta2.Lease) | repeated | | - | `params` | [Params](#akash.market.v1beta2.Params) | | | - - @@ -9028,62 +1851,66 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta2/order.proto + ## akash/escrow/v1/types.proto - + - ### Order - Order stores orderID, state of order and other details + ### Account + Account stores state for an escrow account | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order_id` | [OrderID](#akash.market.v1beta2.OrderID) | | | - | `state` | [Order.State](#akash.market.v1beta2.Order.State) | | | - | `spec` | [akash.deployment.v1beta2.GroupSpec](#akash.deployment.v1beta2.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | + | `id` | [AccountID](#akash.escrow.v1.AccountID) | | unique identifier for this escrow account | + | `owner` | [string](#string) | | bech32 encoded account address of the owner of this escrow account | + | `state` | [AccountState](#akash.escrow.v1.AccountState) | | current state of this escrow account | + | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | unspent coins received from the owner's wallet | + | `transferred` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | total coins spent by this account | + | `settled_at` | [int64](#int64) | | block height at which this account was last settled | + | `depositor` | [string](#string) | | 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` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | 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. | - + - ### OrderFilters - OrderFilters defines flags for order list filter + ### AccountID + AccountID is the account identifier | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `state` | [string](#string) | | | + | `scope` | [string](#string) | | | + | `xid` | [string](#string) | | | - + - ### OrderID - OrderID stores owner and all other seq numbers + ### FractionalPayment + Payment stores state for a payment | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | + | `account_id` | [AccountID](#akash.escrow.v1.AccountID) | | | + | `payment_id` | [string](#string) | | | | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | + | `state` | [FractionalPayment.State](#akash.escrow.v1.FractionalPayment.State) | | | + | `rate` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `balance` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `withdrawn` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | @@ -9092,17 +1919,31 @@ A successful bid becomes a Lease(ID). - + - ### Order.State - State is an enum which refers to state of order + ### AccountState + State stores state for an escrow account | Name | Number | Description | | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | OrderOpen denotes state for order open | - | active | 2 | OrderMatched denotes state for order matched | - | closed | 3 | OrderClosed denotes state for order lost | + | invalid | 0 | AccountStateInvalid is an invalid state | + | open | 1 | AccountOpen is the state when an account is open | + | closed | 2 | AccountClosed is the state when an account is closed | + | overdrawn | 3 | AccountOverdrawn is the state when an account is overdrawn | + + + + + + ### FractionalPayment.State + Payment State + + | Name | Number | Description | + | ---- | ------ | ----------- | + | invalid | 0 | PaymentStateInvalid is the state when the payment is invalid | + | open | 1 | PaymentStateOpen is the state when the payment is open | + | closed | 2 | PaymentStateClosed is the state when the payment is closed | + | overdrawn | 3 | PaymentStateOverdrawn is the state when the payment is overdrawn | @@ -9113,169 +1954,239 @@ A successful bid becomes a Lease(ID). - +

Top

- ## akash/market/v1beta2/params.proto + ## akash/deployment/v1beta4/query.proto - + - ### Params - Params is the params for the x/market module + ### QueryDeploymentRequest + QueryDeploymentRequest is request type for the Query/Deployment RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `order_max_bids` | [uint32](#uint32) | | | + | `id` | [akash.deployment.v1.DeploymentID](#akash.deployment.v1.DeploymentID) | | | - + + - + ### QueryDeploymentResponse + QueryDeploymentResponse is response type for the Query/Deployment RPC method - + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `deployment` | [akash.deployment.v1.Deployment](#akash.deployment.v1.Deployment) | | | + | `groups` | [Group](#akash.deployment.v1beta4.Group) | repeated | | + | `escrow_account` | [akash.escrow.v1.Account](#akash.escrow.v1.Account) | | | + + - + + + + ### QueryDeploymentsRequest + QueryDeploymentsRequest is request type for the Query/Deployments RPC method + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `filters` | [DeploymentFilters](#akash.deployment.v1beta4.DeploymentFilters) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + - -

Top

- ## akash/market/v1beta5/bid.proto - + - ### Bid - Bid stores BidID, state of bid and price + ### QueryDeploymentsResponse + QueryDeploymentsResponse is response type for the Query/Deployments RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta5.BidID) | | | - | `state` | [Bid.State](#akash.market.v1beta5.Bid.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `resources_offer` | [ResourceOffer](#akash.market.v1beta5.ResourceOffer) | repeated | | + | `deployments` | [QueryDeploymentResponse](#akash.deployment.v1beta4.QueryDeploymentResponse) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - + - ### BidFilters - BidFilters defines flags for bid list filter + ### QueryGroupRequest + QueryGroupRequest is request type for the Query/Group RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | + | `id` | [akash.deployment.v1.GroupID](#akash.deployment.v1.GroupID) | | | - + - ### BidID - BidID stores owner and all other seq numbers -A successful bid becomes a Lease(ID). + ### QueryGroupResponse + QueryGroupResponse is response type for the Query/Group RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | + | `group` | [Group](#akash.deployment.v1beta4.Group) | | | + + + + + + + + + + + + + + + ### Query + Query defines the gRPC querier service + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `Deployments` | [QueryDeploymentsRequest](#akash.deployment.v1beta4.QueryDeploymentsRequest) | [QueryDeploymentsResponse](#akash.deployment.v1beta4.QueryDeploymentsResponse) | Deployments queries deployments | GET|/akash/deployment/v1/deployments/list| + | `Deployment` | [QueryDeploymentRequest](#akash.deployment.v1beta4.QueryDeploymentRequest) | [QueryDeploymentResponse](#akash.deployment.v1beta4.QueryDeploymentResponse) | Deployment queries deployment details | GET|/akash/deployment/v1/deployments/info| + | `Group` | [QueryGroupRequest](#akash.deployment.v1beta4.QueryGroupRequest) | [QueryGroupResponse](#akash.deployment.v1beta4.QueryGroupResponse) | Group queries group details | GET|/akash/deployment/v1/groups/info| + + + + + + +

Top

+ + ## akash/deployment/v1beta4/service.proto + + + + + + + + + + + + ### Msg + Msg defines the deployment Msg service. + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `CreateDeployment` | [MsgCreateDeployment](#akash.deployment.v1beta4.MsgCreateDeployment) | [MsgCreateDeploymentResponse](#akash.deployment.v1beta4.MsgCreateDeploymentResponse) | CreateDeployment defines a method to create new deployment given proper inputs. | | + | `DepositDeployment` | [.akash.deployment.v1.MsgDepositDeployment](#akash.deployment.v1.MsgDepositDeployment) | [.akash.deployment.v1.MsgDepositDeploymentResponse](#akash.deployment.v1.MsgDepositDeploymentResponse) | DepositDeployment deposits more funds into the deployment account | | + | `UpdateDeployment` | [MsgUpdateDeployment](#akash.deployment.v1beta4.MsgUpdateDeployment) | [MsgUpdateDeploymentResponse](#akash.deployment.v1beta4.MsgUpdateDeploymentResponse) | UpdateDeployment defines a method to update a deployment given proper inputs. | | + | `CloseDeployment` | [MsgCloseDeployment](#akash.deployment.v1beta4.MsgCloseDeployment) | [MsgCloseDeploymentResponse](#akash.deployment.v1beta4.MsgCloseDeploymentResponse) | CloseDeployment defines a method to close a deployment given proper inputs. | | + | `CloseGroup` | [MsgCloseGroup](#akash.deployment.v1beta4.MsgCloseGroup) | [MsgCloseGroupResponse](#akash.deployment.v1beta4.MsgCloseGroupResponse) | CloseGroup defines a method to close a group of a deployment given proper inputs. | | + | `PauseGroup` | [MsgPauseGroup](#akash.deployment.v1beta4.MsgPauseGroup) | [MsgPauseGroupResponse](#akash.deployment.v1beta4.MsgPauseGroupResponse) | PauseGroup defines a method to close a group of a deployment given proper inputs. | | + | `StartGroup` | [MsgStartGroup](#akash.deployment.v1beta4.MsgStartGroup) | [MsgStartGroupResponse](#akash.deployment.v1beta4.MsgStartGroupResponse) | StartGroup defines a method to close a group of a deployment given proper inputs. | | + + + + +

Top

+ ## akash/discovery/v1/client_info.proto - + - ### MsgCloseBid - MsgCloseBid defines an SDK message for closing bid + ### ClientInfo + ClientInfo akash specific client info | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta5.BidID) | | | + | `api_version` | [string](#string) | | | - - + - ### MsgCloseBidResponse - MsgCloseBidResponse defines the Msg/CloseBid response type. + + + + + + + +

Top

+ ## akash/discovery/v1/akash.proto - + - ### MsgCreateBid - MsgCreateBid defines an SDK message for creating Bid + ### Akash + Akash akash specific RPC parameters | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order` | [OrderID](#akash.market.v1beta5.OrderID) | | | - | `provider` | [string](#string) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `resources_offer` | [ResourceOffer](#akash.market.v1beta5.ResourceOffer) | repeated | | + | `client_info` | [ClientInfo](#akash.discovery.v1.ClientInfo) | | | - - + - ### MsgCreateBidResponse - MsgCreateBidResponse defines the Msg/CreateBid response type. + + + + + + + +

Top

+ ## akash/escrow/v1/genesis.proto - + - ### ResourceOffer - ResourceOffer describes resources that provider is offering -for deployment + ### GenesisState + GenesisState defines the basic genesis state used by escrow module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `resources` | [akash.base.resources.v1.Resources](#akash.base.resources.v1.Resources) | | | - | `count` | [uint32](#uint32) | | | + | `accounts` | [Account](#akash.escrow.v1.Account) | repeated | | + | `payments` | [FractionalPayment](#akash.escrow.v1.FractionalPayment) | repeated | | @@ -9283,21 +2194,6 @@ for deployment - - - - ### Bid.State - State is an enum which refers to state of bid - - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | BidOpen denotes state for bid open | - | active | 2 | BidMatched denotes state for bid open | - | lost | 3 | BidLost denotes state for bid lost | - | closed | 4 | BidClosed denotes state for bid closed | - - @@ -9306,53 +2202,61 @@ for deployment - +

Top

- ## akash/market/v1beta5/query.proto + ## akash/escrow/v1/query.proto - + - ### QueryBidRequest - QueryBidRequest is request type for the Query/Bid RPC method + ### QueryAccountsRequest + QueryAccountRequest is request type for the Query/Account RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [BidID](#akash.market.v1beta5.BidID) | | | + | `scope` | [string](#string) | | | + | `xid` | [string](#string) | | | + | `owner` | [string](#string) | | | + | `state` | [string](#string) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + - ### QueryBidResponse - QueryBidResponse is response type for the Query/Bid RPC method + ### QueryAccountsResponse + QueryProvidersResponse is response type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid` | [Bid](#akash.market.v1beta5.Bid) | | | - | `escrow_account` | [akash.escrow.v1beta3.Account](#akash.escrow.v1beta3.Account) | | | + | `accounts` | [Account](#akash.escrow.v1.Account) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - + - ### QueryBidsRequest - QueryBidsRequest is request type for the Query/Bids RPC method + ### QueryPaymentsRequest + QueryPaymentRequest is request type for the Query/Payment RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `filters` | [BidFilters](#akash.market.v1beta5.BidFilters) | | | + | `scope` | [string](#string) | | | + | `xid` | [string](#string) | | | + | `id` | [string](#string) | | | + | `owner` | [string](#string) | | | + | `state` | [string](#string) | | | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | @@ -9360,141 +2264,153 @@ for deployment - + - ### QueryBidsResponse - QueryBidsResponse is response type for the Query/Bids RPC method + ### QueryPaymentsResponse + QueryProvidersResponse is response type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bids` | [QueryBidResponse](#akash.market.v1beta5.QueryBidResponse) | repeated | | + | `payments` | [FractionalPayment](#akash.escrow.v1.FractionalPayment) | repeated | | | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + + + + + + - + - ### QueryLeaseRequest - QueryLeaseRequest is request type for the Query/Lease RPC method + ### Query + Query defines the gRPC querier service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `Accounts` | [QueryAccountsRequest](#akash.escrow.v1.QueryAccountsRequest) | [QueryAccountsResponse](#akash.escrow.v1.QueryAccountsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Accounts queries all accounts | GET|/akash/escrow/v1/types/accounts/list| + | `Payments` | [QueryPaymentsRequest](#akash.escrow.v1.QueryPaymentsRequest) | [QueryPaymentsResponse](#akash.escrow.v1.QueryPaymentsResponse) | buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME Payments queries all payments | GET|/akash/escrow/v1/types/payments/list| - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [LeaseID](#akash.market.v1beta5.LeaseID) | | | + + + +

Top

+ ## akash/gov/v1beta3/params.proto - + - ### QueryLeaseResponse - QueryLeaseResponse is response type for the Query/Lease RPC method + ### DepositParams + DepositParams defines the parameters for the x/gov module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `lease` | [Lease](#akash.market.v1beta5.Lease) | | | - | `escrow_payment` | [akash.escrow.v1beta3.FractionalPayment](#akash.escrow.v1beta3.FractionalPayment) | | | + | `min_initial_deposit_rate` | [bytes](#bytes) | | min_initial_deposit_rate minimum % of TotalDeposit author of the proposal must put in order for proposal tx to be committed | - - + - ### QueryLeasesRequest - QueryLeasesRequest is request type for the Query/Leases RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [LeaseFilters](#akash.market.v1beta5.LeaseFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +

Top

+ ## akash/gov/v1beta3/genesis.proto - + - ### QueryLeasesResponse - QueryLeasesResponse is response type for the Query/Leases RPC method + ### GenesisState + GenesisState stores slice of genesis deployment instance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `leases` | [QueryLeaseResponse](#akash.market.v1beta5.QueryLeaseResponse) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + | `deposit_params` | [DepositParams](#akash.gov.v1beta3.DepositParams) | | | - - + - ### QueryOrderRequest - QueryOrderRequest is request type for the Query/Order RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `id` | [OrderID](#akash.market.v1beta5.OrderID) | | | + +

Top

+ ## akash/inflation/v1beta2/params.proto - + - ### QueryOrderResponse - QueryOrderResponse is response type for the Query/Order RPC method + ### Params + Params defines the parameters for the x/deployment package | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order` | [Order](#akash.market.v1beta5.Order) | | | + | `inflation_decay_factor` | [string](#string) | | InflationDecayFactor is the number of years it takes inflation to halve. | + | `initial_inflation` | [string](#string) | | InitialInflation is the rate at which inflation starts at genesis. It is a decimal value in the range [0.0, 100.0]. | + | `variance` | [string](#string) | | 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]. | - - + - ### QueryOrdersRequest - QueryOrdersRequest is request type for the Query/Orders RPC method + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `filters` | [OrderFilters](#akash.market.v1beta5.OrderFilters) | | | - | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + +

Top

+ ## akash/inflation/v1beta2/genesis.proto - + - ### QueryOrdersResponse - QueryOrdersResponse is response type for the Query/Orders RPC method + ### GenesisState + GenesisState stores slice of genesis deployment instance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `orders` | [Order](#akash.market.v1beta5.Order) | repeated | | - | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + | `params` | [Params](#akash.inflation.v1beta2.Params) | | | @@ -9506,29 +2422,31 @@ for deployment + + - + + +

Top

- ### Query - Query defines the gRPC querier service + ## akash/inflation/v1beta3/params.proto + - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `Orders` | [QueryOrdersRequest](#akash.market.v1beta5.QueryOrdersRequest) | [QueryOrdersResponse](#akash.market.v1beta5.QueryOrdersResponse) | Orders queries orders with filters | GET|/akash/market/v1beta5/orders/list| - | `Order` | [QueryOrderRequest](#akash.market.v1beta5.QueryOrderRequest) | [QueryOrderResponse](#akash.market.v1beta5.QueryOrderResponse) | Order queries order details | GET|/akash/market/v1beta5/orders/info| - | `Bids` | [QueryBidsRequest](#akash.market.v1beta5.QueryBidsRequest) | [QueryBidsResponse](#akash.market.v1beta5.QueryBidsResponse) | Bids queries bids with filters | GET|/akash/market/v1beta5/bids/list| - | `Bid` | [QueryBidRequest](#akash.market.v1beta5.QueryBidRequest) | [QueryBidResponse](#akash.market.v1beta5.QueryBidResponse) | Bid queries bid details | GET|/akash/market/v1beta5/bids/info| - | `Leases` | [QueryLeasesRequest](#akash.market.v1beta5.QueryLeasesRequest) | [QueryLeasesResponse](#akash.market.v1beta5.QueryLeasesResponse) | Leases queries leases with filters | GET|/akash/market/v1beta5/leases/list| - | `Lease` | [QueryLeaseRequest](#akash.market.v1beta5.QueryLeaseRequest) | [QueryLeaseResponse](#akash.market.v1beta5.QueryLeaseResponse) | Lease queries lease details | GET|/akash/market/v1beta5/leases/info| - + + + ### Params + Params defines the parameters for the x/deployment package + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `inflation_decay_factor` | [string](#string) | | InflationDecayFactor is the number of years it takes inflation to halve. | + | `initial_inflation` | [string](#string) | | InitialInflation is the rate at which inflation starts at genesis. It is a decimal value in the range [0.0, 100.0]. | + | `variance` | [string](#string) | | 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]. | + - -

Top

- ## akash/market/v1beta5/service.proto @@ -9537,74 +2455,53 @@ for deployment - - - - ### Msg - Msg defines the market Msg service - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `CreateBid` | [MsgCreateBid](#akash.market.v1beta5.MsgCreateBid) | [MsgCreateBidResponse](#akash.market.v1beta5.MsgCreateBidResponse) | CreateBid defines a method to create a bid given proper inputs. | | - | `CloseBid` | [MsgCloseBid](#akash.market.v1beta5.MsgCloseBid) | [MsgCloseBidResponse](#akash.market.v1beta5.MsgCloseBidResponse) | CloseBid defines a method to close a bid given proper inputs. | | - | `WithdrawLease` | [MsgWithdrawLease](#akash.market.v1beta5.MsgWithdrawLease) | [MsgWithdrawLeaseResponse](#akash.market.v1beta5.MsgWithdrawLeaseResponse) | WithdrawLease withdraws accrued funds from the lease payment | | - | `CreateLease` | [MsgCreateLease](#akash.market.v1beta5.MsgCreateLease) | [MsgCreateLeaseResponse](#akash.market.v1beta5.MsgCreateLeaseResponse) | CreateLease creates a new lease | | - | `CloseLease` | [MsgCloseLease](#akash.market.v1beta5.MsgCloseLease) | [MsgCloseLeaseResponse](#akash.market.v1beta5.MsgCloseLeaseResponse) | CloseLease defines a method to close an order given proper inputs. | | - - +

Top

- ## akash/market/v1beta5/lease.proto + ## akash/inflation/v1beta3/genesis.proto - + - ### Lease - Lease stores LeaseID, state of lease and price + ### GenesisState + GenesisState stores slice of genesis deployment instance | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta5.LeaseID) | | | - | `state` | [Lease.State](#akash.market.v1beta5.Lease.State) | | | - | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | - | `created_at` | [int64](#int64) | | | - | `closed_on` | [int64](#int64) | | | + | ----- | ---- | ----- | ----------- | + | `params` | [Params](#akash.inflation.v1beta3.Params) | | | - - + - ### LeaseFilters - LeaseFilters defines flags for lease list filter + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `owner` | [string](#string) | | | - | `dseq` | [uint64](#uint64) | | | - | `gseq` | [uint32](#uint32) | | | - | `oseq` | [uint32](#uint32) | | | - | `provider` | [string](#string) | | | - | `state` | [string](#string) | | | + +

Top

+ ## akash/market/v1/bid.proto - + - ### LeaseID - LeaseID stores bid details of lease + ### BidID + BidID stores owner and all other seq numbers +A successful bid becomes a Lease(ID). | Field | Type | Label | Description | @@ -9619,77 +2516,71 @@ for deployment + + - + - ### MsgCloseLease - MsgCloseLease defines an SDK message for closing order + ### BidState + BidState is an enum which refers to state of bid - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `lease_id` | [LeaseID](#akash.market.v1beta5.LeaseID) | | | - + | Name | Number | Description | + | ---- | ------ | ----------- | + | bid_invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | bid_open | 1 | BidOpen denotes state for bid open | + | bid_active | 2 | BidMatched denotes state for bid open | + | bid_lost | 3 | BidLost denotes state for bid lost | + | bid_closed | 4 | BidClosed denotes state for bid closed | - + - - + - ### MsgCloseLeaseResponse - MsgCloseLeaseResponse defines the Msg/CloseLease response type. + + + +

Top

+ ## akash/market/v1/lease.proto - + - ### MsgCreateLease - MsgCreateLease is sent to create a lease + ### Lease + Lease stores LeaseID, state of lease and price | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [BidID](#akash.market.v1beta5.BidID) | | | - - - - - + | `id` | [LeaseID](#akash.market.v1.LeaseID) | | | + | `state` | [LeaseState](#akash.market.v1.LeaseState) | | | + | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `created_at` | [int64](#int64) | | | + | `closed_on` | [int64](#int64) | | | - - - ### MsgCreateLeaseResponse - MsgCreateLeaseResponse is the response from creating a lease - - + - ### MsgWithdrawLease - MsgWithdrawLease defines an SDK message for closing bid + ### LeaseID + LeaseID stores bid details of lease | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_id` | [LeaseID](#akash.market.v1beta5.LeaseID) | | | - - - - - + | `owner` | [string](#string) | | | + | `dseq` | [uint64](#uint64) | | | + | `gseq` | [uint32](#uint32) | | | + | `oseq` | [uint32](#uint32) | | | + | `provider` | [string](#string) | | | - - - ### MsgWithdrawLeaseResponse - MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. - @@ -9697,17 +2588,17 @@ for deployment - + - ### Lease.State + ### LeaseState State is an enum which refers to state of lease | Name | Number | Description | | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | active | 1 | LeaseActive denotes state for lease active | - | insufficient_funds | 2 | LeaseInsufficientFunds denotes state for lease insufficient_funds | - | closed | 3 | LeaseClosed denotes state for lease closed | + | lease_invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | lease_active | 1 | LeaseActive denotes state for lease active | + | lease_insufficient_funds | 2 | LeaseInsufficientFunds denotes state for lease insufficient_funds | + | lease_closed | 3 | LeaseClosed denotes state for lease closed | @@ -9718,25 +2609,25 @@ for deployment - +

Top

- ## akash/market/v1beta5/genesis.proto + ## akash/market/v1/order.proto - + - ### GenesisState - GenesisState defines the basic genesis state used by market module + ### OrderID + OrderID stores owner and all other seq numbers | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.market.v1beta5.Params) | | | - | `orders` | [Order](#akash.market.v1beta5.Order) | repeated | | - | `leases` | [Lease](#akash.market.v1beta5.Lease) | repeated | | - | `bids` | [Bid](#akash.market.v1beta5.Bid) | repeated | | + | `owner` | [string](#string) | | | + | `dseq` | [uint64](#uint64) | | | + | `gseq` | [uint32](#uint32) | | | + | `oseq` | [uint32](#uint32) | | | @@ -9744,6 +2635,20 @@ for deployment + + + + ### OrderState + OrderState is an enum which refers to state of order + + | Name | Number | Description | + | ---- | ------ | ----------- | + | order_invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | + | order_open | 1 | OrderOpen denotes state for order open | + | order_active | 2 | OrderMatched denotes state for order matched | + | order_closed | 3 | OrderClosed denotes state for order lost | + + @@ -9752,35 +2657,37 @@ for deployment - +

Top

- ## akash/market/v1beta5/order.proto + ## akash/market/v1/filters.proto - + - ### Order - Order stores orderID, state of order and other details + ### BidFilters + BidFilters defines flags for bid list filter | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `order_id` | [OrderID](#akash.market.v1beta5.OrderID) | | | - | `state` | [Order.State](#akash.market.v1beta5.Order.State) | | | - | `spec` | [akash.deployment.v1beta4.GroupSpec](#akash.deployment.v1beta4.GroupSpec) | | | - | `created_at` | [int64](#int64) | | | + | `owner` | [string](#string) | | | + | `dseq` | [uint64](#uint64) | | | + | `gseq` | [uint32](#uint32) | | | + | `oseq` | [uint32](#uint32) | | | + | `provider` | [string](#string) | | | + | `state` | [BidState](#akash.market.v1.BidState) | | | - + - ### OrderFilters - OrderFilters defines flags for order list filter + ### LeaseFilters + LeaseFilters defines flags for lease list filter | Field | Type | Label | Description | @@ -9789,17 +2696,18 @@ for deployment | `dseq` | [uint64](#uint64) | | | | `gseq` | [uint32](#uint32) | | | | `oseq` | [uint32](#uint32) | | | - | `state` | [string](#string) | | | + | `provider` | [string](#string) | | | + | `state` | [LeaseState](#akash.market.v1.LeaseState) | | | - + - ### OrderID - OrderID stores owner and all other seq numbers + ### OrderFilters + OrderFilters defines flags for order list filter | Field | Type | Label | Description | @@ -9808,6 +2716,7 @@ for deployment | `dseq` | [uint64](#uint64) | | | | `gseq` | [uint32](#uint32) | | | | `oseq` | [uint32](#uint32) | | | + | `state` | [OrderState](#akash.market.v1.OrderState) | | | @@ -9815,20 +2724,39 @@ for deployment + + + + + + + - + +

Top

- ### Order.State - State is an enum which refers to state of order + ## akash/market/v1beta5/resourcesoffer.proto + + + + + + ### ResourceOffer + ResourceOffer describes resources that provider is offering +for deployment + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `resources` | [akash.base.resources.v1beta4.Resources](#akash.base.resources.v1beta4.Resources) | | | + | `count` | [uint32](#uint32) | | | + + - | Name | Number | Description | - | ---- | ------ | ----------- | - | invalid | 0 | Prefix should start with 0 in enum. So declaring dummy state | - | open | 1 | OrderOpen denotes state for order open | - | active | 2 | OrderMatched denotes state for order matched | - | closed | 3 | OrderClosed denotes state for order lost | + + @@ -9837,23 +2765,26 @@ for deployment - +

Top

- ## akash/market/v1beta5/params.proto + ## akash/market/v1beta5/bid.proto - + - ### Params - Params is the params for the x/market module + ### Bid + Bid stores BidID, state of bid and price | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `bid_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - | `order_max_bids` | [uint32](#uint32) | | | + | `id` | [akash.market.v1.BidID](#akash.market.v1.BidID) | | | + | `state` | [akash.market.v1.BidState](#akash.market.v1.BidState) | | | + | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `created_at` | [int64](#int64) | | | + | `resources_offer` | [ResourceOffer](#akash.market.v1beta5.ResourceOffer) | repeated | | @@ -9869,23 +2800,62 @@ for deployment - +

Top

- ## akash/inflation/v1beta3/genesis.proto + ## akash/market/v1beta5/bidmsg.proto - + - ### GenesisState - GenesisState stores slice of genesis deployment instance + ### MsgCloseBid + MsgCloseBid defines an SDK message for closing bid | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.inflation.v1beta3.Params) | | | + | `id` | [akash.market.v1.BidID](#akash.market.v1.BidID) | | | + + + + + + + + + ### MsgCloseBidResponse + MsgCloseBidResponse defines the Msg/CloseBid response type. + + + + + + + + + ### MsgCreateBid + MsgCreateBid defines an SDK message for creating Bid + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `order_id` | [akash.market.v1.OrderID](#akash.market.v1.OrderID) | | | + | `provider` | [string](#string) | | | + | `price` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | | | + | `deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + | `resources_offer` | [ResourceOffer](#akash.market.v1beta5.ResourceOffer) | repeated | | + + + + + + + + ### MsgCreateBidResponse + MsgCreateBidResponse defines the Msg/CreateBid response type. + @@ -9900,24 +2870,23 @@ for deployment - +

Top

- ## akash/inflation/v1beta3/params.proto + ## akash/market/v1beta5/params.proto - + ### Params - Params defines the parameters for the x/deployment package + Params is the params for the x/market module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `inflation_decay_factor` | [string](#string) | | InflationDecayFactor is the number of years it takes inflation to halve. | - | `initial_inflation` | [string](#string) | | InitialInflation is the rate at which inflation starts at genesis. It is a decimal value in the range [0.0, 100.0]. | - | `variance` | [string](#string) | | 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]. | + | `bid_min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + | `order_max_bids` | [uint32](#uint32) | | | @@ -9933,22 +2902,25 @@ for deployment - +

Top

- ## akash/inflation/v1beta2/genesis.proto + ## akash/market/v1beta5/order.proto - + - ### GenesisState - GenesisState stores slice of genesis deployment instance + ### Order + Order stores orderID, state of order and other details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `params` | [Params](#akash.inflation.v1beta2.Params) | | | + | `id` | [akash.market.v1.OrderID](#akash.market.v1.OrderID) | | | + | `state` | [akash.market.v1.OrderState](#akash.market.v1.OrderState) | | | + | `spec` | [akash.deployment.v1beta4.GroupSpec](#akash.deployment.v1beta4.GroupSpec) | | | + | `created_at` | [int64](#int64) | | | @@ -9964,24 +2936,25 @@ for deployment - +

Top

- ## akash/inflation/v1beta2/params.proto + ## akash/market/v1beta5/genesis.proto - - - ### Params - Params defines the parameters for the x/deployment package + + + ### GenesisState + GenesisState defines the basic genesis state used by market module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `inflation_decay_factor` | [string](#string) | | InflationDecayFactor is the number of years it takes inflation to halve. | - | `initial_inflation` | [string](#string) | | InitialInflation is the rate at which inflation starts at genesis. It is a decimal value in the range [0.0, 100.0]. | - | `variance` | [string](#string) | | 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]. | + | `params` | [Params](#akash.market.v1beta5.Params) | | | + | `orders` | [Order](#akash.market.v1beta5.Order) | repeated | | + | `leases` | [akash.market.v1.Lease](#akash.market.v1.Lease) | repeated | | + | `bids` | [Bid](#akash.market.v1beta5.Bid) | repeated | | @@ -9997,93 +2970,83 @@ for deployment - +

Top

- ## akash/base/v1beta3/memory.proto + ## akash/market/v1beta5/leasemsg.proto - + - ### Memory - Memory stores resource quantity and memory attributes + ### MsgCloseLease + MsgCloseLease defines an SDK message for closing order | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourceValue](#akash.base.v1beta3.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta3.Attribute) | repeated | | + | `lease_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | - - - - - + + - + ### MsgCloseLeaseResponse + MsgCloseLeaseResponse defines the Msg/CloseLease response type. - - -

Top

- ## akash/base/v1beta3/cpu.proto - + - ### CPU - CPU stores resource units and cpu config attributes + ### MsgCreateLease + MsgCreateLease is sent to create a lease | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `units` | [ResourceValue](#akash.base.v1beta3.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta3.Attribute) | repeated | | + | `bid_id` | [akash.market.v1.BidID](#akash.market.v1.BidID) | | | - - - - - + + - + ### MsgCreateLeaseResponse + MsgCreateLeaseResponse is the response from creating a lease - - -

Top

- ## akash/base/v1beta3/resources.proto - + - ### Resources - Resources describes all available resources types for deployment/node etc -if field is nil resource is not present in the given data-structure + ### MsgWithdrawLease + MsgWithdrawLease defines an SDK message for closing bid | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [uint32](#uint32) | | | - | `cpu` | [CPU](#akash.base.v1beta3.CPU) | | | - | `memory` | [Memory](#akash.base.v1beta3.Memory) | | | - | `storage` | [Storage](#akash.base.v1beta3.Storage) | repeated | | - | `gpu` | [GPU](#akash.base.v1beta3.GPU) | | | - | `endpoints` | [Endpoint](#akash.base.v1beta3.Endpoint) | repeated | | + | `bid_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | + + + + + + + + ### MsgWithdrawLeaseResponse + MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. + @@ -10098,199 +3061,195 @@ if field is nil resource is not present in the given data-structure - +

Top

- ## akash/base/v1beta3/attribute.proto + ## akash/market/v1beta5/query.proto - + - ### Attribute - Attribute represents key value pair + ### QueryBidRequest + QueryBidRequest is request type for the Query/Bid RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `key` | [string](#string) | | | - | `value` | [string](#string) | | | + | `id` | [akash.market.v1.BidID](#akash.market.v1.BidID) | | | - + - ### PlacementRequirements - PlacementRequirements + ### QueryBidResponse + QueryBidResponse is response type for the Query/Bid RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `signed_by` | [SignedBy](#akash.base.v1beta3.SignedBy) | | SignedBy list of keys that tenants expect to have signatures from | - | `attributes` | [Attribute](#akash.base.v1beta3.Attribute) | repeated | Attribute list of attributes tenant expects from the provider | + | `bid` | [Bid](#akash.market.v1beta5.Bid) | | | + | `escrow_account` | [akash.escrow.v1.Account](#akash.escrow.v1.Account) | | | - + - ### SignedBy - 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 + ### QueryBidsRequest + QueryBidsRequest is request type for the Query/Bids RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `all_of` | [string](#string) | repeated | all_of all keys in this list must have signed attributes | - | `any_of` | [string](#string) | repeated | any_of at least of of the keys from the list must have signed attributes | + | `filters` | [akash.market.v1.BidFilters](#akash.market.v1.BidFilters) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - + + - + ### QueryBidsResponse + QueryBidsResponse is response type for the Query/Bids RPC method + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `bids` | [QueryBidResponse](#akash.market.v1beta5.QueryBidResponse) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + - -

Top

- ## akash/base/v1beta3/endpoint.proto - + - ### Endpoint - Endpoint describes a publicly accessible IP service + ### QueryLeaseRequest + QueryLeaseRequest is request type for the Query/Lease RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `kind` | [Endpoint.Kind](#akash.base.v1beta3.Endpoint.Kind) | | | - | `sequence_number` | [uint32](#uint32) | | | + | `id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | - - - + - ### Endpoint.Kind - This describes how the endpoint is implemented when the lease is deployed + ### QueryLeaseResponse + QueryLeaseResponse is response type for the Query/Lease RPC method - | Name | Number | Description | - | ---- | ------ | ----------- | - | SHARED_HTTP | 0 | Describes an endpoint that becomes a Kubernetes Ingress | - | RANDOM_PORT | 1 | Describes an endpoint that becomes a Kubernetes NodePort | - | LEASED_IP | 2 | Describes an endpoint that becomes a leased IP | + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `lease` | [akash.market.v1.Lease](#akash.market.v1.Lease) | | | + | `escrow_payment` | [akash.escrow.v1.FractionalPayment](#akash.escrow.v1.FractionalPayment) | | | + - + - + + - + ### QueryLeasesRequest + QueryLeasesRequest is request type for the Query/Leases RPC method + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `filters` | [akash.market.v1.LeaseFilters](#akash.market.v1.LeaseFilters) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + - -

Top

- ## akash/base/v1beta3/gpu.proto - + - ### GPU - GPU stores resource units and cpu config attributes + ### QueryLeasesResponse + QueryLeasesResponse is response type for the Query/Leases RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `units` | [ResourceValue](#akash.base.v1beta3.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta3.Attribute) | repeated | | + | `leases` | [QueryLeaseResponse](#akash.market.v1beta5.QueryLeaseResponse) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - + + - + ### QueryOrderRequest + QueryOrderRequest is request type for the Query/Order RPC method + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `id` | [akash.market.v1.OrderID](#akash.market.v1.OrderID) | | | + - -

Top

- ## akash/base/v1beta3/storage.proto - + - ### Storage - Storage stores resource quantity and storage attributes + ### QueryOrderResponse + QueryOrderResponse is response type for the Query/Order RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `quantity` | [ResourceValue](#akash.base.v1beta3.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta3.Attribute) | repeated | | + | `order` | [Order](#akash.market.v1beta5.Order) | | | - - - - - + + - + ### QueryOrdersRequest + QueryOrdersRequest is request type for the Query/Orders RPC method + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `filters` | [akash.market.v1.OrderFilters](#akash.market.v1.OrderFilters) | | | + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | + - -

Top

- ## akash/base/v1beta3/resourcevalue.proto - + - ### ResourceValue - Unit stores cpu, memory and storage metrics + ### QueryOrdersResponse + QueryOrdersResponse is response type for the Query/Orders RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `val` | [bytes](#bytes) | | | + | `orders` | [Order](#akash.market.v1beta5.Order) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | @@ -10302,33 +3261,29 @@ this behaviour to be discussed - - - - -

Top

+ - ## akash/base/v1beta2/resourceunits.proto - + ### Query + Query defines the gRPC querier service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `Orders` | [QueryOrdersRequest](#akash.market.v1beta5.QueryOrdersRequest) | [QueryOrdersResponse](#akash.market.v1beta5.QueryOrdersResponse) | Orders queries orders with filters | GET|/akash/market/v1beta5/orders/list| + | `Order` | [QueryOrderRequest](#akash.market.v1beta5.QueryOrderRequest) | [QueryOrderResponse](#akash.market.v1beta5.QueryOrderResponse) | Order queries order details | GET|/akash/market/v1beta5/orders/info| + | `Bids` | [QueryBidsRequest](#akash.market.v1beta5.QueryBidsRequest) | [QueryBidsResponse](#akash.market.v1beta5.QueryBidsResponse) | Bids queries bids with filters | GET|/akash/market/v1beta5/bids/list| + | `Bid` | [QueryBidRequest](#akash.market.v1beta5.QueryBidRequest) | [QueryBidResponse](#akash.market.v1beta5.QueryBidResponse) | Bid queries bid details | GET|/akash/market/v1beta5/bids/info| + | `Leases` | [QueryLeasesRequest](#akash.market.v1beta5.QueryLeasesRequest) | [QueryLeasesResponse](#akash.market.v1beta5.QueryLeasesResponse) | Leases queries leases with filters | GET|/akash/market/v1beta5/leases/list| + | `Lease` | [QueryLeaseRequest](#akash.market.v1beta5.QueryLeaseRequest) | [QueryLeaseResponse](#akash.market.v1beta5.QueryLeaseResponse) | Lease queries lease details | GET|/akash/market/v1beta5/leases/info| - - - ### ResourceUnits - ResourceUnits describes all available resources types for deployment/node etc -if field is nil resource is not present in the given data-structure + - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `cpu` | [CPU](#akash.base.v1beta2.CPU) | | | - | `memory` | [Memory](#akash.base.v1beta2.Memory) | | | - | `storage` | [Storage](#akash.base.v1beta2.Storage) | repeated | | - | `endpoints` | [Endpoint](#akash.base.v1beta2.Endpoint) | repeated | | - + +

Top

+ ## akash/market/v1beta5/service.proto @@ -10337,62 +3292,59 @@ if field is nil resource is not present in the given data-structure - - - - -

Top

+ - ## akash/base/v1beta2/attribute.proto - + ### Msg + Msg defines the market Msg service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `CreateBid` | [MsgCreateBid](#akash.market.v1beta5.MsgCreateBid) | [MsgCreateBidResponse](#akash.market.v1beta5.MsgCreateBidResponse) | CreateBid defines a method to create a bid given proper inputs. | | + | `CloseBid` | [MsgCloseBid](#akash.market.v1beta5.MsgCloseBid) | [MsgCloseBidResponse](#akash.market.v1beta5.MsgCloseBidResponse) | CloseBid defines a method to close a bid given proper inputs. | | + | `WithdrawLease` | [MsgWithdrawLease](#akash.market.v1beta5.MsgWithdrawLease) | [MsgWithdrawLeaseResponse](#akash.market.v1beta5.MsgWithdrawLeaseResponse) | WithdrawLease withdraws accrued funds from the lease payment | | + | `CreateLease` | [MsgCreateLease](#akash.market.v1beta5.MsgCreateLease) | [MsgCreateLeaseResponse](#akash.market.v1beta5.MsgCreateLeaseResponse) | CreateLease creates a new lease | | + | `CloseLease` | [MsgCloseLease](#akash.market.v1beta5.MsgCloseLease) | [MsgCloseLeaseResponse](#akash.market.v1beta5.MsgCloseLeaseResponse) | CloseLease defines a method to close an order given proper inputs. | | - - - ### Attribute - Attribute represents key value pair + - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `key` | [string](#string) | | | - | `value` | [string](#string) | | | - + +

Top

+ ## akash/provider/v1beta4/provider.proto - + - ### PlacementRequirements - PlacementRequirements + ### Info + Info | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `signed_by` | [SignedBy](#akash.base.v1beta2.SignedBy) | | SignedBy list of keys that tenants expect to have signatures from | - | `attributes` | [Attribute](#akash.base.v1beta2.Attribute) | repeated | Attribute list of attributes tenant expects from the provider | + | `email` | [string](#string) | | | + | `website` | [string](#string) | | | - + - ### SignedBy - 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 + ### Provider + Provider stores owner and host details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `all_of` | [string](#string) | repeated | all_of all keys in this list must have signed attributes | - | `any_of` | [string](#string) | repeated | any_of at least of of the keys from the list must have signed attributes | + | `owner` | [string](#string) | | | + | `host_uri` | [string](#string) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | + | `info` | [Info](#akash.provider.v1beta4.Info) | | | @@ -10408,23 +3360,22 @@ this behaviour to be discussed - +

Top

- ## akash/base/v1beta2/endpoint.proto + ## akash/provider/v1beta4/genesis.proto - + - ### Endpoint - Endpoint describes a publicly accessible IP service + ### GenesisState + GenesisState defines the basic genesis state used by provider module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `kind` | [Endpoint.Kind](#akash.base.v1beta2.Endpoint.Kind) | | | - | `sequence_number` | [uint32](#uint32) | | | + | `providers` | [Provider](#akash.provider.v1beta4.Provider) | repeated | | @@ -10432,19 +3383,6 @@ this behaviour to be discussed - - - - ### Endpoint.Kind - This describes how the endpoint is implemented when the lease is deployed - - | Name | Number | Description | - | ---- | ------ | ----------- | - | SHARED_HTTP | 0 | Describes an endpoint that becomes a Kubernetes Ingress | - | RANDOM_PORT | 1 | Describes an endpoint that becomes a Kubernetes NodePort | - | LEASED_IP | 2 | Describes an endpoint that becomes a leased IP | - - @@ -10453,88 +3391,89 @@ this behaviour to be discussed - +

Top

- ## akash/base/v1beta2/resource.proto + ## akash/provider/v1beta4/msg.proto - + - ### CPU - CPU stores resource units and cpu config attributes + ### MsgCreateProvider + MsgCreateProvider defines an SDK message for creating a provider | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `units` | [ResourceValue](#akash.base.v1beta2.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta2.Attribute) | repeated | | + | `owner` | [string](#string) | | | + | `host_uri` | [string](#string) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | + | `info` | [Info](#akash.provider.v1beta4.Info) | | | - + - ### Memory - Memory stores resource quantity and memory attributes + ### MsgCreateProviderResponse + MsgCreateProviderResponse defines the Msg/CreateProvider response type. - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourceValue](#akash.base.v1beta2.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta2.Attribute) | repeated | | - - - + - ### Storage - Storage stores resource quantity and storage attributes + ### MsgDeleteProvider + MsgDeleteProvider defines an SDK message for deleting a provider | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `quantity` | [ResourceValue](#akash.base.v1beta2.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta2.Attribute) | repeated | | + | `owner` | [string](#string) | | | - - - - - + + - + ### MsgDeleteProviderResponse + MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. - - -

Top

- ## akash/base/v1beta2/resourcevalue.proto - + - ### ResourceValue - Unit stores cpu, memory and storage metrics + ### MsgUpdateProvider + MsgUpdateProvider defines an SDK message for updating a provider | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `val` | [bytes](#bytes) | | | + | `owner` | [string](#string) | | | + | `host_uri` | [string](#string) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | + | `info` | [Info](#akash.provider.v1beta4.Info) | | | + + + + + + + + ### MsgUpdateProviderResponse + MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. + @@ -10549,89 +3488,68 @@ this behaviour to be discussed - +

Top

- ## akash/base/v1beta1/attribute.proto + ## akash/provider/v1beta4/query.proto - + - ### Attribute - Attribute represents key value pair + ### QueryProviderRequest + QueryProviderRequest is request type for the Query/Provider RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `key` | [string](#string) | | | - | `value` | [string](#string) | | | + | `owner` | [string](#string) | | | - + - ### PlacementRequirements - PlacementRequirements + ### QueryProviderResponse + QueryProviderResponse is response type for the Query/Provider RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `signed_by` | [SignedBy](#akash.base.v1beta1.SignedBy) | | SignedBy list of keys that tenants expect to have signatures from | - | `attributes` | [Attribute](#akash.base.v1beta1.Attribute) | repeated | Attribute list of attributes tenant expects from the provider | + | `provider` | [Provider](#akash.provider.v1beta4.Provider) | | | - + - ### SignedBy - 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 + ### QueryProvidersRequest + QueryProvidersRequest is request type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `all_of` | [string](#string) | repeated | all_of all keys in this list must have signed attributes | - | `any_of` | [string](#string) | repeated | any_of at least of of the keys from the list must have signed attributes | - - - - - - - - - - - - - + | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - -

Top

- ## akash/base/v1beta1/endpoint.proto - + - ### Endpoint - Endpoint describes a publicly accessible IP service + ### QueryProvidersResponse + QueryProvidersResponse is response type for the Query/Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `kind` | [Endpoint.Kind](#akash.base.v1beta1.Endpoint.Kind) | | | + | `providers` | [Provider](#akash.provider.v1beta4.Provider) | repeated | | + | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | @@ -10639,94 +3557,100 @@ this behaviour to be discussed - - + - ### Endpoint.Kind - This describes how the endpoint is implemented when the lease is deployed + - | Name | Number | Description | - | ---- | ------ | ----------- | - | SHARED_HTTP | 0 | Describes an endpoint that becomes a Kubernetes Ingress | - | RANDOM_PORT | 1 | Describes an endpoint that becomes a Kubernetes NodePort | + - - - + ### Query + Query defines the gRPC querier service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `Providers` | [QueryProvidersRequest](#akash.provider.v1beta4.QueryProvidersRequest) | [QueryProvidersResponse](#akash.provider.v1beta4.QueryProvidersResponse) | Providers queries providers | GET|/akash/provider/v1beta4/providers| + | `Provider` | [QueryProviderRequest](#akash.provider.v1beta4.QueryProviderRequest) | [QueryProviderResponse](#akash.provider.v1beta4.QueryProviderResponse) | Provider queries provider details | GET|/akash/provider/v1beta4/providers/{owner}| + - +

Top

- ## akash/base/v1beta1/resource.proto + ## akash/provider/v1beta4/service.proto + + + + + + - + - ### CPU - CPU stores resource units and cpu config attributes + ### Msg + Msg defines the provider Msg service + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `CreateProvider` | [MsgCreateProvider](#akash.provider.v1beta4.MsgCreateProvider) | [MsgCreateProviderResponse](#akash.provider.v1beta4.MsgCreateProviderResponse) | CreateProvider defines a method that creates a provider given the proper inputs | | + | `UpdateProvider` | [MsgUpdateProvider](#akash.provider.v1beta4.MsgUpdateProvider) | [MsgUpdateProviderResponse](#akash.provider.v1beta4.MsgUpdateProviderResponse) | UpdateProvider defines a method that updates a provider given the proper inputs | | + | `DeleteProvider` | [MsgDeleteProvider](#akash.provider.v1beta4.MsgDeleteProvider) | [MsgDeleteProviderResponse](#akash.provider.v1beta4.MsgDeleteProviderResponse) | DeleteProvider defines a method that deletes a provider given the proper inputs | | - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `units` | [ResourceValue](#akash.base.v1beta1.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta1.Attribute) | repeated | | + + + +

Top

+ ## akash/staking/v1beta3/params.proto - + - ### Memory - Memory stores resource quantity and memory attributes + ### Params + Params extends the parameters for the x/staking module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourceValue](#akash.base.v1beta1.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta1.Attribute) | repeated | | + | `min_commission_rate` | [string](#string) | | min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators | - - + - ### ResourceUnits - ResourceUnits describes all available resources types for deployment/node etc -if field is nil resource is not present in the given data-structure + + + + + - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `cpu` | [CPU](#akash.base.v1beta1.CPU) | | | - | `memory` | [Memory](#akash.base.v1beta1.Memory) | | | - | `storage` | [Storage](#akash.base.v1beta1.Storage) | | | - | `endpoints` | [Endpoint](#akash.base.v1beta1.Endpoint) | repeated | | + +

Top

+ ## akash/staking/v1beta3/genesis.proto - + - ### Storage - Storage stores resource quantity and storage attributes + ### GenesisState + GenesisState stores slice of genesis deployment instance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourceValue](#akash.base.v1beta1.ResourceValue) | | | - | `attributes` | [Attribute](#akash.base.v1beta1.Attribute) | repeated | | + | `params` | [Params](#akash.staking.v1beta3.Params) | | | @@ -10742,22 +3666,39 @@ if field is nil resource is not present in the given data-structure - +

Top

- ## akash/base/v1beta1/resourcevalue.proto + ## akash/take/v1beta3/params.proto - + - ### ResourceValue - Unit stores cpu, memory and storage metrics + ### DenomTakeRate + DenomTakeRate describes take rate for specified denom | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `val` | [bytes](#bytes) | | | + | `denom` | [string](#string) | | | + | `rate` | [uint32](#uint32) | | | + + + + + + + + + ### Params + Params defines the parameters for the x/take package + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `denom_take_rates` | [DenomTakeRate](#akash.take.v1beta3.DenomTakeRate) | repeated | denom -> % take rate | + | `default_take_rate` | [uint32](#uint32) | | | @@ -10773,14 +3714,14 @@ if field is nil resource is not present in the given data-structure - +

Top

- ## akash/gov/v1beta3/genesis.proto + ## akash/take/v1beta3/genesis.proto - + ### GenesisState GenesisState stores slice of genesis deployment instance @@ -10788,7 +3729,7 @@ if field is nil resource is not present in the given data-structure | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `deposit_params` | [DepositParams](#akash.gov.v1beta3.DepositParams) | | | + | `params` | [Params](#akash.take.v1beta3.Params) | | | @@ -10804,25 +3745,10 @@ if field is nil resource is not present in the given data-structure - +

Top

- ## akash/gov/v1beta3/params.proto - - - - - - ### DepositParams - DepositParams defines the parameters for the x/gov module - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `min_initial_deposit_rate` | [bytes](#bytes) | | min_initial_deposit_rate minimum % of TotalDeposit author of the proposal must put in order for proposal tx to be committed | - - - + ## akash/take/v1beta3/query.proto @@ -10831,6 +3757,15 @@ if field is nil resource is not present in the given data-structure + + + + ### Query + Query defines the gRPC querier service + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + diff --git a/docs/proto/provider.md b/docs/proto/provider.md index 076b318f..0f7e759e 100644 --- a/docs/proto/provider.md +++ b/docs/proto/provider.md @@ -4,37 +4,38 @@ ## Table of Contents - - [akash/manifest/v2beta1/group.proto](#akash/manifest/v2beta1/group.proto) - - [Group](#akash.manifest.v2beta1.Group) + - [akash/inventory/v1/resourcepair.proto](#akash/inventory/v1/resourcepair.proto) + - [ResourcePair](#akash.inventory.v1.ResourcePair) - - [akash/manifest/v2beta1/httpoptions.proto](#akash/manifest/v2beta1/httpoptions.proto) - - [ServiceExposeHTTPOptions](#akash.manifest.v2beta1.ServiceExposeHTTPOptions) + - [akash/inventory/v1/cpu.proto](#akash/inventory/v1/cpu.proto) + - [CPU](#akash.inventory.v1.CPU) + - [CPUInfo](#akash.inventory.v1.CPUInfo) - - [akash/manifest/v2beta1/serviceexpose.proto](#akash/manifest/v2beta1/serviceexpose.proto) - - [ServiceExpose](#akash.manifest.v2beta1.ServiceExpose) + - [akash/inventory/v1/gpu.proto](#akash/inventory/v1/gpu.proto) + - [GPU](#akash.inventory.v1.GPU) + - [GPUInfo](#akash.inventory.v1.GPUInfo) - - [akash/manifest/v2beta1/service.proto](#akash/manifest/v2beta1/service.proto) - - [Service](#akash.manifest.v2beta1.Service) - - [ServiceParams](#akash.manifest.v2beta1.ServiceParams) - - [StorageParams](#akash.manifest.v2beta1.StorageParams) + - [akash/inventory/v1/memory.proto](#akash/inventory/v1/memory.proto) + - [Memory](#akash.inventory.v1.Memory) + - [MemoryInfo](#akash.inventory.v1.MemoryInfo) - - [akash/manifest/v2beta2/group.proto](#akash/manifest/v2beta2/group.proto) - - [Group](#akash.manifest.v2beta2.Group) + - [akash/inventory/v1/resources.proto](#akash/inventory/v1/resources.proto) + - [NodeResources](#akash.inventory.v1.NodeResources) - - [akash/manifest/v2beta2/httpoptions.proto](#akash/manifest/v2beta2/httpoptions.proto) - - [ServiceExposeHTTPOptions](#akash.manifest.v2beta2.ServiceExposeHTTPOptions) + - [akash/inventory/v1/node.proto](#akash/inventory/v1/node.proto) + - [Node](#akash.inventory.v1.Node) + - [NodeCapabilities](#akash.inventory.v1.NodeCapabilities) - - [akash/manifest/v2beta2/serviceexpose.proto](#akash/manifest/v2beta2/serviceexpose.proto) - - [ServiceExpose](#akash.manifest.v2beta2.ServiceExpose) + - [akash/inventory/v1/storage.proto](#akash/inventory/v1/storage.proto) + - [Storage](#akash.inventory.v1.Storage) + - [StorageInfo](#akash.inventory.v1.StorageInfo) - - [akash/manifest/v2beta2/service.proto](#akash/manifest/v2beta2/service.proto) - - [Service](#akash.manifest.v2beta2.Service) - - [ServiceImageCredentials](#akash.manifest.v2beta2.ServiceImageCredentials) - - [ServiceParams](#akash.manifest.v2beta2.ServiceParams) - - [StorageParams](#akash.manifest.v2beta2.StorageParams) + - [akash/inventory/v1/cluster.proto](#akash/inventory/v1/cluster.proto) + - [Cluster](#akash.inventory.v1.Cluster) - - [akash/manifest/v2beta3/group.proto](#akash/manifest/v2beta3/group.proto) - - [Group](#akash.manifest.v2beta3.Group) + - [akash/inventory/v1/service.proto](#akash/inventory/v1/service.proto) + - [ClusterRPC](#akash.inventory.v1.ClusterRPC) + - [NodeRPC](#akash.inventory.v1.NodeRPC) - [akash/manifest/v2beta3/httpoptions.proto](#akash/manifest/v2beta3/httpoptions.proto) - [ServiceExposeHTTPOptions](#akash.manifest.v2beta3.ServiceExposeHTTPOptions) @@ -48,6 +49,25 @@ - [ServiceParams](#akash.manifest.v2beta3.ServiceParams) - [StorageParams](#akash.manifest.v2beta3.StorageParams) + - [akash/manifest/v2beta3/group.proto](#akash/manifest/v2beta3/group.proto) + - [Group](#akash.manifest.v2beta3.Group) + + - [akash/provider/lease/v1/service.proto](#akash/provider/lease/v1/service.proto) + - [ForwarderPortStatus](#akash.provider.lease.v1.ForwarderPortStatus) + - [LeaseIPStatus](#akash.provider.lease.v1.LeaseIPStatus) + - [LeaseServiceStatus](#akash.provider.lease.v1.LeaseServiceStatus) + - [SendManifestRequest](#akash.provider.lease.v1.SendManifestRequest) + - [SendManifestResponse](#akash.provider.lease.v1.SendManifestResponse) + - [ServiceLogs](#akash.provider.lease.v1.ServiceLogs) + - [ServiceLogsRequest](#akash.provider.lease.v1.ServiceLogsRequest) + - [ServiceLogsResponse](#akash.provider.lease.v1.ServiceLogsResponse) + - [ServiceStatus](#akash.provider.lease.v1.ServiceStatus) + - [ServiceStatusRequest](#akash.provider.lease.v1.ServiceStatusRequest) + - [ServiceStatusResponse](#akash.provider.lease.v1.ServiceStatusResponse) + - [ShellRequest](#akash.provider.lease.v1.ShellRequest) + + - [LeaseRPC](#akash.provider.lease.v1.LeaseRPC) + - [akash/provider/v1/status.proto](#akash/provider/v1/status.proto) - [BidEngineStatus](#akash.provider.v1.BidEngineStatus) - [ClusterStatus](#akash.provider.v1.ClusterStatus) @@ -63,60 +83,28 @@ - [akash/provider/v1/service.proto](#akash/provider/v1/service.proto) - [ProviderRPC](#akash.provider.v1.ProviderRPC) - - [akash/inventory/v1/memory.proto](#akash/inventory/v1/memory.proto) - - [Memory](#akash.inventory.v1.Memory) - - [MemoryInfo](#akash.inventory.v1.MemoryInfo) - - - [akash/inventory/v1/cpu.proto](#akash/inventory/v1/cpu.proto) - - [CPU](#akash.inventory.v1.CPU) - - [CPUInfo](#akash.inventory.v1.CPUInfo) - - - [akash/inventory/v1/cluster.proto](#akash/inventory/v1/cluster.proto) - - [Cluster](#akash.inventory.v1.Cluster) - - - [akash/inventory/v1/resources.proto](#akash/inventory/v1/resources.proto) - - [NodeResources](#akash.inventory.v1.NodeResources) - - - [akash/inventory/v1/node.proto](#akash/inventory/v1/node.proto) - - [Node](#akash.inventory.v1.Node) - - [NodeCapabilities](#akash.inventory.v1.NodeCapabilities) - - - [akash/inventory/v1/resourcepair.proto](#akash/inventory/v1/resourcepair.proto) - - [ResourcePair](#akash.inventory.v1.ResourcePair) - - - [akash/inventory/v1/gpu.proto](#akash/inventory/v1/gpu.proto) - - [GPU](#akash.inventory.v1.GPU) - - [GPUInfo](#akash.inventory.v1.GPUInfo) - - - [akash/inventory/v1/storage.proto](#akash/inventory/v1/storage.proto) - - [Storage](#akash.inventory.v1.Storage) - - [StorageInfo](#akash.inventory.v1.StorageInfo) - - - [akash/inventory/v1/service.proto](#akash/inventory/v1/service.proto) - - [ClusterRPC](#akash.inventory.v1.ClusterRPC) - - [NodeRPC](#akash.inventory.v1.NodeRPC) - - [Scalar Value Types](#scalar-value-types) - +

Top

- ## akash/manifest/v2beta1/group.proto + ## akash/inventory/v1/resourcepair.proto - + - ### Group - Group store name and list of services + ### ResourcePair + ResourcePair to extents resource.Quantity to provide total and available units of the resource | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `services` | [Service](#akash.manifest.v2beta1.Service) | repeated | | + | `allocatable` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `allocated` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `attributes` | [akash.base.attributes.v1.Attribute](#akash.base.attributes.v1.Attribute) | repeated | | @@ -132,66 +120,41 @@ - +

Top

- ## akash/manifest/v2beta1/httpoptions.proto + ## akash/inventory/v1/cpu.proto - + - ### ServiceExposeHTTPOptions - ServiceExposeHTTPOptions + ### CPU + CPU reports CPU inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `max_body_size` | [uint32](#uint32) | | | - | `read_timeout` | [uint32](#uint32) | | | - | `send_timeout` | [uint32](#uint32) | | | - | `next_tries` | [uint32](#uint32) | | | - | `next_timeout` | [uint32](#uint32) | | | - | `next_cases` | [string](#string) | repeated | | - - - - - - - - - - - - - + | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `info` | [CPUInfo](#akash.inventory.v1.CPUInfo) | repeated | | - -

Top

- ## akash/manifest/v2beta1/serviceexpose.proto - + - ### ServiceExpose - ServiceExpose stores exposed ports and hosts details + ### CPUInfo + CPUInfo reports CPU details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `port` | [uint32](#uint32) | | port on the container | - | `external_port` | [uint32](#uint32) | | port on the service definition | - | `proto` | [string](#string) | | | - | `service` | [string](#string) | | | - | `global` | [bool](#bool) | | | - | `hosts` | [string](#string) | repeated | | - | `http_options` | [ServiceExposeHTTPOptions](#akash.manifest.v2beta1.ServiceExposeHTTPOptions) | | | - | `ip` | [string](#string) | | The name of the IP address associated with this, if any | - | `endpoint_sequence_number` | [uint32](#uint32) | | The sequence number of the associated endpoint in the on-chain data | + | `id` | [string](#string) | | | + | `vendor` | [string](#string) | | | + | `model` | [string](#string) | | | + | `vcores` | [uint32](#uint32) | | | @@ -207,62 +170,43 @@ - +

Top

- ## akash/manifest/v2beta1/service.proto - - - - - - ### Service - Service stores name, image, args, env, unit, count and expose list of service - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `image` | [string](#string) | | | - | `command` | [string](#string) | repeated | | - | `args` | [string](#string) | repeated | | - | `env` | [string](#string) | repeated | | - | `resources` | [akash.base.v1beta2.ResourceUnits](#akash.base.v1beta2.ResourceUnits) | | | - | `count` | [uint32](#uint32) | | | - | `expose` | [ServiceExpose](#akash.manifest.v2beta1.ServiceExpose) | repeated | | - | `params` | [ServiceParams](#akash.manifest.v2beta1.ServiceParams) | | | - - - + ## akash/inventory/v1/gpu.proto - + - ### ServiceParams - ServiceParams + ### GPU + GPUInfo reports GPU inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `storage` | [StorageParams](#akash.manifest.v2beta1.StorageParams) | repeated | | + | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `info` | [GPUInfo](#akash.inventory.v1.GPUInfo) | repeated | | - + - ### StorageParams - StorageParams + ### GPUInfo + GPUInfo reports GPU details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | + | `vendor` | [string](#string) | | | + | `vendor_id` | [string](#string) | | | | `name` | [string](#string) | | | - | `mount` | [string](#string) | | | - | `read_only` | [bool](#bool) | | | + | `modelid` | [string](#string) | | | + | `interface` | [string](#string) | | | + | `memory_size` | [string](#string) | | | @@ -278,59 +222,41 @@ - +

Top

- ## akash/manifest/v2beta2/group.proto + ## akash/inventory/v1/memory.proto - + - ### Group - Group store name and list of services + ### Memory + Memory reports Memory inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `services` | [Service](#akash.manifest.v2beta2.Service) | repeated | | - - - - - - - - - - - - - + | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `info` | [MemoryInfo](#akash.inventory.v1.MemoryInfo) | repeated | | - -

Top

- ## akash/manifest/v2beta2/httpoptions.proto - + - ### ServiceExposeHTTPOptions - ServiceExposeHTTPOptions + ### MemoryInfo + MemoryInfo reports Memory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `max_body_size` | [uint32](#uint32) | | | - | `read_timeout` | [uint32](#uint32) | | | - | `send_timeout` | [uint32](#uint32) | | | - | `next_tries` | [uint32](#uint32) | | | - | `next_timeout` | [uint32](#uint32) | | | - | `next_cases` | [string](#string) | repeated | | + | `vendor` | [string](#string) | | | + | `type` | [string](#string) | | | + | `total_size` | [string](#string) | | | + | `speed` | [string](#string) | | | @@ -346,30 +272,27 @@ - +

Top

- ## akash/manifest/v2beta2/serviceexpose.proto + ## akash/inventory/v1/resources.proto - + - ### ServiceExpose - ServiceExpose stores exposed ports and hosts details + ### NodeResources + NodeResources reports node inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `port` | [uint32](#uint32) | | port on the container | - | `external_port` | [uint32](#uint32) | | port on the service definition | - | `proto` | [string](#string) | | | - | `service` | [string](#string) | | | - | `global` | [bool](#bool) | | | - | `hosts` | [string](#string) | repeated | | - | `http_options` | [ServiceExposeHTTPOptions](#akash.manifest.v2beta2.ServiceExposeHTTPOptions) | | | - | `ip` | [string](#string) | | The name of the IP address associated with this, if any | - | `endpoint_sequence_number` | [uint32](#uint32) | | The sequence number of the associated endpoint in the on-chain data | + | `cpu` | [CPU](#akash.inventory.v1.CPU) | | | + | `memory` | [Memory](#akash.inventory.v1.Memory) | | | + | `gpu` | [GPU](#akash.inventory.v1.GPU) | | | + | `ephemeral_storage` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `volumes_attached` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `volumes_mounted` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | @@ -385,81 +308,87 @@ - +

Top

- ## akash/manifest/v2beta2/service.proto + ## akash/inventory/v1/node.proto - + - ### Service - Service stores name, image, args, env, unit, count and expose list of service + ### Node + Node reports node inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `name` | [string](#string) | | | - | `image` | [string](#string) | | | - | `command` | [string](#string) | repeated | | - | `args` | [string](#string) | repeated | | - | `env` | [string](#string) | repeated | | - | `resources` | [akash.base.v1beta3.Resources](#akash.base.v1beta3.Resources) | | | - | `count` | [uint32](#uint32) | | | - | `expose` | [ServiceExpose](#akash.manifest.v2beta2.ServiceExpose) | repeated | | - | `params` | [ServiceParams](#akash.manifest.v2beta2.ServiceParams) | | | - | `credentials` | [ServiceImageCredentials](#akash.manifest.v2beta2.ServiceImageCredentials) | | | + | `resources` | [NodeResources](#akash.inventory.v1.NodeResources) | | | + | `capabilities` | [NodeCapabilities](#akash.inventory.v1.NodeCapabilities) | | | - + - ### ServiceImageCredentials - Credentials to fetch image from registry + ### NodeCapabilities + NodeCapabilities extended list of node capabilities | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `host` | [string](#string) | | | - | `email` | [string](#string) | | | - | `username` | [string](#string) | | | - | `password` | [string](#string) | | | + | `storage_classes` | [string](#string) | repeated | | + + + + + + + + + - + +

Top

- ### ServiceParams - ServiceParams + ## akash/inventory/v1/storage.proto + + + + + + ### Storage + Storage reports Storage inventory details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `storage` | [StorageParams](#akash.manifest.v2beta2.StorageParams) | repeated | | + | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `info` | [StorageInfo](#akash.inventory.v1.StorageInfo) | | | - + - ### StorageParams - StorageParams + ### StorageInfo + StorageInfo reports Storage details | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `mount` | [string](#string) | | | - | `read_only` | [bool](#bool) | | | + | `class` | [string](#string) | | | + | `iops` | [string](#string) | | | @@ -475,23 +404,23 @@ - +

Top

- ## akash/manifest/v2beta3/group.proto + ## akash/inventory/v1/cluster.proto - + - ### Group - Group store name and list of services + ### Cluster + Cluster reports inventory across entire cluster | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `services` | [Service](#akash.manifest.v2beta3.Service) | repeated | | + | `nodes` | [Node](#akash.inventory.v1.Node) | repeated | | + | `storage` | [Storage](#akash.inventory.v1.Storage) | repeated | | @@ -507,6 +436,44 @@ + +

Top

+ + ## akash/inventory/v1/service.proto + + + + + + + + + + + + ### ClusterRPC + ClusterRPC defines the RPC server of cluster + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `QueryCluster` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Cluster](#akash.inventory.v1.Cluster) | QueryCluster defines a method to query hardware state of the cluster buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/inventory| + | `StreamCluster` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Cluster](#akash.inventory.v1.Cluster) stream | StreamCluster defines a method to stream hardware state of the cluster buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + + + + + ### NodeRPC + NodeRPC defines the RPC server of node + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `QueryNode` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Node](#akash.inventory.v1.Node) | QueryNode defines a method to query hardware state of the node buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/node| + | `StreamNode` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Node](#akash.inventory.v1.Node) stream | StreamNode defines a method to stream hardware state of the node buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + + + + +

Top

@@ -620,7 +587,7 @@ | `command` | [string](#string) | repeated | | | `args` | [string](#string) | repeated | | | `env` | [string](#string) | repeated | | - | `resources` | [akash.base.resources.v1.Resources](#akash.base.resources.v1.Resources) | | | + | `resources` | [akash.base.resources.v1beta4.Resources](#akash.base.resources.v1beta4.Resources) | | | | `count` | [uint32](#uint32) | | | | `expose` | [ServiceExpose](#akash.manifest.v2beta3.ServiceExpose) | repeated | | | `params` | [ServiceParams](#akash.manifest.v2beta3.ServiceParams) | | | @@ -672,366 +639,235 @@ - +

Top

- ## akash/provider/v1/status.proto - - - - - - ### BidEngineStatus - BidEngineStatus - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `orders` | [uint32](#uint32) | | | - - - - - - - - - ### ClusterStatus - ClusterStatus - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `leases` | [Leases](#akash.provider.v1.Leases) | | | - | `inventory` | [Inventory](#akash.provider.v1.Inventory) | | | - - - - - - - - - ### Inventory - Inventory - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `cluster` | [akash.inventory.v1.Cluster](#akash.inventory.v1.Cluster) | | | - | `reservations` | [Reservations](#akash.provider.v1.Reservations) | | | - - - - - - - - - ### Leases - Leases - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `active` | [uint32](#uint32) | | | - - - - - - - - - ### ManifestStatus - ManifestStatus - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `deployments` | [uint32](#uint32) | | | - - - - - - - - - ### Reservations - Reservations - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `pending` | [ReservationsMetric](#akash.provider.v1.ReservationsMetric) | | | - | `active` | [ReservationsMetric](#akash.provider.v1.ReservationsMetric) | | | - - - + ## akash/manifest/v2beta3/group.proto - + - ### ReservationsMetric - ReservationsMetric + ### Group + Group store name and list of services | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `count` | [uint32](#uint32) | | | - | `resources` | [ResourcesMetric](#akash.provider.v1.ResourcesMetric) | | | - + | `name` | [string](#string) | | | + | `services` | [Service](#akash.manifest.v2beta3.Service) | repeated | | - - - ### ResourcesMetric - ResourceMetrics - - - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `cpu` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `memory` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `gpu` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `ephemeral_storage` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `storage` | [ResourcesMetric.StorageEntry](#akash.provider.v1.ResourcesMetric.StorageEntry) | repeated | | - - + - + - - + - ### ResourcesMetric.StorageEntry - + - | Field | Type | Label | Description | - | ----- | ---- | ----- | ----------- | - | `key` | [string](#string) | | | - | `value` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - + +

Top

+ ## akash/provider/lease/v1/service.proto - + - ### Status - Status + ### ForwarderPortStatus + ForwarderPortStatus | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `errors` | [string](#string) | repeated | | - | `cluster` | [ClusterStatus](#akash.provider.v1.ClusterStatus) | | | - | `bid_engine` | [BidEngineStatus](#akash.provider.v1.BidEngineStatus) | | | - | `manifest` | [ManifestStatus](#akash.provider.v1.ManifestStatus) | | | - | `public_hostnames` | [string](#string) | repeated | | - | `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - - - - - - - - - - - - - + | `host` | [string](#string) | | | + | `port` | [uint32](#uint32) | | | + | `external_port` | [uint32](#uint32) | | | + | `proto` | [string](#string) | | | + | `name` | [string](#string) | | | - -

Top

- ## akash/provider/v1/service.proto - - - - - - - - - - ### ProviderRPC - ProviderRPC defines the RPC server for provider - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `GetStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) | GetStatus defines a method to query provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/status| - | `StreamStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) stream | Status defines a method to stream provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | - + + + ### LeaseIPStatus + LeaseIPStatus + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `port` | [uint32](#uint32) | | | + | `external_port` | [uint32](#uint32) | | | + | `protocol` | [string](#string) | | | + | `ip` | [string](#string) | | | + - -

Top

- ## akash/inventory/v1/memory.proto - + - ### Memory - Memory reports Memory inventory details + ### LeaseServiceStatus + LeaseServiceStatus | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `info` | [MemoryInfo](#akash.inventory.v1.MemoryInfo) | repeated | | + | `available` | [int32](#int32) | | | + | `total` | [int32](#int32) | | | + | `uris` | [string](#string) | repeated | | + | `observed_generation` | [int64](#int64) | | | + | `replicas` | [int32](#int32) | | | + | `updated_replicas` | [int32](#int32) | | | + | `ready_replicas` | [int32](#int32) | | | + | `available_replicas` | [int32](#int32) | | | - + - ### MemoryInfo - MemoryInfo reports Memory details + ### SendManifestRequest + SendManifestRequest is request type for the SendManifest Providers RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `vendor` | [string](#string) | | | - | `type` | [string](#string) | | | - | `total_size` | [string](#string) | | | - | `speed` | [string](#string) | | | + | `lease_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | + | `manifest` | [akash.manifest.v2beta3.Group](#akash.manifest.v2beta3.Group) | repeated | | - + + - + ### SendManifestResponse + SendManifestResponse is response type for the SendManifest Providers RPC method - + - + + + + ### ServiceLogs + ServiceLogs + + + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `name` | [string](#string) | | | + | `logs` | [bytes](#bytes) | | | + - -

Top

- ## akash/inventory/v1/cpu.proto - + - ### CPU - CPU reports CPU inventory details + ### ServiceLogsRequest + ServiceLogsRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `info` | [CPUInfo](#akash.inventory.v1.CPUInfo) | repeated | | + | `lease_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | + | `services` | [string](#string) | repeated | | - + - ### CPUInfo - CPUInfo reports CPU details + ### ServiceLogsResponse + ServiceLogsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `id` | [string](#string) | | | - | `vendor` | [string](#string) | | | - | `model` | [string](#string) | | | - | `vcores` | [uint32](#uint32) | | | + | `services` | [ServiceLogs](#akash.provider.lease.v1.ServiceLogs) | repeated | | - - - - - + + - + ### ServiceStatus + ServiceStatus + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `name` | [string](#string) | | | + | `status` | [LeaseServiceStatus](#akash.provider.lease.v1.LeaseServiceStatus) | | | + | `ports` | [ForwarderPortStatus](#akash.provider.lease.v1.ForwarderPortStatus) | repeated | | + | `ips` | [LeaseIPStatus](#akash.provider.lease.v1.LeaseIPStatus) | repeated | | + - -

Top

- ## akash/inventory/v1/cluster.proto - + - ### Cluster - Cluster reports inventory across entire cluster + ### ServiceStatusRequest + ServiceStatusRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `nodes` | [Node](#akash.inventory.v1.Node) | repeated | | - | `storage` | [Storage](#akash.inventory.v1.Storage) | repeated | | + | `lease_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | + | `services` | [string](#string) | repeated | | - - - - - + + - + ### ServiceStatusResponse + ServiceStatusResponse + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `services` | [ServiceStatus](#akash.provider.lease.v1.ServiceStatus) | repeated | | + - -

Top

- ## akash/inventory/v1/resources.proto - + - ### NodeResources - NodeResources reports node inventory details + ### ShellRequest + ShellRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `cpu` | [CPU](#akash.inventory.v1.CPU) | | | - | `memory` | [Memory](#akash.inventory.v1.Memory) | | | - | `gpu` | [GPU](#akash.inventory.v1.GPU) | | | - | `ephemeral_storage` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `volumes_attached` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `volumes_mounted` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | + | `lease_id` | [akash.market.v1.LeaseID](#akash.market.v1.LeaseID) | | | @@ -1043,176 +879,188 @@ + + + + ### LeaseRPC + LeaseRPC defines the RPC server for lease control + + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | + | ----------- | ------------ | ------------- | ------------| ------- | -------- | + | `SendManifest` | [SendManifestRequest](#akash.provider.lease.v1.SendManifestRequest) | [SendManifestResponse](#akash.provider.lease.v1.SendManifestResponse) | SendManifest sends manifest to the provider | | + | `ServiceStatus` | [ServiceStatusRequest](#akash.provider.lease.v1.ServiceStatusRequest) | [ServiceStatusResponse](#akash.provider.lease.v1.ServiceStatusResponse) | ServiceStatus buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + | `StreamServiceStatus` | [ServiceStatusRequest](#akash.provider.lease.v1.ServiceStatusRequest) | [ServiceStatusResponse](#akash.provider.lease.v1.ServiceStatusResponse) stream | StreamServiceStatus buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + | `ServiceLogs` | [ServiceLogsRequest](#akash.provider.lease.v1.ServiceLogsRequest) | [ServiceLogsResponse](#akash.provider.lease.v1.ServiceLogsResponse) | ServiceLogs buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + | `StreamServiceLogs` | [ServiceLogsRequest](#akash.provider.lease.v1.ServiceLogsRequest) | [ServiceLogsResponse](#akash.provider.lease.v1.ServiceLogsResponse) stream | StreamServiceLogs buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + - +

Top

- ## akash/inventory/v1/node.proto + ## akash/provider/v1/status.proto - + - ### Node - Node reports node inventory details + ### BidEngineStatus + BidEngineStatus | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `name` | [string](#string) | | | - | `resources` | [NodeResources](#akash.inventory.v1.NodeResources) | | | - | `capabilities` | [NodeCapabilities](#akash.inventory.v1.NodeCapabilities) | | | + | `orders` | [uint32](#uint32) | | | - + - ### NodeCapabilities - NodeCapabilities extended list of node capabilities + ### ClusterStatus + ClusterStatus | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `storage_classes` | [string](#string) | repeated | | + | `leases` | [Leases](#akash.provider.v1.Leases) | | | + | `inventory` | [Inventory](#akash.provider.v1.Inventory) | | | - - - - - + + - + ### Inventory + Inventory + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `cluster` | [akash.inventory.v1.Cluster](#akash.inventory.v1.Cluster) | | | + | `reservations` | [Reservations](#akash.provider.v1.Reservations) | | | + - -

Top

- ## akash/inventory/v1/resourcepair.proto - + - ### ResourcePair - ResourcePair to extents resource.Quantity to provide total and available units of the resource + ### Leases + Leases | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `allocatable` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `allocated` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - | `attributes` | [akash.base.v1beta3.Attribute](#akash.base.v1beta3.Attribute) | repeated | | + | `active` | [uint32](#uint32) | | | - - - - - + + - + ### ManifestStatus + ManifestStatus + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `deployments` | [uint32](#uint32) | | | + - -

Top

- ## akash/inventory/v1/gpu.proto - + - ### GPU - GPUInfo reports GPU inventory details + ### Reservations + Reservations | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `info` | [GPUInfo](#akash.inventory.v1.GPUInfo) | repeated | | + | `pending` | [ReservationsMetric](#akash.provider.v1.ReservationsMetric) | | | + | `active` | [ReservationsMetric](#akash.provider.v1.ReservationsMetric) | | | - + - ### GPUInfo - GPUInfo reports GPU details + ### ReservationsMetric + ReservationsMetric | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `vendor` | [string](#string) | | | - | `vendor_id` | [string](#string) | | | - | `name` | [string](#string) | | | - | `modelid` | [string](#string) | | | - | `interface` | [string](#string) | | | - | `memory_size` | [string](#string) | | | + | `count` | [uint32](#uint32) | | | + | `resources` | [ResourcesMetric](#akash.provider.v1.ResourcesMetric) | | | - - - - - + + - + ### ResourcesMetric + ResourceMetrics + | Field | Type | Label | Description | + | ----- | ---- | ----- | ----------- | + | `cpu` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `memory` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `gpu` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `ephemeral_storage` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | + | `storage` | [ResourcesMetric.StorageEntry](#akash.provider.v1.ResourcesMetric.StorageEntry) | repeated | | + - -

Top

- ## akash/inventory/v1/storage.proto - + - ### Storage - Storage reports Storage inventory details + ### ResourcesMetric.StorageEntry + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `quantity` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | - | `info` | [StorageInfo](#akash.inventory.v1.StorageInfo) | | | + | `key` | [string](#string) | | | + | `value` | [k8s.io.apimachinery.pkg.api.resource.Quantity](#k8s.io.apimachinery.pkg.api.resource.Quantity) | | | - + - ### StorageInfo - StorageInfo reports Storage details + ### Status + Status | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | - | `class` | [string](#string) | | | - | `iops` | [string](#string) | | | + | `errors` | [string](#string) | repeated | | + | `cluster` | [ClusterStatus](#akash.provider.v1.ClusterStatus) | | | + | `bid_engine` | [BidEngineStatus](#akash.provider.v1.BidEngineStatus) | | | + | `manifest` | [ManifestStatus](#akash.provider.v1.ManifestStatus) | | | + | `public_hostnames` | [string](#string) | repeated | | @@ -1228,10 +1076,10 @@ - +

Top

- ## akash/inventory/v1/service.proto + ## akash/provider/v1/service.proto @@ -1241,26 +1089,15 @@ - - - ### ClusterRPC - ClusterRPC defines the RPC server of cluster - - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | - | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `QueryCluster` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Cluster](#akash.inventory.v1.Cluster) | QueryCluster defines a method to query hardware state of the cluster buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/inventory| - | `StreamCluster` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Cluster](#akash.inventory.v1.Cluster) stream | StreamCluster defines a method to stream hardware state of the cluster buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | - - - + - ### NodeRPC - NodeRPC defines the RPC server of node + ### ProviderRPC + ProviderRPC defines the RPC server for provider | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | - | `QueryNode` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Node](#akash.inventory.v1.Node) | QueryNode defines a method to query hardware state of the node buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/node| - | `StreamNode` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Node](#akash.inventory.v1.Node) stream | StreamNode defines a method to stream hardware state of the node buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | + | `GetStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) | GetStatus defines a method to query provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | GET|/v1/status| + | `StreamStatus` | [.google.protobuf.Empty](#google.protobuf.Empty) | [Status](#akash.provider.v1.Status) stream | Status defines a method to stream provider state buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | | diff --git a/docs/swagger-ui/swagger.yaml b/docs/swagger-ui/swagger.yaml index ab848a95..8597ed41 100644 --- a/docs/swagger-ui/swagger.yaml +++ b/docs/swagger-ui/swagger.yaml @@ -4,7 +4,7 @@ info: description: A REST interface for state queries version: 1.0.0 paths: - /akash/audit/v1beta3/audit/attributes/list: + /akash/audit/v1/audit/attributes/list: get: summary: |- AllProvidersAttributes queries all providers @@ -43,9 +43,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -148,7 +149,7 @@ paths: type: boolean tags: - Query - /akash/audit/v1beta3/audit/attributes/{auditor}/{owner}: + /akash/audit/v1/audit/attributes/{auditor}/{owner}: get: summary: >- ProviderAuditorAttributes queries provider signed attributes by specific @@ -190,9 +191,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -247,7 +249,7 @@ paths: type: string tags: - Query - /akash/audit/v1beta3/audit/attributes/{owner}/list: + /akash/audit/v1/audit/attributes/{owner}/list: get: summary: |- ProviderAttributes queries all provider signed attributes @@ -286,9 +288,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -395,7 +398,7 @@ paths: type: boolean tags: - Query - /akash/provider/v1beta3/auditor/{auditor}/list: + /akash/provider/v1/auditor/{auditor}/list: get: summary: |- AuditorAttributes queries all providers signed by this auditor @@ -434,9 +437,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -543,7 +547,7 @@ paths: type: boolean tags: - Query - /akash/cert/v1beta3/certificates/list: + /akash/cert/1/certificates/list: get: summary: Certificates queries certificates operationId: Certificates @@ -594,9 +598,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -650,9 +655,18 @@ paths: required: false type: string - name: filter.state + description: |2- + - 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 in: query required: false type: string + enum: + - invalid + - valid + - revoked + default: invalid - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -711,7 +725,7 @@ paths: type: boolean tags: - Query - /akash/deployment/v1beta3/deployments/info: + /akash/deployment/v1/deployments/info: get: summary: Deployment queries deployment details operationId: Deployment @@ -724,7 +738,7 @@ paths: deployment: type: object properties: - deployment_id: + id: type: object properties: owner: @@ -745,8 +759,10 @@ paths: 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: + title: >- + DeploymentState is an enum which refers to state of + deployment + hash: type: string format: byte created_at: @@ -758,7 +774,7 @@ paths: items: type: object properties: - group_id: + id: type: object properties: owner: @@ -788,7 +804,7 @@ paths: - 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 + title: GroupState is an enum which refers to state of group group_spec: type: object properties: @@ -1000,7 +1016,7 @@ paths: title: >- ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications + title: Spec stores group specifications created_at: type: string format: int64 @@ -1137,7 +1153,7 @@ paths: format: uint64 tags: - Query - /akash/deployment/v1beta3/deployments/list: + /akash/deployment/v1/deployments/list: get: summary: Deployments queries deployments operationId: Deployments @@ -1155,7 +1171,7 @@ paths: deployment: type: object properties: - deployment_id: + id: type: object properties: owner: @@ -1176,8 +1192,10 @@ paths: 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: + title: >- + DeploymentState is an enum which refers to state of + deployment + hash: type: string format: byte created_at: @@ -1191,7 +1209,7 @@ paths: items: type: object properties: - group_id: + id: type: object properties: owner: @@ -1221,7 +1239,9 @@ paths: - 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 + title: >- + GroupState is an enum which refers to state of + group group_spec: type: object properties: @@ -1433,7 +1453,7 @@ paths: title: >- ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications + title: Spec stores group specifications created_at: type: string format: int64 @@ -1544,9 +1564,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -1601,9 +1622,18 @@ paths: type: string format: uint64 - name: filters.state + description: |2- + - 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 in: query required: false type: string + enum: + - invalid + - active + - closed + default: invalid - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -1662,7 +1692,7 @@ paths: type: boolean tags: - Query - /akash/deployment/v1beta3/groups/info: + /akash/deployment/v1/groups/info: get: summary: Group queries group details operationId: Group @@ -1675,7 +1705,7 @@ paths: group: type: object properties: - group_id: + id: type: object properties: owner: @@ -1705,7 +1735,7 @@ paths: - 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 + title: GroupState is an enum which refers to state of group group_spec: type: object properties: @@ -1917,7 +1947,7 @@ paths: title: >- ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications + title: Spec stores group specifications created_at: type: string format: int64 @@ -1962,7 +1992,7 @@ paths: format: int64 tags: - Query - /akash/market/v1beta3/bids/info: + /akash/market/v1beta5/bids/info: get: summary: Bid queries bid details operationId: Bid @@ -1975,7 +2005,7 @@ paths: bid: type: object properties: - bid_id: + id: type: object properties: owner: @@ -1997,20 +2027,20 @@ paths: state: type: string enum: - - invalid - - open - - active - - lost - - closed - default: invalid + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid description: >- - - invalid: Prefix should start with 0 in enum. So + - bid_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 + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState is an enum which refers to state of bid price: type: object properties: @@ -2030,6 +2060,155 @@ paths: created_at: type: string format: int64 + resources_offer: + type: array + items: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: >- + ResourceOffer describes resources that provider is + offering + + for deployment title: Bid stores BidID, state of bid and price escrow_account: type: object @@ -2175,7 +2354,7 @@ paths: type: string tags: - Query - /akash/market/v1beta3/bids/list: + /akash/market/v1beta5/bids/list: get: summary: Bids queries bids with filters operationId: Bids @@ -2193,7 +2372,7 @@ paths: bid: type: object properties: - bid_id: + id: type: object properties: owner: @@ -2215,20 +2394,20 @@ paths: state: type: string enum: - - invalid - - open - - active - - lost - - closed - default: invalid + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_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 + - bid_invalid: Prefix should start with 0 in enum. + So declaring dummy state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState is an enum which refers to state of bid price: type: object properties: @@ -2248,6 +2427,161 @@ paths: created_at: type: string format: int64 + resources_offer: + type: array + items: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: >- + ResourceOffer describes resources that provider is + offering + + for deployment title: Bid stores BidID, state of bid and price escrow_account: type: object @@ -2353,9 +2687,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -2422,9 +2757,22 @@ paths: required: false type: string - name: filters.state + description: |2- + - bid_invalid: Prefix should start with 0 in enum. So declaring dummy state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed in: query required: false type: string + enum: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -2483,7 +2831,7 @@ paths: type: boolean tags: - Query - /akash/market/v1beta3/leases/info: + /akash/market/v1beta5/leases/info: get: summary: Lease queries lease details operationId: Lease @@ -2496,7 +2844,7 @@ paths: lease: type: object properties: - lease_id: + id: type: object properties: owner: @@ -2516,17 +2864,17 @@ paths: state: type: string enum: - - invalid - - active - - insufficient_funds - - closed - default: invalid + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid description: >- - - invalid: Prefix should start with 0 in enum. So + - lease_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 + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_closed: LeaseClosed denotes state for lease closed title: State is an enum which refers to state of lease price: type: object @@ -2678,7 +3026,7 @@ paths: type: string tags: - Query - /akash/market/v1beta3/leases/list: + /akash/market/v1beta5/leases/list: get: summary: Leases queries leases with filters operationId: Leases @@ -2696,7 +3044,7 @@ paths: lease: type: object properties: - lease_id: + id: type: object properties: owner: @@ -2716,17 +3064,17 @@ paths: state: type: string enum: - - invalid - - active - - insufficient_funds - - closed - default: invalid + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_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 + - lease_invalid: Prefix should start with 0 in enum. + So declaring dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_closed: LeaseClosed denotes state for lease closed title: State is an enum which refers to state of lease price: type: object @@ -2839,9 +3187,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -2910,9 +3259,20 @@ paths: required: false type: string - name: filters.state + description: |2- + - lease_invalid: Prefix should start with 0 in enum. So declaring dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_closed: LeaseClosed denotes state for lease closed in: query required: false type: string + enum: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -2971,7 +3331,7 @@ paths: type: boolean tags: - Query - /akash/market/v1beta3/orders/info: + /akash/market/v1beta5/orders/info: get: summary: Order queries order details operationId: Order @@ -2984,7 +3344,7 @@ paths: order: type: object properties: - order_id: + id: type: object properties: owner: @@ -3002,18 +3362,18 @@ paths: state: type: string enum: - - invalid - - open - - active - - closed - default: invalid + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid description: >- - - invalid: Prefix should start with 0 in enum. So + - order_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 + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState is an enum which refers to state of order spec: type: object properties: @@ -3225,7 +3585,7 @@ paths: title: >- ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications + title: Spec stores group specifications created_at: type: string format: int64 @@ -3275,7 +3635,7 @@ paths: format: int64 tags: - Query - /akash/market/v1beta3/orders/list: + /akash/market/v1beta5/orders/list: get: summary: Orders queries orders with filters operationId: Orders @@ -3290,7 +3650,7 @@ paths: items: type: object properties: - order_id: + id: type: object properties: owner: @@ -3308,18 +3668,18 @@ paths: state: type: string enum: - - invalid - - open - - active - - closed - default: invalid + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid description: >- - - invalid: Prefix should start with 0 in enum. So + - order_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 + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState is an enum which refers to state of order spec: type: object properties: @@ -3531,7 +3891,7 @@ paths: title: >- ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications + title: Spec stores group specifications created_at: type: string format: int64 @@ -3542,9 +3902,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -3609,9 +3970,20 @@ paths: type: integer format: int64 - name: filters.state + description: |2- + - order_invalid: Prefix should start with 0 in enum. So declaring dummy state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost in: query required: false type: string + enum: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -3670,7 +4042,7 @@ paths: type: boolean tags: - Query - /akash/provider/v1beta3/providers: + /akash/provider/v1beta4/providers: get: summary: Providers queries providers operationId: Providers @@ -3706,7 +4078,7 @@ paths: type: string website: type: string - title: ProviderInfo + title: Info title: Provider stores owner and host details pagination: type: object @@ -3714,9 +4086,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -3819,7 +4192,7 @@ paths: type: boolean tags: - Query - /akash/provider/v1beta3/providers/{owner}: + /akash/provider/v1beta4/providers/{owner}: get: summary: Provider queries provider details operationId: Provider @@ -3853,7 +4226,7 @@ paths: type: string website: type: string - title: ProviderInfo + title: Info title: Provider stores owner and host details title: >- QueryProviderResponse is response type for the Query/Provider RPC @@ -3887,4633 +4260,4622 @@ paths: type: string tags: - Query - /node_info: + /cosmos/auth/v1beta1/account_info/{address}: get: - description: Information about the connected node - summary: The properties of the connected node - tags: - - Gaia REST - produces: - - application/json + summary: AccountInfo queries account info which is common to all account types. + description: 'Since: cosmos-sdk 0.47' + operationId: AccountInfo responses: '200': - description: Node status + description: A successful response. 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: + info: + description: info is the account info which is represented by BaseAccount. + type: object properties: - id: - type: string - moniker: + address: type: string - example: validator-name - protocol_version: + pub_key: + type: object properties: - p2p: - type: string - example: 7 - block: + type_url: type: string - example: 10 - app: + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - example: 0 - network: - type: string - example: gaia-2 - channels: - type: string - listen_addr: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + account_number: type: string - example: 192.168.56.1:26656 - version: - description: Tendermint version + format: uint64 + sequence: 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 + format: uint64 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. schema: type: object properties: - syncing: - type: boolean - '500': - description: Server internal error - /blocks/latest: - get: - summary: Get the latest block + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the account address string. + in: path + required: true + type: string tags: - - Tendermint RPC - produces: - - application/json + - Query + /cosmos/auth/v1beta1/accounts: + get: + summary: Accounts returns all the existing accounts. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.43 + operationId: Accounts responses: '200': - description: The latest block + description: A successful response. 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: + accounts: type: array items: type: object properties: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: + type_url: type: string - example: '1000' - proposer_priority: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAccountsResponse is the response type for the Query/Accounts + RPC method. + + + Since: cosmos-sdk 0.43 + default: + description: An unexpected error response. schema: type: object properties: - block_height: + error: type: string - validators: + code: + type: integer + format: int32 + message: + type: string + details: 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_url: 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - in: query - name: message.action + - 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: >- - 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 + 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: >- - 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 + 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: >- - 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 + 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: - - 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}: + - Query + /cosmos/auth/v1beta1/accounts/{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 + summary: Account returns account details based on address. + operationId: Account 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 + description: A successful response. schema: type: object properties: - base_req: + account: 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_url: type: string - example: Cosmos-Hub - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 - 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 + format: byte 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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: - 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: + error: 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: + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - in: path - name: address - description: Account address + - name: address + description: address defines the address to query for. + in: path required: true type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + tags: + - Query + /cosmos/auth/v1beta1/address_by_id/{id}: + get: + summary: AccountAddressByID returns account address based on account number. + description: 'Since: cosmos-sdk 0.46.2' + operationId: AccountAddressByID responses: '200': - description: Account information on the blockchain + description: A successful response. schema: type: object properties: - type: + account_address: 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 + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method + default: + description: An unexpected error response. schema: type: object properties: - 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: + error: type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: + code: + type: integer + format: int32 + message: 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: + details: 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: id + description: |- + Deprecated, use account_id instead + + id is the account number of the address to be queried. This field + should have been an uint64 (like all account numbers), and will be + updated to uint64 in a future version of the auth query. + in: path + required: true + type: string + format: int64 + - name: account_id + description: |- + account_id is the account number of the address to be queried. + + Since: cosmos-sdk 0.47 + in: query + required: false + type: string + format: uint64 tags: - - Staking - produces: - - application/json + - Query + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix queries bech32Prefix + description: 'Since: cosmos-sdk 0.46' + operationId: Bech32Prefix responses: '200': - description: OK + description: A successful response. schema: type: object properties: - delegator_address: - type: string - validator_address: - type: string - shares: + bech32_prefix: 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 + description: >- + Bech32PrefixResponse is the response type for Bech32Prefix rpc + method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: - 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: + error: type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: + code: + type: integer + format: int32 + message: type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - amount: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - - Staking - consumes: - - application/json - produces: - - application/json + - Query + /cosmos/auth/v1beta1/bech32/{address_bytes}: + get: + summary: AddressBytesToString converts Account Address bytes to string + description: 'Since: cosmos-sdk 0.46' + operationId: AddressBytesToString responses: '200': - description: OK + description: A successful response. 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: + address_string: 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 + description: >- + AddressBytesToStringResponse is the response type for + AddressString rpc method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: - delegator_address: + error: type: string - validator_address: + code: + type: integer + format: int32 + message: type: string - entries: + details: type: array items: type: object properties: - initial_balance: - type: string - balance: - type: string - creation_height: + type_url: type: string - min_time: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - '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) + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address_bytes + in: path + required: true + type: string + format: byte tags: - - Staking - produces: - - application/json + - Query + /cosmos/auth/v1beta1/bech32/{address_string}: + get: + summary: AddressStringToBytes converts Address string to bytes + description: 'Since: cosmos-sdk 0.46' + operationId: AddressStringToBytes 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 + description: A successful response. 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: + address_bytes: type: string - example: '100' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: Tx was succesfully generated + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes + rpc method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: - msg: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: 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_url: type: string - example: '0' - update_time: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address_string + in: path + required: true + type: string tags: - - Staking - produces: - - application/json + - Query + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts returns all the existing module accounts. + description: 'Since: cosmos-sdk 0.46' + operationId: ModuleAccounts responses: '200': - description: OK + description: A successful response. 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: + accounts: + type: array + items: type: object properties: - rate: - type: string - example: '0' - max_rate: - type: string - example: '0' - max_change_rate: + type_url: type: string - example: '0' - update_time: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: - 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: + error: type: string - example: '0' - bond_intra_tx_counter: + code: type: integer - example: 0 - unbonding_height: - type: string - example: '0' - unbonding_time: + format: int32 + message: 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: + details: + type: array + items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - - Staking - 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: + - Query + /cosmos/auth/v1beta1/module_accounts/{name}: get: - deprecated: true - summary: Get the current staking parameter values - tags: - - Staking - produces: - - application/json + summary: ModuleAccountByName returns the module account info by module name + operationId: ModuleAccountByName responses: '200': - description: OK + description: A successful response. 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: + account: 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_url: type: string - example: '0' - sequence: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + default: + description: An unexpected error response. schema: type: object properties: - 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: + error: type: string - slash_fraction_downtime: + code: + type: integer + format: int32 + message: 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - description: >- - valid value of `"proposal_type"` can be `"text"`, - `"parameter_change"`, `"software_upgrade"` - name: post_proposal_body - in: body + - name: name + 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: - base_req: + params: + description: params defines the parameters of the module. 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: + max_memo_characters: type: string - example: Cosmos-Hub - account_number: + format: uint64 + tx_sig_limit: type: string - example: '0' - sequence: + format: uint64 + tx_size_cost_per_byte: type: string - example: '1' - gas: + format: uint64 + sig_verify_cost_ed25519: type: string - example: '200000' - gas_adjustment: + format: uint64 + sig_verify_cost_secp256k1: 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: + 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 - example: text - proposer: + code: + type: integer + format: int32 + message: type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - initial_deposit: + details: type: array items: type: object properties: - denom: - type: string - example: stake - amount: + type_url: 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: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the 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. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + 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: - 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: + next_key: type: string - example: '0' - sequence: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - 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 + 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: - - in: query - name: voter - description: voter address + - 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 - - in: query - name: depositor - description: depositor address + 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 - - in: query - name: status + format: uint64 + - name: pagination.limit description: >- - proposal status, valid values can be `"deposit_period"`, - `"voting_period"`, `"passed"`, `"rejected"` + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/balances/{address}/by_denom: + get: + summary: Balance queries the balance of a single coin for a single account. + operationId: Balance 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 + description: A successful response. schema: type: object properties: - base_req: + balance: 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: + denom: type: string - example: '200000' - gas_adjustment: + amount: 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: + 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 - x-example: Update max validators - proposer: + code: + type: integer + format: int32 + message: 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: + details: type: array items: type: object properties: - subspace: - type: string - example: staking - key: - type: string - example: MaxValidators - subkey: + type_url: type: string - example: '' value: - type: object + 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: query + required: false + type: string + tags: + - Query + /cosmos/bank/v1beta1/denom_owners/{denom}: + get: + summary: >- + DenomOwners queries for all account addresses that own a particular + token + + denomination. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 + operationId: DenomOwners responses: '200': - description: The transaction was succesfully generated + description: A successful response. schema: type: object properties: - msg: + denom_owners: type: array items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - 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 - example: stake amount: type: string - example: '50' - memo: - type: string - signature: + 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. + + + Since: cosmos-sdk 0.46 + pagination: + description: pagination defines the pagination in the response. 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: + next_key: type: string - example: '0' - sequence: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - 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 + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomOwnersResponse defines the RPC response of a DenomOwners + RPC query. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: - proposal_id: + error: + type: string + code: type: integer - title: + format: int32 + message: 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: + details: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + value: 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 + format: byte parameters: - - type: string - name: proposalId - required: true + - name: denom + description: >- + denom defines the coin denomination to query all account holders + for. 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' + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/denoms_metadata: + get: + summary: |- + DenomsMetadata queries the client metadata for all registered coin + denominations. + operationId: DenomsMetadata 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 + description: A successful response. schema: type: object properties: - base_req: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given + denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one + must + + raise the base_denom to in order to equal the + given DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a + given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges + (eg: ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. + It's used to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the + registered tokens. + pagination: + description: pagination defines the pagination in the response. type: object properties: - 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: + next_key: type: string - example: '200000' - gas_adjustment: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - 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: + 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 - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - amount: + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + value: type: string - example: '50' + 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 + /cosmos/bank/v1beta1/denoms_metadata/{denom}: + get: + summary: DenomsMetadata queries the client metadata of a given coin denomination. + operationId: DenomMetadata responses: '200': - description: OK + description: A successful response. schema: type: object properties: - msg: - type: array - items: - type: string - fee: + metadata: type: object properties: - gas: + description: type: string - amount: + denom_units: type: array items: type: object properties: denom: type: string - example: stake - amount: - type: string - example: '50' - memo: - type: string - signature: - type: object - properties: - signature: + description: >- + denom represents the string name of the given denom + unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one + must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a given + coin + base: type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: type: string - example: '0' - sequence: + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: 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 + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. + It's used to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + default: + description: An unexpected error response. schema: type: object properties: - amount: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + value: 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 + format: byte parameters: - - type: string - description: proposal id - name: proposalId - required: true + - name: denom + description: denom is the coin denom to query the metadata for. in: path - x-example: '2' + 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: 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 + description: A successful response. schema: type: object properties: - base_req: + params: 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: + send_enabled: type: array items: type: object properties: denom: type: string - example: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status + (whether a denom is + + sendable). description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - voter: + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the + genesis object. + + Storage, lookup, and manipulation of this information is + now in the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards + compatibility of genesis files. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - option: + code: + type: integer + format: int32 + message: type: string - example: 'yes' + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/bank/v1beta1/send_enabled: + get: + summary: SendEnabled queries for SendEnabled entries. + description: >- + This query only returns denominations that have specific SendEnabled + settings. + + Any denomination that does not have a specific setting will use the + default + + params.default_send_enabled, and will not be returned by this query. + + + Since: cosmos-sdk 0.47 + operationId: SendEnabled responses: '200': - description: OK + description: A successful response. schema: type: object properties: - msg: + send_enabled: 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: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status + (whether a denom is + + sendable). + pagination: + description: >- + pagination defines the pagination in the response. This field + is only + + populated if the denoms field in the request is empty. type: object properties: - 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: + next_key: type: string - example: '0' - sequence: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - 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 + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySendEnabledResponse defines the RPC response of a SendEnable + query. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. schema: type: object properties: - voter: - type: string - proposal_id: + error: type: string - option: + code: + type: integer + format: int32 + message: 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 + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte 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: + - name: denoms + description: >- + denoms is the specific denoms you want look up. Leave empty to get + all entries. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/spendable_balances/{address}: get: - deprecated: true - summary: Query governance deposit parameters + summary: >- + SpendableBalances queries the spendable balance of all coins for a + single + + account. description: >- - Query governance deposit parameters. The max_deposit_period units are in - nanoseconds. - produces: - - application/json - tags: - - Governance + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 + operationId: SpendableBalances responses: '200': - description: OK + description: A successful response. schema: type: object properties: - min_deposit: + balances: 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 + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure + for querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: + type: object properties: - threshold: - type: string - example: '0.5000000000' - veto: + error: type: string - example: '0.3340000000' - governance_penalty: + code: + type: integer + format: int32 + message: 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 + 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 spendable balances for. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - - 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 + - Query + /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: get: - deprecated: true - summary: Get the total rewards balance from all delegations + summary: >- + SpendableBalanceByDenom queries the spendable balance of a single denom + for + + a single account. description: >- - Get the sum of all the rewards earned by delegations by a single - delegator - produces: - - application/json - tags: - - Distribution + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.47 + operationId: SpendableBalanceByDenom responses: '200': - description: OK + description: A successful response. schema: type: object properties: - rewards: + 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: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response + structure for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - validator_address: + type_url: 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: + 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: query + required: false + type: string + tags: + - Query + /cosmos/bank/v1beta1/supply: + get: + summary: TotalSupply queries the total supply of all coins. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: TotalSupply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + supply: 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: + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + title: supply is the supply of the coins + pagination: + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 type: object properties: - 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: + next_key: type: string - example: '200000' - gas_adjustment: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - 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 + 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: - msg: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: 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 + type: object + properties: + type_url: + type: string + value: + type: string + format: byte 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 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/supply/by_denom: get: - deprecated: true - summary: Get the rewards withdrawal address + summary: SupplyOf queries the supply of a single coin. 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 + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: SupplyOf responses: '200': - description: OK + description: A successful response. schema: type: object properties: - msg: - type: array - items: - type: string - fee: + amount: type: object properties: - gas: + denom: 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 + 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: - operator_address: + error: 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: + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - amount: + value: 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 + format: byte + parameters: + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + type: string 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 + - Query + /cosmos/base/tendermint/v1beta1/abci_query: 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) + summary: >- + ABCIQuery defines a query handler that supports ABCI queries directly to + the + + application, bypassing Tendermint completely. The ABCI query must + contain + + a valid and supported path, including app, custom, p2p, and store. + description: 'Since: cosmos-sdk 0.46' + operationId: ABCIQuery responses: '200': - description: OK + description: A successful response. schema: type: object properties: - msg: - type: array - items: - type: string - fee: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: type: object properties: - gas: - type: string - amount: + ops: type: array items: type: object properties: - denom: + type: type: string - example: stake - amount: + key: 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: + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle + root. The data could + + be arbitrary format, providing necessary data for + example neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type + defined in Tendermint. + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type + defined in Tendermint. + height: type: string - community_tax: + format: int64 + codespace: 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 + description: >- + ABCIQueryResponse defines the response structure for the ABCIQuery + gRPC query. + + + Note: This type is a duplicate of the ResponseQuery proto type + defined in + + Tendermint. + default: + description: An unexpected error response. schema: + type: object properties: - mint_denom: - type: string - inflation_rate_change: - type: string - inflation_max: - type: string - inflation_min: - type: string - goal_bonded: + error: type: string - blocks_per_year: + code: + type: integer + format: int32 + message: 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: + details: type: array items: type: object @@ -8615,7 +8977,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8625,13 +8987,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -8653,7 +9018,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8690,461 +9054,1147 @@ paths: "@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. + parameters: + - name: data + in: query + required: false + type: string + format: byte + - name: path + in: query + required: false + type: string + - name: height + in: query + required: false + type: string + format: int64 + - name: prove + in: query + required: false + type: boolean + tags: + - Service + /cosmos/base/tendermint/v1beta1/blocks/latest: + get: + summary: GetLatestBlock returns the latest block. + operationId: GetLatestBlock + responses: + '200': + description: A successful response. + schema: + type: object + properties: + block_id: type: object properties: - next_key: + hash: 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 + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used 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: + 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. - * If no scheme is provided, `https` is assumed. + NOTE: not all txs here are valid. We're just agreeing + on the order first. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + 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. - Note: this functionality is not currently available in the - official + - 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 - protobuf release, and it is not used for type URLs - beginning with + 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. - type.googleapis.com. + - 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, - Schemes other than `http`, `https` (or the empty scheme) - might be + including all blockchain data structures + and the rules of the application's - 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. + 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, + including all blockchain data structures and the rules + of the application's - Protobuf library provides support to pack/unpack Any values in - the form + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. - of utility functions or additional generated methods of the - Any type. + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string + for better UX. + 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. - Example 1: Pack and unpack a message in C++. + NOTE: not all txs here are valid. We're just agreeing + on the order first. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + 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. - Example 2: Pack and unpack a message in Java. + - 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 - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + 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. - Example 3: Pack and unpack a message in Python. + - 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 - foo = Foo(...) - any = Any() - any.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 + 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, - `value` which holds the custom JSON in addition to the `@type` + including all blockchain data structures + and the rules of the application's - field. Example (for message [google.protobuf.Duration][]): + 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: >- + Block is tendermint type Block, with the Header proposer + address - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + field converted to bech32 string. description: >- - QueryAccountResponse is the response type for the Query/Account - RPC method. + GetLatestBlockResponse is the response type for the + Query/GetLatestBlock RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9257,7 +10307,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9267,13 +10317,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -9295,7 +10348,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9332,951 +10384,1409 @@ paths: "@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: + - Service + /cosmos/base/tendermint/v1beta1/blocks/{height}: get: - summary: Params queries all parameters. - operationId: AuthParams + summary: GetBlockByHeight queries block for given height. + operationId: GetBlockByHeight responses: '200': description: A successful response. schema: type: object properties: - params: - description: params defines the parameters of the module. + block_id: 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: + hash: 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. + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used 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. + 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: The amount field is an Int which implements the custom - method + NOTE: not all txs here are valid. We're just agreeing + on the order first. - 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 + This means that block.AppHash does not include these + txs. 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 + 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. - a count of the total number of items available for pagination in - UIs. + - 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 - count_total is only respected when offset is used. It is ignored - when key + 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. - 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. + - 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, - NOTE: The amount field is an Int which implements the custom - method + including all blockchain data structures + and the rules of the application's - 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. + 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' 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 + 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, - 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. + including all blockchain data structures and the rules + of the application's - It is less efficient than using key. Only one of offset or key - should + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. - 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. + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string - 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 + for better UX. + 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. - a count of the total number of items available for pagination in - UIs. + NOTE: not all txs here are valid. We're just agreeing + on the order first. - count_total is only respected when offset is used. It is ignored - when key + 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. - 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. + - 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: >- + Block is tendermint type Block, with the Header proposer + address + + field converted to bech32 string. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + default: + description: An unexpected error response. schema: type: object properties: - metadatas: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - description: + type_url: 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - raise the base_denom to in order to equal the - given DenomUnit's denom + protocol buffer message. This string must contain at + least - 1 denom = 1^exponent base_denom + one "/" character. The last segment of the URL's path + must represent - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + the fully qualified name of the type (as in - 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 + `path/google.protobuf.Duration`). The name should be in + a canonical form - 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 + (e.g., leading "." is not accepted). - 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 + In practice, teams usually precompile into the binary + all types that they - 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 + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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. + 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 - It is less efficient than using key. Only one of offset or key - should + URL that describes the type of the serialized message. - 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 + Protobuf library provides support to pack/unpack Any values + in the form - a count of the total number of items available for pagination in - UIs. + of utility functions or additional generated methods of the + Any type. - 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 + Example 1: Pack and unpack a message in C++. - raise the base_denom to in order to equal the given - DenomUnit's denom + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - 1 denom = 1^exponent base_denom + Example 2: Pack and unpack a message in Java. - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 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 + Example 3: Pack and unpack a message in Python. - 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 + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - 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 + Example 4: Pack and unpack a message in Go - 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 + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: denom - description: denom is the coin denom to query the metadata for. + - name: height in: path required: true type: string + format: int64 tags: - - Query - /cosmos/bank/v1beta1/params: + - Service + /cosmos/base/tendermint/v1beta1/node_info: get: - summary: Params queries the parameters of x/bank module. - operationId: BankParams + summary: GetNodeInfo queries the current node info. + operationId: GetNodeInfo responses: '200': description: A successful response. schema: type: object properties: - params: + default_node_info: type: object properties: - send_enabled: + 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: - denom: + path: 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. + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. + GetNodeInfoResponse is the response type for the Query/GetNodeInfo + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10294,172 +11804,197 @@ paths: 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. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + protocol buffer message. This string must contain at + least - NOTE: The amount field is an Int which implements the custom - method + one "/" character. The last segment of the URL's path + must represent - 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 + the fully qualified name of the type (as in - was set, its value is undefined otherwise - title: >- - QueryTotalSupplyResponse is the response type for the - Query/TotalSupply RPC + `path/google.protobuf.Duration`). The name should be in + a canonical form - 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 + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 - 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. + 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 - It is less efficient than using key. Only one of offset or key - should + URL that describes the type of the serialized message. - 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 + Protobuf library provides support to pack/unpack Any values + in the form - a count of the total number of items available for pagination in - UIs. + of utility functions or additional generated methods of the + Any type. - 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 + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the 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/supply/{denom}: + - Service + /cosmos/base/tendermint/v1beta1/syncing: get: - summary: SupplyOf queries the supply of a single coin. - operationId: SupplyOf + summary: GetSyncing queries node syncing. + operationId: GetSyncing 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. + syncing: + type: boolean description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf + GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10477,617 +12012,441 @@ paths: 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 - parameters: - - name: denom - description: denom is the coin denom to query balances for. - in: path - required: true - type: string + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the 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/base/tendermint/v1beta1/blocks/latest: + - Service + /cosmos/base/tendermint/v1beta1/validatorsets/latest: get: - summary: GetLatestBlock returns the latest block. - operationId: GetLatestBlock + summary: GetLatestValidatorSet queries latest validator-set. + operationId: GetLatestValidatorSet 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, + 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 - including all blockchain data structures and the rules - of the application's + protocol buffer message. This string must contain at + least - 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: + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used 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: >- - Txs that will be applied by state @ block.Height+1. + 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 - NOTE: not all txs here are valid. We're just agreeing - on the order first. + URL that describes the type of the serialized message. - This means that block.AppHash does not include these - txs. + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 title: >- - 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. + total is total number of results available if + PageRequest.count_total - - 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 + 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 - 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. + protocol buffer message. This string must contain at + least - - 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 + one "/" character. The last segment of the URL's path + must represent - 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, + the fully qualified name of the type (as in - 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 + `path/google.protobuf.Duration`). The name should be in + a canonical form (e.g., leading "." is not accepted). @@ -11169,7 +12528,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -11179,13 +12538,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -11207,7 +12569,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -11244,855 +12605,295 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Service - /cosmos/base/tendermint/v1beta1/blocks/{height}: + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: get: - summary: GetBlockByHeight queries block for given height. - operationId: GetBlockByHeight + summary: GetValidatorSetByHeight queries validator-set at a given height. + operationId: GetValidatorSetByHeight 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, + 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 - including all blockchain data structures and the rules - of the application's + protocol buffer message. This string must contain at + least - 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. + one "/" character. The last segment of the URL's + path must represent - NOTE: not all txs here are valid. We're just agreeing - on the order first. + the fully qualified name of the type (as in - 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. + `path/google.protobuf.Duration`). The name should be + in a canonical form - - 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 + (e.g., leading "." is not accepted). - 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 + In practice, teams usually precompile into the + binary all types that they - 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, + expect it to use in the context of Any. However, for + URLs which use the - including all blockchain data structures - and the rules of the application's + scheme `http`, `https`, or no scheme, one can + optionally set up a type - 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 + server that maps type URLs to message definitions as + follows: - protocol buffer message. This string must contain at - least - one "/" character. The last segment of the URL's path - must represent + * If no scheme is provided, `https` is assumed. - the fully qualified name of the type (as in + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - `path/google.protobuf.Duration`). The name should be in - a canonical form + Note: this functionality is not currently available + in the official - (e.g., leading "." is not accepted). + protobuf release, and it is not used for type URLs + beginning with + type.googleapis.com. - In practice, teams usually precompile into the binary - all types that they - expect it to use in the context of Any. However, for - URLs which use the + Schemes other than `http`, `https` (or the empty + scheme) might be - scheme `http`, `https`, or no scheme, one can optionally - set up a type + 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 - server that maps type URLs to message definitions as - follows: + URL that describes the type of the serialized message. - * If no scheme is provided, `https` is assumed. + Protobuf library provides support to pack/unpack Any + values in the form - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + of utility functions or additional generated methods of + the Any type. - Note: this functionality is not currently available in - the official - protobuf release, and it is not used for type URLs - beginning with + Example 1: Pack and unpack a message in C++. - type.googleapis.com. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - Schemes other than `http`, `https` (or the empty scheme) - might be + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 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 + Example 3: Pack and unpack a message in Python. - URL that describes the type of the serialized message. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - Protobuf library provides support to pack/unpack Any values - in the form + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - of utility functions or additional generated methods of the - Any type. + The pack methods provided by protobuf library will by + default use + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - Example 1: Pack and unpack a message in C++. + methods only use the fully qualified type name after the + last '/' - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - Example 2: Pack and unpack a message in Java. + name "y.z". - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + JSON - 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 + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + 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": "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: - 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: + next_key: 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: + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - description: VersionInfo is the type for the GetNodeInfoResponse message. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo - RPC method. + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12205,7 +13006,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -12215,13 +13016,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -12243,7 +13047,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -12280,26 +13083,106 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: height + in: path + required: true + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Service - /cosmos/base/tendermint/v1beta1/syncing: + /cosmos/distribution/v1beta1/community_pool: get: - summary: GetSyncing queries node syncing. - operationId: GetSyncing + summary: CommunityPool queries the community pool coins. + operationId: CommunityPool responses: '200': description: A successful response. schema: type: object properties: - syncing: - type: boolean - format: boolean + 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: >- - GetSyncingResponse is the response type for the Query/GetSyncing + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12317,405 +13200,76 @@ paths: 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: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: get: - summary: GetLatestValidatorSet queries latest validator-set. - operationId: GetLatestValidatorSet + summary: |- + DelegationTotalRewards queries the total rewards accrued by a each + validator. + operationId: DelegationTotalRewards responses: '200': description: A successful response. schema: type: object properties: - block_height: - type: string - format: int64 - validators: + rewards: type: array items: type: object properties: - address: + validator_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 + 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. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + NOTE: The amount field is an Dec which implements the + custom method - (e.g., leading "." is not accepted). + 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. - In practice, teams usually precompile into the - binary all types that they + NOTE: The amount field is an Dec which implements the custom + method - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used 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. + 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 + description: An unexpected error response. schema: type: object properties: @@ -12733,461 +13287,152 @@ paths: 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. + 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: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.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 + DecCoin defines a token with a denomination and a decimal + amount. - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message [google.protobuf.Duration][]): + NOTE: The amount field is an Dec which implements the custom + method - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + 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: 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 + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true 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 + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true 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}: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: get: - summary: GetValidatorSetByHeight queries validator-set at a given height. - operationId: GetValidatorSetByHeight + summary: DelegatorValidators queries the validators of a delegator. + operationId: DelegatorValidators responses: '200': description: A successful response. schema: type: object properties: - block_height: - type: string - format: int64 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: - address: + type_url: 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: + value: 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. + 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 + description: An unexpected error response. schema: type: object properties: @@ -13205,275 +13450,54 @@ paths: 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 + - name: delegator_address + description: delegator_address defines the delegator address to query for. 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: + - Query + /cosmos/distribution/v1beta1/params: get: - summary: CommunityPool queries the community pool coins. - operationId: CommunityPool + summary: Params queries params of the distribution module. + operationId: DistributionParams 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. - + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated + and is no longer used - NOTE: The amount field is an Dec which implements the custom - method + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated + and is no longer used - signatures required by gogoproto. - description: pool defines community pool's coins. + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean description: >- - QueryCommunityPoolResponse is the response type for the - Query/CommunityPool - - RPC method. + QueryParamsResponse is the response type for the Query/Params RPC + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13496,48 +13520,41 @@ paths: format: byte tags: - Query - /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: + /cosmos/distribution/v1beta1/validators/{validator_address}: get: - summary: |- - DelegationTotalRewards queries the total rewards accrued by a each - validator. - operationId: DelegationTotalRewards + summary: >- + ValidatorDistributionInfo queries validator commission and + self-delegation rewards for validator + operationId: ValidatorDistributionInfo responses: '200': description: A successful response. schema: type: object properties: - rewards: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: type: array items: type: object properties: - validator_address: + denom: 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. + 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 + 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: + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + commission: type: array items: type: object @@ -13555,12 +13572,12 @@ paths: 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. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for + the Query/ValidatorDistributionInfo RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13582,73 +13599,6 @@ paths: 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 @@ -13656,152 +13606,6 @@ paths: 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. @@ -13813,7 +13617,7 @@ paths: type: object properties: commission: - description: commission defines the commision the validator received. + description: commission defines the commission the validator received. type: object properties: commission: @@ -13838,7 +13642,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13910,7 +13714,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13977,9 +13781,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13992,7 +13797,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14081,15 +13886,16 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -14204,7 +14010,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14214,13 +14020,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -14242,7 +14051,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14287,9 +14095,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14304,7 +14113,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14417,7 +14226,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14427,13 +14236,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -14455,7 +14267,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14539,18 +14350,19 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - /cosmos/evidence/v1beta1/evidence/{evidence_hash}: + /cosmos/evidence/v1beta1/evidence/{hash}: get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence @@ -14659,7 +14471,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14669,13 +14481,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -14697,7 +14512,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14735,7 +14549,7 @@ paths: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14848,7 +14662,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14858,13 +14672,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -14886,7 +14703,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14924,11 +14740,21 @@ paths: "value": "1.212s" } parameters: - - name: evidence_hash - description: evidence_hash defines the hash of the requested evidence. + - name: hash + description: |- + hash defines the evidence hash of the requested evidence. + + Since: cosmos-sdk 0.47 in: path required: true type: string + - name: evidence_hash + description: |- + evidence_hash defines the hash of the requested evidence. + Deprecated: Use hash, a HEX encoded string, instead. + in: query + required: false + type: string format: byte tags: - Query @@ -14948,7 +14774,7 @@ paths: properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. deposit_params: description: deposit_params defines the parameters related to deposit. type: object @@ -14976,7 +14802,8 @@ paths: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. tally_params: description: tally_params defines the parameters related to tally. type: object @@ -14987,7 +14814,8 @@ paths: description: >- Minimum percentage of total stake needed to vote for a result to be - considered valid. + + considered valid. threshold: type: string format: byte @@ -15000,12 +14828,13 @@ paths: description: >- Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. + + vetoed. Default value: 1/3. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15118,7 +14947,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15128,13 +14957,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -15156,7 +14988,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15223,6 +15054,7 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: type: object properties: @@ -15323,7 +15155,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15333,13 +15165,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -15361,7 +15196,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15401,6 +15235,7 @@ paths: "value": "1.212s" } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -15410,41 +15245,41 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: description: >- - ProposalStatus enumerates the valid statuses of a - proposal. + final_tally_result is the final tally result of the + proposal. When - - 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: + querying a proposal via gRPC, this field is not + populated until the + + proposal's voting period has ended. type: object properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: >- + abstain is the number of abstain votes on a + proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. + description: >- + no_with_veto is the number of no with veto votes on + a proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -15463,15 +15298,21 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -15479,9 +15320,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -15496,7 +15338,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15609,7 +15451,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15619,13 +15461,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -15647,7 +15492,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15689,7 +15533,7 @@ paths: description: |- proposal_status defines the status of the proposals. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting @@ -15767,15 +15611,16 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}: @@ -15794,6 +15639,7 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: type: object properties: @@ -15894,7 +15740,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15904,13 +15750,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -15932,7 +15781,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15970,6 +15818,7 @@ paths: "value": "1.212s" } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -15979,41 +15828,39 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: description: >- - ProposalStatus enumerates the valid statuses of a - proposal. + final_tally_result is the final tally result of the + proposal. When - - 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: + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. type: object properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. + description: >- + no_with_veto is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -16031,12 +15878,17 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. @@ -16044,7 +15896,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16157,7 +16009,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -16167,275 +16019,287 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + 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 { + any, err := anypb.New(foo) + if err != nil { ... } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON 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 { + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: >- + depositor defines the deposit addresses from the + proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. + description: deposits defines the requested deposits. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDepositsResponse is the response type for the Query/Deposits + RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -16457,7 +16321,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -16547,15 +16410,16 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: @@ -16576,8 +16440,12 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: >- + depositor defines the deposit addresses from the + proposals. amount: type: array items: @@ -16595,6 +16463,7 @@ paths: custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active @@ -16604,7 +16473,7 @@ paths: QueryDepositResponse is the response type for the Query/Deposit RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16717,7 +16586,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -16727,13 +16596,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -16755,7 +16627,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -16817,24 +16688,28 @@ paths: type: object properties: tally: + description: tally defines the requested tally. type: object properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. + description: >- + no_with_veto is the number of no with veto votes on a + proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16947,7 +16822,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -16957,13 +16832,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -16985,7 +16863,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17049,8 +16926,10 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field @@ -17075,6 +16954,9 @@ paths: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -17083,26 +16965,27 @@ paths: - 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: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: >- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -17110,9 +16993,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -17125,7 +17009,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17238,7 +17122,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17248,13 +17132,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -17276,7 +17163,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17366,15 +17252,16 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: @@ -17393,8 +17280,10 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is @@ -17419,6 +17308,9 @@ paths: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -17427,20 +17319,21 @@ paths: - 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: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: >- Vote defines a vote on a governance proposal. @@ -17450,7 +17343,7 @@ paths: QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17563,7 +17456,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17573,13 +17466,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -17601,7 +17497,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17646,253 +17541,149 @@ paths: type: string format: uint64 - name: voter - description: voter defines the oter address for the proposals. + description: voter defines the voter 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: + /cosmos/gov/v1/params/{params_type}: get: - summary: Params returns the total set of minting parameters. - operationId: MintParams + summary: Params queries all parameters of the gov module. + operationId: GovV1Params responses: '200': description: A successful response. schema: type: object properties: - params: - description: params defines the parameters of the module. + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. 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: + voting_period: type: string - title: goal of percent bonded atoms - blocks_per_year: + description: Duration of the voting period. + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: type: string - 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. + description: >- + Maximum period for Atom holders to deposit on a proposal. + Initial value: 2 + + months. + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. type: object properties: - subspace: + quorum: type: string - key: + description: >- + Minimum percentage of total stake needed to vote for a + result to be + + considered valid. + threshold: type: string - value: + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: 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: + description: >- + Minimum value of Veto votes to Total votes ratio for + proposal to be + + vetoed. Default value: 1/3. params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 type: object properties: - signed_blocks_window: + 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 - format: int64 - min_signed_per_window: + description: >- + Maximum period for Atom holders to deposit on a proposal. + Initial value: 2 + + months. + voting_period: type: string - format: byte - downtime_jail_duration: + description: Duration of the voting period. + quorum: type: string - slash_fraction_double_sign: + description: >- + Minimum percentage of total stake needed to vote for a + result to be + considered valid. + threshold: type: string - format: byte - slash_fraction_downtime: + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: type: string - format: byte - description: >- - Params represents the parameters used for by the slashing - module. - title: >- + description: >- + Minimum value of Veto votes to Total votes ratio for + proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value + that must be paid at proposal submission. + description: >- QueryParamsResponse is the response type for the Query/Params RPC - method + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17910,351 +17701,489 @@ paths: 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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/slashing/v1beta1/signing_infos: + /cosmos/gov/v1/proposals: get: - summary: SigningInfos queries signing info of all validators - operationId: SigningInfos + summary: Proposals queries all proposals based on given status. + operationId: GovV1Proposal responses: '200': description: A successful response. schema: type: object properties: - info: + proposals: type: array items: type: object properties: - address: - type: string - start_height: + id: 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 + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - in a block and may have signed a precommit or not. This - in conjunction with the + protocol buffer message. This string must contain + at least - `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 + one "/" character. The last segment of the URL's + path must represent - 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. + the fully qualified name of the type (as in - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + `path/google.protobuf.Duration`). The name should + be in a canonical form - 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 + (e.g., leading "." is not accepted). - 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. + In practice, teams usually precompile into the + binary all types that they - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the - Query/SigningInfos RPC + expect it to use in the context of Any. However, + for URLs which use the - 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. + scheme `http`, `https`, or no scheme, one can + optionally set up a type - It is less efficient than using key. Only one of offset or key - should + server that maps type URLs to message definitions + as follows: - 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 + * If no scheme is provided, `https` is assumed. - a count of the total number of items available for pagination in - UIs. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - count_total is only respected when offset is used. It is ignored - when key + Note: this functionality is not currently + available in the official - 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 + protobuf release, and it is not used for type URLs + beginning with - in a block and may have signed a precommit or not. This in - conjunction with the + type.googleapis.com. - `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. + Schemes other than `http`, `https` (or the empty + scheme) might be - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + 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 - 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 + URL that describes the type of the serialized message. - 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: + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods + of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if + the proposal passes. + status: + description: status defines the proposal status. type: string - 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. + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: description: >- - Delegation represents the bond with tokens held by an - account. It is + final_tally_result is the final tally result of the + proposal. When - owned by one delegator, and is associated with the - voting power of one + querying a proposal via gRPC, this field is not + populated until the - validator. - balance: + proposal's voting period has ended. type: object properties: - denom: + yes_count: type: string - amount: + description: yes_count is the number of yes votes on a proposal. + abstain_count: type: string - description: >- - Coin defines a token with a denomination and an amount. + description: >- + abstain_count is the number of abstain votes on a + proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto + votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - NOTE: The amount field is an Int which implements the - custom method + NOTE: The amount field is an Int which implements the + custom method - signatures required by gogoproto. + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: >- - 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. + Proposal defines the core field members of a governance + proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -18262,9 +18191,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -18273,11 +18203,13 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: |- - QueryDelegatorDelegationsResponse is response type for the - Query/DelegatorDelegations RPC method. + description: >- + QueryProposalsResponse is the response type for the + Query/Proposals RPC + + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18390,7 +18322,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18400,13 +18332,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -18428,7 +18363,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18466,10 +18400,41 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. - in: path - required: true + - name: proposal_status + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false type: string - name: pagination.key description: |- @@ -18517,165 +18482,318 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: + /cosmos/gov/v1/proposals/{proposal_id}: get: - summary: Redelegations queries redelegations of given address. - operationId: Redelegations + summary: Proposal queries proposal details based on ProposalID. + operationId: GovV1Proposal responses: '200': description: A successful response. schema: type: object properties: - redelegation_responses: - type: array - items: - type: object - properties: - redelegation: + proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: type: object properties: - 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_url: 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 + A URL/resource name that uniquely identifies the + type of the serialized - 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 + protocol buffer message. This string must contain at + least - contains a balance in addition to shares which is more - suitable for client + one "/" character. The last segment of the URL's + path must represent - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except - that its entries + the fully qualified name of the type (as in - contain a balance in addition to shares which is more - suitable for client + `path/google.protobuf.Duration`). The name should be + in a canonical form - responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the + proposal passes. + status: + description: status defines the proposal status. type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: >- + abstain_count is the number of abstain votes on a + proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes + on a proposal. + submit_time: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - was set, its value is undefined otherwise - description: >- - QueryRedelegationsResponse is response type for the - Query/Redelegations RPC - method. + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: >- + Proposal defines the core field members of a governance + proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18788,7 +18906,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18798,13 +18916,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -18826,7 +18947,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18864,143 +18984,63 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. 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: + /cosmos/gov/v1/proposals/{proposal_id}/deposits: get: - summary: >- - DelegatorUnbondingDelegations queries all unbonding delegations of a - given - - delegator address. - operationId: DelegatorUnbondingDelegations + summary: Deposits queries all deposits of a single proposal. + operationId: GovV1Deposit responses: '200': description: A successful response. schema: type: object properties: - unbonding_responses: + deposits: type: array items: type: object properties: - delegator_address: + proposal_id: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: type: string description: >- - validator_address is the bech32-encoded address of the - validator. - entries: + depositor defines the deposit addresses from the + proposals. + amount: 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: + denom: type: string - description: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: + amount: 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. + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- - UnbondingDelegation stores all of a single delegator's - unbonding bonds + Deposit defines an amount deposited by an account address to + an active - for a single validator in an time-ordered list. + proposal. + description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object @@ -19008,9 +19048,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -19020,12 +19061,10 @@ paths: was set, its value is undefined otherwise description: >- - QueryUnbondingDelegatorDelegationsResponse is response type for - the - - Query/UnbondingDelegatorDelegations RPC method. + QueryDepositsResponse is the response type for the Query/Deposits + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19138,7 +19177,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19148,13 +19187,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -19176,7 +19218,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19214,11 +19255,12 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - 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 @@ -19265,366 +19307,308 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: + /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: get: - summary: |- - DelegatorValidators queries all validators info for given delegator - address. - operationId: StakingDelegatorValidators + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: GovV1Deposit responses: '200': description: A successful response. schema: type: object properties: - validators: + deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: >- + depositor defines the deposit addresses from the + proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. + 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: - operator_address: + type_url: 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 + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's - path must represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the - binary all types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available - in the official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty - scheme) might be + 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. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - Example 2: Pack and unpack a message in Java. + URL that describes the type of the serialized message. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. + Protobuf library provides support to pack/unpack Any values + in the form - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + of utility functions or additional generated methods of the + Any type. - 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 { - ... - } + Example 1: Pack and unpack a message in C++. - The pack methods provided by protobuf library will by - default use + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + Example 2: Pack and unpack a message in Java. - methods only use the fully qualified type name after the - last '/' + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + Example 3: Pack and unpack a message in Python. - name "y.z". + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - JSON + The pack methods provided by protobuf library will by + default use - ==== + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - The JSON representation of an `Any` value uses the - regular + methods only use the fully qualified type name after the + last '/' - representation of the deserialized, embedded message, - with an + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - additional field `@type` which contains the type URL. - Example: + name "y.z". - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a - custom JSON + JSON - representation, that representation will be embedded - adding a field - `value` which holds the custom JSON in addition to the - `@type` + The JSON representation of an `Any` value uses the regular - field. Example (for message - [google.protobuf.Duration][]): + representation of the deserialized, embedded message, with + an - { - "@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 + additional field `@type` which contains the type URL. + Example: - Validator's bond shares and their exchange rate to coins. - Slashing results in + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - a decrease in the exchange rate, allowing correct - calculation of future + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - undelegations without iterating over delegators. When coins - are delegated to + If the embedded message type is well-known and has a custom + JSON - this validator, the validator is credited with a delegation - whose number of + representation, that representation will be embedded adding + a field - bond shares is based on the amount of coins delegated - divided by the current + `value` which holds the custom JSON in addition to the + `@type` - exchange rate. Voting power can be calculated as total - bonded shares + field. Example (for message [google.protobuf.Duration][]): - multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. - pagination: - description: pagination defines the pagination in the response. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/tally: + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: GovV1TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. type: object properties: - next_key: + yes_count: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + description: yes_count is the number of yes votes on a proposal. + abstain_count: 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. + description: >- + abstain_count is the number of abstain votes on a + proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes on + a proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19737,7 +19721,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19747,13 +19731,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -19775,7 +19762,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19813,393 +19799,412 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. 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}: + /cosmos/gov/v1/proposals/{proposal_id}/votes: get: - summary: |- - DelegatorValidator queries validator info for given delegator validator - pair. - operationId: DelegatorValidator + summary: Votes queries votes of a given proposal. + operationId: GovV1Votes responses: '200': description: A successful response. schema: type: object properties: - validator: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: >- + weight is the vote weight associated with the vote + option. + description: >- + WeightedVoteOption defines a unit of vote for vote + split. + description: options is the weighted vote options. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. + description: votes defines the queried votes. + pagination: + description: pagination defines the pagination in the response. type: object properties: - operator_address: + next_key: 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 + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - protocol buffer message. This string must contain at - least + 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 - one "/" character. The last segment of the URL's path - must represent + protocol buffer message. This string must contain at + least - the fully qualified name of the type (as in + one "/" character. The last segment of the URL's path + must represent - `path/google.protobuf.Duration`). The name should be - in a canonical form + the fully qualified name of the type (as in - (e.g., leading "." is not accepted). + `path/google.protobuf.Duration`). The name should be in + a canonical form + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they - expect it to use in the context of Any. However, for - URLs which use the + In practice, teams usually precompile into the binary + all types that they - scheme `http`, `https`, or no scheme, one can - optionally set up a type + expect it to use in the context of Any. However, for + URLs which use the - server that maps type URLs to message definitions as - follows: + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * If no scheme is provided, `https` is assumed. - Note: this functionality is not currently available in - the official + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protobuf release, and it is not used for type URLs - beginning with + Note: this functionality is not currently available in + the official - type.googleapis.com. + protobuf release, and it is not used 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 + Schemes other than `http`, `https` (or the empty scheme) + might be - URL that describes the type of the serialized message. + 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. + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a - custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded - adding a field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + 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 + { + "@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. - Validator's bond shares and their exchange rate to coins. - Slashing results in + It is less efficient than using key. Only one of offset or key + should - a decrease in the exchange rate, allowing correct calculation - of future + 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. - undelegations without iterating over delegators. When coins - are delegated to + 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 - this validator, the validator is credited with a delegation - whose number of + a count of the total number of items available for pagination in + UIs. - bond shares is based on the amount of coins delegated divided - by the current + count_total is only respected when offset is used. It is ignored + when key - exchange rate. Voting power can be calculated as total bonded - shares + 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. - multiplied by exchange rate. - description: |- - QueryDelegatorValidatorResponse response type for the - Query/DelegatorValidator RPC method. + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: GovV1Vote + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: >- + weight is the vote weight associated with the vote + option. + description: >- + WeightedVoteOption defines a unit of vote for vote + split. + description: options is the weighted vote options. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. + description: >- + QueryVoteResponse is the response type for the Query/Vote RPC + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20312,7 +20317,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20322,13 +20327,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -20350,7 +20358,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20388,431 +20395,83 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. in: path required: true type: string - - name: validator_addr - description: validator_addr defines the validator address to query for. + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. in: path required: true type: string tags: - Query - /cosmos/staking/v1beta1/historical_info/{height}: + /cosmos/mint/v1beta1/annual_provisions: get: - summary: HistoricalInfo queries the historical info for given height. - operationId: HistoricalInfo + summary: AnnualProvisions current minting annual provisions value. + operationId: AnnualProvisions 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. + 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: >- - QueryHistoricalInfoResponse is response type for the - Query/HistoricalInfo RPC + QueryInflationResponse is the response type for the + Query/Inflation RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20830,189 +20489,15 @@ paths: 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: + /cosmos/mint/v1beta1/params: get: - summary: Parameters queries the staking parameters. - operationId: StakingParams + summary: Params returns the total set of minting parameters. + operationId: MintParams responses: '200': description: A successful response. @@ -21020,36 +20505,33 @@ paths: type: object properties: params: - description: params holds all the parameters of this module. + description: params defines the parameters of the module. type: object properties: - unbonding_time: + mint_denom: 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: + title: type of coin to mint + inflation_rate_change: type: string - description: bond_denom defines the bondable coin denomination. + 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 response type for the Query/Params RPC + QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21067,199 +20549,38 @@ paths: 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: + /cosmos/params/v1beta1/params: get: - summary: Pool queries the pool info. - operationId: Pool + 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: - pool: - description: pool defines the pool info. + param: + description: param defines the queried parameter. type: object properties: - not_bonded_tokens: + subspace: type: string - bonded_tokens: + key: type: string - description: QueryPoolResponse is response type for the Query/Pool RPC method. + value: + type: string + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21277,512 +20598,216 @@ paths: 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: 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/staking/v1beta1/validators: + /cosmos/params/v1beta1/subspaces: get: - summary: Validators queries all validators that match the given status. - operationId: Validators + summary: >- + Subspaces queries for all registered subspaces and all keys for a + subspace. + description: 'Since: cosmos-sdk 0.46' + operationId: Subspaces responses: '200': description: A successful response. schema: type: object properties: - validators: + subspaces: type: array items: type: object properties: - operator_address: + subspace: 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 + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys + that exist for - one "/" character. The last segment of the URL's - path must represent + the subspace. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + Since: cosmos-sdk 0.46 + description: >- + QuerySubspacesResponse defines the response types for querying for + all - (e.g., leading "." is not accepted). + registered subspaces and all keys for a subspace. - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used 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). + Since: cosmos-sdk 0.46 + 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 - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: + value: type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: + format: byte + 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 - 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: + 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: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: + 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: >- - 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 + Timestamp until which the validator is jailed due to + liveness downtime. + tombstoned: + type: boolean 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 + Whether or not a validator has been tombstoned (killed + out of validator set). It is set - bond shares is based on the amount of coins delegated - divided by the current + 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. - exchange rate. Voting power can be calculated as total - bonded shares + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their - multiplied by exchange rate. - description: validators contains all the queried validators. + liveness activity. + title: info is the signing info of all validators pagination: - description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -21791,11 +20816,23 @@ paths: 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: >- - QueryValidatorsResponse is response type for the Query/Validators - RPC method + QuerySigningInfosResponse is the response type for the + Query/SigningInfos RPC + + method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21813,32 +20850,303 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + 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. - protocol buffer message. This string must contain at - least + It is less efficient than using key. Only one of offset or key + should - one "/" character. The last segment of the URL's path - must represent + 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. - the fully qualified name of the type (as in + 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 - `path/google.protobuf.Duration`). The name should be in - a canonical form + a count of the total number of items available for pagination in + UIs. - (e.g., leading "." is not accepted). + 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. - In practice, teams usually precompile into the binary - all types that they - expect it to use in the context of Any. However, for - URLs which use the + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos/{cons_address}: + get: + summary: SigningInfo queries the signing info of given cons address + operationId: 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 - scheme `http`, `https`, or no scheme, one can optionally - set up a type + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to + liveness downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out + of validator set). It is set + + once the validator commits an equivocation or for any + other configured misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: >- + 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. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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: @@ -21908,7 +21216,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21918,13 +21226,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -21946,7 +21257,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21984,10 +21294,10 @@ paths: "value": "1.212s" } parameters: - - name: status - description: status enables to query for validators matching a given status. - in: query - required: false + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true type: string - name: pagination.key description: |- @@ -22035,440 +21345,296 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}: + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: - summary: Validator queries validator info for given validator address. - operationId: Validator + summary: Redelegations queries redelegations of given address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: Redelegations responses: '200': description: A successful response. schema: type: object properties: - validator: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of + the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation + source operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation + destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for + redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance + when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of + destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding + has been stopped by external modules + description: >- + RedelegationEntry defines a redelegation object + with relevant metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular + delegator's redelegating bonds + + from a particular source validator to a particular + destination validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for + redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance + when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of + destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding + has been stopped by external modules + description: >- + RedelegationEntry defines a redelegation object + with relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a + RedelegationEntry except that it + + contains a balance in addition to shares which is more + suitable for client + + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except + that its entries + + contain a balance in addition to shares which is more + suitable for client + + responses. + pagination: + description: pagination defines the pagination in the response. type: object properties: - operator_address: + next_key: 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 + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - protocol buffer message. This string must contain at - least + was set, its value is undefined otherwise + description: >- + QueryRedelegationsResponse is response type for the + Query/Redelegations RPC - one "/" character. The last segment of the URL's path - must represent + 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 - the fully qualified name of the type (as in + protocol buffer message. This string must contain at + least - `path/google.protobuf.Duration`). The name should be - in a canonical form + one "/" character. The last segment of the URL's path + must represent - (e.g., leading "." is not accepted). + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - In practice, teams usually precompile into the binary - all types that they + (e.g., leading "." is not accepted). - expect it to use in the context of Any. However, for - URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + In practice, teams usually precompile into the binary + all types that they - server that maps type URLs to message definitions as - follows: + expect it to use in the context of Any. However, for + URLs which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type - * If no scheme is provided, `https` is assumed. + server that maps type URLs to message definitions as + follows: - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in - the official + * If no scheme is provided, `https` is assumed. - protobuf release, and it is not used for type URLs - beginning with + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - type.googleapis.com. + Note: this functionality is not currently available in + the official + protobuf release, and it is not used for type URLs + beginning with - Schemes other than `http`, `https` (or the empty - scheme) might be + type.googleapis.com. - 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. + 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 - Protobuf library provides support to pack/unpack Any - values in the form + URL that describes the type of the serialized message. - of utility functions or additional generated methods of - the Any type. + Protobuf library provides support to pack/unpack Any values + in the form - Example 1: Pack and unpack a message in C++. + of utility functions or additional generated methods of the + Any type. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.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)) { + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... } @@ -22481,7 +21647,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22491,13 +21657,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -22519,7 +21688,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -22557,73 +21725,161 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string + - name: src_validator_addr + description: src_validator_addr defines the validator address to redelegate from. + in: query + required: false + type: string + - name: dst_validator_addr + description: dst_validator_addr defines the validator address to redelegate to. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: get: - summary: ValidatorDelegations queries delegate info for given validator. - operationId: ValidatorDelegations + summary: >- + DelegatorUnbondingDelegations queries all unbonding delegations of a + given + + delegator address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: DelegatorUnbondingDelegations responses: '200': description: A successful response. schema: type: object properties: - delegation_responses: + unbonding_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. + delegator_address: + type: string 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 + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + 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. + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time is the unix time for unbonding + completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: >- + balance defines the tokens to receive at + completion. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has + been stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. description: >- - DelegationResponse is equivalent to Delegation except that - it contains a + UnbondingDelegation stores all of a single delegator's + unbonding bonds - balance in addition to shares which is more suitable for - client responses. + for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object @@ -22631,9 +21887,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -22642,11 +21899,13 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - title: |- - QueryValidatorDelegationsResponse is response type for the - Query/ValidatorDelegations RPC method + description: >- + QueryUnbondingDelegatorDelegationsResponse is response type for + the + + Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22759,7 +22018,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22769,13 +22028,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -22797,7 +22059,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -22835,8 +22096,8 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string @@ -22886,346 +22147,391 @@ paths: 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. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: get: - summary: Delegation queries delegate info for given validator delegator pair. - operationId: Delegation + summary: |- + DelegatorValidators queries all validators info for given delegator + address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: StakingDelegatorValidators 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: + validators: type: array items: type: object properties: - type_url: + operator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of - the serialized + 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 + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's + path must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. 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 + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + 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 { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + 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": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. type: object properties: - creation_height: + moniker: type: string - format: int64 description: >- - creation_height is the height which the unbonding - took place. - completion_time: + moniker defines a human-readable name for the + validator. + identity: type: string - format: date-time description: >- - completion_time is the unix time for unbonding - completion. - initial_balance: + 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: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: + security_contact defines an optional email for + security contact. + details: type: string - description: balance defines the tokens to receive at completion. + description: details define other optional details. + unbonding_height: + type: string + format: int64 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 + 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. - for a single validator in an time-ordered list. - description: >- - QueryDelegationResponse is response type for the - Query/UnbondingDelegation - RPC method. + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator + description: >- + Validator defines a validator, together with the total + amount of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct + calculation of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated + divided by the current + + exchange rate. Voting power can be calculated as total + bonded shares + + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23338,7 +22644,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23348,13 +22654,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -23376,7 +22685,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23414,106 +22722,412 @@ paths: "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 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: get: - summary: >- - ValidatorUnbondingDelegations queries unbonding delegations of a - validator. - operationId: ValidatorUnbondingDelegations + summary: |- + DelegatorValidator queries validator info for given delegator validator + pair. + operationId: DelegatorValidator 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: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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 + 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: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding - took place. - completion_time: + rate: type: string - format: date-time description: >- - completion_time is the unix time for unbonding - completion. - initial_balance: + rate is the commission rate charged to delegators, + as a fraction. + max_rate: type: string description: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: type: string description: >- - balance defines the tokens to receive at - completion. + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time 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: + update_time is the last time the commission rate was + changed. + min_self_delegation: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: type: string - format: uint64 + format: int64 title: >- - total is total number of results available if - PageRequest.count_total + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator + description: >- + Validator defines a validator, together with the total amount + of the - was set, its value is undefined otherwise - description: >- - QueryValidatorUnbondingDelegationsResponse is response type for - the + Validator's bond shares and their exchange rate to coins. + Slashing results in - Query/ValidatorUnbondingDelegations RPC method. + 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 + description: An unexpected error response. schema: type: object properties: @@ -23626,7 +23240,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23636,13 +23250,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -23664,7 +23281,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23702,152 +23318,449 @@ paths: "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 - - 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 + /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: - gas_info: - description: gas_info is the information about gas used in the simulation. + hist: + description: hist defines the historical info at the given height. 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 + 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, - 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: + 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: - type: + operator_address: type: string - attributes: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will + by default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" + will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded + message, with an + + additional field `@type` which contains the type + URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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 + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature + (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height + at which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time + for the validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission + rates to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to + delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate + which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate + was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has + been stopped by external modules + unbonding_ids: type: array items: - type: 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. + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator description: >- - Event allows application developers to attach additional - information to + Validator defines a validator, together with the total + amount of the - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. + Validator's bond shares and their exchange rate to + coins. Slashing results in - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted - during message + a decrease in the exchange rate, allowing correct + calculation of future - or handler execution. - description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. + 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 + description: An unexpected error response. schema: type: object properties: @@ -23960,7 +23873,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23970,13 +23883,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -23998,7 +23914,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24036,24 +23951,60 @@ paths: "value": "1.212s" } parameters: - - name: body - in: body + - name: height + description: height defines at which height to query the historical info. + in: path required: true - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' + type: string + format: int64 tags: - - Service - /cosmos/tx/v1beta1/txs: + - Query + /cosmos/staking/v1beta1/params: get: - summary: GetTxsEvent fetches txs by event. - operationId: GetTxsEvent + summary: Parameters queries the staking parameters. + operationId: StakingParams responses: '200': description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding + delegation or redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: >- + historical_entries is the number of historical entries to + persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission + rate that a validator can charge their delegators + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24166,7 +24117,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24176,13 +24127,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -24204,7 +24158,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24241,375 +24194,29 @@ paths: "@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 + - Query + /cosmos/staking/v1beta1/pool: + get: + summary: Pool queries the pool info. + operationId: Pool responses: '200': description: A successful response. schema: type: object properties: - tx_response: + pool: + description: pool defines the pool info. 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: + not_bonded_tokens: 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: + bonded_tokens: 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. + description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24722,7 +24329,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24732,13 +24339,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -24760,7 +24370,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24797,270 +24406,379 @@ paths: "@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}: + - Query + /cosmos/staking/v1beta1/validators: get: - summary: GetTx fetches a tx by hash. - operationId: GetTx + summary: Validators queries all validators that match the given status. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: Validators 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: + validators: type: array items: type: object properties: - type_url: + operator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of - the serialized + 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 + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's + path must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. 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 + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + 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 { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + 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 + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for + the validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission + rates to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to + delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate + which validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. - method. + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator + description: >- + Validator defines a validator, together with the total + amount of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct + calculation of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated + divided by the current + + exchange rate. Voting power can be calculated as total + bonded shares + + multiplied by exchange rate. + description: validators contains all the queried validators. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryValidatorsResponse is response type for the Query/Validators + RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25173,7 +24891,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25183,13 +24901,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -25211,7 +24932,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25249,74 +24969,88 @@ paths: "value": "1.212s" } parameters: - - name: name - description: name is the name of the applied plan to query for. - in: path - required: true + - name: status + description: status enables to query for validators matching a given status. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /cosmos/upgrade/v1beta1/current_plan: + /cosmos/staking/v1beta1/validators/{validator_addr}: get: - summary: CurrentPlan queries the current upgrade plan. - operationId: CurrentPlan + summary: Validator queries validator info for given validator address. + operationId: Validator responses: '200': description: A successful response. schema: type: object properties: - plan: - description: plan is the current upgrade plan. + validator: 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: + operator_address: 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: + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: type_url: @@ -25416,7 +25150,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25426,13 +25160,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -25454,7 +25191,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25491,91 +25227,230 @@ paths: "@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 + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates + to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, + as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator + description: >- + Validator defines a validator, together with the total amount + of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct calculation + of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated divided + by the current + + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. + 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 @@ -25610,7 +25485,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25620,13 +25495,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -25648,7 +25526,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25685,41 +25562,103 @@ paths: "@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/upgrade/v1beta1/module_versions: + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: - summary: ModuleVersions queries the list of module versions from state. - operationId: ModuleVersions + summary: ValidatorDelegations queries delegate info for given validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: ValidatorDelegations responses: '200': description: A successful response. schema: type: object properties: - module_versions: + delegation_responses: 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 + 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 - RPC method. + owned by one delegator, and is associated with the + voting power of one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that + it contains a + + balance in addition to shares which is more suitable for + client responses. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25832,7 +25771,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25842,13 +25781,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -25870,7 +25812,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25908,40 +25849,132 @@ paths: "value": "1.212s" } parameters: - - name: module_name + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + - name: pagination.key 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. + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. in: query required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: 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 + summary: Delegation queries delegate info for given validator delegator pair. + operationId: Delegation 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 + 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 + description: An unexpected error response. schema: type: object properties: @@ -26054,7 +26087,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26064,13 +26097,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -26092,7 +26128,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26130,227 +26165,387 @@ paths: "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 + - 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 - format: int64 tags: - Query - /cosmos/authz/v1beta1/grants: + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: get: - summary: Returns list of `Authorization`, granted to the grantee by the granter. - operationId: Grants + summary: |- + UnbondingDelegation queries unbonding info for given validator delegator + pair. + operationId: UnbondingDelegation responses: '200': description: A successful response. schema: type: object properties: - grants: - type: array - items: - type: object - properties: - authorization: + 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: - type_url: + creation_height: type: string + format: int64 description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the + creation_height is the height which the unbonding + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time is the unix time for unbonding + completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds - scheme `http`, `https`, or no scheme, one can - optionally set up a type + for a single validator in an time-ordered list. + description: >- + QueryDelegationResponse is response type for the + Query/UnbondingDelegation - server that maps type URLs to message definitions as - follows: + 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 - * If no scheme is provided, `https` is assumed. + one "/" character. The last segment of the URL's path + must represent - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + the fully qualified name of the type (as in - Note: this functionality is not currently available - in the official + `path/google.protobuf.Duration`). The name should be in + a canonical form - protobuf release, and it is not used for type URLs - beginning with + (e.g., leading "." is not accepted). - type.googleapis.com. + In practice, teams usually precompile into the binary + all types that they - Schemes other than `http`, `https` (or the empty - scheme) might be + expect it to use in the context of Any. However, for + URLs which use the - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + 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. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any - values in the form + Protobuf library provides support to pack/unpack Any values + in the form - of utility functions or additional generated methods of - the Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + 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 { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the - regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, - with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a - custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded - adding a field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message - [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: + get: + summary: >- + ValidatorUnbondingDelegations queries unbonding delegations of a + validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: ValidatorUnbondingDelegations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: 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. + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time is the unix time for unbonding + completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: >- + balance defines the tokens to receive at + completion. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has + been stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds + + for a single validator in an time-ordered list. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -26360,10 +26555,12 @@ paths: was set, its value is undefined otherwise description: >- - QueryGrantsResponse is the response type for the - Query/Authorizations RPC method. + QueryValidatorUnbondingDelegationsResponse is response type for + the + + Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26476,7 +26673,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26486,13 +26683,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -26514,7 +26714,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26552,20 +26751,10 @@ paths: "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 + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true type: string - name: pagination.key description: |- @@ -26613,117 +26802,30 @@ paths: 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. + + + Since: cosmos-sdk 0.43 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 + /cosmos/tx/v1beta1/decode: + post: + summary: TxDecode decodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: TxDecode 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. + $ref: '#/definitions/cosmos.tx.v1beta1.TxDecodeResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26836,7 +26938,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26846,13 +26948,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -26874,7 +26979,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26912,144 +27016,46 @@ paths: "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 + - name: body + in: body required: true - type: string + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + + Since: cosmos-sdk 0.47 tags: - - Query - /cosmos/feegrant/v1beta1/allowances/{grantee}: - get: - summary: Allowances returns all the grants for address. - operationId: Allowances + - Service + /cosmos/tx/v1beta1/decode/amino: + post: + summary: TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + description: 'Since: cosmos-sdk 0.47' + operationId: TxDecodeAmino 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. - + amino_json: + type: string + description: >- + TxDecodeAminoResponse is the response type for the + Service.TxDecodeAmino - Schemes other than `http`, `https` (or the empty - scheme) might be + RPC method. - 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. + Since: cosmos-sdk 0.47 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27162,7 +27168,7 @@ paths: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27172,13 +27178,16 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -27200,7 +27209,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27238,6533 +27246,28465 @@ paths: "value": "1.212s" } parameters: - - name: grantee - in: path + - name: body + in: body 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. + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: >- + TxDecodeAminoRequest is the request type for the + Service.TxDecodeAmino - It is less efficient than using key. Only one of offset or key - should + RPC method. - 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 + Since: cosmos-sdk 0.47 + tags: + - Service + /cosmos/tx/v1beta1/encode: + post: + summary: TxEncode encodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: TxEncode + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. - a count of the total number of items available for pagination in - UIs. + Since: cosmos-sdk 0.47 + 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 - count_total is only respected when offset is used. It is ignored - when key + protocol buffer message. This string must contain at + least - 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 + one "/" character. The last segment of the URL's path + must represent - 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. + the fully qualified name of the type (as in - 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. + `path/google.protobuf.Duration`). The name should be in + a canonical form - 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 + (e.g., leading "." is not accepted). - 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 + In practice, teams usually precompile into the binary + all types that they - is set. - format: boolean - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. + expect it to use in the context of Any. However, for + URLs which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type - 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. + server that maps type URLs to message definitions as + follows: - 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 + * If no scheme is provided, `https` is assumed. - one "/" character. The last segment of the URL's path must represent + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - the fully qualified name of the type (as in + Note: this functionality is not currently available in + the official - `path/google.protobuf.Duration`). The name should be in a canonical - form + protobuf release, and it is not used for type URLs + beginning with - (e.g., leading "." is not accepted). + type.googleapis.com. - In practice, teams usually precompile into the binary all types that - they + Schemes other than `http`, `https` (or the empty scheme) + might be - expect it to use in the context of Any. However, for URLs which use - the + 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 - scheme `http`, `https`, or no scheme, one can optionally set up a type + URL that describes the type of the serialized message. - server that maps type URLs to message definitions as follows: + Protobuf library provides support to pack/unpack Any values + in the form - * If no scheme is provided, `https` is assumed. + of utility functions or additional generated methods of the + Any type. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the official + Example 1: Pack and unpack a message in C++. - protobuf release, and it is not used for type URLs beginning with + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - type.googleapis.com. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Schemes other than `http`, `https` (or the empty scheme) might be + Example 3: Pack and unpack a message in Python. - 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 + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - URL that describes the type of the serialized message. + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Protobuf library provides support to pack/unpack Any values in the form + The pack methods provided by protobuf library will by + default use - of utility functions or additional generated methods of the Any type. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + methods only use the fully qualified type name after the + last '/' - Example 1: Pack and unpack a message in C++. + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + name "y.z". - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. + JSON - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + The JSON representation of an `Any` value uses the regular - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + representation of the deserialized, embedded message, with + an - The pack methods provided by protobuf library will by default use + additional field `@type` which contains the type URL. + Example: - 'type.googleapis.com/full.type.name' as the type URL and the unpack + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - methods only use the fully qualified type name after the last '/' + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - in the type URL, for example "foo.bar.com/x/y.z" will yield type + If the embedded message type is well-known and has a custom + JSON - name "y.z". + representation, that representation will be embedded adding + a field + `value` which holds the custom JSON in addition to the + `@type` + field. Example (for message [google.protobuf.Duration][]): - JSON + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.TxEncodeRequest' + tags: + - Service + /cosmos/tx/v1beta1/encode/amino: + post: + summary: TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + description: 'Since: cosmos-sdk 0.47' + operationId: TxEncodeAmino + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: >- + TxEncodeAminoResponse is the response type for the + Service.TxEncodeAmino - ==== + RPC method. - The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + Since: cosmos-sdk 0.47 + 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 - additional field `@type` which contains the type URL. Example: + protocol buffer message. This string must contain at + least - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + one "/" character. The last segment of the URL's path + must represent - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + the fully qualified name of the type (as in - If the embedded message type is well-known and has a custom JSON + `path/google.protobuf.Duration`). The name should be in + a canonical form - representation, that representation will be embedded adding a field + (e.g., leading "." is not accepted). - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + In practice, teams usually precompile into the binary + all types that they - { - "@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 + expect it to use in the context of Any. However, for + URLs which use the - protocol buffer message. This string must contain at least + scheme `http`, `https`, or no scheme, one can optionally + set up a type - one "/" character. The last segment of the URL's path must - represent + server that maps type URLs to message definitions as + follows: - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + * If no scheme is provided, `https` is assumed. - (e.g., leading "." is not accepted). + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + Note: this functionality is not currently available in + the official - In practice, teams usually precompile into the binary all types - that they + protobuf release, and it is not used for type URLs + beginning with - expect it to use in the context of Any. However, for URLs which - use the + type.googleapis.com. - scheme `http`, `https`, or no scheme, one can optionally set up - a type - server that maps type URLs to message definitions as follows: + 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 - * If no scheme is provided, `https` is assumed. + URL that describes the type of the serialized message. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + Protobuf library provides support to pack/unpack Any values + in the form - protobuf release, and it is not used for type URLs beginning - with + of utility functions or additional generated methods of the + Any type. - type.googleapis.com. + Example 1: Pack and unpack a message in C++. - Schemes other than `http`, `https` (or the empty scheme) might - be + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - 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 + Example 2: Pack and unpack a message in Java. - URL that describes the type of the serialized message. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - Protobuf library provides support to pack/unpack Any values in the - form + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - of utility functions or additional generated methods of the Any - type. + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Example 1: Pack and unpack a message in C++. + The pack methods provided by protobuf library will by + default use - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 2: Pack and unpack a message in Java. + methods only use the fully qualified type name after the + last '/' - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Example 3: Pack and unpack a message in Python. + name "y.z". - foo = Foo(...) - any = Any() - any.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 { - ... - } + JSON - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + The JSON representation of an `Any` value uses the regular - methods only use the fully qualified type name after the last '/' + representation of the deserialized, embedded message, with + an - in the type URL, for example "foo.bar.com/x/y.z" will yield type + additional field `@type` which contains the type URL. + Example: - name "y.z". + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + If the embedded message type is well-known and has a custom + JSON - JSON + representation, that representation will be embedded adding + a field - ==== + `value` which holds the custom JSON in addition to the + `@type` - The JSON representation of an `Any` value uses the regular + field. Example (for message [google.protobuf.Duration][]): - representation of the deserialized, embedded message, with an + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + amino_json: + type: string + description: >- + TxEncodeAminoRequest is the request type for the + Service.TxEncodeAmino - additional field `@type` which contains the type URL. Example: + RPC method. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Since: cosmos-sdk 0.47 + tags: + - Service + /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 - If the embedded message type is well-known and has a custom JSON + length prefixed in order to separate data from multiple + message executions. - representation, that representation will be embedded adding a field + Deprecated. This field is still populated, but prefer + msg_response instead - `value` which holds the custom JSON in addition to the `@type` + because it also contains the Msg response typeURL. + log: + type: string + description: >- + Log contains the log information from message or handler + execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, + associated with an event. + description: >- + Event allows application developers to attach additional + information to - field. Example (for message [google.protobuf.Duration][]): + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. - { - "@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 + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted + during message - 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. + or handler execution. + msg_responses: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - 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.ResourceValue: - type: object - properties: - val: - type: string - format: byte - title: Unit stores cpu, memory and storage metrics - akash.base.v1beta3.Resources: - type: object - properties: - id: - type: integer - format: int64 - 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: + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + msg_responses contains the Msg handler responses type + packed in Anys. + + + Since: cosmos-sdk 0.46 + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + default: + description: An unexpected error response. + schema: type: object properties: - val: + error: 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: + code: + type: integer + format: int32 + message: 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: |- - Resources 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.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 + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - AllOf has precedence i.e. if there is at least one entry AnyOf is ignored - regardless to how many + protocol buffer message. This string must contain at + least - entries there + one "/" character. The last segment of the URL's path + must represent - 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: + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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 - 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: + collectionFormat: multi + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + - name: order_by + description: |2- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + in: query + required: false + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + - name: page + description: >- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + type: string + format: uint64 + - name: limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + tags: + - Service + post: + summary: BroadcastTx broadcast transaction. + operationId: 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, + associated with an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, + with + + additional metadata, emitted only by processing the + messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: |- + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x + onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + description: >- + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest + + RPC method. + tags: + - Service + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: GetBlockWithTxs + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + description: height is the height of the block to query. + in: path + required: true + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/tx/v1beta1/txs/{hash}: + get: + summary: GetTx fetches a tx by hash. + operationId: 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: name + description: name is the name of the applied plan to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/authority: + get: + summary: Returns the account with authority to conduct upgrades + description: 'Since: cosmos-sdk 0.46' + operationId: Authority + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + /cosmos/upgrade/v1beta1/current_plan: + get: + summary: CurrentPlan queries the current upgrade plan. + operationId: 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. + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + /cosmos/upgrade/v1beta1/module_versions: + get: + summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' + operationId: 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. + + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + + + Since: cosmos-sdk 0.43 + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: module_name + description: |- + module_name is a field to query a specific module + consensus version from state. Leaving this empty will + fetch the full list of module versions from state. + in: query + required: false + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: + get: + summary: >- + UpgradedConsensusState queries the consensus state that will serve + + as a trusted kernel for the next version of this chain. It will only be + + stored at the last height of this chain. + + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + operationId: UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + title: 'Since: cosmos-sdk 0.43' + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + time when the grant will expire and will be pruned. If + null, then the grant + + doesn't have a time expiration (other conditions in + `authorization` + + may apply to invalidate the grant) + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: >- + authorizations is a list of grants granted for grantee by + granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGrantsResponse is the response type for the + Query/Authorizations RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: query + required: false + type: string + - name: grantee + in: query + required: false + type: string + - name: msg_type_url + description: >- + Optional, msg_type_url, when set, will query only grants matching + given msg type. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/authz/v1beta1/grants/grantee/{grantee}: + get: + summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. + description: 'Since: cosmos-sdk 0.46' + operationId: GranteeGrants + responses: + '200': + description: A successful response. + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/authz/v1beta1/grants/granter/{granter}: + get: + summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. + description: 'Since: cosmos-sdk 0.46' + operationId: GranterGrants + responses: + '200': + description: A successful response. + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/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, periodic, allowed 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON 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, periodic, allowed 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesResponse is the response type for the + Query/Allowances RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/feegrant/v1beta1/issued/{granter}: + get: + summary: AllowancesByGranter returns all the grants given by an address + description: 'Since: cosmos-sdk 0.46' + operationId: AllowancesByGranter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic, periodic, allowed fee + allowance. + type: object + properties: + type_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 that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/balance/{owner}/{class_id}: + get: + summary: >- + Balance queries the number of NFTs of a given class owned by the owner, + same as balanceOf in ERC721 + operationId: NftBalance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + amount is the number of all NFTs of a given class owned by the + owner + title: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: owner + description: owner is the owner address of the nft + in: path + required: true + type: string + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/classes: + get: + summary: Classes queries all NFT classes + operationId: Classes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of + ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft + classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can + define schema for Class and NFT `Data` attributes. + Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + description: class defines the class of the nft type. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryClassesResponse is the response type for the Query/Classes + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/classes/{class_id}: + get: + summary: Class queries an NFT class based on its id + operationId: Class + responses: + '200': + description: A successful response. + schema: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + title: >- + QueryClassResponse is the response type for the Query/Class 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/nfts: + get: + summary: >- + NFTs queries all NFTs of a given class or owner,choose at least one of + the two, similar to tokenByIndex in + + ERC721Enumerable + operationId: NFTs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the + contract address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: NFT defines the NFT + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryNFTsResponse is the response type for the Query/NFTs RPC + methods + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: class_id + description: class_id associated with the nft. + in: query + required: false + type: string + - name: owner + description: owner is the owner address of the nft. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/nfts/{class_id}/{id}: + get: + summary: NFT queries an NFT based on its class and id. + operationId: NFT + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: owner is the owner address of the nft + title: QueryNFTResponse is the response type for the Query/NFT 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + - name: id + description: id is a unique identifier of the NFT + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/owner/{class_id}/{id}: + get: + summary: >- + Owner queries the owner of the NFT based on its class and id, same as + ownerOf in ERC721 + operationId: Owner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + owner: + type: string + title: owner is the owner address of the nft + title: >- + QueryOwnerResponse is the response type for the Query/Owner RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + - name: id + description: id is a unique identifier of the NFT + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/supply/{class_id}: + get: + summary: >- + Supply queries the number of NFTs from the given class, same as + totalSupply of ERC721. + operationId: Supply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: amount is the number of all NFTs from the given class + title: >- + QuerySupplyResponse is the response type for the Query/Supply RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/group_info/{group_id}: + get: + summary: GroupInfo queries group info based on group id. + operationId: GroupInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the GroupInfo of the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/group_members/{group_id}: + get: + summary: GroupMembers queries members of a group by group id. + operationId: GroupMembers + responses: + '200': + description: A successful response. + schema: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be + greater than 0. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + GroupMember represents the relationship between a group and + a member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGroupMembersResponse is the Query/GroupMembersResponse + response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_admin/{admin}: + get: + summary: GroupPoliciesByAdmin queries group policies by admin address. + operationId: GroupPoliciesByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info with provided + admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGroupPoliciesByAdminResponse is the + Query/GroupPoliciesByAdmin response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: admin + description: admin is the admin address of the group policy. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_group/{group_id}: + get: + summary: GroupPoliciesByGroup queries group policies by group id. + operationId: GroupPoliciesByGroup + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGroupPoliciesByGroupResponse is the + Query/GroupPoliciesByGroup response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: group_id + description: group_id is the unique ID of the group policy's group. + in: path + required: true + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policy_info/{address}: + get: + summary: >- + GroupPolicyInfo queries group policy info based on account address of + group policy. + operationId: GroupPolicyInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information + for a group policy. + description: >- + QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response + type. + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the account address of the group policy. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/groups_by_admin/{admin}: + get: + summary: GroupsByAdmin queries groups by admin address. + operationId: GroupsByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse + response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: admin + description: admin is the account address of a group's admin. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/groups_by_member/{address}: + get: + summary: GroupsByMember queries groups by member address. + operationId: GroupsByMember + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGroupsByMemberResponse is the Query/GroupsByMember response + type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the group member address. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/proposal/{proposal_id}: + get: + summary: Proposal queries a proposal based on proposal id. + operationId: GroupProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes + for this + + proposal for each vote option. It is empty at submission, + and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successful MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of `sdk.Msg`s that will be executed if + the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: QueryProposalResponse is the Query/Proposal response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals/{proposal_id}/tally: + get: + summary: >- + TallyResult returns the tally result of a proposal. If the proposal is + + still in voting period, then this query computes the current tally + state, + + which might not be final. On the other hand, if the proposal is final, + + then it simply returns the `final_tally_result` state stored in the + + proposal itself. + operationId: GroupTallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposal_id + description: proposal_id is the unique id of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals_by_group_policy/{address}: + get: + summary: >- + ProposalsByGroupPolicy queries proposals based on account address of + group policy. + operationId: ProposalsByGroupPolicy + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal + was submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at + proposal submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals + from previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted + votes for this + + proposal for each vote option. It is empty at + submission, and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successful MsgExec is called before (to execute + a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of `sdk.Msg`s that will be executed + if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can + submit a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryProposalsByGroupPolicyResponse is the + Query/ProposalByGroupPolicy response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: >- + address is the account address of the group policy related to + proposals. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}: + get: + summary: VoteByProposalVoter queries a vote by proposal id and voter. + operationId: VoteByProposalVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter + response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/votes_by_proposal/{proposal_id}: + get: + summary: VotesByProposal queries a vote by proposal id. + operationId: VotesByProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryVotesByProposalResponse is the Query/VotesByProposal response + type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/votes_by_voter/{voter}: + get: + summary: VotesByVoter queries a vote by voter. + operationId: VotesByVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query +definitions: + akash.audit.v1.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.v1.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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: QueryProvidersResponse is response type for the Query/Providers RPC method + akash.base.attributes.v1.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. + reverse: + type: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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.v1.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.v1.CertificateFilter: + type: object + properties: + owner: + type: string + serial: + type: string + 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 + title: CertificateFilter defines filters used to filter certificates + akash.cert.v1.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.v1.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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QueryCertificatesResponse is response type for the Query/Certificates RPC + method + akash.cert.v1.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.base.attributes.v1.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.attributes.v1.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.resources.v1beta4.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.resources.v1beta4.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.resources.v1beta4.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.resources.v1beta4.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.resources.v1beta4.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.resources.v1beta4.ResourceValue: + type: object + properties: + val: + type: string + format: byte + title: Unit stores cpu, memory and storage metrics + akash.base.resources.v1beta4.Resources: + type: object + properties: + id: + type: integer + format: int64 + 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: |- + Resources describes all available resources types for deployment/node etc + if field is nil resource is not present in the given data-structure + akash.base.resources.v1beta4.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.v1.Deployment: + type: object + properties: + 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: DeploymentState is an enum which refers to state of deployment + hash: + type: string + format: byte + created_at: + type: string + format: int64 + title: Deployment stores deploymentID, state and version details + akash.deployment.v1.DeploymentID: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + title: DeploymentID stores owner and sequence number + akash.deployment.v1.DeploymentState: + 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: DeploymentState is an enum which refers to state of deployment + akash.deployment.v1.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.v1beta4.DeploymentFilters: + type: object + properties: + owner: + type: string + dseq: + type: string + format: uint64 + 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: DeploymentState is an enum which refers to state of deployment + title: DeploymentFilters defines filters used to filter deployments + akash.deployment.v1beta4.Group: + type: object + properties: + 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: GroupState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with the + Price + title: Spec stores group specifications + created_at: + type: string + format: int64 + title: Group stores group id, state and specifications of group + akash.deployment.v1beta4.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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: ResourceUnit extends Resources and adds Count along with the Price + title: Spec stores group specifications + akash.deployment.v1beta4.GroupState: + 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: GroupState is an enum which refers to state of group + akash.deployment.v1beta4.QueryDeploymentResponse: + type: object + properties: + deployment: + type: object + properties: + 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: DeploymentState is an enum which refers to state of deployment + hash: + 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: + 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: GroupState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with + the Price + title: Spec 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.v1beta4.QueryDeploymentsResponse: + type: object + properties: + deployments: + type: array + items: + type: object + properties: + deployment: + type: object + properties: + 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: >- + DeploymentState is an enum which refers to state of + deployment + hash: + 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: + 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: GroupState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along + with the Price + title: Spec 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QueryDeploymentsResponse is response type for the Query/Deployments RPC + method + akash.deployment.v1beta4.QueryGroupResponse: + type: object + properties: + group: + type: object + properties: + 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: GroupState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with the + Price + title: Spec 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.v1beta4.ResourceUnit: + type: object + properties: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: ResourceUnit extends Resources and adds Count along with the Price + akash.escrow.v1.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.v1.AccountID: + type: object + properties: + scope: + type: string + xid: + type: string + title: AccountID is the account identifier + akash.escrow.v1.AccountState: + 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 + 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.v1.MsgDepositDeploymentResponse: + type: object + description: >- + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response + type. + akash.deployment.v1beta4.MsgCloseDeploymentResponse: + type: object + description: MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. + akash.deployment.v1beta4.MsgCloseGroupResponse: + type: object + description: MsgCloseGroupResponse defines the Msg/CloseGroup response type. + akash.deployment.v1beta4.MsgCreateDeploymentResponse: + type: object + description: >- + MsgCreateDeploymentResponse defines the Msg/CreateDeployment response + type. + akash.deployment.v1beta4.MsgPauseGroupResponse: + type: object + description: MsgPauseGroupResponse defines the Msg/PauseGroup response type. + akash.deployment.v1beta4.MsgStartGroupResponse: + type: object + description: MsgStartGroupResponse defines the Msg/StartGroup response type. + akash.deployment.v1beta4.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.v1.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.v1.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.v1.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 + enum: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid + description: >- + - bid_invalid: Prefix should start with 0 in enum. So declaring dummy + state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState is an enum which refers to state of bid + title: BidFilters defines flags for bid list filter + akash.market.v1.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.v1.BidState: + type: string + enum: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid + description: >- + - bid_invalid: Prefix should start with 0 in enum. So declaring dummy + state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState is an enum which refers to state of bid + akash.market.v1.Lease: + type: object + properties: + 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: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid + description: >- + - lease_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_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.v1.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 + enum: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid + description: >- + - lease_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + title: LeaseFilters defines flags for lease list filter + akash.market.v1.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.v1.LeaseState: + type: string + enum: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid + description: >- + - lease_invalid: Prefix should start with 0 in enum. So declaring dummy + state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_closed: LeaseClosed denotes state for lease closed + title: State is an enum which refers to state of lease + akash.market.v1.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 + enum: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid + description: >- + - order_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState is an enum which refers to state of order + title: OrderFilters defines flags for order list filter + akash.market.v1.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.v1.OrderState: + type: string + enum: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid + description: >- + - order_invalid: Prefix should start with 0 in enum. So declaring dummy + state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState is an enum which refers to state of order + akash.market.v1beta5.Bid: + type: object + properties: + 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: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid + description: >- + - bid_invalid: Prefix should start with 0 in enum. So declaring dummy + state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState 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 + resources_offer: + type: array + items: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: |- + ResourceOffer describes resources that provider is offering + for deployment + title: Bid stores BidID, state of bid and price + akash.market.v1beta5.Order: + type: object + properties: + 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: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid + description: >- + - order_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with the + Price + title: Spec stores group specifications + created_at: + type: string + format: int64 + title: Order stores orderID, state of order and other details + akash.market.v1beta5.QueryBidResponse: + type: object + properties: + bid: + type: object + properties: + 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: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid + description: >- + - bid_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState 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 + resources_offer: + type: array + items: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: |- + ResourceOffer describes resources that provider is offering + for deployment + 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.v1beta5.QueryBidsResponse: + type: object + properties: + bids: + type: array + items: + type: object + properties: + bid: + type: object + properties: + 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: + - bid_invalid + - bid_open + - bid_active + - bid_lost + - bid_closed + default: bid_invalid + description: >- + - bid_invalid: Prefix should start with 0 in enum. So + declaring dummy state + - bid_open: BidOpen denotes state for bid open + - bid_active: BidMatched denotes state for bid open + - bid_lost: BidLost denotes state for bid lost + - bid_closed: BidClosed denotes state for bid closed + title: BidState 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 + resources_offer: + type: array + items: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: >- + ResourceOffer describes resources that provider is + offering + + for deployment + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: QueryBidsResponse is response type for the Query/Bids RPC method + akash.market.v1beta5.QueryLeaseResponse: + type: object + properties: + lease: + type: object + properties: + 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: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid + description: >- + - lease_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_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.v1beta5.QueryLeasesResponse: + type: object + properties: + leases: + type: array + items: + type: object + properties: + lease: + type: object + properties: + 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: + - lease_invalid + - lease_active + - lease_insufficient_funds + - lease_closed + default: lease_invalid + description: >- + - lease_invalid: Prefix should start with 0 in enum. So + declaring dummy state + - lease_active: LeaseActive denotes state for lease active + - lease_insufficient_funds: LeaseInsufficientFunds denotes state for lease insufficient_funds + - lease_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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: QueryLeasesResponse is response type for the Query/Leases RPC method + akash.market.v1beta5.QueryOrderResponse: + type: object + properties: + order: + type: object + properties: + 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: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid + description: >- + - order_invalid: Prefix should start with 0 in enum. So declaring + dummy state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with the + Price + title: Spec 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.v1beta5.QueryOrdersResponse: + type: object + properties: + orders: + type: array + items: + type: object + properties: + 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: + - order_invalid + - order_open + - order_active + - order_closed + default: order_invalid + description: >- + - order_invalid: Prefix should start with 0 in enum. So + declaring dummy state + - order_open: OrderOpen denotes state for order open + - order_active: OrderMatched denotes state for order matched + - order_closed: OrderClosed denotes state for order lost + title: OrderState 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: + resource: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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: >- + ResourceUnit extends Resources and adds Count along with + the Price + title: Spec 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: QueryOrdersResponse is response type for the Query/Orders RPC method + akash.market.v1beta5.ResourceOffer: + type: object + properties: + resources: + type: object + properties: + id: + type: integer + format: int64 + 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: >- + Resources 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 + title: |- + ResourceOffer describes resources that provider is offering + for deployment + akash.market.v1beta5.MsgCloseBidResponse: + type: object + description: MsgCloseBidResponse defines the Msg/CloseBid response type. + akash.market.v1beta5.MsgCloseLeaseResponse: + type: object + description: MsgCloseLeaseResponse defines the Msg/CloseLease response type. + akash.market.v1beta5.MsgCreateBidResponse: + type: object + description: MsgCreateBidResponse defines the Msg/CreateBid response type. + akash.market.v1beta5.MsgCreateLeaseResponse: + type: object + title: MsgCreateLeaseResponse is the response from creating a lease + akash.market.v1beta5.MsgWithdrawLeaseResponse: + type: object + description: MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. + akash.provider.v1beta4.Info: + type: object + properties: + email: + type: string + website: + type: string + title: Info + akash.provider.v1beta4.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: Info + title: Provider stores owner and host details + akash.provider.v1beta4.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: Info + title: Provider stores owner and host details + title: QueryProviderResponse is response type for the Query/Provider RPC method + akash.provider.v1beta4.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: Info + title: Provider stores owner and host details + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: QueryProvidersResponse is response type for the Query/Providers RPC method + cosmos.auth.v1beta1.AddressBytesToStringResponse: + type: object + properties: + address_string: + type: string + description: >- + AddressBytesToStringResponse is the response type for AddressString rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.AddressStringToBytesResponse: + type: object + properties: + address_bytes: + type: string + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.BaseAccount: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: >- + BaseAccount defines a base account type. It contains all the necessary + fields + + for basic account functionality. Any custom account type should extend + this + + type for additional functionality (e.g. vesting). + cosmos.auth.v1beta1.Bech32PrefixResponse: + type: object + properties: + bech32_prefix: + type: string + description: |- + Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method + cosmos.auth.v1beta1.QueryAccountInfoResponse: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAccountsResponse is the response type for the Query/Accounts RPC + method. + + + Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + cosmos.auth.v1beta1.QueryModuleAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.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. + + Since: cosmos-sdk 0.46 + cosmos.bank.v1beta1.DenomUnit: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' + with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to + verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis + object. + + Storage, lookup, and manipulation of this information is now in the + keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of + genesis files. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + 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 = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used + to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + 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. + + + Since: cosmos-sdk 0.46 + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC + query. + + + Since: cosmos-sdk 0.46 + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used + to verify that + + the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis + object. + + Storage, lookup, and manipulation of this information is now in + the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards + compatibility of genesis files. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySendEnabledResponse: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QuerySendEnabledResponse defines the RPC response of a SendEnable query. + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse: + type: object + properties: + balance: + 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: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure + for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.QuerySpendableBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + 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. + + Since: cosmos-sdk 0.43 + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + cosmos.base.tendermint.v1beta1.ABCIQueryResponse: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. + The data could + + be arbitrary format, providing necessary data for example + neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined + in Tendermint. + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + height: + type: string + format: int64 + codespace: + type: string + description: >- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC + query. + + + Note: This type is a duplicate of the ResponseQuery proto type defined in + + Tendermint. + cosmos.base.tendermint.v1beta1.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + 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 + description: >- + proposer_address is the original block proposer address, formatted + as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it + to a Bech32 string + + for better UX. + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: type: object properties: - group_id: + block_id: type: object properties: - owner: - type: string - dseq: + hash: 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: + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: - name: - type: string - requirements: + 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: - signed_by: - title: >- - SignedBy list of keys that tenants expect to have signatures - from + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: 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: + hash: + 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: - key: + block_id_flag: type: string - value: + 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 - 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: - resource: + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: - id: - type: integer - format: int64 - cpu: + duplicate_vote_evidence: type: object properties: - units: + vote_a: type: object properties: - val: + 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 - 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: + 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: - val: + 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 - 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: + 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: - key: - type: string - value: + 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 - 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: + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: type: array items: type: object properties: - key: + address: type: string - value: + 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 - 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: >- - Resources 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: + 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: - denom: + block_id_flag: type: string - amount: + 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 - 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: >- - ResourceUnit extends Resources and adds Count along with the - Price - 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: + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock + RPC method. + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: - owner: - type: string - dseq: + block_height: 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: + validators: type: array items: type: object properties: - resource: + address: + type: string + pub_key: type: object properties: - id: - type: integer - format: int64 - 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: >- - Resources describes all available resources types for - deployment/node etc + 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)) { + ... + } - 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. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - NOTE: The amount field is an Dec which implements the custom - method + Example 3: Pack and unpack a message in Python. - signatures required by gogoproto. - title: ResourceUnit extends Resources and adds Count along with the Price - title: GroupSpec stores group specifications - akash.deployment.v1beta3.QueryDeploymentResponse: + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: type: object properties: - deployment: + default_node_info: type: object properties: - deployment_id: + protocol_version: type: object properties: - owner: + p2p: type: string - dseq: + format: uint64 + block: type: string format: uint64 - title: DeploymentID stores owner and sequence number - state: + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: 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 + channels: + type: string format: byte - created_at: + moniker: type: string - format: int64 - title: Deployment stores deploymentID, state and version details - groups: + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC + method. + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing RPC + method. + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: type: array items: type: object properties: - group_id: + address: + type: string + pub_key: type: object properties: - owner: + type_url: type: string - dseq: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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: 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 + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. 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: - resource: - type: object - properties: - id: - type: integer - format: int64 - 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: >- - Resources describes all available resources types for - deployment/node etc + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 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. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - NOTE: The amount field is an Dec which implements the - custom method + Example 4: Pack and unpack a message in Go - signatures required by gogoproto. - title: >- - ResourceUnit extends Resources and adds Count along with - the Price - title: GroupSpec stores group specifications - created_at: + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 - title: Group stores group id, state and specifications of group - escrow_account: + 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: - 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 + next_key: type: string - enum: - - invalid - - open - - closed - - overdrawn - default: invalid + format: byte 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 + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - signatures required by gogoproto. - title: total coins spent by this account - settled_at: + was set, its value is undefined otherwise + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: type: string - format: int64 - title: block height at which this account was last settled - depositor: + format: uint64 + app: type: string - description: >- - bech32 encoded account address of the depositor. + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, - If depositor is same as the owner, then any incoming coins are - added to the Balance. + including all blockchain data structures and the rules of the + application's - If depositor isn't same as the owner, then any incoming coins are - added to the Funds. - funds: + 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: - denom: - type: string - amount: + total: + type: integer + format: int64 + hash: 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: - resource: - type: object - properties: - id: - type: integer - format: int64 - 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: >- - Resources describes all available resources - types for deployment/node etc + 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 + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. - 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. + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + for better UX. + description: Header defines the structure of a Tendermint block header. + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.ProofOp: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The data + could - NOTE: The amount field is an Dec which - implements the custom method + be arbitrary format, providing necessary data for example neighbouring + node - signatures required by gogoproto. - title: >- - ResourceUnit extends Resources and adds Count along - with the Price - 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. + hash. - NOTE: The amount field is an Dec which implements the custom - method + Note: This type is a duplicate of the ProofOp proto type defined in + Tendermint. + cosmos.base.tendermint.v1beta1.ProofOps: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The + data could - 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. + be arbitrary format, providing necessary data for example + neighbouring node + hash. - 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. + Note: This type is a duplicate of the ProofOp proto type defined in + Tendermint. + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. - 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: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + cosmos.base.tendermint.v1beta1.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_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 - NOTE: The amount field is an Dec which implements the custom - method + one "/" character. The last segment of the URL's path must + represent - signatures required by gogoproto. - title: Account stores state for an escrow account - title: >- - QueryDeploymentResponse is response type for the Query/Deployment - RPC method - pagination: + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Tendermint Validators + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: type: object properties: - next_key: + p2p: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: uint64 + block: 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: + 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: - group: + 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: - group_id: + version: + title: basic block info type: object properties: - owner: + block: type: string - dseq: + format: uint64 + app: type: string format: uint64 - gseq: - type: integer - format: int64 - title: >- - GroupID stores owner, deployment sequence number and group - sequence number - state: + 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 - enum: - - invalid - - open - - paused - - insufficient_funds - - closed - default: invalid + 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: >- - - 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: + 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: - key: + type: type: string - value: + 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 - 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: - resource: + 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: - id: - type: integer + 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 - cpu: + round: + type: integer + format: int32 + block_id: type: object properties: - units: + hash: + type: string + format: byte + part_set_header: type: object properties: - val: + total: + type: integer + format: int64 + hash: 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: + 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: - quantity: + header: type: object properties: - val: + 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: Unit stores cpu, memory and storage metrics - attributes: + 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: - key: + address: type: string - value: + 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 - 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: + format: int64 + proposer_priority: type: string - format: byte - title: Unit stores cpu, memory and storage metrics - attributes: - type: array - items: + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - key: + ed25519: type: string - value: + format: byte + secp256k1: 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: + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: 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: + 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: - kind: + ed25519: 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 + format: byte + secp256k1: + type: string + format: byte title: >- - Endpoint describes a publicly accessible IP - service - title: >- - Resources 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 + 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 - 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: >- - ResourceUnit extends Resources and adds Count along with the - Price - 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.ResourceUnit: - type: object - properties: - resource: + 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: - id: - type: integer + height: + type: string format: int64 - 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: + round: + type: integer + format: int32 + block_id: type: object properties: - units: + hash: + type: string + format: byte + part_set_header: type: object properties: - val: + total: + type: integer + format: int64 + hash: 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: + title: PartsetHeader + title: BlockID + signatures: type: array items: type: object properties: - kind: + block_id_flag: 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: >- - Resources 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: ResourceUnit extends Resources and adds Count along with the Price - 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 + - 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: >- - - 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: + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.BlockID: type: object properties: - owner: - type: string - dseq: - type: string - format: uint64 - gseq: - type: integer - format: int64 - oseq: - type: integer - format: int64 - provider: + hash: 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: + format: byte + part_set_header: type: object properties: - owner: - type: string - dseq: - type: string - format: uint64 - gseq: - type: integer - format: int64 - oseq: + total: 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: + hash: 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: + format: byte + title: PartsetHeader + title: BlockID + tendermint.types.BlockIDFlag: 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: + - 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: - owner: - type: string - dseq: + height: type: string - format: uint64 - gseq: - type: integer format: int64 - oseq: + round: type: integer - format: int64 - provider: - type: string - state: - type: string - title: LeaseFilters defines flags for lease list filter - akash.market.v1beta3.LeaseID: + 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: - owner: + block_id_flag: type: string - dseq: + 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: uint64 - gseq: - type: integer - format: int64 - oseq: - type: integer - format: int64 - provider: + format: byte + timestamp: type: string - title: LeaseID stores bid details of lease - akash.market.v1beta3.Order: + 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: - order_id: + vote_a: type: object properties: - owner: + type: type: string - dseq: + 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: uint64 - gseq: - type: integer format: int64 - oseq: + round: type: integer - format: int64 - title: OrderID stores owner and all other seq numbers - state: - type: string - enum: - - invalid - - open - - active - - closed - default: invalid + 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: >- - - 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: + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + vote_b: type: object properties: - name: + type: type: string - requirements: + 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: - signed_by: - title: >- - SignedBy list of keys that tenants expect to have signatures - from + hash: + type: string + format: byte + part_set_header: 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: - resource: - type: object - properties: - id: - type: integer - format: int64 - 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: >- - Resources 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 + 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 - signatures required by gogoproto. - title: >- - ResourceUnit extends Resources and adds Count along with the - Price - title: GroupSpec stores group specifications - created_at: + consensus. + total_voting_power: 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: + validator_power: 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: + timestamp: 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: + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + tendermint.types.Evidence: type: object properties: - bid: + duplicate_vote_evidence: type: object properties: - bid_id: + vote_a: type: object properties: - owner: + type: type: string - dseq: + 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: uint64 - gseq: - type: integer format: int64 - oseq: + round: type: integer - format: int64 - provider: + 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 - 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: + format: date-time + validator_address: type: string - amount: + format: byte + validator_index: + type: integer + format: int32 + signature: type: string + format: byte description: >- - DecCoin defines a token with a denomination and a decimal amount. - - - NOTE: The amount field is an Dec which implements the custom - method + Vote represents a prevote, precommit, or commit vote from + validators for - 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 + consensus. + vote_b: type: object properties: - scope: - type: string - xid: + type: 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: + 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 - amount: + 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 - 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: + format: date-time + validator_address: type: string - amount: + format: byte + validator_index: + type: integer + format: int32 + signature: type: string + format: byte description: >- - DecCoin defines a token with a denomination and a decimal amount. - - - NOTE: The amount field is an Dec which implements the custom - method + Vote represents a prevote, precommit, or commit vote from + validators for - signatures required by gogoproto. - title: total coins spent by this account - settled_at: + consensus. + total_voting_power: type: string format: int64 - title: block height at which this account was last settled - depositor: + validator_power: 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: + 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: - 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. - + 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, - NOTE: The amount field is an Dec which implements the custom - method + including all blockchain data structures and the rules + of the application's - signatures required by gogoproto. - title: unspent coins received from the owner's wallet - transferred: + 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: - denom: + ed25519: type: string - amount: + format: byte + secp256k1: 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: + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: type: string format: int64 - title: block height at which this account was last settled - depositor: + proposer_priority: 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: + format: int64 + total_voting_power: 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: + timestamp: 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: + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.EvidenceList: type: object properties: - leases: + evidence: type: array items: type: object properties: - lease: + duplicate_vote_evidence: type: object properties: - lease_id: + vote_a: type: object properties: - owner: + type: type: string - dseq: + 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: uint64 - gseq: - type: integer format: int64 - oseq: + round: 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: + 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 - 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: + format: date-time + validator_address: type: string - amount: + format: byte + validator_index: + type: integer + format: int32 + signature: type: string + format: byte description: >- - DecCoin defines a token with a denomination and a decimal - amount. - - - NOTE: The amount field is an Dec which implements the custom - method + Vote represents a prevote, precommit, or commit vote from + validators for - signatures required by gogoproto. - balance: + consensus. + vote_b: type: object properties: - denom: - type: string - amount: + type: 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 + 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. - signatures required by gogoproto. - withdrawn: - type: object - properties: - denom: - type: string - amount: + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: 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: + 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: - resource: + signed_header: type: object properties: - id: - type: integer - format: int64 - cpu: + header: type: object properties: - units: + version: + title: basic block info type: object properties: - val: + 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 - 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: + 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: - quantity: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - val: + hash: type: string format: byte - title: Unit stores cpu, memory and storage metrics - attributes: + 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: - key: + block_id_flag: type: string - value: + 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 - title: Attribute represents key value pair - title: >- - Memory stores resource quantity and memory - attributes - storage: + 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: - name: + address: type: string - quantity: + format: byte + pub_key: type: object properties: - val: + ed25519: 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: + 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: - units: + address: + type: string + format: byte + pub_key: type: object properties: - val: + ed25519: 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: >- - Resources 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: + 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 - description: >- - DecCoin defines a token with a denomination and a - decimal amount. - + 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, - NOTE: The amount field is an Dec which implements the - custom method + including all blockchain data structures and the rules of the + application's - signatures required by gogoproto. - title: >- - ResourceUnit extends Resources and adds Count along with the - Price - title: GroupSpec stores group specifications - created_at: + 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: 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: + 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: - orders: - type: array - items: - type: object - properties: - order_id: + 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: - owner: + address: type: string - dseq: + 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: 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: + proposer_priority: 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: + 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: - key: - type: string - value: + total: + type: integer + format: int64 + hash: type: string - title: Attribute represents key value pair - title: >- - Attribute list of attributes tenant expects from the - provider - title: PlacementRequirements - resources: - type: array - items: + 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: - resource: + hash: + type: string + format: byte + part_set_header: type: object properties: - id: + total: type: integer format: int64 - 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: >- - Resources 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: + hash: 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: >- - ResourceUnit extends Resources and adds Count along with - the Price - 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: + 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 - attributes: + format: int64 + byzantine_validators: type: array items: type: object properties: - key: + address: type: string - value: + 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 - 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: + 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: - email: - type: string - website: + total: + type: integer + format: int64 + hash: type: string - title: ProviderInfo - akash.provider.v1beta3.QueryProviderResponse: + format: byte + title: PartsetHeader + tendermint.types.SignedHeader: type: object properties: - provider: + header: type: object properties: - owner: + 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 - host_uri: + height: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - title: Attribute represents key value pair - info: + format: int64 + time: + type: string + format: date-time + last_block_id: type: object properties: - email: - type: string - website: + hash: 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: + format: byte + part_set_header: type: object properties: - key: - type: string - value: + total: + type: integer + format: int64 + hash: 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: + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + title: hashes of block data + data_hash: 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: + format: byte + validators_hash: type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: + format: byte + title: hashes from the app output from the prev block + next_validators_hash: type: string - log: + format: byte + consensus_hash: 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: + format: byte + app_hash: type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: + format: byte + last_results_hash: type: string - log: + format: byte + evidence_hash: 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: + 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: - 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: + height: type: string - signature: + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - signature: + hash: type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: + format: byte + part_set_header: type: object properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: + total: + type: integer + format: int64 + hash: 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: + format: byte + title: PartsetHeader + title: BlockID + signatures: type: array items: type: object properties: - key: + block_id_flag: type: string - value: + 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 - 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: + format: byte + timestamp: type: string + format: date-time 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: + 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: - msg: - type: array - items: - type: string - fee: + address: + type: string + format: byte + pub_key: type: object properties: - gas: + ed25519: type: string - amount: - type: array - items: + 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: - denom: + ed25519: type: string - example: stake - amount: + format: byte + secp256k1: type: string - example: '50' - memo: - type: string - signature: + 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: - signature: + address: type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + format: byte pub_key: type: object properties: - type: + ed25519: type: string - example: tendermint/PubKeySecp256k1 - value: + format: byte + secp256k1: type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: type: string - example: '0' - sequence: + format: int64 + proposer_priority: type: string - example: '0' - BlockID: - type: object - properties: - hash: + format: int64 + total_voting_power: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - BlockHeader: + format: int64 + tendermint.types.Vote: type: object properties: - chain_id: + type: type: string - example: cosmoshub-2 + 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: number - example: 1 - time: type: string - example: '2017-12-30T05:53:09.287+01:00' - num_txs: - type: number - example: 0 - last_block_id: + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: hash: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: + format: byte + part_set_header: type: object properties: total: - type: number - example: 0 + type: integer + format: int64 hash: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - total_txs: - type: number - example: 35 - last_commit_hash: + format: byte + title: PartsetHeader + title: BlockID + timestamp: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - data_hash: + format: date-time + validator_address: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - validators_hash: + format: byte + validator_index: + type: integer + format: int32 + signature: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - next_validators_hash: + format: byte + description: |- + Vote represents a prevote, precommit, or commit vote from validators for + consensus. + tendermint.version.Consensus: + type: object + properties: + block: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - consensus_hash: + format: uint64 + app: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - app_hash: + 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 - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - last_results_hash: + 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 - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - evidence_hash: + base_proposer_reward: type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - proposer_address: + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. + bonus_proposer_reward: type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - version: - type: object - properties: - block: - type: string - example: 10 - app: - type: string - example: 0 - Block: + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + description: Params defines the set of params for the distribution module. + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: type: object properties: - 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: + 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: - total: - type: number - example: 0 - hash: + denom: 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: + 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: string - evidence: + 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 - 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: + 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: - block_meta: + params: + description: params defines the parameters of the module. 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: + community_tax: + type: string + base_proposer_reward: + type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is + no longer used + + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commission the validator received. type: object properties: - 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: + commission: 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: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse: type: object properties: - validator_address: + operator_address: type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + commission: type: array items: type: object properties: denom: type: string - example: stake amount: type: string - example: '50' - DelegatorTotalRewards: + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: type: object properties: rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) + rewards + + for a validator inexpensive to track, allows simple sanity checks. + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: type: array items: type: object properties: - validator_address: + validator_period: 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: + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + description: slashes defines the slashes the validator received. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: + type: object + properties: + commission: type: array items: type: object properties: denom: type: string - example: stake amount: type: string - example: '50' - BaseReq: + 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: - 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: + rewards: 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: + 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: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: + validator_period: type: string - example: '1000' - proposer_priority: + format: uint64 + fraction: type: string - example: '1000' - TextProposal: + 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: - proposal_id: - type: integer - title: - type: string - description: - type: string - proposal_type: - type: string - proposal_status: - type: string - final_tally_result: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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: - 'yes': + next_key: type: string - example: '0.0000000000' - abstain: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - example: '0.0000000000' - 'no': + 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 - example: '0.0000000000' - no_with_veto: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 - example: '0.0000000000' - submit_time: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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 - total_deposit: + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: type: array items: type: object properties: denom: type: string - example: stake amount: type: string - example: '50' - voting_start_time: - type: string - Proposer: - type: object - properties: - proposal_id: - type: string - proposer: - type: string - Deposit: + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + cosmos.gov.v1beta1.DepositParams: type: object properties: - amount: + min_deposit: 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: + 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 - example: '0.0000000000' - Vote: + 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: - 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: + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: type: object properties: - moniker: - type: string - identity: - type: string - website: - type: string - security_contact: + type_url: type: string - details: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 - bond_height: - type: string - example: '0' - bond_intra_tx_counter: - type: integer - example: 0 - unbonding_height: - type: string - example: '0' - unbonding_time: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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: + description: status defines the proposal status. type: string - example: '1970-01-01T00:00:00Z' - commission: + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. type: object properties: - rate: - type: string - example: '0' - max_rate: - type: string - example: '0' - max_change_rate: + 'yes': type: string - example: '0' - update_time: + description: yes is the number of yes votes on a proposal. + abstain: 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: + description: abstain is the number of abstain votes on a proposal. + 'no': type: string - example: stake - amount: + description: no is the number of no votes on a proposal. + no_with_veto: 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: + description: no_with_veto is the number of no with veto votes on a proposal. + submit_time: type: string - ValidatorDistInfo: - type: object - properties: - operator_address: + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: 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: + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: 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: + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: type: string - missed_blocks_counter: + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: type: string - ParamChange: + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: type: object properties: - subspace: - type: string - example: staking - key: - type: string - example: MaxValidators - subkey: - type: string - example: '' - value: + deposit: type: object - Supply: + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1beta1.QueryDepositsResponse: type: object properties: - total: + deposits: type: array items: type: object properties: - denom: + proposal_id: type: string - example: stake - amount: + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: type: string - example: '50' - cosmos.auth.v1beta1.Params: + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: >- + Deposit defines an amount deposited by an account address to an + active + + proposal. + description: deposits defines the requested deposits. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + cosmos.gov.v1beta1.QueryParamsResponse: type: object properties: - 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: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: >- + Minimum percentage of total stake needed to vote for a result to + be + + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + format: byte + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + + vetoed. Default value: 1/3. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.gov.v1beta1.QueryProposalResponse: type: object properties: - account: + proposal: type: object properties: - type_url: + proposal_id: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + format: uint64 + description: proposal_id defines the unique id of the proposal. + 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 + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be + Schemes other than `http`, `https` (or the empty scheme) might + be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - Must be a valid serialized protocol buffer of the above specified + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - URL that describes the type of the serialized message. + Example 1: Pack and unpack a message in C++. - Protobuf library provides support to pack/unpack Any values in the - form + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - of utility functions or additional generated methods of the Any type. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 1: Pack and unpack a message in C++. + Example 3: Pack and unpack a message in Python. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 2: Pack and unpack a message in Java. + Example 4: Pack and unpack a message in Go - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Example 3: Pack and unpack a message in Python. + The pack methods provided by protobuf library will by default use - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 4: Pack and unpack a message in Go + methods only use the fully qualified type name after the last '/' - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - The pack methods provided by protobuf library will by default use + name "y.z". - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + JSON - name "y.z". + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - JSON + additional field `@type` which contains the type URL. Example: - ==== + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The JSON representation of an `Any` value uses the regular + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - representation of the deserialized, embedded message, with an + If the embedded message type is well-known and has a custom JSON - additional field `@type` which contains the type URL. Example: + representation, that representation will be embedded adding a + field - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + `value` which holds the custom JSON in addition to the `@type` - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + field. Example (for message [google.protobuf.Duration][]): - If the embedded message type is well-known and has a custom JSON + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. When - representation, that representation will be embedded adding a field + querying a proposal via gRPC, this field is not populated until + the - `value` which holds the custom JSON in addition to the `@type` + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. description: >- - QueryAccountResponse is the response type for the Query/Account RPC + QueryProposalResponse is the response type for the Query/Proposal RPC method. - cosmos.auth.v1beta1.QueryAccountsResponse: + cosmos.gov.v1beta1.QueryProposalsResponse: type: object properties: - accounts: + proposals: type: array items: type: object properties: - type_url: + proposal_id: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + format: uint64 + description: proposal_id defines the unique id of the proposal. + 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 + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set up - a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. 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); - } + `Any` contains an arbitrary serialized protocol buffer message + along with a - Example 3: Pack and unpack a message in Python. + URL that describes the type of the serialized message. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Protobuf library provides support to pack/unpack Any values in + the form - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + of utility functions or additional generated methods of the Any + type. - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + Example 1: Pack and unpack a message in C++. - methods only use the fully qualified type name after the last '/' + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - in the type URL, for example "foo.bar.com/x/y.z" will yield type + Example 2: Pack and unpack a message in Java. - name "y.z". + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - JSON + Example 4: Pack and unpack a message in Go - ==== + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The JSON representation of an `Any` value uses the regular + The pack methods provided by protobuf library will by default + use - representation of the deserialized, embedded message, with an + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - additional field `@type` which contains the type URL. Example: + methods only use the fully qualified type name after the last + '/' - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + name "y.z". - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + JSON - 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 + The JSON representation of an `Any` value uses the regular - 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. + representation of the deserialized, embedded message, with an - 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 + additional field `@type` which contains the type URL. Example: - raise the base_denom to in order to equal the given DenomUnit's denom + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - 1 denom = 1^exponent base_denom + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' - with + If the embedded message type is well-known and has a custom JSON - 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 + representation, that representation will be embedded adding a + field - raise the base_denom to in order to equal the given DenomUnit's - denom + `value` which holds the custom JSON in addition to the `@type` - 1 denom = 1^exponent base_denom + field. Example (for message [google.protobuf.Duration][]): - (e.g. with a base_denom of uatom, one can create a DenomUnit of - 'atom' with + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. + When - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: type: array items: - type: 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 + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - 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 + NOTE: The amount field is an Int which implements the custom + method - 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: + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: type: string - amount: + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: 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. + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -33772,9 +55712,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -33783,248 +55724,157 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the Query/AllBalances - RPC - + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC method. - cosmos.bank.v1beta1.QueryBalanceResponse: + cosmos.gov.v1beta1.QueryTallyResultResponse: type: object properties: - balance: + tally: + description: tally defines the requested tally. type: object properties: - denom: + 'yes': type: string - amount: + description: yes is the number of yes votes on a proposal. + abstain: 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: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. description: >- - QueryBalanceResponse is the response type for the Query/Balance RPC + QueryTallyResultResponse is the response type for the Query/Tally RPC method. - cosmos.bank.v1beta1.QueryDenomMetadataResponse: + cosmos.gov.v1beta1.QueryVoteResponse: type: object properties: - metadata: + vote: 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: + proposal_id: type: string - description: >- - URI to a document (on or off-chain) that contains additional - information. Optional. - uri_hash: + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: type: string + description: voter is the voter address of the proposal. + option: description: >- - URIHash is a sha256 hash of a document pointed by URI. It's used - to verify that + Deprecated: Prefer to use `options` instead. This field is set in + queries - 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 + if and only if `len(options) == 1` and that option has weight 1. + In all - 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: + 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: - denom: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string - amount: + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: type: string - description: >- - 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 + description: weight is the vote weight associated with the vote option. + description: |- + WeightedVoteOption defines a unit of vote for vote split. - 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 + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. - was set, its value is undefined otherwise - description: >- - QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC - query. - cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + Since: cosmos-sdk 0.43 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + cosmos.gov.v1beta1.QueryVotesResponse: type: object properties: - metadatas: + votes: 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: + proposal_id: type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: - ATOM). This can - - be the same as the display. - uri: + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: type: string + description: voter is the voter address of the proposal. + option: description: >- - URI to a document (on or off-chain) that contains additional - information. Optional. - uri_hash: + 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 - description: >- - URIHash is a sha256 hash of a document pointed by URI. It's used - to verify that + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: |- + WeightedVoteOption defines a unit of vote for vote split. - the document didn't change. Optional. + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the registered - tokens. + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -34032,9 +55882,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -34043,61 +55894,161 @@ definitions: 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: + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + cosmos.gov.v1beta1.TallyParams: type: object properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + cosmos.gov.v1beta1.TallyResult: + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. In + all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: |- + WeightedVoteOption defines a unit of vote for vote split. - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - cosmos.bank.v1beta1.QuerySupplyOfResponse: + 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: - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + voting_period: + type: string + description: Duration of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: |- + WeightedVoteOption defines a unit of vote for vote split. - 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: + Since: cosmos-sdk 0.43 + cosmos.gov.v1.Deposit: type: object properties: - supply: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: type: array items: type: object @@ -34111,1342 +56062,1707 @@ definitions: 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 + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + cosmos.gov.v1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - was set, its value is undefined otherwise - title: >- - QueryTotalSupplyResponse is the response type for the Query/TotalSupply - RPC + 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 - method - cosmos.bank.v1beta1.SendEnabled: + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1.Params: type: object properties: - denom: + 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 - enabled: - type: boolean - format: boolean + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + voting_period: + type: string + description: Duration of the voting period. + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must + be paid at proposal submission. description: |- - SendEnabled maps coin denom to a send_enabled status (whether a denom is - sendable). - cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + Params defines the parameters for the x/gov module. + + Since: cosmos-sdk 0.47 + cosmos.gov.v1.Proposal: 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, + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - including all blockchain data structures and the rules of the - application's + protocol buffer message. This string must contain at least - 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. + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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)) { + ... + } - NOTE: not all txs here are valid. We're just agreeing on the - order first. + Example 2: Pack and unpack a message in Java. - 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. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - - 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 + Example 3: Pack and unpack a message in Python. - 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. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - - 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 + Example 4: Pack and unpack a message in Go - 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, + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - including all blockchain data structures - and the rules of the application's + The pack methods provided by protobuf library will by default use - 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.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1.QueryDepositResponse: + type: object + properties: + deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: type: object properties: - hash: + denom: 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. + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: >- + Deposit defines an amount deposited by an account address to an + active + + proposal. + description: deposits defines the requested deposits. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + cosmos.gov.v1.QueryParamsResponse: type: object properties: - block_id: + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. type: object properties: - hash: + voting_period: 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: + description: Duration of the voting period. + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. type: object properties: - 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, + 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. - 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: + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: >- + Minimum percentage of total stake needed to vote for a result to + be + + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + + vetoed. Default value: 1/3. + params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + voting_period: + type: string + description: Duration of the voting period. + quorum: + type: string + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that + must be paid at proposal submission. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.gov.v1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + type_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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: type: string - format: byte - last_results_hash: + description: yes_count is the number of yes votes on a proposal. + abstain_count: type: string - format: byte - evidence_hash: + description: abstain_count is the number of abstain votes on a proposal. + no_count: type: string - format: byte - title: consensus info - proposer_address: + description: no_count is the number of no votes on a proposal. + no_with_veto_count: 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. + no_with_veto_count is the number of no with veto votes on a + proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - NOTE: 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. + NOTE: The amount field is an Int which implements the custom + method - - 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 + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: Proposal defines the core field members of a governance proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal RPC + method. + cosmos.gov.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - 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. + protocol buffer message. This string must contain at least - - 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 + one "/" character. The last segment of the URL's path must + represent - 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, + the fully qualified name of the type (as in - including all blockchain data structures - and the rules of the application's + `path/google.protobuf.Duration`). The name should be in a + canonical form - 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: + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the + proposal passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. + When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: type: object properties: - hash: + denom: 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. + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string description: >- - Commit contains the evidence that a block was committed by a set - of validators. + no_with_veto_count is the number of no with veto votes on a + proposal. description: >- - GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. - cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1.QueryVoteResponse: type: object properties: - block_height: - type: string - format: int64 - validators: + vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + cosmos.gov.v1.QueryVotesResponse: + type: object + properties: + votes: type: array items: type: object properties: - address: + proposal_id: 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). - + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - In practice, teams usually precompile into the binary all - types that they + was set, its value is undefined otherwise + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + cosmos.gov.v1.TallyParams: + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + cosmos.gov.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given governance + proposal. - expect it to use in the context of Any. However, for URLs - which use the + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1.WeightedVoteOption: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + cosmos.mint.v1beta1.Params: + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: Params defines the parameters for the x/mint module. + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + cosmos.mint.v1beta1.QueryInflationResponse: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + cosmos.mint.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.params.v1beta1.ParamChange: + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: |- + ParamChange defines an individual parameter change, for use in + ParameterChangeProposal. + cosmos.params.v1beta1.QueryParamsResponse: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.params.v1beta1.QuerySubspacesResponse: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys that + exist for - scheme `http`, `https`, or no scheme, one can optionally set - up a type + the subspace. - server that maps type URLs to message definitions as - follows: + Since: cosmos-sdk 0.46 + description: |- + QuerySubspacesResponse defines the response types for querying for all + registered subspaces and all keys for a subspace. - * If no scheme is provided, `https` is assumed. + Since: cosmos-sdk 0.46 + cosmos.params.v1beta1.Subspace: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: |- + Subspace defines a parameter subspace name and all the keys that exist for + the subspace. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Since: cosmos-sdk 0.46 + 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 - Note: this functionality is not currently available in the - official + in a block and may have signed a precommit or not. This in + conjunction with the - protobuf release, and it is not used for type URLs beginning - with + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set - type.googleapis.com. + 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 - Schemes other than `http`, `https` (or the empty scheme) - might be + 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 - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + 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: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.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` + Index which is incremented each time the validator was a bonded - field. Example (for message [google.protobuf.Duration][]): + in a block and may have signed a precommit or not. This in + conjunction with the - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: type: string - format: int64 - proposer_priority: + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other + configured misbehiavor. + missed_blocks_counter: type: string format: int64 - description: Validator is the type for the validator-set. + 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: - description: pagination defines an pagination for the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -35455,106 +57771,291 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC + + method + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in conjunction + with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other configured + misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + 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: - default_node_info: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. 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: + rate: type: string - listen_addr: + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: type: string - network: + 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 - channels: + height: type: string - format: byte - moniker: + format: int64 + time: type: string - other: + format: date-time + last_block_id: + title: prev block info type: object properties: - tx_index: - type: string - rpc_address: + hash: type: string - application_version: - type: object - properties: - name: + 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 - app_name: + format: byte + title: hashes of block data + data_hash: type: string - version: + format: byte + validators_hash: type: string - git_commit: + format: byte + title: hashes from the app output from the prev block + next_validators_hash: type: string - build_tags: + format: byte + consensus_hash: type: string - go_version: + format: byte + app_hash: 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: + format: byte + last_results_hash: 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: + 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: - address: + operator_address: type: string - pub_key: + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: type_url: @@ -35653,7 +58154,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -35663,13 +58164,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -35690,7 +58194,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -35723,1115 +58226,1084 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - voting_power: + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). type: string - format: int64 - proposer_priority: + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: 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: + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: type: string - title: module path - version: + 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 - title: module version - sum: + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: 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: + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the - including all blockchain data structures and the rules of the - application's + Validator's bond shares and their exchange rate to coins. Slashing + results in - 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. + a decrease in the exchange rate, allowing correct calculation of + future - NOTE: not all txs here are valid. We're just agreeing on the - order first. + undelegations without iterating over delegators. When coins are + delegated to - 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. + this validator, the validator is credited with a delegation whose + number of - - 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 + bond shares is based on the amount of coins delegated divided by the + current - 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. + exchange rate. Voting power can be calculated as total bonded shares - - 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 + multiplied by exchange rate. + description: >- + HistoricalInfo contains header and validator information for a given + block. - 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, + It is stored as part of staking module's state, which persists the `n` + most - including all blockchain data structures and - the rules of the application's + recent HistoricalInfo - 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: + (`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. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a + validator can charge their delegators + description: Params defines the parameters for the x/staking module. + cosmos.staking.v1beta1.Pool: + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: |- + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + cosmos.staking.v1beta1.QueryDelegationResponse: + type: object + properties: + delegation_response: type: object properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: + delegation: type: object properties: - hash: + delegator_address: 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: + 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: - block_id_flag: + delegator_address: 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 + description: >- + delegator_address is the bech32-encoded address of the + delegator. validator_address: type: string - format: byte - timestamp: + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: type: string - format: date-time - signature: + 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 - 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: + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a + + balance in addition to shares which is more suitable for client + responses. + description: delegation_responses defines all the delegations' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: type: object properties: - hash: - type: string - format: byte - part_set_header: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds + + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. type: object properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. total: - type: integer + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 + 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 - hash: + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: 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: + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: 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: + validators: type: array items: type: object properties: - block_id_flag: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 + 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: - - 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: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: type: string - format: byte - timestamp: + 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 - signature: + 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 - 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. + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. - 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: + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: type: string - format: 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 + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the - consensus. - vote_b: + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. type: object properties: - 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: + next_key: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - 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: + 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: - duplicate_vote_evidence: + hist: + description: hist defines the historical info at the given height. type: object properties: - vote_a: + header: 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. + 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, - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string height: type: string format: int64 - round: - type: integer - format: int32 - block_id: + time: + type: string + format: date-time + last_block_id: + title: prev block info type: object properties: hash: @@ -36847,1839 +59319,2178 @@ definitions: type: string format: byte title: PartsetHeader - title: BlockID - timestamp: + last_commit_hash: type: string - format: date-time - validator_address: + format: byte + title: hashes of block data + data_hash: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + validators_hash: type: string format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: - type: object - properties: - type: + title: hashes from the app output from the prev block + next_validators_hash: 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: + format: byte + consensus_hash: 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: + format: byte + app_hash: type: string - format: date-time - validator_address: + format: byte + last_results_hash: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + evidence_hash: 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: + 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: - address: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the 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 + 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 - 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: + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: type: string - format: int64 - proposer_priority: + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: 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: + 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: - type: + moniker: 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: + description: moniker defines a human-readable name for the validator. + identity: 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: + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: type: string - format: date-time - validator_address: + description: website defines an optional website link. + security_contact: type: string - format: byte - validator_index: - type: integer - format: int32 - signature: + description: >- + security_contact defines an optional email for security + contact. + details: type: string - format: byte + description: details define other optional details. + unbonding_height: + type: string + format: int64 description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: + 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: - 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 + commission_rates: 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: + commission_rates defines the initial commission rates to + be used for creating a validator. type: object properties: - hash: + rate: 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: + 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 - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string description: >- - Vote represents a prevote, precommit, or commit vote from - validators for + min_self_delegation is the validator's self declared minimum + self delegation. - consensus. - total_voting_power: - type: string - format: int64 - validator_power: + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: type: string format: int64 - timestamp: - type: string - format: date-time + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding + of this validator description: >- - 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, + Validator defines a validator, together with the total amount of + the - including all blockchain data structures and the - rules of the application's + Validator's bond shares and their exchange rate to coins. + Slashing results in - 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: + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated divided by + the current + + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. + description: >- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo + RPC + + method. + cosmos.staking.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that + a validator can charge their delegators + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.staking.v1beta1.QueryPoolResponse: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: QueryPoolResponse is response type for the Query/Pool RPC method. + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: type: string - format: int64 - byzantine_validators: + 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: - address: + creation_height: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + description: entries are the redelegation entries. + 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 - proposer_priority: + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: type: string format: int64 - total_voting_power: + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it + + contains a balance in addition to shares which is more + suitable for client + + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries + + contain a balance in addition to shares which is more suitable for + client + + responses. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryRedelegationsResponse is response type for the Query/Redelegations + RPC + + method. + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + type: object + properties: + unbond: + 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 - timestamp: + description: >- + creation_height is the height which the unbonding took + place. + completion_time: type: string format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - tendermint.types.Header: + 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: - version: - title: basic block info + 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: - block: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + cosmos.staking.v1beta1.QueryValidatorResponse: + type: object + properties: + validator: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 + 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 - format: uint64 - app: + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: type: string - format: uint64 + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, + Validator defines a validator, together with the total amount of the - including all blockchain data structures and the rules of the - application's + Validator's bond shares and their exchange rate to coins. Slashing + results in - 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: + 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: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info + 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: - block: + creation_height: type: string - format: uint64 - app: + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: type: string format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's + 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 - 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: + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. type: object properties: - validators: - type: array - items: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + cosmos.staking.v1beta1.QueryValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 + 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: - address: + moniker: type: string - format: byte - pub_key: + 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: - ed25519: + rate: type: string - format: byte - secp256k1: + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: + 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: 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: + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + + + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: type: string - format: int64 - total_voting_power: - type: string - format: int64 - tendermint.types.LightClientAttackEvidence: - type: object - properties: - conflicting_block: + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators contains all the queried validators. + pagination: + description: pagination defines the pagination in the response. type: object properties: - 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 + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - 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: + 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 - format: int64 - byzantine_validators: + 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: - 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: + creation_height: type: string format: int64 - proposer_priority: + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: type: string format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.PartSetHeader: + 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: - total: - type: integer + creation_height: + type: string format: int64 - hash: + description: creation_height defines the height which the redelegation took place. + completion_time: 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: + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: type: string - format: byte - consensus_hash: + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: type: string - format: byte - app_hash: + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: type: string - format: byte - last_results_hash: + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: type: string - format: byte - evidence_hash: + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + unbonding_id: type: string - format: byte - title: consensus info - proposer_address: + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that + it + + contains a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.RedelegationResponse: + type: object + properties: + redelegation: type: object properties: - height: + delegator_address: 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: + 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: - 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: + creation_height: type: string - format: byte - timestamp: + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: type: string format: date-time - signature: + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. 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. + Redelegation contains the list of a particular delegator's + redelegating bonds - - 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: + from a particular source validator to a particular destination + validator. + entries: type: array items: type: object properties: - address: - type: string - format: byte - pub_key: + redelegation_entry: type: object properties: - ed25519: + creation_height: type: string - format: byte - secp256k1: + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it + + contains a balance in addition to shares which is more suitable for + client + + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries + + contain a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: type: string format: int64 - proposer_priority: + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: type: string format: int64 - proposer: + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + cosmos.staking.v1beta1.UnbondingDelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + cosmos.staking.v1beta1.Validator: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: type: object properties: - address: + 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 - 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: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the 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 + 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 - format: int64 - proposer_priority: + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: type: string - format: int64 - total_voting_power: + 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 - 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: + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + 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: - hash: - type: string - format: byte - part_set_header: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used + for creating a validator. type: object properties: - total: - type: integer - format: int64 - hash: + rate: 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: + 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 - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. - including all blockchain data structures and the rules of the - application's - state transition machine. - cosmos.distribution.v1beta1.DelegationDelegatorReward: - type: object - properties: - validator_address: + Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: type: string - reward: + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: type: array items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the - 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. + Validator's bond shares and their exchange rate to coins. Slashing results + in - 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 + a decrease in the exchange rate, allowing correct calculation of future - 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. + undelegations without iterating over delegators. When coins are delegated + to - 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: + 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: - rewards: + msg_index: + type: integer + format: int64 + log: + type: string + events: type: array items: type: object properties: - validator_address: + type: type: string - reward: + attributes: type: array items: type: object properties: - denom: + key: type: string - amount: + value: 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 + Attribute defines an attribute wrapper where the key and value + are - 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 + strings instead of raw bytes. 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: + 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: - withdraw_address: + key: + type: string + value: 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: + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + cosmos.base.abci.v1beta1.GasInfo: 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: + 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: - 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. - + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler execution. It MUST + be - NOTE: The amount field is an Dec which implements the custom - method + length prefixed in order to separate data from multiple message + executions. - signatures required by gogoproto. - description: >- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) - rewards + Deprecated. This field is still populated, but prefer msg_response + instead - 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: + because it also contains the Msg response typeURL. + log: + type: string + description: Log contains the log information from message or handler execution. + events: type: array items: type: object properties: - validator_period: - type: string - format: uint64 - fraction: + type: 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 + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated with an + event. + description: >- + Event allows application developers to attach additional information + to - 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. + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - 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. + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted during + message - 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: + or handler execution. + msg_responses: type: array items: type: object @@ -38777,7 +61588,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38787,13 +61598,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -38811,7 +61625,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38837,40 +61650,121 @@ definitions: `value` which holds the 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 + field. Example (for message [google.protobuf.Duration][]): - was set, its value is undefined otherwise - description: >- - QueryAllEvidenceResponse is the response type for the Query/AllEvidence - RPC + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + msg_responses contains the Msg handler responses type packed in Anys. - method. - cosmos.evidence.v1beta1.QueryEvidenceResponse: + Since: cosmos-sdk 0.46 + description: Result is the union of ResponseFormat and ResponseCheckTx. + cosmos.base.abci.v1beta1.StringEvent: type: object properties: - evidence: + 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: @@ -38963,7 +61857,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38973,13 +61867,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -38997,7 +61894,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -39029,267 +61925,605 @@ definitions: "@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: + timestamp: type: string - amount: + description: >- + Time of the previous block. For heights > 1, it's the weighted median + of + + the timestamps of the valid votes in the block.LastCommit. For height + == 1, + + it's genesis time. + events: type: array items: type: object properties: - denom: - type: string - amount: + type: type: string - description: |- - Coin defines a token with a denomination and an amount. + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated with an + event. + description: >- + Event allows application developers to attach additional information + to - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages and + those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and metadata. + The + + tags are stringified and the log is JSON decoded. + cosmos.crypto.multisig.v1beta1.CompactBitArray: + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte description: |- - Deposit defines an amount deposited by an account address to an active - proposal. - cosmos.gov.v1beta1.DepositParams: + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + cosmos.tx.signing.v1beta1.SignMode: + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. It also allows + for adding Tips in transactions. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.AuthInfo: type: object properties: - min_deposit: + signer_infos: type: array items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' + description: >- + signer_infos defines the signing modes for the required signers. The + number - 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 + 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: >- - 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: + Fee is the fee and gas limit for the transaction. The first signer is + the + + primary signer and the one which pays the fee. The fee can be + calculated + + based on the cost of evaluating the body and doing signature + verification + + of the signers. This can be estimated via simulation. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + title: amount is the amount of coins to be paid as a fee + gas_limit: + type: string + format: uint64 + title: >- + gas_limit is the maximum gas that can be used in transaction + processing + + before an out of gas error occurs + payer: + type: string + description: >- + if unset, the first signer is responsible for paying the fees. If + set, the specified account must pay the fees. + + the payer must be a tx signer (and thus have signed this field in + AuthInfo). + + setting this field does *not* change the ordering of required + signers for the transaction. + granter: + type: string + title: >- + if set, the fee payer (either the first signer or the value of the + payer field) requests that a fee grant be used + + to pay fees instead of the fee payer's own balance. If an + appropriate fee grant does not exist or the chain does + + not support fee grants, this will fail + tip: + description: >- + Tip is the optional tip used for transactions fees paid in another + denom. + + + This field is ignored if the chain didn't enable tips, i.e. didn't add + the + + `TipDecorator` in its posthandler. + + + Since: cosmos-sdk 0.46 + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + title: amount is the amount of the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + cosmos.tx.v1beta1.BroadcastMode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + cosmos.tx.v1beta1.BroadcastTxRequest: type: object properties: - proposal_id: + tx_bytes: type: string - format: uint64 - content: + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast + RPC method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + cosmos.tx.v1beta1.BroadcastTxResponse: + type: object + properties: + tx_response: type: object properties: - type_url: + 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: >- - A URL/resource name that uniquely identifies the type of the - serialized + 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 + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official - (e.g., leading "." is not accepted). + protobuf release, and it is not used for type URLs beginning + with + type.googleapis.com. - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + Schemes other than `http`, `https` (or the empty scheme) might + be - scheme `http`, `https`, or no scheme, one can optionally set up a - type + 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 - server that maps type URLs to message definitions as follows: + URL that describes the type of the serialized message. - * If no scheme is provided, `https` is assumed. + Protobuf library provides support to pack/unpack Any values in the + form - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + of utility functions or additional generated methods of the Any + type. - Note: this functionality is not currently available in the - official - protobuf release, and it is not used for type URLs beginning with + Example 1: Pack and unpack a message in C++. - type.googleapis.com. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - Schemes other than `http`, `https` (or the empty scheme) might be + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 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 + Example 3: Pack and unpack a message in Python. - URL that describes the type of the serialized message. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - Protobuf library provides support to pack/unpack Any values in the - form + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - of utility functions or additional generated methods of the Any type. + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 1: Pack and unpack a message in C++. + methods only use the fully qualified type name after the last '/' - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - Example 2: Pack and unpack a message in Java. + name "y.z". - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + JSON - 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 JSON representation of an `Any` value uses the regular - The pack methods provided by protobuf library will by default use + representation of the deserialized, embedded message, with an - 'type.googleapis.com/full.type.name' as the type URL and the unpack + additional field `@type` which contains the type URL. Example: - methods only use the fully qualified type name after the last '/' + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - in the type URL, for example "foo.bar.com/x/y.z" will yield type + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - name "y.z". + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a + field + `value` which holds the custom JSON in addition to the `@type` - JSON + 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 JSON representation of an `Any` value uses the regular + the timestamps of the valid votes in the block.LastCommit. For + height == 1, - representation of the deserialized, embedded message, with an + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to - additional field `@type` which contains the type URL. Example: + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + these events include those emitted by processing all the messages + and those - If the embedded message type is well-known and has a custom JSON + emitted from the ante. Whereas Logs contains the events, with - representation, that representation will be embedded adding a field + additional metadata, emitted only by processing the messages. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The - { - "@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: + 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 @@ -39303,116 +62537,607 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - voting_start_time: + title: amount is the amount of coins to be paid as a fee + gas_limit: type: string - format: date-time - voting_end_time: + 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 - 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. + description: >- + if unset, the first signer is responsible for paying the fees. If set, + the specified account must pay the fees. - - 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: + the payer must be a tx signer (and thus have signed this field in + AuthInfo). + + setting this field does *not* change the ordering of required signers + for the transaction. + granter: + type: string + title: >- + if set, the fee payer (either the first signer or the value of the + payer field) requests that a fee grant be used + + to pay fees instead of the fee payer's own balance. If an appropriate + fee grant does not exist or the chain does + + not support fee grants, this will fail + description: >- + Fee includes the amount of coins paid in fees and the maximum + + gas to be used by the transaction. The ratio yields an effective + "gasprice", + + which must be above some miminum to be accepted into the mempool. + cosmos.tx.v1beta1.GetBlockWithTxsResponse: type: object properties: - deposit: + txs: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + block_id: type: object properties: - proposal_id: - type: string - format: uint64 - depositor: + hash: type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: + 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 - description: >- - Coin defines a token with a denomination and an amount. + 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 - NOTE: The amount field is an Int which implements the custom - method + 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, - 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: + 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: - denom: - type: string - amount: + hash: 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. + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. pagination: - description: pagination defines the pagination in the response. + description: pagination defines a pagination for the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -39422,81 +63147,102 @@ definitions: was set, its value is undefined otherwise description: >- - QueryDepositsResponse is the response type for the Query/Deposits RPC - method. - cosmos.gov.v1beta1.QueryParamsResponse: + GetBlockWithTxsResponse is the response type for the + Service.GetBlockWithTxs method. + + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.GetTxResponse: type: object properties: - voting_params: - description: voting_params defines the parameters related to voting. + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + tx_response: type: object properties: - voting_period: + height: type: string - description: Length of the voting period. - deposit_params: - description: deposit_params defines the parameters related to deposit. - type: object - properties: - min_deposit: + 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: - denom: - type: string - amount: + msg_index: + type: integer + format: int64 + log: type: string - description: >- - Coin defines a token with a denomination and an amount. + 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 - NOTE: The amount field is an Int which implements the custom - method + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some - 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: + 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 - format: uint64 - content: + 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: @@ -39593,7 +63339,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -39603,13 +63349,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -39628,7 +63377,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -39661,87 +63409,159 @@ definitions: "@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: + timestamp: type: string - format: date-time - total_deposit: + description: >- + Time of the previous block. For heights > 1, it's the weighted + median of + + the timestamps of the valid votes in the block.LastCommit. For + height == 1, + + it's genesis time. + events: type: array items: type: object properties: - denom: - type: string - amount: + type: type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated with + an event. description: >- - Coin defines a token with a denomination and an amount. + Event allows application developers to attach additional + information to + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - NOTE: The amount field is an Int which implements the custom - method + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, - 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: + these events include those emitted by processing all the messages + and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: GetTxResponse is the response type for the Service.GetTx method. + cosmos.tx.v1beta1.GetTxsEventResponse: type: object properties: - proposals: + 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: - proposal_id: + height: type: string - format: uint64 - content: + 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: @@ -39840,7 +63660,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -39850,13 +63670,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -39877,7 +63700,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -39910,935 +63732,779 @@ definitions: "@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: + timestamp: type: string - option: description: >- - Deprecated: Prefer to use `options` instead. This field is set - in queries + Time of the previous block. For heights > 1, it's the weighted + median of - if and only if `len(options) == 1` and that option has weight 1. - In all + the timestamps of the valid votes in the block.LastCommit. For + height == 1, - 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: + it's genesis time. + events: 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: 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 + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated + with an event. + description: >- + Event allows application developers to attach additional + information to - 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. + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - - 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. + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, - - 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. + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: tx_responses is the list of queried TxResponses. + pagination: + description: |- + pagination defines a pagination for the response. + Deprecated post v0.46.x: use total instead. type: object properties: - 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: + next_key: type: string - title: goal of percent bonded atoms - blocks_per_year: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string format: uint64 - title: 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: + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + total: type: string + format: uint64 + title: total is total number of results available description: |- - ParamChange defines an individual parameter change, for use in - ParameterChangeProposal. - cosmos.params.v1beta1.QueryParamsResponse: + GetTxsEventResponse is the response type for the Service.TxsByEvents + RPC method. + cosmos.tx.v1beta1.ModeInfo: type: object properties: - param: - description: param defines the queried parameter. + single: + title: single represents a single signer type: object properties: - subspace: - type: string - key: - type: string - value: + mode: + title: mode is the signing mode of the single signer 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: + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security + guarantees. + + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all + known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary + representation + + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode + does not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum + variant, + + but is not implemented on the SDK by default. To enable EIP-191, + you need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 + multi: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + description: ModeInfo describes the signing mode of a single or nested multisig signer. + cosmos.tx.v1beta1.ModeInfo.Multi: type: object properties: - params: + bitarray: + title: bitarray specifies which keys within the multisig are signing type: object properties: - signed_blocks_window: - type: string + extra_bits_stored: + type: integer 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: + elems: 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: + 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: - val_signing_info: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security guarantees. + + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary + representation + + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does + not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + + but is not implemented on the SDK by default. To enable EIP-191, you + need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 + title: |- + Single is the mode info for a single signer. It is structured as a message + to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + future + cosmos.tx.v1beta1.OrderBy: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + description: >- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting + order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + title: OrderBy defines the sorting order + cosmos.tx.v1beta1.SignerInfo: + type: object + properties: + public_key: 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_url: type: string - format: int64 description: >- - Index which is incremented each time the validator was a bonded + A URL/resource name that uniquely identifies the type of the + serialized - in a block and may have signed a precommit or not. This in - conjunction with the + protocol buffer message. This string must contain at least - `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 + one "/" character. The last segment of the URL's path must + represent - 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. + the fully qualified name of the type (as in - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + `path/google.protobuf.Duration`). The name should be in a + canonical form - 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 + (e.g., leading "." is not accepted). - 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 + In practice, teams usually precompile into the binary all types + that they - `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 + expect it to use in the context of Any. However, for URLs which + use the - 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. + scheme `http`, `https`, or no scheme, one can optionally set up a + type - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + server that maps type URLs to message definitions as follows: - liveness activity. - title: info is the signing info of all validators - pagination: - type: object - properties: - next_key: + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 - 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 + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular - 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. + representation of the deserialized, embedded message, with an - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the Query/SigningInfos - RPC + additional field `@type` which contains the type URL. Example: - 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 + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - in a block and may have signed a precommit or not. This in conjunction - with the + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - `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 + If the embedded message type is well-known and has a custom JSON - 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. + representation, that representation will be embedded adding a field - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + `value` which holds the custom JSON in addition to the `@type` - 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. + field. Example (for message [google.protobuf.Duration][]): - - 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": "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: >- - 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 + sequence is the sequence of the account, which describes the - a validator. - cosmos.staking.v1beta1.Delegation: + 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: - 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: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + tx_bytes: type: string - description: shares define the delegation shares received. + format: byte + description: |- + tx_bytes is the raw transaction. + + Since: cosmos-sdk 0.43 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: + SimulateRequest is the request type for the Service.Simulate + RPC method. + cosmos.tx.v1beta1.SimulateResponse: type: object properties: - delegation: + gas_info: + description: gas_info is the information about gas used in the simulation. type: object properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: + gas_wanted: type: string - description: validator_address is the bech32-encoded address of the validator. - shares: + format: uint64 + description: >- + GasWanted is the maximum units of work we allow this tx to + perform. + gas_used: 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: + format: uint64 + description: GasUsed is the amount of gas actually consumed. + result: + description: result is the result of the simulation. type: object properties: - denom: + data: type: string - amount: + format: byte + description: >- + Data is any data returned from message or handler execution. It + MUST be + + length prefixed in order to separate data from multiple message + executions. + + Deprecated. This field is still populated, but prefer msg_response + instead + + because it also contains the Msg response typeURL. + log: type: string - description: |- - Coin defines a token with a denomination and an amount. + description: >- + Log contains the log information from message or handler + execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to - 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 + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, + Events contains a slice of Event objects that were emitted during + message - including all blockchain data structures and the rules of the - application's + or handler execution. + msg_responses: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - 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: + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + msg_responses contains the Msg handler responses type packed in + Anys. + + + Since: cosmos-sdk 0.46 + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + cosmos.tx.v1beta1.Tip: + type: object + properties: + amount: type: array items: type: object properties: - operator_address: + denom: type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + Tip is the tip used for meta-transactions. + + Since: cosmos-sdk 0.46 + cosmos.tx.v1beta1.Tx: + type: object + properties: + body: + title: body is the processable content of the transaction + type: object + properties: + messages: + type: array + items: type: object properties: type_url: @@ -40937,7 +64603,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -40947,13 +64613,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -40974,7 +64643,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -41007,671 +64675,225 @@ definitions: "@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 + description: >- + messages is a list of messages to be executed. The required + signers of - multiplied by exchange rate. - description: >- - HistoricalInfo contains header and validator information for a given - block. + those messages define the number and order of elements in + AuthInfo's - It is stored as part of staking module's state, which persists the `n` - most + signer_infos and Tx's signatures. Each required signer address is + added to - recent HistoricalInfo + the list only the first time it occurs. - (`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 + By convention, the first required signer (usually from the first + message) - owned by one delegator, and is associated with the voting power of - one + is referred to as the primary signer and pays the fee for the + whole - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string + transaction. + memo: + 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 + memo is any arbitrary note/comment to be added to the transaction. - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that it contains - a + WARNING: in clients, any publicly exposed text should not be + called memo, - 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: + 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: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: + type_url: 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 + A URL/resource name that uniquely identifies the type of the + serialized - (e.g., leading "." is not accepted). + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must + represent - In practice, teams usually precompile into the binary all - types that they + the fully qualified name of the type (as in - expect it to use in the context of Any. However, for URLs - which use the + `path/google.protobuf.Duration`). The name should be in a + canonical form - scheme `http`, `https`, or no scheme, one can optionally set - up a type + (e.g., leading "." is not accepted). - server that maps type URLs to message definitions as follows: + In practice, teams usually precompile into the binary all + types that they - * If no scheme is provided, `https` is assumed. + expect it to use in the context of Any. However, for URLs + which use the - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + scheme `http`, `https`, or no scheme, one can optionally set + up a type - Note: this functionality is not currently available in the - official + server that maps type URLs to message definitions as + follows: - protobuf release, and it is not used for type URLs beginning - with - type.googleapis.com. + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Schemes other than `http`, `https` (or the empty scheme) might - be + Note: this functionality is not currently available in the + official - 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 + protobuf release, and it is not used for type URLs beginning + with - URL that describes the type of the serialized message. + type.googleapis.com. - Protobuf library provides support to pack/unpack Any values in the - form + Schemes other than `http`, `https` (or the empty scheme) + might be - of utility functions or additional generated methods of the Any - type. + 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. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Protobuf library provides support to pack/unpack Any values in + the form - Example 2: Pack and unpack a message in Java. + of utility functions or additional generated methods of the Any + type. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. + Example 1: Pack and unpack a message in C++. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + Foo foo = ...; + Any any; + any.PackFrom(foo); ... + if (any.UnpackTo(&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 { - ... - } + Example 2: Pack and unpack a message in Java. - The pack methods provided by protobuf library will by default use + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Example 3: Pack and unpack a message in Python. - methods only use the fully qualified type name after the last '/' + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - in the type URL, for example "foo.bar.com/x/y.z" will yield type + Example 4: Pack and unpack a message in Go - name "y.z". + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default + use + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - JSON + methods only use the fully qualified type name after the last + '/' - ==== + in the type URL, for example "foo.bar.com/x/y.z" will yield type - The JSON representation of an `Any` value uses the regular + name "y.z". - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + JSON - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + The JSON representation of an `Any` value uses the regular - representation, that representation will be embedded adding a - field + representation of the deserialized, embedded message, with an - `value` which holds the custom JSON in addition to the `@type` + additional field `@type` which contains the type URL. Example: - field. Example (for message [google.protobuf.Duration][]): + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@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 + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Validator's bond shares and their exchange rate to coins. Slashing - results in + If the embedded message type is well-known and has a custom JSON - a decrease in the exchange rate, allowing correct calculation of - future + representation, that representation will be embedded adding a + field - undelegations without iterating over delegators. When coins are - delegated to + `value` which holds the custom JSON in addition to the `@type` - this validator, the validator is credited with a delegation whose - number of + field. Example (for message [google.protobuf.Duration][]): - bond shares is based on the amount of coins delegated divided by the - current + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by + chains - exchange rate. Voting power can be calculated as total bonded shares + when the default options are not sufficient. If any of these are + present - 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: + and can't be handled, the transaction will be rejected + non_critical_extension_options: + type: array + items: type: object properties: type_url: @@ -41741,1893 +64963,1312 @@ definitions: `Any` contains an arbitrary serialized protocol buffer message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' - Protobuf library provides support to pack/unpack Any values in - the form + in the type URL, for example "foo.bar.com/x/y.z" will yield type - of utility functions or additional generated methods of the Any - type. + name "y.z". - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + JSON - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + The JSON representation of an `Any` value uses the regular - Example 3: Pack and unpack a message in Python. + representation of the deserialized, embedded message, with an - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + additional field `@type` which contains the type URL. Example: - Example 4: Pack and unpack a message in Go + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - The pack methods provided by protobuf library will by default - use + If the embedded message type is well-known and has a custom JSON - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + representation, that representation will be embedded adding a field - methods only use the fully qualified type name after the last - '/' + `value` which holds the custom JSON in addition to the `@type` - in the type URL, for example "foo.bar.com/x/y.z" will yield type + field. Example (for message [google.protobuf.Duration][]): - name "y.z". + { + "@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 - JSON + the list only the first time it occurs. - ==== + By convention, the first required signer (usually from the first + message) - The JSON representation of an `Any` value uses the regular + is referred to as the primary signer and pays the fee for the whole - representation of the deserialized, embedded message, with an + transaction. + memo: + type: string + description: >- + memo is any arbitrary note/comment to be added to the transaction. - additional field `@type` which contains the type URL. Example: + WARNING: in clients, any publicly exposed text should not be called + memo, - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + 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 - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + protocol buffer message. This string must contain at least - If the embedded message type is well-known and has a custom JSON + one "/" character. The last segment of the URL's path must + represent - representation, that representation will be embedded adding a - field + the fully qualified name of the type (as in - `value` which holds the custom JSON in addition to the `@type` + `path/google.protobuf.Duration`). The name should be in a + canonical form - field. Example (for message [google.protobuf.Duration][]): + (e.g., leading "." is not accepted). - { - "@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 + In practice, teams usually precompile into the binary all types + that they - a decrease in the exchange rate, allowing correct calculation of - future + expect it to use in the context of Any. However, for URLs which + use the - undelegations without iterating over delegators. When coins are - delegated to + scheme `http`, `https`, or no scheme, one can optionally set up + a type - this validator, the validator is credited with a delegation whose - number of + server that maps type URLs to message definitions as follows: - 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 + * If no scheme is provided, `https` is assumed. - 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 + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - 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, + Note: this functionality is not currently available in the + official - including all blockchain data structures and the rules of the - application's + protobuf release, and it is not used for type URLs beginning + with - 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 + type.googleapis.com. - protocol buffer message. This string must contain at - least - one "/" character. The last segment of the URL's path - must represent + Schemes other than `http`, `https` (or the empty scheme) might + be - the fully qualified name of the type (as in + 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 - `path/google.protobuf.Duration`). The name should be in - a canonical form + URL that describes the type of the serialized message. - (e.g., leading "." is not accepted). + Protobuf library provides support to pack/unpack Any values in the + form - In practice, teams usually precompile into the binary - all types that they + of utility functions or additional generated methods of the Any + type. - expect it to use in the context of Any. However, for - URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + Example 1: Pack and unpack a message in C++. - server that maps type URLs to message definitions as - follows: + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - * If no scheme is provided, `https` is assumed. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Example 3: Pack and unpack a message in Python. - Note: this functionality is not currently available in - the official + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - protobuf release, and it is not used for type URLs - beginning with + Example 4: Pack and unpack a message in Go - type.googleapis.com. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default use - Schemes other than `http`, `https` (or the empty scheme) - might be + 'type.googleapis.com/full.type.name' as the type URL and the unpack - 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 + methods only use the fully qualified type name after the last '/' - URL that describes the type of the serialized message. + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - Protobuf library provides support to pack/unpack Any values - in the form - of utility functions or additional generated methods of the - Any type. + JSON - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + The JSON representation of an `Any` value uses the regular - Example 2: Pack and unpack a message in Java. + representation of the deserialized, embedded message, with an - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` - Example 3: Pack and unpack a message in Python. + field. Example (for message [google.protobuf.Duration][]): - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by chains - Example 4: Pack and unpack a message in Go + when the default options are not sufficient. If any of these are + present - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + 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 - The pack methods provided by protobuf library will by - default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the - last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all types + that they - JSON + expect it to use in the context of Any. However, for URLs which + use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set up + a type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as follows: - representation of the deserialized, embedded message, with - an - additional field `@type` which contains the type URL. - Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom - JSON + protobuf release, and it is not used for type URLs beginning + with - representation, that representation will be embedded adding - a field + type.googleapis.com. - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) might + be - { - "@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. + used with implementation specific semantics. + value: + type: string + format: byte 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 + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - a decrease in the exchange rate, allowing correct calculation of - future + URL that describes the type of the serialized message. - undelegations without iterating over delegators. When coins are - delegated to - this validator, the validator is credited with a delegation - whose number of + Protobuf library provides support to pack/unpack Any values in the + form - bond shares is based on the amount of coins delegated divided by - the current + of utility functions or additional generated methods of the Any + type. - 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 + Example 1: Pack and unpack a message in C++. - 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 + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - 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 + Example 2: Pack and unpack a message in Java. - contains a balance in addition to shares which is more - suitable for client + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries + Example 3: Pack and unpack a message in Python. - contain a balance in addition to shares which is more suitable for - client + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - 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 + Example 4: Pack and unpack a message in Go - was set, its value is undefined otherwise - description: >- - QueryRedelegationsResponse is response type for the Query/Redelegations - RPC + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - 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 + The pack methods provided by protobuf library will by default use - owned by one delegator, and is associated with the voting power - of one + 'type.googleapis.com/full.type.name' as the type URL and the unpack - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type - NOTE: The amount field is an Int which implements the custom - method + name "y.z". - 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 + JSON - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + The JSON representation of an `Any` value uses the regular - the fully qualified name of the type (as in + representation of the deserialized, embedded message, with an - `path/google.protobuf.Duration`). The name should be in a - canonical form + additional field `@type` which contains the type URL. Example: - (e.g., leading "." is not accepted). + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - In practice, teams usually precompile into the binary all - types that they + If the embedded message type is well-known and has a custom JSON - expect it to use in the context of Any. However, for URLs - which use the + representation, that representation will be embedded adding a field - scheme `http`, `https`, or no scheme, one can optionally set - up a type + `value` which holds the custom JSON in addition to the `@type` - server that maps type URLs to message definitions as follows: + 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 - * If no scheme is provided, `https` is assumed. + when the default options are not sufficient. If any of these are + present - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + and can't be handled, they will be ignored + description: TxBody is the body of a transaction that all signers sign over. + cosmos.tx.v1beta1.TxDecodeAminoRequest: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. - Note: this functionality is not currently available in the - official + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeAminoResponse: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. - protobuf release, and it is not used for type URLs beginning - with + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. - type.googleapis.com. + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeResponse: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the decoded transaction. + description: |- + TxDecodeResponse is the response type for the + Service.TxDecode method. + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoRequest: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. - Schemes other than `http`, `https` (or the empty scheme) might - be + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoResponse: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. - 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 + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeRequest: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to encode. + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. - URL that describes the type of the serialized message. + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeResponse: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + Since: cosmos-sdk 0.47 + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + description: EventAttribute is a single key-value pair, associated with an event. + description: >- + Event allows application developers to attach additional information to - Protobuf library provides support to pack/unpack Any values in the - form + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - of utility functions or additional generated methods of the Any - type. + Later, transactions may be queried using these events. + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + value: + type: string + index: + type: 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. + Since: cosmos-sdk 0.43 + 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 - Example 1: Pack and unpack a message in C++. + version of the software to apply any special "on-upgrade" commands + during - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + the first BeginBlock method after the upgrade is applied. It is also + used - Example 2: Pack and unpack a message in Java. + to detect whether a software version can handle a given upgrade. If no - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + upgrade handler with this name has been set in the software, it will + be - Example 3: Pack and unpack a message in Python. + assumed that the software is out-of-date when the upgrade Time or + Height is - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based + upgrade logic - Example 4: Pack and unpack a message in Go + has been removed from the SDK. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all types + that they - JSON + expect it to use in the context of Any. However, for URLs which + use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set up a + type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as follows: - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom JSON + protobuf release, and it is not used for type URLs beginning with - representation, that representation will be embedded adding a - field + type.googleapis.com. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) might be - { - "@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: + used with implementation specific semantics. + value: type: string + format: byte description: >- - min_self_delegation is the validator's self declared minimum self - delegation. + Must be a valid serialized protocol buffer of the above specified + type. description: >- - Validator defines a validator, together with the total amount of the + `Any` contains an arbitrary serialized protocol buffer message along + with a - Validator's bond shares and their exchange rate to coins. Slashing - results in + URL that describes the type of the serialized message. - a decrease in the exchange rate, allowing correct calculation of - future - undelegations without iterating over delegators. When coins are - delegated to + Protobuf library provides support to pack/unpack Any values in the + form - this validator, the validator is credited with a delegation whose - number of + of utility functions or additional generated methods of the Any type. - 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 + Example 1: Pack and unpack a message in C++. - 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 + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. - 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 + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - 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 + Example 4: Pack and unpack a message in Go - protocol buffer message. This string must contain at least + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - one "/" character. The last segment of the URL's path must - represent + The pack methods provided by protobuf library will by default use - the fully qualified name of the type (as in + 'type.googleapis.com/full.type.name' as the type URL and the unpack - `path/google.protobuf.Duration`). The name should be in a - canonical form + methods only use the fully qualified type name after the last '/' - (e.g., leading "." is not accepted). + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - In practice, teams usually precompile into the binary all - types that they - expect it to use in the context of Any. However, for URLs - which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + JSON - server that maps type URLs to message definitions as - follows: + The JSON representation of an `Any` value uses the regular - * If no scheme is provided, `https` is assumed. + representation of the deserialized, embedded message, with an - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + additional field `@type` which contains the type URL. Example: - Note: this functionality is not currently available in the - official + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - protobuf release, and it is not used for type URLs beginning - with + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - type.googleapis.com. + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field - Schemes other than `http`, `https` (or the empty scheme) - might be + `value` which holds the custom JSON in addition to the `@type` - 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 + field. Example (for message [google.protobuf.Duration][]): - URL that describes the type of the serialized message. + { + "@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.QueryAuthorityResponse: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the + upgraded - Protobuf library provides support to pack/unpack Any values in - the form + version of the software to apply any special "on-upgrade" commands + during - of utility functions or additional generated methods of the Any - type. + 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 - Example 1: Pack and unpack a message in C++. + upgrade handler with this name has been set in the software, it + will be - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + assumed that the software is out-of-date when the upgrade Time or + Height is - Example 2: Pack and unpack a message in Java. + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based + upgrade logic - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + has been removed from the SDK. - Example 3: Pack and unpack a message in Python. + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: >- + Any application specific upgrade info to be included on-chain - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + 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 - Example 4: Pack and unpack a message in Go + protocol buffer message. This string must contain at least - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + one "/" character. The last segment of the URL's path must + represent - The pack methods provided by protobuf library will by default - use + the fully qualified name of the type (as in - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + `path/google.protobuf.Duration`). The name should be in a + canonical form - methods only use the fully qualified type name after the last - '/' + (e.g., leading "." is not accepted). - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + In practice, teams usually precompile into the binary all + types that they + expect it to use in the context of Any. However, for URLs + which use the + scheme `http`, `https`, or no scheme, one can optionally set + up a type - JSON + server that maps type URLs to message definitions as follows: - ==== - The JSON representation of an `Any` value uses the regular + * If no scheme is provided, `https` is assumed. - representation of the deserialized, embedded message, with an + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - additional field `@type` which contains the type URL. Example: + Note: this functionality is not currently available in the + official - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + protobuf release, and it is not used for type URLs beginning + with - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + type.googleapis.com. - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + Schemes other than `http`, `https` (or the empty scheme) might + be - `value` which holds the custom JSON in addition to the `@type` + 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 - field. Example (for message [google.protobuf.Duration][]): + URL that describes the type of the serialized message. - { - "@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 + Protobuf library provides support to pack/unpack Any values in the + form - a decrease in the exchange rate, allowing correct calculation of - future + of utility functions or additional generated methods of the Any + type. - undelegations without iterating over delegators. When coins are - delegated to - this validator, the validator is credited with a delegation whose - number of + Example 1: Pack and unpack a message in C++. - bond shares is based on the amount of coins delegated divided by the - current + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - exchange rate. Voting power can be calculated as total bonded shares + Example 2: Pack and unpack a message in Java. - 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 + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - 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 + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - 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 + methods only use the fully qualified type name after the last '/' - contains a balance in addition to shares which is more suitable for client + in the type URL, for example "foo.bar.com/x/y.z" will yield type - 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 + name "y.z". - 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 + JSON - contain a balance in addition to shares which is more suitable for client - responses. - cosmos.staking.v1beta1.UnbondingDelegation: + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the 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: - 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: + module_versions: 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: + name: type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: + title: name of the app module + version: 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: + format: uint64 + title: consensus version of the app module + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + + + Since: cosmos-sdk 0.43 + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: type: object properties: - 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: + upgraded_consensus_state: type: string - description: balance defines the tokens to receive at completion. + format: byte + title: 'Since: cosmos-sdk 0.43' description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - cosmos.staking.v1beta1.Validator: + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + cosmos.authz.v1beta1.Grant: type: object properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's operator; bech - encoded in JSON. - consensus_pubkey: + authorization: type: object properties: type_url: @@ -43720,7 +66361,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43730,13 +66371,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -43754,7 +66398,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -43768,351 +66411,45 @@ definitions: string last_name = 2; } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the 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. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted during - message + If the embedded message type is well-known and has a custom JSON - 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 + representation, that representation will be embedded adding a field - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes + `value` which holds the custom JSON in addition to the `@type` - contain key/value pairs that are strings instead of raw bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + field. Example (for message [google.protobuf.Duration][]): - 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": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: date-time + title: >- + time when the grant will expire and will be pruned. If null, then the + grant + + doesn't have a time expiration (other conditions in `authorization` + + may apply to invalidate the grant) + description: |- + Grant gives permissions to execute + the provide method with expiration time. + cosmos.authz.v1beta1.GrantAuthorization: + type: object + properties: + granter: type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: + grantee: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + authorization: type: object properties: type_url: @@ -44205,7 +66542,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -44215,13 +66552,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -44239,7 +66579,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -44271,599 +66610,753 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - timestamp: + expiration: 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 + format: date-time + title: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. - tags are stringified and the log is JSON decoded. - cosmos.crypto.multisig.v1beta1.CompactBitArray: + It is used in genesis.proto and query.proto + cosmos.authz.v1beta1.QueryGranteeGrantsResponse: 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. + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - - 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: + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. + cosmos.authz.v1beta1.QueryGranterGrantsResponse: type: object properties: - signer_infos: + grants: type: array items: - $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' - description: >- - signer_infos defines the signing modes for the required signers. The - number + type: object + properties: + granter: + type: string + grantee: + type: string + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' - and order of elements must match the required signers from TxBody's + in the type URL, for example "foo.bar.com/x/y.z" will yield type - messages. The first element is the primary signer and the one which - pays + name "y.z". - 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 + JSON - 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. + The JSON representation of an `Any` value uses the regular - NOTE: The amount field is an Int which implements the custom - method + representation of the deserialized, embedded message, with an - 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 + additional field `@type` which contains the type URL. Example: - 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. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - the payer must be a tx signer (and thus have signed this field in - AuthInfo). + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - 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 + If the embedded message type is well-known and has a custom JSON - to pay fees instead of the fee payer's own balance. If an - appropriate fee grant does not exist or the chain does + representation, that representation will be embedded adding a + field - 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. + `value` which holds the custom JSON in addition to the `@type` - - 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. + field. Example (for message [google.protobuf.Duration][]): - - 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": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. type: object properties: - 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: + next_key: type: string + format: byte description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. + cosmos.authz.v1beta1.QueryGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: type: object properties: - msg_index: - type: integer - format: int64 - log: + type_url: 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 + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + 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 + 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. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + 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 { + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } ... - } + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a + field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - timestamp: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: >- + time when the grant will expire and will be pruned. If null, + then the grant + + doesn't have a time expiration (other conditions in + `authorization` + + may apply to invalidate the grant) + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGrantsResponse is the response type for the Query/Authorizations RPC + method. + cosmos.feegrant.v1beta1.Grant: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of their + funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + type_url: type: string description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + expect it to use in the context of Any. However, for URLs which + use the - it's genesis time. - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + scheme `http`, `https`, or no scheme, one can optionally set up a + type - 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. + server that maps type URLs to message definitions as follows: - 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. + * If no scheme is provided, `https` is assumed. - the payer must be a tx signer (and thus have signed this field in - AuthInfo). + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - 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 + Note: this functionality is not currently available in the + official - to pay fees instead of the fee payer's own balance. If an appropriate - fee grant does not exist or the chain does + protobuf release, and it is not used for type URLs beginning with - not support fee grants, this will fail - description: >- - Fee includes the amount of coins paid in fees and the maximum + type.googleapis.com. - 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: + 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: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: tx is the queried transaction. - tx_response: + allowance: + description: allowance is a allowance granted for grantee by granter. 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: + granter: 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: + granter is the address of the user granting an allowance of their + funds. + grantee: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -44927,218 +67420,142 @@ definitions: 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 { - ... - } + title: Grant is stored in the KVStore to record a grant with full context + description: >- + QueryAllowanceResponse is the response type for the Query/Allowance RPC + method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all + types that they - JSON + expect it to use in the context of Any. However, for URLs + which use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set + up a type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as + follows: - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom JSON + protobuf release, and it is not used for type URLs beginning + with - representation, that representation will be embedded adding a - field + type.googleapis.com. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) + might be - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - timestamp: + 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 that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: type: string - description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + was set, its value is undefined otherwise + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. - 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: + Since: cosmos-sdk 0.46 + cosmos.feegrant.v1beta1.QueryAllowancesResponse: type: object properties: - txs: - type: array - items: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: txs is the list of queried transactions. - tx_responses: + allowances: 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: + granter: 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: + granter is the address of the user granting an allowance of + their funds. + grantee: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -45169,293 +67586,273 @@ definitions: scheme `http`, `https`, or no scheme, one can optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesResponse is the response type for the Query/Allowances RPC + method. + cosmos.nft.v1beta1.Class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, similar to + the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema for + Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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 - * If no scheme is provided, `https` is assumed. + the fully qualified name of the type (as in - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + `path/google.protobuf.Duration`). The name should be in a + canonical form - Note: this functionality is not currently available in the - official + (e.g., leading "." is not accepted). - protobuf release, and it is not used for type URLs beginning - with - type.googleapis.com. + In practice, teams usually precompile into the binary all types + that they + expect it to use in the context of Any. However, for URLs which + use the - Schemes other than `http`, `https` (or the empty scheme) - might be + scheme `http`, `https`, or no scheme, one can optionally set up a + type - 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 + server that maps type URLs to message definitions as follows: - URL that describes the type of the serialized message. + * If no scheme is provided, `https` is assumed. - Protobuf library provides support to pack/unpack Any values in - the form + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - of utility functions or additional generated methods of the Any - type. + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning with - Example 1: Pack and unpack a message in C++. + type.googleapis.com. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + Schemes other than `http`, `https` (or the empty scheme) might be - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + 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 - Example 3: Pack and unpack a message in Python. + URL that describes the type of the serialized message. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Protobuf library provides support to pack/unpack Any values in the + form - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + of utility functions or additional generated methods of the Any type. - The pack methods provided by protobuf library will by default - use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Example 1: Pack and unpack a message in C++. - methods only use the fully qualified type name after the last - '/' + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - in the type URL, for example "foo.bar.com/x/y.z" will yield type + Example 2: Pack and unpack a message in Java. - name "y.z". + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - JSON + Example 4: Pack and unpack a message in Go - ==== + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The JSON representation of an `Any` value uses the regular + The pack methods provided by protobuf library will by default use - representation of the deserialized, embedded message, with an + 'type.googleapis.com/full.type.name' as the type URL and the unpack - additional field `@type` which contains the type URL. Example: + methods only use the fully qualified type name after the last '/' - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + name "y.z". - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field - `value` which holds the custom JSON in addition to the `@type` + JSON - 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 JSON representation of an `Any` value uses the regular - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + representation of the deserialized, embedded message, with an - it's genesis time. - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + additional field `@type` which contains the type URL. Example: - 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 + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - 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. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - - 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 + If the embedded message type is well-known and has a custom JSON - 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. + representation, that representation will be embedded adding a field - This is used to ensure that the encoded data takes up a minimal amount - of + `value` which holds the custom JSON in addition to the `@type` - space after proto encoding. + field. Example (for message [google.protobuf.Duration][]): - 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": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + cosmos.nft.v1beta1.NFT: type: object properties: - mode: - title: mode is the signing mode of the single signer + class_id: 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: + title: >- + class_id associated with the NFT, similar to the contract address of + ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: type: object properties: type_url: @@ -45548,7 +67945,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -45558,13 +67955,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -45582,7 +67982,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -45614,124 +68013,251 @@ definitions: "@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: + title: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + cosmos.nft.v1beta1.QueryBalanceResponse: + type: object + properties: + amount: type: string format: uint64 - description: >- - sequence is the sequence of the account, which describes the + title: amount is the number of all NFTs of a given class owned by the owner + title: QueryBalanceResponse is the response type for the Query/Balance RPC method + cosmos.nft.v1beta1.QueryClassResponse: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema + for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: - number of committed transactions signed by a given address. It is used - to + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - 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 + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - 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 + If the embedded message type is well-known and has a custom JSON - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + representation, that representation will be embedded adding a + field - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted during - message + `value` which holds the custom JSON in addition to the `@type` - or handler execution. - description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. - cosmos.tx.v1beta1.Tx: + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + title: QueryClassResponse is the response type for the Query/Class RPC method + cosmos.nft.v1beta1.QueryClassesResponse: type: object properties: - body: - title: body is the processable content of the transaction - type: object - properties: - messages: - type: array - items: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: type: object properties: type_url: @@ -45830,7 +68356,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -45840,13 +68366,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -45867,7 +68396,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -45900,223 +68428,243 @@ definitions: "@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: + title: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + description: class defines the class of the nft type. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: type: string - 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: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string format: uint64 - title: |- - 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 + title: >- + total is total number of results available if + PageRequest.count_total - protocol buffer message. This string must contain at least + was set, its value is undefined otherwise + title: QueryClassesResponse is the response type for the Query/Classes RPC method + cosmos.nft.v1beta1.QueryNFTResponse: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address + of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - one "/" character. The last segment of the URL's path must - represent + protocol buffer message. This string must contain at least - the fully qualified name of the type (as in + one "/" character. The last segment of the URL's path must + represent - `path/google.protobuf.Duration`). The name should be in a - canonical form + the fully qualified name of the type (as in - (e.g., leading "." is not accepted). + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they - expect it to use in the context of Any. However, for URLs - which use the + In practice, teams usually precompile into the binary all + types that they - scheme `http`, `https`, or no scheme, one can optionally set - up a type + expect it to use in the context of Any. However, for URLs + which use the - server that maps type URLs to message definitions as - follows: + scheme `http`, `https`, or no scheme, one can optionally set + up a type + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * If no scheme is provided, `https` is assumed. - Note: this functionality is not currently available in the - official + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protobuf release, and it is not used for type URLs beginning - with + Note: this functionality is not currently available in the + official - type.googleapis.com. + protobuf release, and it is not used 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 + Schemes other than `http`, `https` (or the empty scheme) might + be - URL that describes the type of the serialized message. + 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. + Protobuf library provides support to pack/unpack Any values in the + form + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { ... - 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 + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - methods only use the fully qualified type name after the last - '/' + The pack methods provided by protobuf library will by default use - in the type URL, for example "foo.bar.com/x/y.z" will yield type + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - name "y.z". + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - JSON - ==== - The JSON representation of an `Any` value uses the regular + JSON - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + The JSON representation of an `Any` value uses the regular - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + representation of the deserialized, embedded message, with an - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + additional field `@type` which contains the type URL. Example: - If the embedded message type is well-known and has a custom JSON + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - representation, that representation will be embedded adding a - field + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - `value` which holds the custom JSON in addition to the `@type` + If the embedded message type is well-known and has a custom JSON - field. Example (for message [google.protobuf.Duration][]): + representation, that representation will be embedded adding a + field - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by - chains + `value` which holds the custom JSON in addition to the `@type` - when the default options are not sufficient. If any of these are - present + field. Example (for message [google.protobuf.Duration][]): - and can't be handled, the transaction will be rejected - non_critical_extension_options: - type: array - items: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: owner is the owner address of the nft + title: QueryNFTResponse is the response type for the Query/NFT RPC method + cosmos.nft.v1beta1.QueryNFTsResponse: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: type: object properties: type_url: @@ -46215,7 +68763,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46225,13 +68773,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -46252,7 +68803,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46285,234 +68835,421 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: NFT defines the NFT + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 title: >- - extension_options are arbitrary options that can be added by - chains + total is total number of results available if + PageRequest.count_total - when the default options are not sufficient. If any of these are - present + was set, its value is undefined otherwise + title: QueryNFTsResponse is the response type for the Query/NFTs RPC methods + cosmos.nft.v1beta1.QueryOwnerResponse: + type: object + properties: + owner: + type: string + title: owner is the owner address of the nft + title: QueryOwnerResponse is the response type for the Query/Owner RPC method + cosmos.nft.v1beta1.QuerySupplyResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: amount is the number of all NFTs from the given class + title: QuerySupplyResponse is the response type for the Query/Supply RPC method + cosmos.group.v1.GroupInfo: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that - 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 + would break existing proposals. Whenever any members weight is + changed, - AuthInfo's signer_infos to allow connecting signature meta information - like + or any member is added or removed this version is incremented and will - public key and signing mode by position. - description: Tx is the standard type used for broadcasting transactions. - cosmos.tx.v1beta1.TxBody: + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: GroupInfo represents the high-level on-chain information for a group. + cosmos.group.v1.GroupMember: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater than + 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: GroupMember represents the relationship between a group and a member. + cosmos.group.v1.GroupPolicyInfo: type: object properties: - messages: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that - protocol buffer message. This string must contain at least + would create a different result on a running proposal. + decision_policy: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - one "/" character. The last segment of the URL's path must - represent + protocol buffer message. This string must contain at least - the fully qualified name of the type (as in + one "/" character. The last segment of the URL's path must + represent - `path/google.protobuf.Duration`). The name should be in a - canonical form + the fully qualified name of the type (as in - (e.g., leading "." is not accepted). + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + In practice, teams usually precompile into the binary all types + that they - scheme `http`, `https`, or no scheme, one can optionally set up - a type + expect it to use in the context of Any. However, for URLs which + use the - server that maps type URLs to message definitions as follows: + scheme `http`, `https`, or no scheme, one can optionally set up a + type + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * If no scheme is provided, `https` is assumed. - Note: this functionality is not currently available in the - official + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protobuf release, and it is not used for type URLs beginning - with + Note: this functionality is not currently available in the + official - type.googleapis.com. + protobuf release, and it is not used 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 + Schemes other than `http`, `https` (or the empty scheme) might be - URL that describes the type of the serialized message. + 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. + Protobuf library provides support to pack/unpack Any values in the + form + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group policy was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a group + policy. + cosmos.group.v1.Member: + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: weight is the member's voting weight that should be greater than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: |- + Member represents a group member with an account address, + non-zero weight, metadata and added_at timestamp. + cosmos.group.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: submit_time is a timestamp specifying when a proposal was submitted. + group_version: + type: string + format: uint64 + description: |- + group_version tracks the version of the group at proposal submission. + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 description: >- - messages is a list of messages to be executed. The required signers of + group_policy_version tracks the version of the group policy at + proposal submission. - those messages define the number and order of elements in AuthInfo's + When a decision policy is changed, existing proposals from previous + policy - signer_infos and Tx's signatures. Each required signer address is - added to + versions will become invalid with the `ABORTED` status. - the list only the first time it occurs. + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for this - By convention, the first required signer (usually from the first - message) + proposal for each vote option. It is empty at submission, and only - is referred to as the primary signer and pays the fee for the whole + populated after tallying, at voting period end or at proposal + execution, - transaction. - memo: + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: type: string + format: date-time description: >- - memo is any arbitrary note/comment to be added to the transaction. + voting_period_end is the timestamp before which voting must be done. - WARNING: in clients, any publicly exposed text should not be called - memo, + Unless a successful MsgExec is called before (to execute a proposal + whose - but should be called `note` instead (see - https://github.com/cosmos/cosmos-sdk/issues/9122). - timeout_height: + tally is successful before the voting period ends), tallying will be + done + + at this point, and the `final_tally_result`and `status` fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. Initial + value is NotRun. type: string - format: uint64 - title: |- - timeout is the block height after which this transaction will not - be processed by the chain - extension_options: + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: type: array items: type: object @@ -46610,7 +69347,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46620,13 +69357,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -46644,7 +69384,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46676,507 +69415,653 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - extension_options are arbitrary options that can be added by chains + description: >- + messages is a list of `sdk.Msg`s that will be executed if the proposal + passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can submit a + proposal - when the default options are not sufficient. If any of these are - present + for a group policy to decide upon. - and can't be handled, the transaction will be rejected - non_critical_extension_options: + A proposal consists of a set of `sdk.Msg`s that will be executed if the + proposal + + passes as well as some optional metadata associated with the proposal. + cosmos.group.v1.ProposalExecutorResult: + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + description: |- + ProposalExecutorResult defines types of proposal executor results. + + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed. + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor. + - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state. + - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state. + cosmos.group.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus defines proposal statuses. + + - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed. + - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted. + - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome + passes the group policy's decision policy. + - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome + is rejected by the group policy's decision policy. + - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the + final tally. + - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner. + When this happens the final status is Withdrawn. + cosmos.group.v1.QueryGroupInfoResponse: + type: object + properties: + info: + description: info is the GroupInfo of the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and + will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + cosmos.group.v1.QueryGroupMembersResponse: + type: object + properties: + members: type: array items: type: object properties: - type_url: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater + than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: >- + GroupMember represents the relationship between a group and a + member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: QueryGroupMembersResponse is the Query/GroupMembersResponse response type. + cosmos.group.v1.QueryGroupPoliciesByAdminResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the group policy. + version: type: string + format: uint64 description: >- - A URL/resource name that uniquely identifies the type of the - serialized + version is used to track changes to a group's GroupPolicyInfo + structure that - protocol buffer message. This string must contain at least + would create a different result on a running proposal. + decision_policy: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - one "/" character. The last segment of the URL's path must - represent + protocol buffer message. This string must contain at least - the fully qualified name of the type (as in + one "/" character. The last segment of the URL's path must + represent - `path/google.protobuf.Duration`). The name should be in a - canonical form + the fully qualified name of the type (as in - (e.g., leading "." is not accepted). + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + In practice, teams usually precompile into the binary all + types that they - scheme `http`, `https`, or no scheme, one can optionally set up - a type + expect it to use in the context of Any. However, for URLs + which use the - server that maps type URLs to message definitions as follows: + scheme `http`, `https`, or no scheme, one can optionally set + up a type + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * If no scheme is provided, `https` is assumed. - Note: this functionality is not currently available in the - official + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protobuf release, and it is not used for type URLs beginning - with + Note: this functionality is not currently available in the + official - type.googleapis.com. + protobuf release, and it is not used 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 + Schemes other than `http`, `https` (or the empty scheme) + might be - URL that describes the type of the serialized message. + 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. + Protobuf library provides support to pack/unpack Any values in + the form + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Example 1: Pack and unpack a message in C++. - Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Example 2: Pack and unpack a message in Java. - Example 3: Pack and unpack a message in Python. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + Example 3: Pack and unpack a message in Python. - Example 4: Pack and unpack a message in Go + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + Example 4: Pack and unpack a message in Go - The pack methods provided by protobuf library will by default use + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - 'type.googleapis.com/full.type.name' as the type URL and the unpack + The pack methods provided by protobuf library will by default + use - methods only use the fully qualified type name after the last '/' + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - in the type URL, for example "foo.bar.com/x/y.z" will yield type + methods only use the fully qualified type name after the last + '/' - name "y.z". + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - JSON - ==== + JSON - The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + The JSON representation of an `Any` value uses the regular - additional field `@type` which contains the type URL. Example: + representation of the deserialized, embedded message, with an - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + additional field `@type` which contains the type URL. Example: - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - If the embedded message type is well-known and has a custom JSON + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - representation, that representation will be embedded adding a field + If the embedded message type is well-known and has a custom JSON - `value` which holds the custom JSON in addition to the `@type` + representation, that representation will be embedded adding a + field - field. Example (for message [google.protobuf.Duration][]): + `value` which holds the custom JSON in addition to the `@type` - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + field. Example (for message [google.protobuf.Duration][]): - when the default options are not sufficient. If any of these are - present + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: group_policies are the group policies info with provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - 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: + was set, its value is undefined otherwise + description: >- + QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin + response type. + cosmos.group.v1.QueryGroupPoliciesByGroupResponse: type: object properties: - type: - type: string - attributes: + group_policies: type: array items: type: object properties: - key: + address: type: string - format: byte - value: + description: address is the account address of group policy. + group_id: 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 + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that - has been removed from the SDK. + would create a different result on a running proposal. + decision_policy: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - 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 - protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must + represent - one "/" character. The last segment of the URL's path must - represent + the fully qualified name of the type (as in - the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a + canonical form - `path/google.protobuf.Duration`). The name should be in a - canonical form + (e.g., leading "." is not accepted). - (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all + types that they - In practice, teams usually precompile into the binary all types - that they + expect it to use in the context of Any. However, for URLs + which use the - expect it to use in the context of Any. However, for URLs which - use the + scheme `http`, `https`, or no scheme, one can optionally set + up a type - scheme `http`, `https`, or no scheme, one can optionally set up a - type + server that maps type URLs to message definitions as + follows: - server that maps type URLs to message definitions as follows: + * If no scheme is provided, `https` is assumed. - * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Note: this functionality is not currently available in the + official - Note: this functionality is not currently available in the - official + protobuf release, and it is not used for type URLs beginning + with - protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. - type.googleapis.com. + Schemes other than `http`, `https` (or the empty scheme) + might be - 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 - 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. - URL that describes the type of the serialized message. + Protobuf library provides support to pack/unpack Any values in + the form - Protobuf library provides support to pack/unpack Any values in the - form + of utility functions or additional generated methods of the Any + type. - of utility functions or additional generated methods of the Any type. + Example 1: Pack and unpack a message in C++. - Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Example 2: Pack and unpack a message in Java. - Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Example 3: Pack and unpack a message in Python. - Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + Example 4: Pack and unpack a message in Go - Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - 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 - The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last + '/' - methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type - in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - name "y.z". + JSON - JSON - ==== + The JSON representation of an `Any` value uses the regular - The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: - additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + If the embedded message type is well-known and has a custom JSON - If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a + field - representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` - `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): - field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - { - "@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. + was set, its value is undefined otherwise description: >- - QueryAppliedPlanResponse is the response type for the Query/AppliedPlan - RPC - - method. - cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup + response type. + cosmos.group.v1.QueryGroupPolicyInfoResponse: type: object properties: - plan: - description: plan is the current upgrade plan. + info: type: object properties: - name: + address: 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: + description: address is the account address of group policy. + group_id: 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: + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: type: string - format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + description: metadata is any arbitrary metadata attached to the group policy. + version: type: string - title: >- - Any application specific upgrade info to be included on-chain + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that - such as a git commit that validators could automatically upgrade - to - upgraded_client_state: + would create a different result on a running proposal. + decision_policy: type: object properties: type_url: @@ -47273,7 +70158,7 @@ definitions: foo = any.unpack(Foo.class); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47283,13 +70168,16 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + any, err := anypb.New(foo) + if err != nil { + ... + } ... foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + if err := any.UnmarshalTo(foo); err != nil { ... } @@ -47308,7 +70196,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -47341,223 +70228,262 @@ definitions: "@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: + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. + cosmos.group.v1.QueryGroupsByAdminResponse: type: object properties: - module_versions: + groups: type: array items: type: object properties: - name: + id: type: string - title: name of the app module + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. version: type: string format: uint64 - title: 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 + title: >- + version is used to track changes to a group's membership + structure that - 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 + would break existing proposals. Whenever any members weight is + changed, - RPC method. - cosmos.authz.v1beta1.Grant: - type: object - properties: - authorization: + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. type: object properties: - type_url: + next_key: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - type.googleapis.com. + was set, its value is undefined otherwise + description: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response + type. + cosmos.group.v1.QueryGroupsByMemberResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + would break existing proposals. Whenever any members weight is + changed, - Schemes other than `http`, `https` (or the empty scheme) might be + or any member is added or removed this version is incremented + and will - used with implementation specific semantics. - value: + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: type: string format: byte - description: >- - 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". - - + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - JSON + was set, its value is undefined otherwise + description: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. + cosmos.group.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. - ==== + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. - The JSON representation of an `Any` value uses the regular + When a decision policy is changed, existing proposals from + previous policy - representation of the deserialized, embedded message, with an + versions will become invalid with the `ABORTED` status. - additional field `@type` which contains the type URL. Example: + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + proposal for each vote option. It is empty at submission, and only - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + populated after tallying, at voting period end or at proposal + execution, - If the embedded message type is well-known and has a custom JSON + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. - representation, that representation will be embedded adding a field + Unless a successful MsgExec is called before (to execute a + proposal whose - `value` which holds the custom JSON in addition to the `@type` + tally is successful before the voting period ends), tallying will + be done - field. Example (for message [google.protobuf.Duration][]): + at this point, and the `final_tally_result`and `status` fields + will be - { - "@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: + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: type: object properties: type_url: @@ -47627,122 +70553,445 @@ definitions: `Any` contains an arbitrary serialized protocol buffer message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of `sdk.Msg`s that will be executed if the + proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: QueryProposalResponse is the Query/Proposal response type. + cosmos.group.v1.QueryProposalsByGroupPolicyResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of + the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and + only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successful MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying + will be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: + type: object + properties: + type_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. - Protobuf library provides support to pack/unpack Any values in - the form + Schemes other than `http`, `https` (or the empty scheme) + might be - of utility functions or additional generated methods of the Any - type. + 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. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + 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 { + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } ... - } + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a + field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of `sdk.Msg`s that will be executed if the + proposal passes. + title: type: string - 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. + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can submit + a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if + the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -47752,267 +71001,161 @@ definitions: was set, its value is undefined otherwise description: >- - QueryGrantsResponse is the response type for the Query/Authorizations RPC - method. - cosmos.feegrant.v1beta1.Grant: + QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy + response type. + cosmos.group.v1.QueryTallyResultResponse: 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. + tally: + description: tally defines the requested tally. type: object properties: - type_url: + yes_count: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used 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: + description: yes_count is the weighted sum of yes votes. + abstain_count: 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: + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + cosmos.group.v1.QueryVoteByProposalVoterResponse: type: object properties: - allowance: - description: allowance is a allowance granted for grantee by granter. + vote: + description: vote is the vote with given proposal_id and voter. type: object properties: - granter: + proposal_id: type: string - description: >- - granter is the address of the user granting an allowance of their - funds. - grantee: + format: uint64 + description: proposal is the unique ID of the proposal. + voter: 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: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. description: >- - QueryAllowanceResponse is the response type for the Query/Allowance RPC - method. - cosmos.feegrant.v1beta1.QueryAllowancesResponse: + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response + type. + cosmos.group.v1.QueryVotesByProposalResponse: type: object properties: - allowances: + votes: type: array items: type: object properties: - granter: + proposal_id: type: string - description: >- - granter is the address of the user granting an allowance of - their funds. - grantee: + format: uint64 + description: proposal is the unique ID of the proposal. + voter: 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 + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - 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. + was set, its value is undefined otherwise + description: QueryVotesByProposalResponse is the Query/VotesByProposal response type. + cosmos.group.v1.QueryVotesByVoterResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -48021,9 +71164,66 @@ definitions: 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 + description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + cosmos.group.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: TallyResult represents the sum of weighted votes for each vote option. + cosmos.group.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + cosmos.group.v1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: |- + VoteOption enumerates the valid vote options for a given proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + return an error. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. diff --git a/go.mod b/go/go.mod similarity index 59% rename from go.mod rename to go/go.mod index 4b434c19..d4e18756 100644 --- a/go.mod +++ b/go/go.mod @@ -1,29 +1,38 @@ -module github.com/akash-network/akash-api +module pkg.akt.io/go -go 1.21 +go 1.22.0 + +toolchain go1.22.2 require ( - github.com/99designs/keyring v1.2.1 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/math v1.3.0 + github.com/99designs/keyring v1.2.2 + github.com/akash-network/akash-api v0.0.67 + github.com/blang/semver/v4 v4.0.0 github.com/boz/go-lifecycle v0.1.1 github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 - github.com/cosmos/cosmos-sdk v0.45.16 + github.com/cometbft/cometbft v0.37.5 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.47.11 + github.com/cosmos/gogoproto v1.4.12 github.com/edwingeng/deque/v2 v2.1.1 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/pkg/errors v0.9.1 github.com/pseudomuto/protoc-gen-doc v1.5.1 - github.com/regen-network/cosmos-proto v0.3.1 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 - github.com/tendermint/tendermint v0.34.27 - go.step.sm/crypto v0.44.6 + go.step.sm/crypto v0.44.8 google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.26.1 - k8s.io/apimachinery v0.26.1 + k8s.io/api v0.30.0 + k8s.io/apimachinery v0.30.0 ) replace ( @@ -41,21 +50,27 @@ replace ( // Use regen gogoproto fork // To be replaced by cosmos/gogoproto in future versions github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + + // replace broken goleveldb + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + + // replace tendermint with akash fork. this is needed for migrations from v0 to v2. remove once module is on v3 github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash - // latest grpc doesn't work with with cosmos-sdk modified proto compiler, so we need to enforce - // the following version across all dependencies. - google.golang.org/grpc => google.golang.org/grpc v1.33.2 + // stick with compatible version or x/exp in v0.47.x line + //golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + // stick with compatible version of rapid in v0.47.x line + pgregory.net/rapid => pgregory.net/rapid v0.5.5 ) require ( - cosmossdk.io/api v0.2.6 // indirect + cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/DataDog/zstd v1.5.0 // indirect - github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig v2.15.0+incompatible // indirect github.com/aokoli/goutils v1.0.1 // indirect @@ -63,39 +78,48 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/confio/ics23/go v0.9.1 // indirect - github.com/cosmos/btcutil v1.0.4 // indirect - github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.1 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.5 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/creachadair/taskgroup v0.3.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgraph-io/ristretto v0.1.1 // 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 v1.5.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.17.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -103,70 +127,79 @@ require ( 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/go-uuid v1.0.1 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.1-0.20191016231534-914dc3f8dd7c // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.13 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.1-0.20191019112844-b572e7f4cdac // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.10 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/minio/highwayhash v1.0.2 // 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/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect github.com/pseudomuto/protokit v0.2.0 // indirect + github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/regen-network/cosmos-proto v0.3.1 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.2 // indirect + github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/viper v1.18.2 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/tm-db v0.6.7 // indirect - github.com/tidwall/btree v1.5.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + github.com/tidwall/btree v1.6.0 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.7 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go/go.sum similarity index 58% rename from go.sum rename to go/go.sum index a358a0c7..5b198c15 100644 --- a/go.sum +++ b/go/go.sum @@ -1,252 +1,293 @@ +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= -cosmossdk.io/api v0.2.6 h1:AoNwaLLapcLsphhMK6+o0kZl+D6MMUaHVqSdwinASGU= -cosmossdk.io/api v0.2.6/go.mod h1:u/d+GAxil0nWpl1XnQL8nkziQDIWuBDhv8VnDm/s6dI= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= +cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= 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/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= -github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/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/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/akash-network/akash-api v0.0.67 h1:lwtSvYoxXe/XJKB0UabA2np3l0ujLMsKxmA4e6IWzsM= +github.com/akash-network/akash-api v0.0.67/go.mod h1:PdOQGTCX3kLBoKHdbPF9pe5+vSLANaMJbgA04UE+OqY= github.com/akash-network/cometbft v0.34.27-akash h1:V1dApDOr8Ee7BJzYyQ7Z9VBtrAul4+baMeA6C49dje0= github.com/akash-network/cometbft v0.34.27-akash/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= 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/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +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/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.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +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/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +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/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boz/go-lifecycle v0.1.1 h1:tG/wff7Zxbkf19g4D4I0G8Y4sq83iT5QjD4rzEf/zrI= github.com/boz/go-lifecycle v0.1.1/go.mod h1:zdagAUMcC2C0OmQkBlJZFV77uF4GCVaGphAexGi7oho= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -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/snappy-go v0.0.0-20151229074030-0bdef8d06723/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/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/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/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= 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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +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-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/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 h1:qbb/AE938DFhOajUYh9+OXELpSF9KZw2ZivtmW6eX1Q= -github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677/go.mod h1:890yq1fUb9b6dGNwssgeUO5vQV9qfXnCPxAJhBQfXw0= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= -github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= +github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= +github.com/cometbft/cometbft v0.37.5 h1:/U/TlgMh4NdnXNo+YU9T2NMCWyhXNDF34Mx582jlvq0= +github.com/cometbft/cometbft v0.37.5/go.mod h1:QC+mU0lBhKn8r9qvmnq53Dmf3DWBt4VtkcKw2C81wxY= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.1 h1:3MV46eeWwO3xCauKyAtuAdJYMyPnnchW4iLr2bTw6/U= github.com/confio/ics23/go v0.9.1/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= 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/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-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieELltZWHRmwPmPaZ8+XoL2Sj+A2YJlr8= -github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ= -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.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw= -github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/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.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.47.11 h1:0Qx7eORw0RJqPv+mvDuU8NQ1LV3nJJKJnPoYblWHolc= +github.com/cosmos/cosmos-sdk v0.47.11/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= 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/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.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= -github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= -github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= +github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= 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.3/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/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -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/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= 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 v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= 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/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= 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/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +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 v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edwingeng/deque/v2 v2.1.1 h1:+xjC3TnaeMPLZMi7QQf9jN2K00MZmTwruApqplbL9IY= github.com/edwingeng/deque/v2 v2.1.1/go.mod h1:HukI8CQe9KDmZCcURPZRYVYjH79Zy2tIjTF9sN3Bgb0= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +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.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +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.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 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.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.17.0 h1:UustVWnOoDFHBS7IJUB2QK/nB5pap748ZEp0swnQJak= -github.com/getsentry/sentry-go v0.17.0/go.mod h1:B82dxtBvxG0KaPD8/hfSV+VcHD+Lg/xUS4JuQn1P4cM= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= 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.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 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.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 v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +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/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 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/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= -github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +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/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 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= @@ -262,14 +303,17 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +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.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -277,31 +321,40 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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.5.0/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/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.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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/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.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +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.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= @@ -311,79 +364,80 @@ 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-version v1.6.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.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/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/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +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.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -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/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +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/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +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/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.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 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.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +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.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= 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/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.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -394,44 +448,47 @@ 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/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/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/linxGnu/grocksdb v1.7.10 h1:dz7RY7GnFUA+GJO6jodyxgkUeGMEkPp3ikt9hAcNGEw= -github.com/linxGnu/grocksdb v1.7.10/go.mod h1:0hTf+iA+GOr0jDX4CgIYyJZxqOH9XlBh6KVj8+zmF34= +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/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.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +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.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/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.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/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/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.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -442,42 +499,69 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN 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/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= 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/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/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +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.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -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/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= 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/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= +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/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +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/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +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/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +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 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/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -485,27 +569,41 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/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.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= 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/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +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.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= 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.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/pseudomuto/protoc-gen-doc v1.5.1 h1:Ah259kcrio7Ix1Rhb6u8FCaOkzf9qRBqXnvAufg061w= @@ -514,45 +612,52 @@ github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= 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-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/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/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +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/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= 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 v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 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/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY= github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc= 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/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -564,16 +669,21 @@ github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNo github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +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.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +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.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -583,6 +693,7 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ 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= @@ -598,112 +709,112 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= 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/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/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= -github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= +github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +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/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/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/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/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= -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.step.sm/crypto v0.44.6 h1:vQg8ujce7fNXDO8EWdriSz+ZSJpYnNh22QrFtRjdyoY= -go.step.sm/crypto v0.44.6/go.mod h1:oKRO4jaf2MaCohJDN+/8ShImkvIgUKfJxxy87gqsnXs= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +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.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.step.sm/crypto v0.44.8 h1:jDSHL6FdB1UTA0d56ECNx9XtLVkewzeg38Vy3HWB3N8= +go.step.sm/crypto v0.44.8/go.mod h1:QEmu4T9YewrDuaJnrV1I0zWZ15aJ/mqRUfL5w3R2WgU= +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/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= 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/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +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= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= 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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/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-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/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-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= 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-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 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.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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-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-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/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-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-20190813141303-74dc4d7220e7/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-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-20200520004742-59133d7f0dd7/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-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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= 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-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= @@ -712,49 +823,61 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ 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-20201020160332-67f06af15bc9/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.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/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-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/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-20200814200057-3d37ad5750ed/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-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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-20210615035016-665e8c7367d1/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-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/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-20211007075335-d3039528d8ac/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-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -765,49 +888,72 @@ 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/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-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/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-20190327201419-c70d86f8b7cf/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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +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-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/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-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= 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= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +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-20190425155659-357c62f0e4bb/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-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 h1:rIo7ocm2roD9DcFIX67Ym8icoGCKSARAiPljFhh5suQ= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +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.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.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.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +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.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= 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= @@ -816,30 +962,35 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi 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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +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.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/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= @@ -849,32 +1000,35 @@ 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-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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.0/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/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= -k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= -k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= -k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= -pgregory.net/rapid v0.5.3/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/go/grpc/gogoreflection/fix_registration.go b/go/grpc/gogoreflection/fix_registration.go index 4a97108d..01e0bc0f 100644 --- a/go/grpc/gogoreflection/fix_registration.go +++ b/go/grpc/gogoreflection/fix_registration.go @@ -6,31 +6,25 @@ import ( "fmt" "reflect" - _ "github.com/gogo/protobuf/gogoproto" // required so it does register the gogoproto file descriptor - _ "k8s.io/apimachinery/pkg/api/resource" // required so it does register the k8s resource + _ "github.com/cosmos/gogoproto/gogoproto" // required so it does register the gogoproto file descriptor + gogoproto "github.com/cosmos/gogoproto/proto" + dpb "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor" + "github.com/golang/protobuf/proto" //nolint:staticcheck - gogoproto "github.com/gogo/protobuf/proto" + "k8s.io/apimachinery/pkg/api/resource" // required so it does register the k8s resource - // nolint: staticcheck - "github.com/golang/protobuf/proto" - dpb "github.com/golang/protobuf/protoc-gen-go/descriptor" - _ "github.com/regen-network/cosmos-proto" // look above + // we need to this transfer protobuf registration to gogoproto above + kproto "github.com/gogo/protobuf/proto" ) var importsToFix = map[string][]string{ - "gogo.proto": { - "gogoproto/gogo.proto", - "github.com/gogo/protobuf/gogoproto/gogo.proto", - }, - - "cosmos.proto": {"cosmos_proto/cosmos.proto"}, - "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto": {"k8s.io/apimachinery/pkg/api/resource/generated.proto"}, + // "k8s.io/apimachinery/pkg/api/resource/generated.proto": {"k8s.io/apimachinery/pkg/api/resource/generated.proto"}, } // fixRegistration is required because certain files register themselves in a way // but are imported by other files in a different way. // NOTE(fdymylja): This fix should not be needed and should be addressed in some CI. -// Currently every cosmos-sdk proto file is importing gogo.proto as gogoproto/gogo.proto, +// Currently, every cosmos-sdk proto file is importing gogo.proto as gogoproto/gogo.proto, // but gogo.proto registers itself as gogo.proto, same goes for cosmos.proto. func fixRegistration(registeredAs, importedAs string) error { raw := gogoproto.FileDescriptor(registeredAs) @@ -58,6 +52,12 @@ func init() { // in theory this shouldn't be required, generally speaking // proto files should be imported as their registration path + gogoproto.RegisterType((*resource.Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity") + gogoproto.RegisterType((*resource.QuantityValue)(nil), "k8s.io.apimachinery.pkg.api.resource.QuantityValue") + + protoFile := "k8s.io/apimachinery/pkg/api/resource/generated.proto" + gogoproto.RegisterFile(protoFile, kproto.FileDescriptor(protoFile)) + for registeredAs, imports := range importsToFix { for _, importedAs := range imports { err := fixRegistration(registeredAs, importedAs) diff --git a/go/grpc/gogoreflection/serverreflection.go b/go/grpc/gogoreflection/serverreflection.go index 936d3df3..7851a21c 100644 --- a/go/grpc/gogoreflection/serverreflection.go +++ b/go/grpc/gogoreflection/serverreflection.go @@ -16,24 +16,22 @@ * */ -/* -Package reflection implements server reflection service. - -The service implemented is defined in: -https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. - -To register server reflection on a gRPC server: - - import "google.golang.org/grpc/reflection" - - s := grpc.NewServer() - pb.RegisterYourOwnServer(s, &server{}) - - // Register reflection service on gRPC server. - reflection.Register(s) - - s.Serve(lis) -*/ +// Package gogoreflection implements server reflection service. +// +// The service implemented is defined in: +// https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. +// +// To register server reflection on a gRPC server: +// +// import "google.golang.org/grpc/reflection" +// +// s := grpc.NewServer() +// pb.RegisterYourOwnServer(s, &server{}) +// +// // Register reflection service on gRPC server. +// reflection.Register(s) +// +// s.Serve(lis) package gogoreflection // import "google.golang.org/grpc/reflection" import ( @@ -46,9 +44,8 @@ import ( "sort" "sync" - // nolint: staticcheck - "github.com/golang/protobuf/proto" - dpb "github.com/golang/protobuf/protoc-gen-go/descriptor" + dpb "github.com/cosmos/gogoproto/protoc-gen-gogo/descriptor" + "github.com/golang/protobuf/proto" //nolint:staticcheck "google.golang.org/grpc" "google.golang.org/grpc/codes" rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" @@ -57,20 +54,12 @@ import ( type serverReflectionServer struct { rpb.UnimplementedServerReflectionServer - s *grpc.Server - + s *grpc.Server initSymbols sync.Once serviceNames []string symbols map[string]*dpb.FileDescriptorProto // map of fully-qualified names to files } -// Register registers the server reflection service on the given gRPC server. -func Register(s *grpc.Server) { - rpb.RegisterServerReflectionServer(s, &serverReflectionServer{ - s: s, - }) -} - // protoMessage is used for type assertion on proto messages. // Generated proto message implements function Descriptor(), but Descriptor() // is not part of interface proto.Message. This interface is needed to @@ -79,6 +68,13 @@ type protoMessage interface { Descriptor() ([]byte, []int) } +// Register registers the server reflection service on the given gRPC server. +func Register(s *grpc.Server) { + rpb.RegisterServerReflectionServer(s, &serverReflectionServer{ + s: s, + }) +} + func (s *serverReflectionServer) getSymbols() (svcNames []string, symbolIndex map[string]*dpb.FileDescriptorProto) { s.initSymbols.Do(func() { serviceInfo := s.s.GetServiceInfo() @@ -376,6 +372,8 @@ func (s *serverReflectionServer) allExtensionNumbersForTypeName(name string) ([] } // ServerReflectionInfo is the reflection service handler. +// +//nolint:staticcheck func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflection_ServerReflectionInfoServer) error { sentFileDescriptors := make(map[string]bool) for { @@ -386,7 +384,7 @@ func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflectio if err != nil { return err } - + out := &rpb.ServerReflectionResponse{ ValidHost: in.Host, OriginalRequest: in, diff --git a/go/inventory/v1/cluster.pb.go b/go/inventory/v1/cluster.pb.go index 8b45c53d..5aff67ab 100644 --- a/go/inventory/v1/cluster.pb.go +++ b/go/inventory/v1/cluster.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -83,7 +83,7 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/cluster.proto", fileDescriptor_205585ebfe7f68ce) } var fileDescriptor_205585ebfe7f68ce = []byte{ - // 292 bytes of a gzipped FileDescriptorProto + // 274 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0xcf, 0xcc, 0x2b, 0x4b, 0xcd, 0x2b, 0xc9, 0x2f, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, @@ -97,12 +97,11 @@ var fileDescriptor_205585ebfe7f68ce = []byte{ 0x2e, 0x76, 0xa8, 0xed, 0x12, 0x4c, 0x60, 0x2b, 0xa4, 0xb1, 0x59, 0x11, 0x0c, 0x51, 0xe2, 0x64, 0x07, 0xb5, 0x85, 0x1d, 0x2a, 0xf0, 0xea, 0x9e, 0x3c, 0x4c, 0xfb, 0xa7, 0x7b, 0xf2, 0x7c, 0x10, 0x9b, 0xa0, 0x02, 0x20, 0xbb, 0xf8, 0xa0, 0xfe, 0x80, 0x2a, 0x0f, 0x82, 0x29, 0xb6, 0x62, 0x79, - 0xb1, 0x40, 0x9e, 0xc1, 0xc9, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, + 0xb1, 0x40, 0x9e, 0xc1, 0xc9, 0xe4, 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, - 0x8c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0xee, 0xd1, 0xcd, - 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0x86, 0xf2, 0x12, 0x0b, 0x32, 0xf5, 0xd3, 0xf3, 0x51, 0x42, - 0x31, 0x89, 0x0d, 0x1c, 0x7c, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, 0x3a, 0xd9, 0x8b, - 0xcd, 0x01, 0x00, 0x00, + 0xa4, 0x0a, 0xb2, 0xd3, 0xf5, 0x12, 0xb3, 0x4b, 0xf4, 0x32, 0x41, 0x61, 0x8b, 0x12, 0x5a, 0x49, + 0x6c, 0xe0, 0x60, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x18, 0x2d, 0x69, 0xc9, 0xb5, 0x01, + 0x00, 0x00, } func (m *Cluster) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/cpu.pb.go b/go/inventory/v1/cpu.pb.go index 22c9a5c3..445ae99f 100644 --- a/go/inventory/v1/cpu.pb.go +++ b/go/inventory/v1/cpu.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -153,34 +153,33 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/cpu.proto", fileDescriptor_ed2b8a0bd798e5a3) } var fileDescriptor_ed2b8a0bd798e5a3 = []byte{ - // 425 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcf, 0x6e, 0xd3, 0x30, - 0x18, 0xaf, 0xd3, 0xae, 0x74, 0x2e, 0x13, 0x52, 0xc4, 0x21, 0x0c, 0x94, 0xaf, 0xb2, 0x34, 0xa9, - 0x1c, 0x48, 0xb4, 0x72, 0x41, 0x48, 0x5c, 0x3a, 0x2e, 0x93, 0x40, 0x2a, 0x41, 0xe3, 0xc0, 0x89, - 0xac, 0x49, 0x3b, 0x6b, 0xab, 0x5d, 0xdc, 0x24, 0xa8, 0x6f, 0xc1, 0x73, 0xf0, 0x24, 0x3b, 0xee, - 0x84, 0x38, 0x19, 0x94, 0xde, 0x22, 0x4e, 0x79, 0x02, 0x94, 0xcf, 0x26, 0x02, 0x6d, 0xb7, 0xef, - 0xf7, 0xcf, 0x3f, 0xd9, 0xfe, 0xe8, 0x93, 0xf8, 0x32, 0xde, 0x5c, 0x84, 0x5c, 0x14, 0xa9, 0xc8, - 0xa4, 0xda, 0x86, 0xc5, 0x71, 0x38, 0x5f, 0xe7, 0xc1, 0x5a, 0xc9, 0x4c, 0xba, 0x2e, 0xaa, 0x41, - 0xab, 0x06, 0xc5, 0xf1, 0xe1, 0xc3, 0xa5, 0x5c, 0x4a, 0x94, 0xc3, 0x66, 0x32, 0xce, 0xc3, 0xa3, - 0x3b, 0xce, 0x51, 0xe9, 0x46, 0xe6, 0x6a, 0x9e, 0xae, 0x63, 0xae, 0x8c, 0x8d, 0xfd, 0x26, 0xf4, - 0xde, 0xc9, 0xec, 0xec, 0x54, 0x2c, 0xa4, 0xfb, 0x94, 0x3a, 0x3c, 0xf1, 0xc8, 0x88, 0x8c, 0xf7, - 0xa7, 0x8f, 0x4a, 0x0d, 0xce, 0xe9, 0xeb, 0x4a, 0x83, 0xc3, 0x93, 0x5a, 0xc3, 0xfe, 0x36, 0x5e, - 0x5d, 0xbd, 0x64, 0x3c, 0x61, 0x91, 0xc3, 0x13, 0xf7, 0x15, 0xed, 0x17, 0xa9, 0x48, 0xa4, 0xf2, - 0x1c, 0xb4, 0x1f, 0x95, 0x1a, 0xfa, 0x1f, 0x90, 0xa9, 0x34, 0x58, 0xad, 0xd6, 0x70, 0x60, 0x62, - 0x06, 0xb3, 0xc8, 0x0a, 0xee, 0x0b, 0xba, 0xb7, 0x92, 0x49, 0x7a, 0xe5, 0x75, 0x31, 0xcd, 0x4a, - 0x0d, 0x7b, 0x6f, 0x1b, 0xa2, 0xd2, 0x60, 0x94, 0x5a, 0xc3, 0x7d, 0x93, 0x45, 0xc8, 0x22, 0x43, - 0x63, 0xf1, 0x5c, 0xaa, 0x74, 0xe3, 0xf5, 0x46, 0x64, 0x7c, 0x60, 0x8b, 0x91, 0xc1, 0x62, 0x9c, - 0xfe, 0x29, 0x46, 0xdc, 0x14, 0x9b, 0xe1, 0x3b, 0xa1, 0xdd, 0x93, 0xd9, 0x99, 0xbb, 0xa2, 0x83, - 0xcf, 0x79, 0x2c, 0x32, 0x9e, 0x6d, 0xf1, 0xc2, 0xc3, 0xc9, 0x28, 0xb8, 0xfd, 0xb4, 0x41, 0x64, - 0x1f, 0x6c, 0x16, 0x73, 0x35, 0x0d, 0xaf, 0x35, 0x74, 0x4a, 0x0d, 0x83, 0x77, 0x36, 0x59, 0x69, - 0x68, 0x4f, 0xa9, 0x35, 0x3c, 0x30, 0x95, 0x7f, 0x19, 0x16, 0xb5, 0xa2, 0xfb, 0x89, 0xf6, 0xb8, - 0x58, 0x48, 0xcf, 0x19, 0x75, 0xc7, 0xc3, 0xc9, 0xe3, 0xbb, 0xaa, 0xec, 0x27, 0xb4, 0x2d, 0xbd, - 0x06, 0x55, 0x1a, 0x30, 0x58, 0x6b, 0x18, 0xda, 0x0f, 0x10, 0x0b, 0xc9, 0xbe, 0xfd, 0x84, 0x81, - 0xf5, 0xbf, 0x8f, 0xd0, 0x30, 0x7d, 0x73, 0x5d, 0xfa, 0xe4, 0xa6, 0xf4, 0xc9, 0xaf, 0xd2, 0x27, - 0x5f, 0x77, 0x7e, 0xe7, 0x66, 0xe7, 0x77, 0x7e, 0xec, 0xfc, 0xce, 0xc7, 0xc9, 0x92, 0x67, 0x17, - 0xf9, 0x79, 0x30, 0x97, 0xab, 0x10, 0x7b, 0x9f, 0x89, 0x34, 0xfb, 0x22, 0xd5, 0xa5, 0x45, 0xf1, - 0x9a, 0x87, 0x4b, 0xf9, 0xdf, 0xa2, 0x9c, 0xf7, 0x71, 0x39, 0x9e, 0xff, 0x09, 0x00, 0x00, 0xff, - 0xff, 0xf7, 0x33, 0x13, 0x2d, 0x8d, 0x02, 0x00, 0x00, + // 409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xbd, 0xae, 0xd3, 0x30, + 0x14, 0x8e, 0xd3, 0xde, 0xd2, 0xeb, 0x72, 0x85, 0x14, 0x31, 0x84, 0x82, 0x72, 0x22, 0x4b, 0x57, + 0x2a, 0x4b, 0xa2, 0x16, 0x06, 0x84, 0xc4, 0xd2, 0xb2, 0x74, 0x40, 0x2a, 0x41, 0x65, 0x60, 0x22, + 0x34, 0x69, 0xb1, 0xda, 0xc6, 0xc1, 0x4d, 0x23, 0xf5, 0x2d, 0x78, 0x0e, 0x9e, 0xa4, 0x63, 0x27, + 0xc4, 0x64, 0x50, 0xba, 0x45, 0x4c, 0x79, 0x02, 0x14, 0xdb, 0x44, 0xa0, 0xdb, 0xed, 0x7c, 0x7f, + 0xfe, 0x64, 0xfb, 0xe0, 0x27, 0xe1, 0x3a, 0xdc, 0x7d, 0xf6, 0x69, 0x92, 0xc7, 0x49, 0xc6, 0xf8, + 0xc1, 0xcf, 0x87, 0xfe, 0x22, 0xdd, 0x7b, 0x29, 0x67, 0x19, 0xb3, 0x2c, 0xa9, 0x7a, 0x8d, 0xea, + 0xe5, 0xc3, 0xfe, 0xc3, 0x15, 0x5b, 0x31, 0x29, 0xfb, 0xf5, 0xa4, 0x9c, 0xfd, 0xdb, 0x0b, 0xe7, + 0xf0, 0x78, 0xc7, 0xf6, 0x7c, 0x11, 0xa7, 0x21, 0xe5, 0xca, 0x46, 0x7e, 0x23, 0x7c, 0x6f, 0x32, + 0x9b, 0x4f, 0x93, 0x25, 0xb3, 0x9e, 0x62, 0x93, 0x46, 0x36, 0x72, 0xd1, 0xe0, 0x7a, 0xfc, 0xa8, + 0x10, 0x60, 0x4e, 0x5f, 0x97, 0x02, 0x4c, 0x1a, 0x55, 0x02, 0xae, 0x0f, 0xe1, 0x76, 0xf3, 0x92, + 0xd0, 0x88, 0x04, 0x26, 0x8d, 0xac, 0x57, 0xb8, 0x93, 0xc7, 0x49, 0xc4, 0xb8, 0x6d, 0x4a, 0xfb, + 0x6d, 0x21, 0xa0, 0xf3, 0x5e, 0x32, 0xa5, 0x00, 0xad, 0x55, 0x02, 0x6e, 0x54, 0x4c, 0x61, 0x12, + 0x68, 0xc1, 0x7a, 0x81, 0xaf, 0xb6, 0x2c, 0x8a, 0x37, 0x76, 0x4b, 0xa6, 0x49, 0x21, 0xe0, 0xea, + 0x4d, 0x4d, 0x94, 0x02, 0x94, 0x52, 0x09, 0xb8, 0xaf, 0xb2, 0x12, 0x92, 0x40, 0xd1, 0xb2, 0x78, + 0xc1, 0x78, 0xbc, 0xb3, 0xdb, 0x2e, 0x1a, 0xdc, 0xe8, 0x62, 0xc9, 0xc8, 0x62, 0x39, 0xfd, 0x53, + 0x2c, 0x71, 0x5d, 0xac, 0x86, 0xef, 0x08, 0xb7, 0x26, 0xb3, 0xb9, 0xb5, 0xc5, 0xdd, 0x2f, 0xfb, + 0x30, 0xc9, 0x68, 0x76, 0x90, 0x17, 0xee, 0x8d, 0x5c, 0xef, 0xee, 0xd3, 0x7a, 0x81, 0x7e, 0xb0, + 0x59, 0x48, 0xf9, 0xd8, 0x3f, 0x0a, 0x30, 0x0a, 0x01, 0xdd, 0xb7, 0x3a, 0x59, 0x0a, 0x68, 0x4e, + 0xa9, 0x04, 0x3c, 0x50, 0x95, 0x7f, 0x19, 0x12, 0x34, 0xa2, 0xf5, 0x11, 0xb7, 0x69, 0xb2, 0x64, + 0xb6, 0xe9, 0xb6, 0x06, 0xbd, 0xd1, 0xe3, 0x4b, 0x55, 0xfa, 0x13, 0x9a, 0x96, 0x76, 0x8d, 0x4a, + 0x01, 0x32, 0x58, 0x09, 0xe8, 0xe9, 0x0f, 0x48, 0x96, 0x8c, 0x7c, 0xfb, 0x09, 0x5d, 0xed, 0x7f, + 0x17, 0x48, 0xc3, 0xf8, 0xf9, 0xb1, 0x70, 0xd0, 0xa9, 0x70, 0xd0, 0xaf, 0xc2, 0x41, 0x5f, 0xcf, + 0x8e, 0x71, 0x3a, 0x3b, 0xc6, 0x8f, 0xb3, 0x63, 0x7c, 0xe8, 0xa7, 0xeb, 0x95, 0x17, 0xae, 0x33, + 0x8f, 0xd6, 0xfb, 0xf1, 0xdf, 0x42, 0x7c, 0xea, 0xc8, 0x25, 0x78, 0xf6, 0x27, 0x00, 0x00, 0xff, + 0xff, 0x72, 0x3c, 0x6f, 0x8e, 0x75, 0x02, 0x00, 0x00, } func (m *CPUInfo) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/gpu.pb.go b/go/inventory/v1/gpu.pb.go index f69ac814..8c7b915a 100644 --- a/go/inventory/v1/gpu.pb.go +++ b/go/inventory/v1/gpu.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -169,39 +169,38 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/gpu.proto", fileDescriptor_2cc01b12bd00ffcc) } var fileDescriptor_2cc01b12bd00ffcc = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x4f, 0x6b, 0xdb, 0x30, - 0x14, 0x8f, 0x9b, 0x2c, 0x71, 0x14, 0xc6, 0x86, 0xd8, 0xc1, 0x74, 0xc3, 0x0a, 0x82, 0x42, 0x19, - 0xd4, 0xa6, 0xc9, 0x6d, 0xb0, 0x4b, 0x28, 0x94, 0x8c, 0x76, 0x64, 0xee, 0xba, 0xc3, 0x2e, 0x99, - 0x1a, 0x2b, 0xae, 0x68, 0x6d, 0x65, 0x8a, 0x93, 0x91, 0x7e, 0x8a, 0x7d, 0x8e, 0x5d, 0xf7, 0x25, - 0x7a, 0xec, 0x69, 0xec, 0xa4, 0x0d, 0xe7, 0x96, 0x63, 0x3e, 0xc1, 0x90, 0xe4, 0x3f, 0x1d, 0xed, - 0xed, 0xbd, 0xdf, 0xbf, 0x67, 0xeb, 0x3d, 0xf0, 0x8a, 0x5c, 0x91, 0xf9, 0xa5, 0xcf, 0x92, 0x25, - 0x4d, 0x52, 0x2e, 0x56, 0xfe, 0xf2, 0xd0, 0x8f, 0x66, 0x0b, 0x6f, 0x26, 0x78, 0xca, 0x21, 0xd4, - 0xac, 0x57, 0xb2, 0xde, 0xf2, 0x70, 0xf7, 0x45, 0xc4, 0x23, 0xae, 0x69, 0x5f, 0x55, 0x46, 0xb9, - 0xbb, 0xf7, 0x48, 0x8e, 0xa0, 0x73, 0xbe, 0x10, 0x13, 0x3a, 0x23, 0x4c, 0x18, 0x19, 0xfe, 0x59, - 0x07, 0xad, 0xe3, 0xd1, 0xf9, 0x30, 0x99, 0x72, 0xf8, 0x16, 0x34, 0x97, 0x34, 0x09, 0xb9, 0x70, - 0xac, 0xae, 0xb5, 0xdf, 0x1e, 0xec, 0x65, 0x12, 0x35, 0x3f, 0x69, 0x64, 0x23, 0x51, 0xce, 0x6d, - 0x25, 0x7a, 0xba, 0x22, 0xf1, 0xf5, 0x1b, 0x6c, 0x7a, 0x1c, 0xe4, 0x04, 0x7c, 0x07, 0xda, 0xa6, - 0x1a, 0xb3, 0xd0, 0xd9, 0xd1, 0x09, 0x07, 0x99, 0x44, 0xb6, 0x49, 0x18, 0x1e, 0x6d, 0x24, 0xaa, - 0x04, 0x5b, 0x89, 0x9e, 0xdf, 0x8f, 0x19, 0xb3, 0x10, 0x07, 0xb6, 0xa9, 0x87, 0x21, 0xec, 0x83, - 0x46, 0x42, 0x62, 0xea, 0xd4, 0x75, 0x0c, 0xca, 0x24, 0x6a, 0xbc, 0x27, 0x31, 0xdd, 0x48, 0xa4, - 0xf1, 0xad, 0x44, 0x1d, 0xe3, 0x56, 0x1d, 0x0e, 0x34, 0x08, 0x8f, 0x40, 0x2b, 0xe6, 0x21, 0xbd, - 0x66, 0xa1, 0xd3, 0xd0, 0xbe, 0xd7, 0x99, 0x44, 0xad, 0x53, 0x05, 0xe9, 0xe9, 0xb6, 0x66, 0xcd, - 0xf0, 0x67, 0xc6, 0x5e, 0x20, 0x38, 0x28, 0xac, 0xf0, 0x04, 0xb4, 0x59, 0x92, 0x52, 0x31, 0x25, - 0x13, 0xea, 0x3c, 0xd1, 0x39, 0x5e, 0x26, 0x51, 0x7b, 0x58, 0x80, 0xea, 0x3f, 0x4a, 0x45, 0xf5, - 0x1f, 0x25, 0x84, 0x83, 0x8a, 0x86, 0x1f, 0x41, 0x27, 0xa6, 0x31, 0x17, 0xab, 0xf1, 0x9c, 0xdd, - 0x50, 0xa7, 0xa9, 0xf3, 0xfa, 0x99, 0x44, 0xe0, 0x54, 0xc3, 0x67, 0xec, 0x46, 0x05, 0xde, 0x17, - 0x6d, 0x25, 0x82, 0xf9, 0xd7, 0x55, 0x20, 0x0e, 0x40, 0x5c, 0x1a, 0xf0, 0x2f, 0x0b, 0xd4, 0x8f, - 0x47, 0xe7, 0x30, 0x06, 0xf6, 0xd7, 0x05, 0x49, 0x52, 0x96, 0xae, 0xf4, 0xce, 0x3a, 0xbd, 0xae, - 0xf7, 0xf0, 0x42, 0xbc, 0x20, 0xdf, 0xfb, 0x88, 0x30, 0x31, 0xf0, 0x6f, 0x25, 0xaa, 0xa9, 0xbd, - 0x7c, 0xc8, 0x9d, 0xea, 0x65, 0x8a, 0x94, 0xea, 0x65, 0x0a, 0x04, 0x07, 0x25, 0x09, 0xbf, 0x80, - 0x06, 0x4b, 0xa6, 0xdc, 0xd9, 0xe9, 0xd6, 0xf7, 0x3b, 0xbd, 0x97, 0x8f, 0x8d, 0xca, 0x6f, 0xa9, - 0x9c, 0xd2, 0x50, 0x9d, 0x5a, 0x9b, 0x32, 0x56, 0x6b, 0x53, 0x1d, 0xfe, 0xf1, 0x07, 0xd9, 0xb9, - 0xfe, 0x2c, 0xd0, 0x82, 0xc1, 0xc9, 0x6d, 0xe6, 0x5a, 0x77, 0x99, 0x6b, 0xfd, 0xcd, 0x5c, 0xeb, - 0xfb, 0xda, 0xad, 0xdd, 0xad, 0xdd, 0xda, 0xef, 0xb5, 0x5b, 0xfb, 0xdc, 0x8b, 0x58, 0x7a, 0xb9, - 0xb8, 0xf0, 0x26, 0x3c, 0xf6, 0xf5, 0xdc, 0x83, 0x84, 0xa6, 0xdf, 0xb8, 0xb8, 0xca, 0x3b, 0x32, - 0x63, 0x7e, 0xc4, 0xff, 0xbb, 0xf7, 0x8b, 0xa6, 0xbe, 0xf1, 0xfe, 0xbf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xed, 0x18, 0x1d, 0x0d, 0x54, 0x03, 0x00, 0x00, + // 491 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0x36, 0x31, 0xd9, 0x4c, 0x10, 0x65, 0xf0, 0xb0, 0x44, 0xd9, 0x09, 0x03, 0x85, 0x22, + 0xb8, 0x4b, 0x1b, 0x4f, 0x82, 0x97, 0x50, 0x28, 0x11, 0x2b, 0x71, 0x6b, 0x3d, 0x78, 0x89, 0x63, + 0x77, 0x12, 0x87, 0x74, 0x77, 0xe2, 0x64, 0x13, 0x48, 0x3f, 0x85, 0x9f, 0xc3, 0xab, 0x5f, 0xa2, + 0xc7, 0x9e, 0xc4, 0xd3, 0x28, 0x93, 0x5b, 0x8e, 0xf9, 0x04, 0x32, 0x33, 0xfb, 0xa7, 0xd2, 0xde, + 0xde, 0xfb, 0xfd, 0x7b, 0xbb, 0xf3, 0x1e, 0x78, 0x46, 0x66, 0x64, 0xf1, 0x35, 0x64, 0xe9, 0x8a, + 0xa6, 0x19, 0x17, 0xeb, 0x70, 0x75, 0x18, 0x4e, 0xe7, 0xcb, 0x60, 0x2e, 0x78, 0xc6, 0x21, 0x34, + 0x6c, 0x50, 0xb2, 0xc1, 0xea, 0xb0, 0xfb, 0x64, 0xca, 0xa7, 0xdc, 0xd0, 0xa1, 0xae, 0xac, 0xb2, + 0xbb, 0x7f, 0x4f, 0x8e, 0xa0, 0x0b, 0xbe, 0x14, 0x17, 0x74, 0x4e, 0x98, 0xb0, 0x32, 0xfc, 0xb3, + 0x0e, 0x5a, 0x27, 0xa3, 0xf3, 0x61, 0x3a, 0xe1, 0xf0, 0x35, 0x68, 0xae, 0x68, 0x1a, 0x73, 0xe1, + 0x39, 0x3d, 0xe7, 0xa0, 0x3d, 0xd8, 0x57, 0x12, 0x35, 0x3f, 0x1a, 0x64, 0x2b, 0x51, 0xce, 0xed, + 0x24, 0x7a, 0xb8, 0x26, 0xc9, 0xe5, 0x2b, 0x6c, 0x7b, 0x1c, 0xe5, 0x04, 0x7c, 0x03, 0xda, 0xb6, + 0x1a, 0xb3, 0xd8, 0xdb, 0x33, 0x09, 0x2f, 0x94, 0x44, 0xae, 0x4d, 0x18, 0x1e, 0x6f, 0x25, 0xaa, + 0x04, 0x3b, 0x89, 0x1e, 0xdf, 0x8e, 0x19, 0xb3, 0x18, 0x47, 0xae, 0xad, 0x87, 0x31, 0xec, 0x83, + 0x46, 0x4a, 0x12, 0xea, 0xd5, 0x4d, 0x0c, 0x52, 0x12, 0x35, 0xde, 0x91, 0x84, 0x6e, 0x25, 0x32, + 0xf8, 0x4e, 0xa2, 0x8e, 0x75, 0xeb, 0x0e, 0x47, 0x06, 0x84, 0xc7, 0xa0, 0x95, 0xf0, 0x98, 0x5e, + 0xb2, 0xd8, 0x6b, 0x18, 0xdf, 0x73, 0x25, 0x51, 0xeb, 0x54, 0x43, 0x66, 0xba, 0x6b, 0x58, 0x3b, + 0xfc, 0x91, 0xb5, 0x17, 0x08, 0x8e, 0x0a, 0x2b, 0x7c, 0x0b, 0xda, 0x2c, 0xcd, 0xa8, 0x98, 0x90, + 0x0b, 0xea, 0x3d, 0x30, 0x39, 0x81, 0x92, 0xa8, 0x3d, 0x2c, 0x40, 0xfd, 0x1f, 0xa5, 0xa2, 0xfa, + 0x8f, 0x12, 0xc2, 0x51, 0x45, 0xc3, 0x0f, 0xa0, 0x93, 0xd0, 0x84, 0x8b, 0xf5, 0x78, 0xc1, 0xae, + 0xa8, 0xd7, 0x34, 0x79, 0x7d, 0x25, 0x11, 0x38, 0x35, 0xf0, 0x19, 0xbb, 0xd2, 0x81, 0xb7, 0x45, + 0x3b, 0x89, 0x60, 0xfe, 0x75, 0x15, 0x88, 0x23, 0x90, 0x94, 0x06, 0xfc, 0xcb, 0x01, 0xf5, 0x93, + 0xd1, 0x39, 0x4c, 0x80, 0xfb, 0x6d, 0x49, 0xd2, 0x8c, 0x65, 0x6b, 0xb3, 0xb3, 0xce, 0x51, 0x2f, + 0xb8, 0x7b, 0x21, 0x41, 0x94, 0xef, 0x7d, 0x44, 0x98, 0x18, 0x84, 0xd7, 0x12, 0xd5, 0xf4, 0x5e, + 0xde, 0xe7, 0x4e, 0xfd, 0x32, 0x45, 0x4a, 0xf5, 0x32, 0x05, 0x82, 0xa3, 0x92, 0x84, 0x9f, 0x41, + 0x83, 0xa5, 0x13, 0xee, 0xed, 0xf5, 0xea, 0x07, 0x9d, 0xa3, 0xa7, 0xf7, 0x8d, 0xca, 0x6f, 0xa9, + 0x9c, 0xd2, 0xd0, 0x9d, 0x5e, 0x9b, 0x36, 0x56, 0x6b, 0xd3, 0x1d, 0xfe, 0xf1, 0x07, 0xb9, 0xb9, + 0xfe, 0x2c, 0x32, 0x82, 0xc1, 0xcb, 0x6b, 0xe5, 0x3b, 0x37, 0xca, 0x77, 0xfe, 0x2a, 0xdf, 0xf9, + 0xbe, 0xf1, 0x6b, 0x37, 0x1b, 0xbf, 0xf6, 0x7b, 0xe3, 0xd7, 0x3e, 0x75, 0xe7, 0xb3, 0x69, 0x40, + 0x66, 0x59, 0xc0, 0xf4, 0x99, 0xff, 0x77, 0xd7, 0x5f, 0x9a, 0xe6, 0x96, 0xfb, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x4c, 0x53, 0xb7, 0x15, 0x3c, 0x03, 0x00, 0x00, } func (m *GPUInfo) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/memory.pb.go b/go/inventory/v1/memory.pb.go index 036cdeb6..10b33b66 100644 --- a/go/inventory/v1/memory.pb.go +++ b/go/inventory/v1/memory.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -153,35 +153,34 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/memory.proto", fileDescriptor_bf744888c94a0308) } var fileDescriptor_bf744888c94a0308 = []byte{ - // 438 bytes of a gzipped FileDescriptorProto + // 422 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xbf, 0x6e, 0xd3, 0x40, - 0x1c, 0x8e, 0x53, 0x37, 0x6a, 0x2e, 0x20, 0xc4, 0x89, 0xc1, 0xea, 0xe0, 0x5f, 0x74, 0x52, 0xa5, - 0x2e, 0xd8, 0x34, 0x5d, 0x10, 0x12, 0x4b, 0x36, 0x24, 0x10, 0xe0, 0x54, 0x0c, 0x2c, 0xe8, 0xda, - 0x5e, 0xd2, 0x53, 0x6b, 0x9f, 0xb9, 0x5c, 0x82, 0xdc, 0x57, 0x60, 0xe1, 0x39, 0x78, 0x92, 0x8e, - 0x1d, 0x99, 0xae, 0xe8, 0xb2, 0x79, 0xf4, 0x13, 0xa0, 0xbb, 0x73, 0x1d, 0x10, 0xdd, 0xfc, 0x7d, - 0xbf, 0xef, 0x8f, 0xf4, 0xf9, 0x10, 0xd0, 0x4b, 0xba, 0xbc, 0x48, 0x79, 0xb1, 0x66, 0x85, 0x12, - 0xb2, 0x4a, 0xd7, 0x47, 0x69, 0xce, 0x72, 0x21, 0xab, 0xa4, 0x94, 0x42, 0x09, 0x8c, 0x9d, 0x20, - 0xe9, 0x04, 0xc9, 0xfa, 0x68, 0xff, 0xd9, 0x42, 0x2c, 0x84, 0x3b, 0xa7, 0xf6, 0xcb, 0x2b, 0xf7, - 0x0f, 0x1e, 0x88, 0x92, 0x6c, 0x29, 0x56, 0xf2, 0x8c, 0x95, 0x94, 0x4b, 0x2f, 0x23, 0xdf, 0xfb, - 0x08, 0xbd, 0x73, 0x0d, 0x6f, 0x8a, 0xb9, 0xc0, 0xaf, 0xd1, 0x60, 0xcd, 0x8a, 0x73, 0x21, 0xa3, - 0x60, 0x1c, 0x1c, 0x0e, 0xa7, 0x07, 0x46, 0xc3, 0xe0, 0x93, 0x63, 0x6a, 0x0d, 0xed, 0xad, 0xd1, - 0xf0, 0xb8, 0xa2, 0xf9, 0xd5, 0x2b, 0xe2, 0x31, 0xc9, 0xda, 0x03, 0x3e, 0x46, 0xa1, 0xaa, 0x4a, - 0x16, 0xf5, 0x9d, 0x19, 0x8c, 0x86, 0xf0, 0xa4, 0x2a, 0x59, 0xad, 0xc1, 0xf1, 0x8d, 0x86, 0x91, - 0x37, 0x5a, 0x44, 0x32, 0x47, 0xe2, 0xf7, 0x08, 0x29, 0xa1, 0xe8, 0xd5, 0x97, 0x25, 0xbf, 0x66, - 0xd1, 0x8e, 0xb3, 0xbe, 0x30, 0x1a, 0x86, 0x27, 0x96, 0x9d, 0xf1, 0x6b, 0xeb, 0xff, 0x4b, 0xd2, - 0x68, 0x78, 0xda, 0xa6, 0x74, 0x1c, 0xc9, 0x86, 0xea, 0x5e, 0x8d, 0x5f, 0xa2, 0xdd, 0x65, 0xc9, - 0xd8, 0x79, 0x14, 0xba, 0x2c, 0x62, 0x34, 0xec, 0xce, 0x2c, 0x51, 0x6b, 0xf0, 0x97, 0x46, 0xc3, - 0x23, 0x1f, 0xe1, 0x20, 0xc9, 0x3c, 0x4d, 0xee, 0x02, 0x34, 0xf0, 0x6b, 0xe0, 0x1c, 0xed, 0x7d, - 0x5d, 0xd1, 0x42, 0x71, 0x55, 0xb9, 0x2d, 0x46, 0x93, 0x71, 0xf2, 0xff, 0xf8, 0x49, 0xd6, 0x4e, - 0xfa, 0x81, 0x72, 0x39, 0x4d, 0x6f, 0x34, 0xf4, 0x8c, 0x86, 0xbd, 0x8f, 0xad, 0xb3, 0xd6, 0xd0, - 0xa5, 0x34, 0x1a, 0x9e, 0xf8, 0xce, 0x7b, 0x86, 0x64, 0xdd, 0x11, 0xcf, 0x51, 0xc8, 0x8b, 0xb9, - 0x88, 0xfa, 0xe3, 0x9d, 0xc3, 0xd1, 0x24, 0x7e, 0xa8, 0x6a, 0xfb, 0x9b, 0xa6, 0x93, 0xb6, 0x28, - 0xb4, 0xc8, 0xae, 0x6b, 0xbd, 0xdb, 0x75, 0x2d, 0x22, 0x3f, 0xef, 0x60, 0xb4, 0xb5, 0xcc, 0x32, - 0xa7, 0x99, 0xbe, 0xbd, 0x31, 0x71, 0x70, 0x6b, 0xe2, 0xe0, 0xb7, 0x89, 0x83, 0x1f, 0x9b, 0xb8, - 0x77, 0xbb, 0x89, 0x7b, 0xbf, 0x36, 0x71, 0xef, 0xf3, 0x64, 0xc1, 0xd5, 0xc5, 0xea, 0x34, 0x39, - 0x13, 0x79, 0xea, 0xda, 0x9f, 0x17, 0x4c, 0x7d, 0x13, 0xf2, 0xb2, 0x45, 0xb4, 0xe4, 0xe9, 0x42, - 0xfc, 0xf3, 0xa0, 0x4e, 0x07, 0xee, 0x11, 0x1d, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xd0, - 0x7e, 0x48, 0xb8, 0x02, 0x00, 0x00, + 0x18, 0x8f, 0x53, 0x37, 0x6a, 0x2e, 0x20, 0xc4, 0x89, 0xc1, 0xca, 0xe0, 0x2f, 0x3a, 0xa9, 0x52, + 0x27, 0x9b, 0xa6, 0x0c, 0x08, 0x89, 0x25, 0x1b, 0x03, 0x02, 0x9c, 0x8a, 0x81, 0x05, 0x1d, 0xf4, + 0x12, 0x4e, 0x69, 0x7c, 0xe6, 0x72, 0xb5, 0xe4, 0xbe, 0x02, 0x0b, 0xcf, 0xc1, 0x93, 0x74, 0xec, + 0xc8, 0x74, 0x45, 0x97, 0xcd, 0xa3, 0x9f, 0x00, 0xdd, 0x9d, 0xeb, 0x80, 0x9a, 0xcd, 0xbf, 0xbf, + 0x9f, 0xf4, 0xf3, 0x21, 0xa0, 0x2b, 0xba, 0xf9, 0x96, 0xf2, 0xbc, 0x64, 0xb9, 0x12, 0xb2, 0x4a, + 0xcb, 0xd3, 0x74, 0xcd, 0xd6, 0x42, 0x56, 0x49, 0x21, 0x85, 0x12, 0x18, 0x3b, 0x43, 0xd2, 0x19, + 0x92, 0xf2, 0x74, 0xfc, 0x6c, 0x29, 0x96, 0xc2, 0xc9, 0xa9, 0xfd, 0xf2, 0xce, 0xf1, 0xf1, 0x9e, + 0x2a, 0xc9, 0x36, 0xe2, 0x4a, 0x7e, 0x65, 0x05, 0xe5, 0xd2, 0xdb, 0xc8, 0x8f, 0x3e, 0x42, 0x6f, + 0xdd, 0x85, 0x37, 0xf9, 0x42, 0xe0, 0xd7, 0x68, 0x50, 0xb2, 0xfc, 0x42, 0xc8, 0x28, 0x98, 0x04, + 0x27, 0xc3, 0xd9, 0xb1, 0xd1, 0x30, 0xf8, 0xe8, 0x98, 0x5a, 0x43, 0xab, 0x35, 0x1a, 0x1e, 0x57, + 0x74, 0x7d, 0xf9, 0x8a, 0x78, 0x4c, 0xb2, 0x56, 0xc0, 0x67, 0x28, 0x54, 0x55, 0xc1, 0xa2, 0xbe, + 0x0b, 0x83, 0xd1, 0x10, 0x9e, 0x57, 0x05, 0xab, 0x35, 0x38, 0xbe, 0xd1, 0x30, 0xf2, 0x41, 0x8b, + 0x48, 0xe6, 0x48, 0xfc, 0x0e, 0x21, 0x25, 0x14, 0xbd, 0xfc, 0xbc, 0xe1, 0xd7, 0x2c, 0x3a, 0x70, + 0xd1, 0xe7, 0x46, 0xc3, 0xf0, 0xdc, 0xb2, 0x73, 0x7e, 0x6d, 0xf3, 0xff, 0x58, 0x1a, 0x0d, 0x4f, + 0xdb, 0x96, 0x8e, 0x23, 0xd9, 0x50, 0xdd, 0xbb, 0xf1, 0x4b, 0x74, 0xb8, 0x29, 0x18, 0xbb, 0x88, + 0x42, 0xd7, 0x45, 0x8c, 0x86, 0xc3, 0xb9, 0x25, 0x6a, 0x0d, 0x5e, 0x69, 0x34, 0x3c, 0xf2, 0x15, + 0x0e, 0x92, 0xcc, 0xd3, 0xe4, 0x2e, 0x40, 0x03, 0xbf, 0x06, 0x5e, 0xa3, 0xa3, 0xef, 0x57, 0x34, + 0x57, 0x5c, 0x55, 0x6e, 0x8b, 0xd1, 0x74, 0x92, 0x3c, 0x1c, 0x3f, 0xc9, 0xda, 0x49, 0xdf, 0x53, + 0x2e, 0x67, 0xe9, 0x8d, 0x86, 0x9e, 0xd1, 0x70, 0xf4, 0xa1, 0x4d, 0xd6, 0x1a, 0xba, 0x96, 0x46, + 0xc3, 0x13, 0x7f, 0xf3, 0x9e, 0x21, 0x59, 0x27, 0xe2, 0x05, 0x0a, 0x79, 0xbe, 0x10, 0x51, 0x7f, + 0x72, 0x70, 0x32, 0x9a, 0xc6, 0xfb, 0x4e, 0xed, 0x7e, 0xd3, 0x6c, 0xda, 0x1e, 0x0a, 0x2d, 0xb2, + 0xeb, 0xda, 0xec, 0x6e, 0x5d, 0x8b, 0xc8, 0xaf, 0x3b, 0x18, 0xed, 0x22, 0xf3, 0xcc, 0x79, 0x66, + 0x2f, 0x6e, 0x4c, 0x1c, 0xdc, 0x9a, 0x38, 0xf8, 0x63, 0xe2, 0xe0, 0xe7, 0x36, 0xee, 0xdd, 0x6e, + 0xe3, 0xde, 0xef, 0x6d, 0xdc, 0xfb, 0x34, 0x2e, 0x56, 0xcb, 0x84, 0xae, 0x54, 0xc2, 0xed, 0x3b, + 0xfa, 0xef, 0xe1, 0x7c, 0x19, 0xb8, 0xc7, 0x72, 0xf6, 0x37, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xc9, + 0x8e, 0xdc, 0xa0, 0x02, 0x00, 0x00, } func (m *MemoryInfo) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/metrics.go b/go/inventory/v1/metrics.go index bde7e3cc..df2db230 100644 --- a/go/inventory/v1/metrics.go +++ b/go/inventory/v1/metrics.go @@ -3,7 +3,7 @@ package v1 import ( sdk "github.com/cosmos/cosmos-sdk/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" ) type ResourcesMetric struct { diff --git a/go/inventory/v1/node.pb.go b/go/inventory/v1/node.pb.go index d37c2d29..4b033a73 100644 --- a/go/inventory/v1/node.pb.go +++ b/go/inventory/v1/node.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -137,31 +137,30 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/node.proto", fileDescriptor_5f97c0fb35079221) } var fileDescriptor_5f97c0fb35079221 = []byte{ - // 375 bytes of a gzipped FileDescriptorProto + // 360 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x31, 0x4f, 0xc2, 0x40, - 0x1c, 0xc5, 0x7b, 0x40, 0x4c, 0x5a, 0x08, 0x92, 0x6a, 0x4c, 0x43, 0x62, 0x0f, 0x2f, 0x0e, 0x2c, - 0xb6, 0x01, 0x36, 0x1d, 0x4c, 0xca, 0x6a, 0x18, 0xea, 0xe6, 0x62, 0x8e, 0x72, 0x29, 0x0d, 0xb4, - 0x47, 0x7a, 0x05, 0x43, 0xe2, 0xea, 0xee, 0xc7, 0xf1, 0x23, 0x30, 0x32, 0x3a, 0x5d, 0x4c, 0xd9, - 0x3a, 0xf6, 0x13, 0x98, 0xb6, 0x58, 0x5a, 0xd4, 0xad, 0xf7, 0x7e, 0xaf, 0xef, 0xdd, 0xfd, 0xf3, - 0x97, 0x2e, 0xf1, 0x0c, 0xb3, 0xa9, 0xee, 0x78, 0x2b, 0xe2, 0x05, 0xd4, 0x5f, 0xeb, 0xab, 0x9e, - 0xee, 0xd1, 0x09, 0xd1, 0x16, 0x3e, 0x0d, 0xa8, 0x2c, 0xa7, 0x58, 0xcb, 0xb1, 0xb6, 0xea, 0xb5, - 0xcf, 0x6d, 0x6a, 0xd3, 0x14, 0xeb, 0xc9, 0x57, 0xe6, 0x6c, 0xa3, 0x3f, 0x82, 0x7c, 0xc2, 0xe8, - 0xd2, 0xb7, 0x08, 0xcb, 0x3c, 0xe8, 0x55, 0x6a, 0x8d, 0xe8, 0x84, 0x0c, 0xf1, 0x02, 0x8f, 0x9d, - 0xb9, 0x13, 0x38, 0x84, 0xc9, 0x53, 0xe9, 0x94, 0x05, 0xd4, 0xc7, 0x36, 0x79, 0xb6, 0xe6, 0x98, - 0x31, 0xc2, 0x14, 0xd0, 0xa9, 0x76, 0x45, 0xe3, 0x3e, 0xe4, 0xb0, 0xf9, 0x98, 0xa1, 0x61, 0x46, - 0x22, 0x0e, 0x8f, 0xcd, 0x31, 0x87, 0x17, 0x6b, 0xec, 0xce, 0x6f, 0xd1, 0x11, 0x40, 0x66, 0x93, - 0x95, 0x7e, 0x46, 0x1f, 0x15, 0xa9, 0x96, 0xd4, 0xcb, 0x03, 0xa9, 0xe6, 0x61, 0x97, 0x28, 0xa0, - 0x03, 0xba, 0xa2, 0x01, 0x43, 0x0e, 0x6b, 0x23, 0xec, 0x92, 0x88, 0xc3, 0x54, 0x8f, 0x39, 0xac, - 0x67, 0x91, 0xc9, 0x09, 0x99, 0xa9, 0x28, 0x33, 0x49, 0xcc, 0x9f, 0xa3, 0x54, 0x3a, 0xa0, 0x5b, - 0xef, 0x5f, 0x69, 0xbf, 0xa7, 0xa3, 0x25, 0x0d, 0xe6, 0x8f, 0xd1, 0xe8, 0x6f, 0x38, 0x14, 0x42, - 0x0e, 0xc5, 0x5c, 0x8a, 0x38, 0x3c, 0x04, 0xc5, 0x1c, 0xb6, 0xb2, 0xaa, 0x5c, 0x42, 0xe6, 0x01, - 0xcb, 0x6f, 0x40, 0x6a, 0x58, 0x85, 0x69, 0x29, 0xd5, 0xb4, 0xf8, 0xfa, 0xbf, 0xe2, 0xe2, 0x64, - 0x8d, 0xbb, 0x7d, 0x77, 0xa3, 0xa8, 0x46, 0x1c, 0x96, 0x12, 0x63, 0x0e, 0xcf, 0xb2, 0x1b, 0x14, - 0x55, 0x64, 0x96, 0x4c, 0xc6, 0xc3, 0x26, 0x54, 0xc1, 0x36, 0x54, 0xc1, 0x57, 0xa8, 0x82, 0xf7, - 0x9d, 0x2a, 0x6c, 0x77, 0xaa, 0xf0, 0xb9, 0x53, 0x85, 0xa7, 0xbe, 0xed, 0x04, 0xd3, 0xe5, 0x58, - 0xb3, 0xa8, 0xab, 0xa7, 0x97, 0xba, 0xf1, 0x48, 0xf0, 0x42, 0xfd, 0xd9, 0xfe, 0x84, 0x17, 0x8e, - 0x6e, 0xd3, 0xd2, 0x5a, 0x8c, 0x4f, 0xd2, 0x6d, 0x18, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0x7f, - 0xc1, 0xd6, 0x12, 0x7c, 0x02, 0x00, 0x00, + 0x1c, 0xc5, 0x7b, 0x40, 0x4c, 0x5a, 0x08, 0x92, 0x6a, 0x4c, 0x43, 0x62, 0x0f, 0x2f, 0x0e, 0x4c, + 0xd7, 0x00, 0x4e, 0x3a, 0x98, 0x94, 0x9d, 0xa1, 0x6e, 0x2e, 0xe6, 0x80, 0x4b, 0x69, 0x80, 0x1e, + 0xe9, 0x55, 0x12, 0x12, 0x57, 0x77, 0x3f, 0x8e, 0x1f, 0x81, 0x91, 0xd1, 0xe9, 0x62, 0xca, 0xd6, + 0xb1, 0x9f, 0xc0, 0xb4, 0xa7, 0xa5, 0x45, 0xdd, 0xda, 0xf7, 0x7b, 0x7d, 0xaf, 0xf7, 0xff, 0x9f, + 0x76, 0x49, 0xe6, 0x84, 0xcf, 0x2c, 0xcf, 0x5f, 0x53, 0x3f, 0x64, 0xc1, 0xc6, 0x5a, 0xf7, 0x2c, + 0x9f, 0x4d, 0x29, 0x5e, 0x05, 0x2c, 0x64, 0xba, 0x9e, 0x61, 0x9c, 0x63, 0xbc, 0xee, 0xb5, 0xcf, + 0x5d, 0xe6, 0xb2, 0x0c, 0x5b, 0xe9, 0x93, 0x74, 0xb6, 0xd1, 0x1f, 0x41, 0x01, 0xe5, 0xec, 0x39, + 0x98, 0x50, 0x2e, 0x3d, 0xe8, 0x45, 0x6b, 0x8d, 0xd8, 0x94, 0x0e, 0xc9, 0x8a, 0x8c, 0xbd, 0x85, + 0x17, 0x7a, 0x94, 0xeb, 0x33, 0xed, 0x94, 0x87, 0x2c, 0x20, 0x2e, 0x7d, 0x9a, 0x2c, 0x08, 0xe7, + 0x94, 0x1b, 0xa0, 0x53, 0xed, 0xaa, 0xf6, 0x7d, 0x24, 0x60, 0xf3, 0x41, 0xa2, 0xa1, 0x24, 0xb1, + 0x80, 0xc7, 0xe6, 0x44, 0xc0, 0x8b, 0x0d, 0x59, 0x2e, 0x6e, 0xd1, 0x11, 0x40, 0x4e, 0x93, 0x97, + 0x3e, 0x46, 0xef, 0x15, 0xad, 0x96, 0xd6, 0xeb, 0x03, 0xad, 0xe6, 0x93, 0x25, 0x35, 0x40, 0x07, + 0x74, 0x55, 0x1b, 0x46, 0x02, 0xd6, 0x46, 0x64, 0x49, 0x63, 0x01, 0x33, 0x3d, 0x11, 0xb0, 0x2e, + 0x23, 0xd3, 0x37, 0xe4, 0x64, 0xa2, 0xce, 0x35, 0x35, 0x3f, 0x8e, 0x51, 0xe9, 0x80, 0x6e, 0xbd, + 0x7f, 0x85, 0x7f, 0x4f, 0x07, 0xa7, 0x0d, 0xce, 0x8f, 0xd1, 0xee, 0x6f, 0x05, 0x54, 0x22, 0x01, + 0xd5, 0x5c, 0x8a, 0x05, 0x3c, 0x04, 0x25, 0x02, 0xb6, 0x64, 0x55, 0x2e, 0x21, 0xe7, 0x80, 0xf5, + 0x57, 0xa0, 0x35, 0x26, 0x85, 0x69, 0x19, 0xd5, 0xac, 0xf8, 0xfa, 0xbf, 0xe2, 0xe2, 0x64, 0xed, + 0xbb, 0xef, 0xee, 0x46, 0x51, 0x8d, 0x05, 0x2c, 0x25, 0x26, 0x02, 0x9e, 0xc9, 0x3f, 0x28, 0xaa, + 0xc8, 0x29, 0x99, 0xec, 0x9b, 0x6d, 0x64, 0x82, 0x5d, 0x64, 0x82, 0xcf, 0xc8, 0x04, 0x6f, 0x7b, + 0x53, 0xd9, 0xed, 0x4d, 0xe5, 0x63, 0x6f, 0x2a, 0x8f, 0xed, 0xd5, 0xdc, 0xc5, 0x64, 0x1e, 0x62, + 0x2f, 0xbd, 0x0d, 0xa5, 0xf5, 0x8f, 0x4f, 0xb2, 0xad, 0x0f, 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x82, 0x4f, 0x0d, 0xa5, 0x64, 0x02, 0x00, 0x00, } func (m *NodeCapabilities) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/resourcepair.go b/go/inventory/v1/resourcepair.go index 712c6f88..4a7ce712 100644 --- a/go/inventory/v1/resourcepair.go +++ b/go/inventory/v1/resourcepair.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "k8s.io/apimachinery/pkg/api/resource" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" + types "pkg.akt.io/go/node/types/resources/v1beta4" ) func NewResourcePair(allocatable, allocated int64, format resource.Format) ResourcePair { diff --git a/go/inventory/v1/resourcepair.pb.go b/go/inventory/v1/resourcepair.pb.go index 34540b76..d9584889 100644 --- a/go/inventory/v1/resourcepair.pb.go +++ b/go/inventory/v1/resourcepair.pb.go @@ -5,14 +5,14 @@ package v1 import ( 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" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" resource "k8s.io/apimachinery/pkg/api/resource" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -28,9 +28,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ResourcePair to extents resource.Quantity to provide total and available units of the resource type ResourcePair struct { - Allocatable *resource.Quantity `protobuf:"bytes,1,opt,name=allocatable,proto3" json:"allocatable" yaml:"allocatable"` - Allocated *resource.Quantity `protobuf:"bytes,2,opt,name=allocated,proto3" json:"allocated" yaml:"allocated"` - 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,omitempty" yaml:"attributes,omitempty"` + Allocatable *resource.Quantity `protobuf:"bytes,1,opt,name=allocatable,proto3" json:"allocatable" yaml:"allocatable"` + Allocated *resource.Quantity `protobuf:"bytes,2,opt,name=allocated,proto3" json:"allocated" yaml:"allocated"` + Attributes pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` } func (m *ResourcePair) Reset() { *m = ResourcePair{} } @@ -80,7 +80,7 @@ func (m *ResourcePair) GetAllocated() *resource.Quantity { return nil } -func (m *ResourcePair) GetAttributes() github_com_akash_network_akash_api_go_node_types_v1beta3.Attributes { +func (m *ResourcePair) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } @@ -96,34 +96,33 @@ func init() { } var fileDescriptor_995cee7bf7b692e7 = []byte{ - // 428 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x3f, 0x8f, 0xd3, 0x30, - 0x18, 0xc6, 0x63, 0x8a, 0x90, 0x2e, 0x65, 0x40, 0xd1, 0x0d, 0xd5, 0x21, 0xe2, 0x53, 0x24, 0xa4, - 0x1b, 0xc0, 0x56, 0x7b, 0x0c, 0xa7, 0xdb, 0x5a, 0x56, 0x06, 0xc8, 0xc8, 0xe6, 0x24, 0xaf, 0x52, - 0x2b, 0x7f, 0x1c, 0x39, 0x4e, 0x50, 0x36, 0xc4, 0xc8, 0xc4, 0x47, 0x60, 0xe6, 0x63, 0x30, 0x75, - 0xec, 0xc8, 0x64, 0x50, 0xba, 0x40, 0xc7, 0x7e, 0x02, 0x94, 0x3f, 0x6d, 0x82, 0x60, 0x40, 0xb7, - 0xc5, 0xef, 0xfb, 0xf8, 0xf7, 0x3c, 0xca, 0x63, 0xf3, 0x29, 0x8b, 0x58, 0xbe, 0xa6, 0x3c, 0x2d, - 0x21, 0x55, 0x42, 0x56, 0xb4, 0x9c, 0x53, 0x09, 0xb9, 0x28, 0xa4, 0x0f, 0x19, 0xe3, 0x92, 0x64, - 0x52, 0x28, 0x61, 0x59, 0xad, 0x8c, 0x9c, 0x64, 0xa4, 0x9c, 0x5f, 0x9c, 0x87, 0x22, 0x14, 0xed, - 0x9a, 0x36, 0x5f, 0x9d, 0xf2, 0xc2, 0xe9, 0x80, 0x1e, 0xcb, 0x81, 0x96, 0x73, 0x0f, 0x14, 0xbb, - 0xa6, 0x4c, 0x29, 0xc9, 0xbd, 0x42, 0x41, 0xaf, 0x79, 0x11, 0xdd, 0xe4, 0x84, 0x0b, 0xca, 0x32, - 0x9e, 0x30, 0x7f, 0xcd, 0x53, 0x90, 0x15, 0xcd, 0xa2, 0xb0, 0x19, 0x9c, 0xdc, 0x69, 0x08, 0x29, - 0x48, 0xa6, 0x20, 0xe8, 0x6e, 0x39, 0xbf, 0x26, 0xe6, 0x43, 0xb7, 0x5f, 0xbe, 0x66, 0x5c, 0x5a, - 0x1f, 0x91, 0x39, 0x65, 0x71, 0x2c, 0x7c, 0xa6, 0x98, 0x17, 0xc3, 0x0c, 0x5d, 0xa2, 0xab, 0xe9, - 0x82, 0x90, 0x8e, 0x4e, 0xc6, 0x74, 0x92, 0x45, 0x61, 0x33, 0x20, 0x47, 0x3a, 0x79, 0x53, 0xb0, - 0x54, 0x71, 0x55, 0xad, 0x6e, 0x36, 0x1a, 0xa3, 0x5a, 0xe3, 0xe9, 0x72, 0x40, 0xed, 0x35, 0x1e, - 0x93, 0x0f, 0x1a, 0x5b, 0x15, 0x4b, 0xe2, 0x5b, 0x67, 0x34, 0x74, 0xdc, 0xb1, 0xc4, 0x7a, 0x8f, - 0xcc, 0xb3, 0xfe, 0x0c, 0xc1, 0xec, 0xde, 0x9d, 0xa2, 0x2c, 0xfa, 0x28, 0x67, 0xcb, 0x23, 0x68, - 0xaf, 0xf1, 0x40, 0x3d, 0x68, 0xfc, 0xe8, 0x8f, 0x18, 0x10, 0x38, 0xee, 0xb0, 0xb6, 0xbe, 0x22, - 0xd3, 0x3c, 0xfd, 0xea, 0x7c, 0x36, 0xb9, 0x9c, 0x5c, 0x4d, 0x17, 0x4f, 0x48, 0x57, 0x5d, 0x53, - 0x08, 0xe9, 0x0b, 0x21, 0xcb, 0xa3, 0x6a, 0xf5, 0x01, 0x6d, 0x34, 0x36, 0xf6, 0x1a, 0x9f, 0x0f, - 0x37, 0x9f, 0x89, 0x84, 0x2b, 0x48, 0x32, 0x55, 0x1d, 0x34, 0x7e, 0xdc, 0x3b, 0xfe, 0x63, 0xeb, - 0x7c, 0xf9, 0x8e, 0x5f, 0x86, 0x5c, 0xad, 0x0b, 0x8f, 0xf8, 0x22, 0xa1, 0xad, 0xd1, 0xf3, 0x14, - 0xd4, 0x3b, 0x21, 0xa3, 0xfe, 0xd4, 0x34, 0x1a, 0x0a, 0x9a, 0x8a, 0x00, 0xa8, 0xaa, 0x32, 0xc8, - 0xe9, 0x5f, 0x19, 0x72, 0x77, 0x94, 0xfa, 0xf6, 0xfe, 0xcf, 0xcf, 0xd8, 0x58, 0xbd, 0xda, 0xd4, - 0x36, 0xda, 0xd6, 0x36, 0xfa, 0x51, 0xdb, 0xe8, 0xd3, 0xce, 0x36, 0xb6, 0x3b, 0xdb, 0xf8, 0xb6, - 0xb3, 0x8d, 0xb7, 0x8b, 0xff, 0x33, 0x1c, 0x3f, 0x68, 0xef, 0x41, 0xfb, 0x80, 0xae, 0x7f, 0x07, - 0x00, 0x00, 0xff, 0xff, 0xf4, 0xbc, 0x8c, 0x91, 0xed, 0x02, 0x00, 0x00, + // 413 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xbd, 0xae, 0xd3, 0x30, + 0x1c, 0xc5, 0x63, 0x8a, 0x90, 0x6e, 0xc2, 0x80, 0xa2, 0x3b, 0x54, 0x45, 0x8a, 0xaf, 0x82, 0x90, + 0x3a, 0x20, 0x5b, 0x29, 0x77, 0xa8, 0xee, 0xd6, 0x3e, 0x01, 0x64, 0x64, 0x73, 0x1a, 0x2b, 0xd7, + 0xca, 0x87, 0x2d, 0xdb, 0x8d, 0x94, 0x8d, 0x99, 0x89, 0x47, 0x60, 0x66, 0xe7, 0x1d, 0x3a, 0x76, + 0x64, 0x40, 0x06, 0xa5, 0x0b, 0xea, 0xd8, 0x27, 0x40, 0xf9, 0x68, 0x93, 0x4a, 0x4c, 0x77, 0xcb, + 0xff, 0x7f, 0x4e, 0x7e, 0x3e, 0x89, 0x8f, 0xfd, 0x96, 0xa4, 0x44, 0x3d, 0x62, 0x56, 0x94, 0xb4, + 0xd0, 0x5c, 0x56, 0xb8, 0x0c, 0xb0, 0xa4, 0x8a, 0x6f, 0xe5, 0x86, 0x0a, 0xc2, 0x24, 0x12, 0x92, + 0x6b, 0xee, 0xba, 0xad, 0x0d, 0x5d, 0x6c, 0xa8, 0x0c, 0x66, 0xb7, 0x09, 0x4f, 0x78, 0x2b, 0xe3, + 0xe6, 0xa9, 0x73, 0xce, 0xe6, 0x1d, 0x30, 0x22, 0x8a, 0x62, 0xa2, 0xb5, 0x64, 0xd1, 0x56, 0x53, + 0xd5, 0x60, 0x2f, 0x53, 0xef, 0xbc, 0x4f, 0x97, 0x0a, 0x33, 0x8e, 0x89, 0x60, 0x39, 0xd9, 0x3c, + 0xb2, 0x82, 0xca, 0x0a, 0x8b, 0x34, 0x69, 0x16, 0x97, 0x0c, 0x38, 0xa1, 0x05, 0x95, 0x44, 0xd3, + 0xb8, 0x7b, 0xcb, 0xff, 0x35, 0xb1, 0x5f, 0x86, 0xbd, 0xf8, 0x81, 0x30, 0xe9, 0x7e, 0x01, 0xb6, + 0x43, 0xb2, 0x8c, 0x6f, 0x88, 0x26, 0x51, 0x46, 0xa7, 0xe0, 0x0e, 0xcc, 0x9d, 0x05, 0x42, 0xe9, + 0x52, 0x21, 0xc6, 0xd1, 0x98, 0x8e, 0x44, 0x9a, 0x34, 0x0b, 0x74, 0xa6, 0xa3, 0x8f, 0x5b, 0x52, + 0x68, 0xa6, 0xab, 0xf5, 0x72, 0x67, 0x20, 0xa8, 0x0d, 0x74, 0x56, 0x03, 0xea, 0x68, 0xe0, 0x98, + 0x7c, 0x32, 0xd0, 0xad, 0x48, 0x9e, 0x3d, 0xf8, 0xa3, 0xa5, 0x1f, 0x8e, 0x2d, 0xee, 0x67, 0x60, + 0xdf, 0xf4, 0x33, 0x8d, 0xa7, 0xcf, 0x9e, 0x14, 0x65, 0xd1, 0x47, 0xb9, 0x59, 0x9d, 0x41, 0x47, + 0x03, 0x07, 0xea, 0xc9, 0xc0, 0x57, 0x57, 0x31, 0x68, 0xec, 0x87, 0x83, 0xec, 0xfe, 0x00, 0xb6, + 0x3d, 0xfc, 0xf8, 0xe9, 0xe4, 0x6e, 0x32, 0x77, 0x16, 0x6f, 0x50, 0x77, 0x81, 0xcd, 0xb5, 0xa0, + 0x41, 0x45, 0x65, 0x80, 0x56, 0xe7, 0x69, 0x2d, 0x76, 0x06, 0x5a, 0x47, 0x03, 0x6f, 0x07, 0xc3, + 0x3b, 0x9e, 0x33, 0x4d, 0x73, 0xa1, 0xab, 0x93, 0x81, 0xaf, 0xfb, 0x63, 0xff, 0xa3, 0xfa, 0xdf, + 0x7f, 0xc3, 0xa0, 0xfd, 0xa4, 0x54, 0x23, 0xd6, 0x14, 0x02, 0x17, 0x3c, 0xa6, 0x58, 0x57, 0x82, + 0xaa, 0xeb, 0x1e, 0x0c, 0x07, 0xaa, 0x70, 0x14, 0xf4, 0xe1, 0xf9, 0xdf, 0x6f, 0xd0, 0x5a, 0xdf, + 0xef, 0x6a, 0x0f, 0xec, 0x6b, 0x0f, 0xfc, 0xa9, 0x3d, 0xf0, 0xf5, 0xe0, 0x59, 0xfb, 0x83, 0x67, + 0xfd, 0x3c, 0x78, 0xd6, 0xa7, 0xd9, 0x35, 0x7e, 0xdc, 0xd8, 0xe8, 0x45, 0xdb, 0x8d, 0xf7, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xca, 0xcb, 0x5d, 0xa8, 0xce, 0x02, 0x00, 0x00, } func (m *ResourcePair) Marshal() (dAtA []byte, err error) { @@ -357,7 +356,7 @@ func (m *ResourcePair) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, v1beta3.Attribute{}) + m.Attributes = append(m.Attributes, v1.Attribute{}) if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/go/inventory/v1/resources.pb.go b/go/inventory/v1/resources.pb.go index 3f290fb9..a6454d6a 100644 --- a/go/inventory/v1/resources.pb.go +++ b/go/inventory/v1/resources.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -117,38 +117,37 @@ func init() { } var fileDescriptor_f20a722bd8ee01b5 = []byte{ - // 488 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0x87, 0x37, 0x6e, 0xbb, 0x87, 0x48, 0xdb, 0x35, 0x88, 0x0d, 0x8b, 0x64, 0x96, 0x01, 0xa1, - 0x1e, 0x4c, 0x68, 0xbd, 0x79, 0x33, 0x8b, 0x2e, 0xa2, 0x95, 0x90, 0xb2, 0x1e, 0x04, 0x59, 0xa6, - 0xd9, 0x61, 0x36, 0x74, 0xb3, 0x33, 0x4c, 0x32, 0x91, 0x7e, 0x09, 0x11, 0xbc, 0xf8, 0x19, 0xfc, - 0x24, 0x3d, 0x16, 0x4f, 0x9e, 0x46, 0xd9, 0xbd, 0xe5, 0x98, 0x4f, 0x20, 0xc9, 0x4c, 0x8a, 0xfb, - 0xc7, 0xd2, 0x5b, 0xde, 0xf9, 0xbd, 0xef, 0xf3, 0x3e, 0x13, 0x18, 0x13, 0xa2, 0x0b, 0x94, 0x4e, - 0xbd, 0x78, 0x9e, 0xe3, 0x79, 0x46, 0xf9, 0xa5, 0x97, 0x1f, 0x7b, 0x1c, 0xa7, 0x54, 0xf0, 0x08, - 0xa7, 0x2e, 0xe3, 0x34, 0xa3, 0x96, 0x55, 0xf7, 0xb8, 0x37, 0x3d, 0x6e, 0x7e, 0xdc, 0x7b, 0x48, - 0x28, 0xa1, 0x75, 0xec, 0x55, 0x5f, 0xaa, 0xb3, 0xf7, 0x78, 0x0b, 0x2d, 0x62, 0xe2, 0x96, 0x94, - 0xdc, 0xa4, 0x60, 0x4b, 0x9a, 0xe0, 0xa4, 0xda, 0xa7, 0x1a, 0x9e, 0xdc, 0xa2, 0xca, 0x50, 0xcc, - 0x55, 0x1b, 0xfc, 0xb9, 0x6b, 0xee, 0xbd, 0xa7, 0x13, 0x1c, 0x36, 0xb7, 0xb0, 0xde, 0x9a, 0xed, - 0x88, 0x09, 0xdb, 0xe8, 0x1b, 0x47, 0xf7, 0x4f, 0x0e, 0xdd, 0xcd, 0xdb, 0xb8, 0x83, 0x60, 0xe4, - 0xf7, 0xaf, 0x24, 0x68, 0x2d, 0x24, 0x68, 0x0f, 0x82, 0x51, 0x21, 0x41, 0x35, 0x52, 0x4a, 0x60, - 0x5e, 0xa2, 0x64, 0xf6, 0x02, 0x46, 0x4c, 0xc0, 0xb0, 0x3a, 0xb2, 0x3e, 0x99, 0x1d, 0x65, 0x65, - 0xdf, 0xab, 0x79, 0xbd, 0x6d, 0xbc, 0xd3, 0xba, 0xc3, 0x7f, 0xaa, 0x91, 0x1d, 0x55, 0x17, 0x12, - 0xe8, 0xd9, 0x52, 0x82, 0x3d, 0x05, 0x56, 0x35, 0x0c, 0x75, 0x60, 0x9d, 0x99, 0x6d, 0xc2, 0x84, - 0xdd, 0xfe, 0xbf, 0xeb, 0x30, 0x18, 0xf9, 0x47, 0x8d, 0xeb, 0x50, 0xb9, 0x92, 0x7f, 0x5d, 0x09, - 0x13, 0xf0, 0xc7, 0x6f, 0xb0, 0x33, 0x0c, 0x46, 0x69, 0x58, 0x45, 0xd6, 0x77, 0xc3, 0x7c, 0x80, - 0xd9, 0x14, 0x27, 0x98, 0xa3, 0xd9, 0x38, 0xcd, 0x28, 0x47, 0x04, 0xdb, 0x3b, 0xf5, 0x8e, 0xfe, - 0xb6, 0x1d, 0xcd, 0xbf, 0x0b, 0x50, 0xcc, 0xfd, 0x37, 0x7a, 0x59, 0xf7, 0x55, 0x83, 0x38, 0x53, - 0x84, 0x42, 0x82, 0x4d, 0x6c, 0x29, 0x81, 0xad, 0x3c, 0x36, 0x22, 0x18, 0x76, 0xf1, 0x1a, 0xc2, - 0xfa, 0x66, 0x98, 0xdd, 0x9c, 0xce, 0x44, 0x82, 0xd3, 0x31, 0xca, 0x32, 0x14, 0x4d, 0xf1, 0xc4, - 0xde, 0xbd, 0xa3, 0xd9, 0x6b, 0x6d, 0x76, 0xf0, 0x41, 0x11, 0x5e, 0x6a, 0x40, 0x21, 0xc1, 0x06, - 0xb4, 0x94, 0xe0, 0x50, 0x79, 0xad, 0x27, 0x30, 0x3c, 0xc8, 0x57, 0xe7, 0xad, 0x2f, 0x86, 0xd9, - 0x9c, 0x8d, 0x13, 0x2a, 0xe6, 0x19, 0x9e, 0xd8, 0x9d, 0x3b, 0x4a, 0x0d, 0xb4, 0xd4, 0xbe, 0x96, - 0x3a, 0x55, 0xf3, 0x85, 0x04, 0xeb, 0xc8, 0x52, 0x82, 0x47, 0xab, 0x4a, 0x3a, 0x80, 0xe1, 0x7e, - 0xbe, 0x32, 0xec, 0xbf, 0xbb, 0x5a, 0x38, 0xc6, 0xf5, 0xc2, 0x31, 0xfe, 0x2c, 0x1c, 0xe3, 0xeb, - 0xd2, 0x69, 0x5d, 0x2f, 0x9d, 0xd6, 0xaf, 0xa5, 0xd3, 0xfa, 0x78, 0x42, 0xe2, 0x6c, 0x2a, 0xce, - 0xdd, 0x88, 0x26, 0x5e, 0xad, 0xf6, 0x6c, 0x8e, 0xb3, 0xcf, 0x94, 0x5f, 0xe8, 0x0a, 0xb1, 0xd8, - 0x23, 0x74, 0xe5, 0xd5, 0x9c, 0x77, 0xea, 0x97, 0xf2, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x7c, 0x50, 0xd8, 0xc7, 0xfd, 0x03, 0x00, 0x00, + // 474 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40, + 0x18, 0x87, 0x1b, 0xbb, 0xdb, 0xc3, 0xc8, 0xee, 0xd6, 0x20, 0x6e, 0x28, 0x92, 0x29, 0x03, 0xc2, + 0x7a, 0x49, 0x59, 0xf5, 0xe4, 0xcd, 0x14, 0x2d, 0x22, 0x2b, 0x21, 0x4b, 0x3d, 0x08, 0x52, 0xc6, + 0x74, 0x98, 0x96, 0x36, 0x9d, 0x61, 0x92, 0x09, 0xec, 0x97, 0x10, 0xc1, 0x8b, 0x9f, 0xc1, 0x4f, + 0xb2, 0xc7, 0xc5, 0x93, 0xa7, 0x51, 0xda, 0x5b, 0x8e, 0xf9, 0x04, 0x92, 0xcc, 0x64, 0xb1, 0x7f, + 0x5c, 0x7a, 0xcb, 0xcc, 0xef, 0x7d, 0x9f, 0xf7, 0x99, 0xc0, 0x0b, 0x10, 0x9e, 0xe1, 0x64, 0xd2, + 0x9b, 0x2e, 0x32, 0xb2, 0x48, 0x99, 0xb8, 0xea, 0x65, 0xe7, 0x3d, 0x41, 0x12, 0x26, 0x45, 0x44, + 0x12, 0x8f, 0x0b, 0x96, 0x32, 0xdb, 0xae, 0x6a, 0xbc, 0xdb, 0x1a, 0x2f, 0x3b, 0xef, 0x3c, 0xa4, + 0x8c, 0xb2, 0x2a, 0xee, 0x95, 0x5f, 0xba, 0xb2, 0xf3, 0x78, 0x07, 0x2d, 0xe2, 0xf2, 0x8e, 0x94, + 0xde, 0xa6, 0x70, 0x47, 0x1a, 0x93, 0xb8, 0x9c, 0xa7, 0x0b, 0x9e, 0xdc, 0xa1, 0xca, 0xf1, 0x54, + 0xe8, 0x32, 0xf4, 0xf3, 0x10, 0x1c, 0xbd, 0x67, 0x63, 0x12, 0xd6, 0xaf, 0xb0, 0xdf, 0x81, 0x66, + 0xc4, 0xa5, 0x63, 0x75, 0xad, 0xb3, 0xfb, 0xcf, 0x4e, 0xbd, 0xed, 0xd7, 0x78, 0xfd, 0x60, 0xe8, + 0x77, 0xaf, 0x15, 0x6c, 0x2c, 0x15, 0x6c, 0xf6, 0x83, 0x61, 0xae, 0x60, 0xd9, 0x52, 0x28, 0x08, + 0xae, 0x70, 0x3c, 0x7f, 0x89, 0x22, 0x2e, 0x51, 0x58, 0x5e, 0xd9, 0x9f, 0x40, 0x4b, 0x5b, 0x39, + 0xf7, 0x2a, 0x5e, 0x67, 0x17, 0xef, 0xa2, 0xaa, 0xf0, 0x9f, 0x1a, 0x64, 0x4b, 0x9f, 0x73, 0x05, + 0x4d, 0x6f, 0xa1, 0xe0, 0x91, 0x06, 0xeb, 0x33, 0x0a, 0x4d, 0x60, 0x5f, 0x82, 0x26, 0xe5, 0xd2, + 0x69, 0xfe, 0xdf, 0x75, 0x10, 0x0c, 0xfd, 0xb3, 0xda, 0x75, 0xa0, 0x5d, 0xe9, 0xbf, 0xae, 0x94, + 0x4b, 0xf4, 0xe3, 0x37, 0x3c, 0x18, 0x04, 0xc3, 0x24, 0x2c, 0x23, 0xfb, 0xbb, 0x05, 0x1e, 0x10, + 0x3e, 0x21, 0x31, 0x11, 0x78, 0x3e, 0x4a, 0x52, 0x26, 0x30, 0x25, 0xce, 0x41, 0x35, 0xa3, 0xbb, + 0x6b, 0x46, 0xfd, 0xef, 0x02, 0x3c, 0x15, 0xfe, 0x5b, 0x33, 0xac, 0xfd, 0xba, 0x46, 0x5c, 0x6a, + 0x42, 0xae, 0xe0, 0x36, 0xb6, 0x50, 0xd0, 0xd1, 0x1e, 0x5b, 0x11, 0x0a, 0xdb, 0x64, 0x03, 0x61, + 0x7f, 0xb3, 0x40, 0x3b, 0x63, 0x73, 0x19, 0x93, 0x64, 0x84, 0xd3, 0x14, 0x47, 0x13, 0x32, 0x76, + 0x0e, 0xf7, 0x34, 0x7b, 0x63, 0xcc, 0x4e, 0x3e, 0x68, 0xc2, 0x2b, 0x03, 0xc8, 0x15, 0xdc, 0x82, + 0x16, 0x0a, 0x9e, 0x6a, 0xaf, 0xcd, 0x04, 0x85, 0x27, 0xd9, 0x7a, 0xbf, 0xfd, 0xc5, 0x02, 0xf5, + 0xdd, 0x28, 0x66, 0x72, 0x91, 0x92, 0xb1, 0xd3, 0xda, 0x53, 0xaa, 0x6f, 0xa4, 0x8e, 0x8d, 0xd4, + 0x85, 0xee, 0xcf, 0x15, 0xdc, 0x44, 0x16, 0x0a, 0x3e, 0x5a, 0x57, 0x32, 0x01, 0x0a, 0x8f, 0xb3, + 0xb5, 0x66, 0xff, 0xc5, 0xf5, 0xd2, 0xb5, 0x6e, 0x96, 0xae, 0xf5, 0x67, 0xe9, 0x5a, 0x5f, 0x57, + 0x6e, 0xe3, 0x66, 0xe5, 0x36, 0x7e, 0xad, 0xdc, 0xc6, 0xc7, 0x0e, 0x9f, 0x51, 0x0f, 0xcf, 0x52, + 0x6f, 0x5a, 0x6e, 0xe2, 0xda, 0x76, 0x7c, 0x6e, 0x55, 0x1b, 0xf1, 0xfc, 0x6f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x90, 0xad, 0xd5, 0x6f, 0xe5, 0x03, 0x00, 0x00, } func (m *NodeResources) Marshal() (dAtA []byte, err error) { diff --git a/go/inventory/v1/service.pb.go b/go/inventory/v1/service.pb.go index 02db95d0..e5506aaa 100644 --- a/go/inventory/v1/service.pb.go +++ b/go/inventory/v1/service.pb.go @@ -6,8 +6,8 @@ package v1 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("akash/inventory/v1/service.proto", fileDescriptor_19b1fad552cee5dc) } var fileDescriptor_19b1fad552cee5dc = []byte{ - // 319 bytes of a gzipped FileDescriptorProto + // 305 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0xcf, 0xcc, 0x2b, 0x4b, 0xcd, 0x2b, 0xc9, 0x2f, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, @@ -41,16 +41,16 @@ var fileDescriptor_19b1fad552cee5dc = []byte{ 0x8b, 0x4b, 0x52, 0x8b, 0x20, 0x2a, 0x8c, 0xe6, 0x33, 0x72, 0xb1, 0xfb, 0xe5, 0xa7, 0xa4, 0x06, 0x05, 0x38, 0x0b, 0x05, 0x71, 0x71, 0x06, 0x96, 0xa6, 0x16, 0x55, 0x82, 0xf8, 0x42, 0x62, 0x7a, 0x10, 0x8b, 0xf5, 0x60, 0xae, 0xd2, 0x73, 0x05, 0xb9, 0x4a, 0x4a, 0x42, 0x0f, 0xd3, 0x07, 0x7a, - 0x20, 0x1d, 0x4a, 0xc2, 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0xe2, 0x15, 0xe2, 0x80, 0x39, 0x22, 0x89, - 0x51, 0x4b, 0xc8, 0x81, 0x8b, 0x2b, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x97, 0x3c, 0x43, 0x0d, 0x18, + 0x20, 0x1d, 0x4a, 0xc2, 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0xe2, 0x4d, 0x62, 0xd4, 0x12, 0xe2, 0x80, + 0xb9, 0x43, 0xc8, 0x81, 0x8b, 0x2b, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x97, 0x3c, 0x43, 0x0d, 0x18, 0x8d, 0x36, 0x33, 0x72, 0x71, 0x39, 0x43, 0xdc, 0x0c, 0x72, 0x64, 0x2c, 0x17, 0x0f, 0xd8, 0x91, - 0x50, 0x21, 0x9c, 0x46, 0x4a, 0x63, 0x33, 0x12, 0xaa, 0x49, 0x49, 0x02, 0xec, 0x54, 0x21, 0x21, - 0x5e, 0x90, 0x53, 0xe1, 0x2a, 0x40, 0xee, 0x75, 0xe3, 0xe2, 0x85, 0xb8, 0x97, 0x12, 0xf3, 0x0d, - 0x18, 0x9d, 0x7c, 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, 0x28, 0x3d, - 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0x84, 0x6e, 0x5e, 0x6a, 0x49, - 0x79, 0x7e, 0x51, 0x36, 0x94, 0x07, 0x8a, 0xe8, 0xf4, 0x7c, 0x94, 0x38, 0x4b, 0x62, 0x03, 0x5b, - 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x86, 0xd8, 0xe4, 0x60, 0x02, 0x00, 0x00, + 0x50, 0x21, 0x9c, 0x46, 0x4a, 0x63, 0x33, 0x12, 0xaa, 0x49, 0x49, 0x02, 0xec, 0x54, 0x21, 0x90, + 0x53, 0x79, 0x41, 0x4e, 0x85, 0x2b, 0x12, 0x72, 0xe3, 0xe2, 0x85, 0xb8, 0x97, 0x12, 0xf3, 0x0d, + 0x18, 0x9d, 0x4c, 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, 0x4a, 0xaa, 0x20, + 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x33, 0x5f, 0x3f, 0x3d, 0x1f, 0x25, 0x6e, 0x92, 0xd8, + 0xc0, 0x96, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x84, 0x4d, 0x0c, 0xb2, 0x48, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/inventory/v1/service.pb.gw.go b/go/inventory/v1/service.pb.gw.go index 85d71370..0b50671e 100644 --- a/go/inventory/v1/service.pb.gw.go +++ b/go/inventory/v1/service.pb.gw.go @@ -196,7 +196,7 @@ func RegisterNodeRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( - pattern_NodeRPC_QueryNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_NodeRPC_QueryNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -265,7 +265,7 @@ func RegisterClusterRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_ClusterRPC_QueryCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "inventory"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterRPC_QueryCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "inventory"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/inventory/v1/storage.pb.go b/go/inventory/v1/storage.pb.go index bab6d6d1..82e04bb0 100644 --- a/go/inventory/v1/storage.pb.go +++ b/go/inventory/v1/storage.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -137,30 +137,29 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/storage.proto", fileDescriptor_98ef685b221b1af7) } var fileDescriptor_98ef685b221b1af7 = []byte{ - // 355 bytes of a gzipped FileDescriptorProto + // 341 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x4f, 0xc2, 0x40, - 0x1c, 0xc5, 0x5b, 0x53, 0x14, 0x5b, 0x13, 0x93, 0xc6, 0x81, 0x30, 0xf4, 0x48, 0x8d, 0x89, 0x8b, - 0xbd, 0x00, 0x8b, 0x71, 0xc4, 0x89, 0xc4, 0x44, 0x2c, 0x8b, 0x71, 0x3b, 0x48, 0x5b, 0x2e, 0xc0, - 0xfd, 0xeb, 0xf5, 0xc0, 0x90, 0xf8, 0x21, 0xfc, 0x58, 0x8c, 0xc4, 0xc9, 0xe9, 0x62, 0xca, 0xc6, - 0xc8, 0x27, 0x30, 0xbd, 0xab, 0x04, 0x23, 0x5b, 0xdf, 0xfb, 0xbf, 0xff, 0xfd, 0xfa, 0xee, 0xec, - 0x06, 0x19, 0x93, 0x6c, 0x84, 0x29, 0x9b, 0x47, 0x4c, 0x00, 0x5f, 0xe0, 0x79, 0x13, 0x67, 0x02, - 0x38, 0x49, 0xa2, 0x20, 0xe5, 0x20, 0xc0, 0x75, 0x55, 0x22, 0xd8, 0x25, 0x82, 0x79, 0xb3, 0x7e, - 0x91, 0x40, 0x02, 0x6a, 0x8c, 0x8b, 0x2f, 0x9d, 0xac, 0x5f, 0x1d, 0x38, 0x8b, 0x47, 0x19, 0xcc, - 0xf8, 0x30, 0x4a, 0x09, 0xe5, 0x3a, 0xe6, 0xbf, 0xdb, 0x4e, 0x5f, 0x13, 0xba, 0x2c, 0x06, 0xf7, - 0xd6, 0xae, 0x0c, 0x27, 0x24, 0xcb, 0x6a, 0x66, 0xc3, 0xbc, 0x3e, 0xed, 0xf8, 0xb9, 0x44, 0x95, - 0xfb, 0xc2, 0xd8, 0x48, 0xa4, 0x27, 0x5b, 0x89, 0xce, 0x16, 0x64, 0x3a, 0xb9, 0xf3, 0x95, 0xf4, - 0x43, 0x6d, 0xbb, 0x6d, 0xdb, 0xa2, 0x90, 0x66, 0xb5, 0x23, 0xb5, 0x88, 0x72, 0x89, 0xac, 0xee, - 0x63, 0xaf, 0xbf, 0x91, 0x48, 0xf9, 0x5b, 0x89, 0x1c, 0xbd, 0x56, 0x28, 0x3f, 0x54, 0xa6, 0xff, - 0x69, 0xda, 0x27, 0x25, 0xde, 0x9d, 0xda, 0xd5, 0xd7, 0x19, 0x61, 0x82, 0x8a, 0x85, 0xa2, 0x3b, - 0xad, 0x46, 0xf0, 0xbf, 0x6d, 0x10, 0x96, 0x1d, 0x7a, 0x84, 0xf2, 0x0e, 0x5e, 0x4a, 0x64, 0xe4, - 0x12, 0x55, 0x9f, 0xca, 0xcd, 0x8d, 0x44, 0xbb, 0x53, 0xb6, 0x12, 0x9d, 0x6b, 0xe4, 0xaf, 0xe3, - 0x87, 0xbb, 0xa1, 0xfb, 0x6c, 0x5b, 0x94, 0xc5, 0xa0, 0xfe, 0xd7, 0x69, 0xa1, 0x43, 0xa8, 0xbd, - 0x8b, 0xe9, 0x5c, 0x96, 0x24, 0xab, 0x50, 0xaa, 0x14, 0x8b, 0x61, 0xaf, 0x14, 0x8b, 0xa1, 0x28, - 0x55, 0x44, 0x1f, 0x96, 0xb9, 0x67, 0xae, 0x72, 0xcf, 0xfc, 0xce, 0x3d, 0xf3, 0x63, 0xed, 0x19, - 0xab, 0xb5, 0x67, 0x7c, 0xad, 0x3d, 0xe3, 0xa5, 0x95, 0x50, 0x31, 0x9a, 0x0d, 0x82, 0x21, 0x4c, - 0xb1, 0xe2, 0xdd, 0xb0, 0x48, 0xbc, 0x01, 0x1f, 0x97, 0x8a, 0xa4, 0x14, 0x27, 0xf0, 0xe7, 0xcd, - 0x06, 0xc7, 0xea, 0x9d, 0xda, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x05, 0x29, 0xcd, 0xfa, 0x1c, - 0x02, 0x00, 0x00, + 0x14, 0xc7, 0x5b, 0x53, 0x14, 0xaf, 0x26, 0x26, 0x8d, 0x03, 0x61, 0xe8, 0x91, 0x33, 0x26, 0x4e, + 0xd7, 0x00, 0x0e, 0xc6, 0x11, 0x27, 0x26, 0xb1, 0x2c, 0xc6, 0xed, 0x24, 0x6d, 0xbd, 0x00, 0x77, + 0xf5, 0x5a, 0x48, 0x48, 0xfc, 0x10, 0x7e, 0x2c, 0x46, 0xe2, 0xe4, 0x74, 0x31, 0xc7, 0xc6, 0xc8, + 0x27, 0x30, 0x77, 0x57, 0x09, 0x46, 0xb6, 0xbe, 0xff, 0xfb, 0xbf, 0xf7, 0xeb, 0xff, 0x1e, 0x68, + 0x91, 0x31, 0x29, 0x5e, 0x23, 0xca, 0xe6, 0x09, 0x2b, 0xb9, 0x58, 0x44, 0xf3, 0x76, 0x54, 0x94, + 0x5c, 0x90, 0x2c, 0xc1, 0xb9, 0xe0, 0x25, 0x0f, 0x02, 0xe3, 0xc0, 0x3b, 0x07, 0x9e, 0xb7, 0x9b, + 0x17, 0x19, 0xcf, 0xb8, 0x69, 0x47, 0xfa, 0xcb, 0x3a, 0x9b, 0x57, 0x07, 0x76, 0x89, 0xa4, 0xe0, + 0x33, 0x31, 0x4a, 0x72, 0x42, 0x85, 0xb5, 0xa1, 0x77, 0xe0, 0x0f, 0x2d, 0xa1, 0xcf, 0x52, 0x1e, + 0xdc, 0x82, 0xda, 0x68, 0x42, 0x8a, 0xa2, 0xe1, 0xb6, 0xdc, 0xeb, 0xd3, 0x1e, 0x52, 0x12, 0xd6, + 0xee, 0xb5, 0xb0, 0x91, 0xd0, 0x76, 0xb6, 0x12, 0x9e, 0x2d, 0xc8, 0x74, 0x72, 0x87, 0x4c, 0x89, + 0x62, 0x2b, 0x07, 0x5d, 0xe0, 0x51, 0x9e, 0x17, 0x8d, 0x23, 0x33, 0x08, 0x95, 0x84, 0x5e, 0xff, + 0x61, 0x30, 0xdc, 0x48, 0x68, 0xf4, 0xad, 0x84, 0xbe, 0x1d, 0xd3, 0x15, 0x8a, 0x8d, 0x88, 0x3e, + 0x5d, 0x70, 0x52, 0xe1, 0x83, 0x29, 0xa8, 0xbf, 0xcd, 0x08, 0x2b, 0x69, 0xb9, 0x30, 0x74, 0xbf, + 0xd3, 0xc2, 0xff, 0xd3, 0xe2, 0xb8, 0xca, 0x30, 0x20, 0x54, 0xf4, 0xa2, 0xa5, 0x84, 0x8e, 0x92, + 0xb0, 0xfe, 0x58, 0x4d, 0x6e, 0x24, 0xdc, 0x6d, 0xd9, 0x4a, 0x78, 0x6e, 0x91, 0xbf, 0x0a, 0x8a, + 0x77, 0xcd, 0xe0, 0x09, 0x78, 0x94, 0xa5, 0xdc, 0xfc, 0xaf, 0xdf, 0x81, 0x87, 0x50, 0x7b, 0x0f, + 0xd3, 0xbb, 0xac, 0x48, 0x9e, 0xae, 0x4c, 0x28, 0x96, 0xf2, 0xbd, 0x50, 0x2c, 0xe5, 0x3a, 0x94, + 0xb6, 0xde, 0x2c, 0x55, 0xe8, 0xae, 0x54, 0xe8, 0x7e, 0xab, 0xd0, 0xfd, 0x58, 0x87, 0xce, 0x6a, + 0x1d, 0x3a, 0x5f, 0xeb, 0xd0, 0x79, 0x6e, 0xe6, 0xe3, 0x0c, 0x93, 0x71, 0x89, 0xa9, 0x3e, 0xd5, + 0x9f, 0xdb, 0xbc, 0x1c, 0x9b, 0x7b, 0x74, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x73, 0x9e, 0x14, + 0xe7, 0x04, 0x02, 0x00, 0x00, } func (m *StorageInfo) Marshal() (dAtA []byte, err error) { diff --git a/go/manifest/v2beta1/group.go b/go/manifest/v2beta1/group.go deleted file mode 100644 index 5eee487f..00000000 --- a/go/manifest/v2beta1/group.go +++ /dev/null @@ -1,23 +0,0 @@ -package v2beta1 - -import ( - types "github.com/akash-network/akash-api/go/node/types/v1beta2" -) - -// GetName returns the name of group -func (g Group) GetName() string { - return g.Name -} - -// 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/v2beta1/group.pb.go b/go/manifest/v2beta1/group.pb.go deleted file mode 100644 index 22268f01..00000000 --- a/go/manifest/v2beta1/group.pb.go +++ /dev/null @@ -1,398 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta1/group.proto - -package v2beta1 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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_18ff3fe1d1a21258, []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 init() { - proto.RegisterType((*Group)(nil), "akash.manifest.v2beta1.Group") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta1/group.proto", fileDescriptor_18ff3fe1d1a21258) -} - -var fileDescriptor_18ff3fe1d1a21258 = []byte{ - // 268 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, 0xd4, 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, 0x87, 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, 0x81, 0x8b, 0x03, 0x6a, 0x4e, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xbc, 0x1e, - 0x76, 0xd7, 0xe9, 0x05, 0x43, 0xd4, 0x39, 0x29, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, 0x9e, 0x3c, - 0x5c, 0xe3, 0xa7, 0x7b, 0xf2, 0xfc, 0x10, 0x93, 0x61, 0x22, 0x4a, 0x41, 0x70, 0x49, 0x2b, 0x96, - 0x8e, 0x05, 0xf2, 0x0c, 0x4e, 0x11, 0x37, 0x1e, 0xca, 0x31, 0x34, 0x3c, 0x92, 0x63, 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, 0xb3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, - 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x0b, 0x74, 0xf3, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, - 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0x8c, 0x60, 0x48, 0x62, 0x03, 0xfb, 0xdf, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0xbb, 0xf1, 0x49, 0x23, 0x79, 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 += fmt.Sprintf("%v", f) + "," - } - 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/v2beta1/httpoptions.pb.go b/go/manifest/v2beta1/httpoptions.pb.go deleted file mode 100644 index 57badd95..00000000 --- a/go/manifest/v2beta1/httpoptions.pb.go +++ /dev/null @@ -1,535 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta1/httpoptions.proto - -package v2beta1 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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_5fa251bcf6bf1d0e, []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.v2beta1.ServiceExposeHTTPOptions") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta1/httpoptions.proto", fileDescriptor_5fa251bcf6bf1d0e) -} - -var fileDescriptor_5fa251bcf6bf1d0e = []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, 0x44, 0x12, 0xc8, 0x90, 0x29, 0x38, 0x04, 0x9c, 0x29, 0x41, 0xd6, 0x10, 0xb2, 0x88, 0x93, - 0x7d, 0x91, 0x0f, 0x47, 0x3a, 0xa1, 0x3b, 0x3b, 0xb2, 0xa7, 0x3c, 0x42, 0xde, 0x2a, 0x19, 0x3d, - 0x7a, 0x12, 0x89, 0xbc, 0x79, 0xf4, 0x13, 0x84, 0x3b, 0x29, 0xd6, 0x25, 0xde, 0x4e, 0x9f, 0x3e, - 0x3e, 0x7e, 0xc3, 0x5f, 0xeb, 0xc2, 0x09, 0xa4, 0x63, 0x27, 0x82, 0x31, 0xbe, 0x45, 0x94, 0x39, - 0xb3, 0xc3, 0x00, 0x31, 0x78, 0xe0, 0x8c, 0x19, 0x4b, 0x48, 0xc2, 0x30, 0x89, 0xa9, 0x9d, 0xa4, - 0x84, 0x11, 0xfd, 0xb7, 0x30, 0xed, 0x77, 0xd3, 0xae, 0xcc, 0x3f, 0xbf, 0x42, 0x12, 0x12, 0xa1, - 0x38, 0xfc, 0x55, 0xda, 0xd6, 0x53, 0x43, 0x33, 0x06, 0x28, 0x9d, 0xe1, 0x21, 0x3a, 0xcf, 0x12, - 0x42, 0x51, 0xdf, 0xf3, 0xae, 0x2e, 0xcb, 0xa0, 0x7e, 0xa1, 0xb5, 0x23, 0x98, 0xf9, 0x01, 0x19, - 0xcd, 0x7d, 0x8a, 0x17, 0xc8, 0x50, 0x3b, 0x6a, 0xb7, 0xdd, 0xfb, 0xb7, 0xc9, 0xcd, 0xef, 0x11, - 0xcc, 0x7a, 0x64, 0x34, 0x1f, 0xe0, 0x05, 0xda, 0xe6, 0xa6, 0x3e, 0x87, 0xd1, 0xdd, 0x89, 0x25, - 0x41, 0xcb, 0x95, 0x15, 0xbd, 0xaf, 0xfd, 0x48, 0x11, 0x1c, 0xf9, 0x0c, 0x47, 0x88, 0x4c, 0x99, - 0xf1, 0xa5, 0x2e, 0x71, 0xee, 0x95, 0xb8, 0x2e, 0x49, 0xd0, 0x72, 0x65, 0x85, 0x97, 0x28, 0x8a, - 0xeb, 0x52, 0xa3, 0x2e, 0x71, 0xbe, 0x57, 0x92, 0xa0, 0xe5, 0xca, 0x8a, 0x7e, 0xaa, 0x69, 0x31, - 0xca, 0x98, 0xcf, 0x52, 0x8c, 0xa8, 0xf1, 0x55, 0x74, 0xfe, 0x6e, 0x72, 0xb3, 0xc5, 0xa9, 0xc7, - 0xe1, 0x36, 0x37, 0x7f, 0x96, 0x95, 0x1d, 0xb2, 0xdc, 0xfa, 0x37, 0xdf, 0x52, 0x16, 0xaa, 0x2d, - 0xdf, 0xea, 0x2d, 0x42, 0xfa, 0xbc, 0x45, 0x82, 0x96, 0x2b, 0x2b, 0xbb, 0x2d, 0x43, 0x48, 0x11, - 0x35, 0x9a, 0x9d, 0x46, 0xb7, 0x55, 0x6f, 0x39, 0xe3, 0xf0, 0xe3, 0x16, 0x81, 0xaa, 0x2d, 0xe2, - 0xdd, 0xbb, 0x5e, 0xbd, 0x02, 0xe5, 0xa1, 0x00, 0xea, 0x73, 0x01, 0xd4, 0x65, 0x01, 0xd4, 0x97, - 0x02, 0xa8, 0x8f, 0x6b, 0xa0, 0x2c, 0xd7, 0x40, 0x59, 0xad, 0x81, 0x72, 0x73, 0x1c, 0x62, 0x36, - 0x9e, 0x06, 0xf6, 0x90, 0x44, 0x8e, 0x38, 0x92, 0xff, 0x31, 0x62, 0xf7, 0x24, 0x9d, 0x54, 0x5f, - 0x30, 0xc1, 0x4e, 0x48, 0xf6, 0x6e, 0x2c, 0x68, 0x8a, 0x53, 0x39, 0x7a, 0x0b, 0x00, 0x00, 0xff, - 0xff, 0x39, 0x7c, 0x4a, 0xd7, 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/v2beta1/manifest.go b/go/manifest/v2beta1/manifest.go deleted file mode 100644 index 0bd0d701..00000000 --- a/go/manifest/v2beta1/manifest.go +++ /dev/null @@ -1,300 +0,0 @@ -package v2beta1 - -import ( - "fmt" - "math" - "regexp" - "strings" - - "github.com/pkg/errors" - - k8svalidation "k8s.io/apimachinery/pkg/util/validation" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - types "github.com/akash-network/akash-api/go/node/types/v1beta2" -) - -var ( - serviceNameValidationRegex = regexp.MustCompile(`^[a-z]([-a-z0-9]*[a-z0-9])?$`) - hostnameMaxLen = 255 -) - -// Manifest store list of groups -type Manifest []Group - -// GetGroups returns a manifest with groups list -func (m Manifest) GetGroups() []Group { - return m -} - -// ValidateManifest does validation for manifest -func ValidateManifest(m Manifest) error { - if len(m) == 0 { - return fmt.Errorf("%w: manifest is empty", ErrInvalidManifest) - } - return validateManifestGroups(m.GetGroups()) -} - -type validateManifestGroupsHelper struct { - hostnames map[string]int // used as a set - globalServiceCount uint -} - -func validateManifestGroups(groups []Group) error { - helper := validateManifestGroupsHelper{ - hostnames: make(map[string]int), - } - names := make(map[string]int) // used as a set - for _, group := range groups { - if err := validateManifestGroup(group, &helper); err != nil { - return err - } - if _, exists := names[group.GetName()]; exists { - return fmt.Errorf("%w: duplicate group %q", ErrInvalidManifest, group.GetName()) - } - - names[group.GetName()] = 0 // Value stored is not used - } - if helper.globalServiceCount == 0 { - return fmt.Errorf("%w: zero global services", ErrInvalidManifest) - } - return nil -} - -func validateManifestGroup(group Group, helper *validateManifestGroupsHelper) error { - if 0 == len(group.Services) { - return fmt.Errorf("%w: group %q contains no services", ErrInvalidManifest, group.GetName()) - } - - if err := dtypes.ValidateResourceList(&group); err != nil { - return err - } - for _, s := range group.Services { - if err := validateManifestService(s, helper); err != nil { - return err - } - } - return nil -} - -func validateManifestService(service Service, helper *validateManifestGroupsHelper) error { - if len(service.Name) == 0 { - return fmt.Errorf("%w: service name is empty", ErrInvalidManifest) - } - - serviceNameValid := serviceNameValidationRegex.MatchString(service.Name) - if !serviceNameValid { - return fmt.Errorf("%w: service %q name is invalid", ErrInvalidManifest, service.Name) - } - - if len(service.Image) == 0 { - return fmt.Errorf("%w: service %q has empty image name", ErrInvalidManifest, service.Name) - } - - for _, envVar := range service.Env { - idx := strings.Index(envVar, "=") - if idx == 0 { - return fmt.Errorf("%w: service %q defines an env. var. with an empty name", ErrInvalidManifest, service.Name) - } - - var envVarName string - if idx > 0 { - envVarName = envVar[0:idx] - } else { - envVarName = envVar - } - - if 0 != len(k8svalidation.IsEnvVarName(envVarName)) { - return fmt.Errorf("%w: service %q defines an env. var. with an invalid name %q", ErrInvalidManifest, service.Name, envVarName) - } - - } - - for _, serviceExpose := range service.Expose { - if err := validateServiceExpose(service.Name, serviceExpose, helper); err != nil { - return err - } - } - - return nil -} - -func validateServiceExpose(serviceName string, serviceExpose ServiceExpose, helper *validateManifestGroupsHelper) error { - if serviceExpose.Port == 0 || serviceExpose.Port > math.MaxUint16 { - return fmt.Errorf("%w: service %q port value must be 0 < value <= 65535 ", ErrInvalidManifest, serviceName) - } - - switch serviceExpose.Proto { - case TCP, UDP: - break - default: - return fmt.Errorf("%w: service %q protocol %q unknown", ErrInvalidManifest, serviceName, serviceExpose.Proto) - } - - if serviceExpose.Global { - helper.globalServiceCount++ - } - - for _, host := range serviceExpose.Hosts { - if !isValidHostname(host) { - return fmt.Errorf("%w: service %q has invalid hostname %q", ErrInvalidManifest, serviceName, host) - } - - _, exists := helper.hostnames[host] - if exists { - return errors.Errorf("hostname %q is duplicated, this is not allowed", host) - } - helper.hostnames[host] = 0 // Value stored does not matter - } - - return nil -} - -func isValidHostname(hostname string) bool { - return len(hostname) <= hostnameMaxLen && 0 == len(k8svalidation.IsDNS1123Subdomain(hostname)) -} - -func ValidateManifestWithGroupSpecs(m *Manifest, gspecs []*dtypes.GroupSpec) error { - rlists := make([]types.ResourceGroup, 0, len(gspecs)) - for _, gspec := range gspecs { - rlists = append(rlists, gspec) - } - return validateManifestDeploymentGroups(m.GetGroups(), rlists) -} - -func ValidateManifestWithDeployment(m *Manifest, dgroups []dtypes.Group) error { - rgroups := make([]types.ResourceGroup, 0, len(dgroups)) - for _, dgroup := range dgroups { - rgroups = append(rgroups, dgroup) - } - - return validateManifestDeploymentGroups(m.GetGroups(), rgroups) -} - -func validateManifestDeploymentGroups(mgroups []Group, dgroups []types.ResourceGroup) error { - if len(mgroups) != len(dgroups) { - return errors.Errorf("invalid manifest: group count mismatch (%v != %v)", len(mgroups), len(dgroups)) - } - - dgroupByName := make(map[string]types.ResourceGroup) - - for _, dgroup := range dgroups { - dgroupByName[dgroup.GetName()] = dgroup - } - - for _, mgroup := range mgroups { - dgroup, dgroupExists := dgroupByName[mgroup.GetName()] - - if !dgroupExists { - return errors.Errorf("invalid manifest: unknown deployment group ('%v')", mgroup.GetName()) - } - - if err := validateManifestDeploymentGroup(mgroup, dgroup); err != nil { - return err - } - } - - return nil -} - -func validateManifestDeploymentGroup(mgroup Group, dgroup types.ResourceGroup) error { - mlist := make([]types.Resources, len(mgroup.GetResources())) - copy(mlist, mgroup.GetResources()) - - httpOnlyEndpointsCountForDeploymentGroup := 0 - otherEndpointsCountForDeploymentGroup := 0 - - // Iterate over all deployment groups -deploymentGroupLoop: - for _, drec := range dgroup.GetResources() { - for _, endpoint := range drec.Resources.Endpoints { - switch endpoint.Kind { - case types.Endpoint_SHARED_HTTP: - httpOnlyEndpointsCountForDeploymentGroup++ - case types.Endpoint_RANDOM_PORT: - otherEndpointsCountForDeploymentGroup++ - } - } - // Find a matching manifest group - for idx := range mlist { - mrec := mlist[idx] - - // Check that this manifest group is not yet exhausted - if mrec.Count == 0 { - continue - } - - if !drec.Resources.CPU.Equal(mrec.Resources.CPU) || - !drec.Resources.Memory.Equal(mrec.Resources.Memory) || - !drec.Resources.Storage.Equal(mrec.Resources.Storage) { - continue - } - - // If the manifest group contains more resources than the deployment group, then - // fulfill the deployment group entirely - if mrec.Count >= drec.Count { - mrec.Count -= drec.Count - drec.Count = 0 - } else { - // Partially fulfill the deployment group since the manifest group contains less - drec.Count -= mrec.Count - mrec.Count = 0 - } - - // Update the value stored in the list - mlist[idx] = mrec - - // If the deployment group is fulfilled then break out and - // move to the next deployment - if drec.Count == 0 { - continue deploymentGroupLoop - } - } - // If this point is reached then the deployment group cannot be fully matched - // against the given manifest groups - return fmt.Errorf("%w: underutilized deployment group %q", ErrManifestCrossValidation, dgroup.GetName()) - } - - // Search for any manifest groups which are not fully satisfied - for _, mrec := range mlist { - if mrec.Count > 0 { - return fmt.Errorf("%w: manifest resources %q is not fully matched with deployment groups", ErrManifestCrossValidation, mgroup.GetName()) - } - } - - httpOnlyEndpointCount := 0 - otherEndpointCount := 0 - - for _, service := range mgroup.Services { - for _, serviceExpose := range service.Expose { - if serviceExpose.Global { - if IsIngress(serviceExpose) { - httpOnlyEndpointCount++ - } else { - otherEndpointCount++ - } - } - } - } - - if otherEndpointCount != otherEndpointsCountForDeploymentGroup { - return errors.Errorf("invalid manifest: mismatch on number of endpoints %d != %d", otherEndpointCount, otherEndpointsCountForDeploymentGroup) - } - - if httpOnlyEndpointCount != httpOnlyEndpointsCountForDeploymentGroup { - return errors.Errorf("invalid manifest: mismatch on number of HTTP only endpoints %d != %d", httpOnlyEndpointCount, httpOnlyEndpointsCountForDeploymentGroup) - } - - return nil -} - -func IsIngress(expose ServiceExpose) bool { - return expose.Proto == TCP && expose.Global && 80 == ExposeExternalPort(expose) -} - -func ExposeExternalPort(expose ServiceExpose) int32 { - if expose.ExternalPort == 0 { - return int32(expose.Port) - } - return int32(expose.ExternalPort) -} diff --git a/go/manifest/v2beta1/manifest_cross_validation_test.go b/go/manifest/v2beta1/manifest_cross_validation_test.go deleted file mode 100644 index 94843272..00000000 --- a/go/manifest/v2beta1/manifest_cross_validation_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package v2beta1_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - manifest "github.com/akash-network/akash-api/go/manifest/v2beta1" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta2" - tutil "github.com/akash-network/akash-api/go/testutil" - "github.com/akash-network/akash-api/go/testutil/v1beta2" -) - -func TestManifestWithEmptyDeployment(t *testing.T) { - m := simpleManifest() - deployment := make([]dtypes.Group, 0) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) -} - -func simpleDeployment(t *testing.T) []dtypes.Group { - deployment := make([]dtypes.Group, 1) - gid := testutil.GroupID(t) - resources := make([]dtypes.Resource, 1) - resources[0] = dtypes.Resource{ - Resources: simpleResourceUnits(), - Count: 1, - Price: sdk.NewInt64DecCoin(tutil.CoinDenom, 1), - } - deployment[0] = dtypes.Group{ - GroupID: gid, - State: 0, - GroupSpec: dtypes.GroupSpec{ - Name: nameOfTestGroup, - Requirements: akashtypes.PlacementRequirements{}, - Resources: resources, - }, - } - - return deployment -} - -func TestManifestWithDeployment(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.NoError(t, err) -} - -func TestManifestWithDeploymentMultipleCount(t *testing.T) { - addl := uint32(tutil.RandRangeInt(1, 20)) - m := simpleManifest() - m[0].Services[0].Count += addl - deployment := simpleDeployment(t) - deployment[0].GroupSpec.Resources[0].Count += addl - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.NoError(t, err) -} - -func TestManifestWithDeploymentMultiple(t *testing.T) { - cpu := int64(tutil.RandRangeInt(1024, 2000)) - storage := int64(tutil.RandRangeInt(2000, 3000)) - memory := int64(tutil.RandRangeInt(3001, 4000)) - - m := make(manifest.Manifest, 3) - m[0] = simpleManifest()[0] - m[0].Services[0].Resources.CPU.Units.Val = sdk.NewInt(cpu) - m[0].Name = "testgroup-2" - - m[1] = simpleManifest()[0] - m[1].Services[0].Resources.Storage[0].Quantity.Val = sdk.NewInt(storage) - m[1].Name = "testgroup-1" - - m[2] = simpleManifest()[0] - m[2].Services[0].Resources.Memory.Quantity.Val = sdk.NewInt(memory) - m[2].Name = "testgroup-0" - - deployment := make([]dtypes.Group, 3) - deployment[0] = simpleDeployment(t)[0] - deployment[0].GroupSpec.Resources[0].Resources.Memory.Quantity.Val = sdk.NewInt(memory) - deployment[0].GroupSpec.Name = "testgroup-0" - - deployment[1] = simpleDeployment(t)[0] - deployment[1].GroupSpec.Resources[0].Resources.Storage[0].Quantity.Val = sdk.NewInt(storage) - deployment[1].GroupSpec.Name = "testgroup-1" - - deployment[2] = simpleDeployment(t)[0] - deployment[2].GroupSpec.Resources[0].Resources.CPU.Units.Val = sdk.NewInt(cpu) - deployment[2].GroupSpec.Name = "testgroup-2" - - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.NoError(t, err) -} - -func TestManifestWithDeploymentCPUMismatch(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - deployment[0].GroupSpec.Resources[0].Resources.CPU.Units.Val = sdk.NewInt(999) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*underutilized deployment group.+$", err) -} - -func TestManifestWithDeploymentMemoryMismatch(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - deployment[0].GroupSpec.Resources[0].Resources.Memory.Quantity.Val = sdk.NewInt(99999) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*underutilized deployment group.+$", err) -} - -func TestManifestWithDeploymentStorageMismatch(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - deployment[0].GroupSpec.Resources[0].Resources.Storage[0].Quantity.Val = sdk.NewInt(99999) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*underutilized deployment group.+$", err) -} - -func TestManifestWithDeploymentCountMismatch(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - deployment[0].GroupSpec.Resources[0].Count++ - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*underutilized deployment group.+$", err) -} - -func TestManifestWithManifestGroupMismatch(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - m[0].Services[0].Count++ - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*manifest resources .+ not fully matched.+$", err) -} - -func TestManifestWithEndpointMismatchA(t *testing.T) { - m := simpleManifest() - - // Make this require an endpoint - m[0].Services[0].Expose[0] = manifest.ServiceExpose{ - Port: 2000, - ExternalPort: 0, - Proto: manifest.TCP, - Service: "", - Global: true, - Hosts: nil, - } - deployment := simpleDeployment(t) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*mismatch on number of endpoints.+$", err) -} - -func TestManifestWithEndpointMismatchB(t *testing.T) { - m := simpleManifest() - deployment := simpleDeployment(t) - // Add an endpoint where the manifest doesn't call for it - deployment[0].GroupSpec.Resources[0].Resources.Endpoints = append(deployment[0].GroupSpec.Resources[0].Resources.Endpoints, akashtypes.Endpoint{}) - err := manifest.ValidateManifestWithDeployment(&m, deployment) - require.Error(t, err) - require.Regexp(t, "^.*mismatch on number of HTTP only endpoints.+$", err) -} diff --git a/go/manifest/v2beta1/manifest_test.go b/go/manifest/v2beta1/manifest_test.go deleted file mode 100644 index a9b8d28e..00000000 --- a/go/manifest/v2beta1/manifest_test.go +++ /dev/null @@ -1,465 +0,0 @@ -package v2beta1_test - -import ( - "bytes" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - "github.com/stretchr/testify/assert" - - manifest "github.com/akash-network/akash-api/go/manifest/v2beta1" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta2" - "github.com/akash-network/akash-api/go/testutil/v1beta2" -) - -var ( - randCPU1 = uint64(testutil.RandCPUUnits()) - randCPU2 = randCPU1 + 1 - randMemory = testutil.RandMemoryQuantity() - randStorage = testutil.RandStorageQuantity() -) - -var randUnits1 = akashtypes.ResourceUnits{ - CPU: &akashtypes.CPU{ - Units: akashtypes.NewResourceValue(randCPU1), - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.NewResourceValue(randMemory), - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Quantity: akashtypes.NewResourceValue(randStorage), - }, - }, -} - -var randUnits2 = akashtypes.ResourceUnits{ - CPU: &akashtypes.CPU{ - Units: akashtypes.NewResourceValue(randCPU2), - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.NewResourceValue(randMemory), - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Quantity: akashtypes.NewResourceValue(randStorage), - }, - }, -} - -func Test_ValidateManifest(t *testing.T) { - tests := []struct { - name string - ok bool - mgroups []manifest.Group - dgroups []*dtypes.GroupSpec - }{ - { - name: "empty", - ok: true, - }, - - { - name: "single", - ok: true, - mgroups: []manifest.Group{ - { - Name: "foo", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: []dtypes.Resource{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "multi-mgroup", - ok: true, - mgroups: []manifest.Group{ - { - Name: "foo", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits1, - Count: 1, - }, - { - Name: "svc1", - Resources: randUnits1, - Count: 2, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: []dtypes.Resource{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "multi-dgroup", - ok: true, - mgroups: []manifest.Group{ - { - Name: "foo", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: []dtypes.Resource{ - { - Resources: randUnits1, - Count: 2, - }, - { - Resources: randUnits1, - Count: 1, - }, - }, - }, - }, - }, - - { - name: "mismatch-name", - ok: false, - mgroups: []manifest.Group{ - { - Name: "foo-bad", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: []dtypes.Resource{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "mismatch-cpu", - ok: false, - mgroups: []manifest.Group{ - { - Name: "foo", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits2, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: []dtypes.Resource{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "mismatch-group-count", - ok: false, - mgroups: []manifest.Group{ - { - Name: "foo", - Services: []manifest.Service{ - { - Name: "svc1", - Resources: randUnits2, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{}, - }, - } - - for _, test := range tests { - m := manifest.Manifest(test.mgroups) - err := manifest.ValidateManifestWithGroupSpecs(&m, test.dgroups) - if test.ok { - assert.NoError(t, err, test.name) - } else { - assert.Error(t, err, test.name) - } - } -} - -func TestNilManifestIsInvalid(t *testing.T) { - err := manifest.ValidateManifest(nil) - require.Error(t, err) - require.Regexp(t, "^.*manifest is empty.*$", err) -} - -const nameOfTestService = "test-service" -const nameOfTestGroup = "testGroup" - -func simpleResourceUnits() akashtypes.ResourceUnits { - return akashtypes.ResourceUnits{ - CPU: &akashtypes.CPU{ - Units: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randCPU1), - }, - Attributes: nil, - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randMemory), - }, - Attributes: nil, - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Name: "default", - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randStorage), - }, - }, - }, - Endpoints: []akashtypes.Endpoint{ - { - Kind: akashtypes.Endpoint_SHARED_HTTP, - }, - }, - } -} - -func simpleManifest() manifest.Manifest { - expose := make([]manifest.ServiceExpose, 1) - expose[0].Global = true - expose[0].Port = 80 - expose[0].Proto = manifest.TCP - expose[0].Hosts = make([]string, 1) - expose[0].Hosts[0] = "host.test" - services := make([]manifest.Service, 1) - services[0] = manifest.Service{ - Name: nameOfTestService, - Image: "test/image:1.0", - Command: nil, - Args: nil, - Env: nil, - Resources: simpleResourceUnits(), - Count: 1, - Expose: expose, - } - m := make(manifest.Manifest, 1) - m[0] = manifest.Group{ - Name: nameOfTestGroup, - Services: services, - } - - return m -} - -func TestSimpleManifestIsValid(t *testing.T) { - m := simpleManifest() - err := manifest.ValidateManifest(m) - require.NoError(t, err) -} - -func TestManifestWithNoGlobalServicesIsInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services[0].Expose[0].Global = false - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*zero global services.*$", err) -} - -func TestManifestWithBadServiceNameIsInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services[0].Name = "a_bad_service_name" // should not contain underscores - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*name is invalid.*$", err) - - m[0].Services[0].Name = "a-name-" // should not end with dash - err = manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*name is invalid.*$", err) -} - -func TestManifestWithServiceNameIsValid(t *testing.T) { - m := simpleManifest() - - m[0].Services[0].Name = "9aaa-bar" // does not allow starting with a number - err := manifest.ValidateManifest(m) - require.ErrorIs(t, err, manifest.ErrInvalidManifest) - require.Regexp(t, "^.*name is invalid.*$", err) -} - -func TestManifestWithDuplicateHostIsInvalid(t *testing.T) { - m := simpleManifest() - hosts := make([]string, 2) - const hostname = "a.test" - hosts[0] = hostname - hosts[1] = hostname - m[0].Services[0].Expose[0].Hosts = hosts - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*hostname.+is duplicated.*$", err) -} - -func TestManifestWithDashInHostname(t *testing.T) { - m := simpleManifest() - hosts := make([]string, 1) - hosts[0] = "a-test.com" - m[0].Services[0].Expose[0].Hosts = hosts - err := manifest.ValidateManifest(m) - require.NoError(t, err) -} - -func TestManifestWithBadHostIsInvalid(t *testing.T) { - m := simpleManifest() - hosts := make([]string, 2) - hosts[0] = "bob.test" // valid - hosts[1] = "-bob" // invalid - m[0].Services[0].Expose[0].Hosts = hosts - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*invalid hostname.*$", err) -} - -func TestManifestWithLongHostIsInvalid(t *testing.T) { - m := simpleManifest() - hosts := make([]string, 1) - buf := &bytes.Buffer{} - for i := 0; i != 255; i++ { - _, err := buf.WriteRune('a') - require.NoError(t, err) - } - _, err := buf.WriteString(".com") - require.NoError(t, err) - - hosts[0] = buf.String() - m[0].Services[0].Expose[0].Hosts = hosts - err = manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*invalid hostname.*$", err) -} - -func TestManifestWithDuplicateGroupIsInvalid(t *testing.T) { - mDuplicate := make(manifest.Manifest, 2) - mDuplicate[0] = simpleManifest()[0] - mDuplicate[1] = simpleManifest()[0] - mDuplicate[1].Services[0].Expose[0].Hosts[0] = "anotherhost.test" - err := manifest.ValidateManifest(mDuplicate) - require.Error(t, err) - require.Regexp(t, "^.*duplicate group.*$", err) -} - -func TestManifestWithNoServicesInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services = nil - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*contains no services.*$", err) -} - -func TestManifestWithEmptyServiceNameInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services[0].Name = "" - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*service name is empty.*$", err) -} - -func TestManifestWithEmptyImageNameInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services[0].Image = "" - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, "^.*service.+has empty image name.*$", err) -} - -func TestManifestWithEmptyEnvValueIsValid(t *testing.T) { - m := simpleManifest() - envVars := make([]string, 1) - envVars[0] = "FOO=" // sets FOO to empty string - m[0].Services[0].Env = envVars - err := manifest.ValidateManifest(m) - require.NoError(t, err) -} - -func TestManifestWithEmptyEnvNameIsInvalid(t *testing.T) { - m := simpleManifest() - envVars := make([]string, 1) - envVars[0] = "=FOO" // invalid - m[0].Services[0].Env = envVars - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, `^.*var\. with an empty name.*$`, err) -} - -func TestManifestWithBadEnvNameIsInvalid(t *testing.T) { - m := simpleManifest() - envVars := make([]string, 1) - envVars[0] = "9VAR=FOO" // invalid because it starts with a digit - m[0].Services[0].Env = envVars - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, `^.*var\. with an invalid name.*$`, err) -} - -func TestManifestServiceUnknownProtocolIsInvalid(t *testing.T) { - m := simpleManifest() - m[0].Services[0].Expose[0].Proto = "ICMP" - err := manifest.ValidateManifest(m) - require.Error(t, err) - require.Regexp(t, `^.*protocol .+ unknown.*$`, err) -} diff --git a/go/manifest/v2beta1/manifest_validation_errors.go b/go/manifest/v2beta1/manifest_validation_errors.go deleted file mode 100644 index 2046c98e..00000000 --- a/go/manifest/v2beta1/manifest_validation_errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package v2beta1 - -import ( - "errors" -) - -var ( - ErrInvalidManifest = errors.New("invalid manifest") - ErrManifestCrossValidation = errors.New("manifest cross validation error") -) diff --git a/go/manifest/v2beta1/parse.go b/go/manifest/v2beta1/parse.go deleted file mode 100644 index 78feb106..00000000 --- a/go/manifest/v2beta1/parse.go +++ /dev/null @@ -1,65 +0,0 @@ -package v2beta1 - -import ( - "errors" - "fmt" - "strings" - - corev1 "k8s.io/api/core/v1" -) - -var ( - errUnknownServiceProtocol = errors.New("unknown service protocol") - ErrUnsupportedServiceProtocol = errors.New("unsupported service protocol") -) - -type ServiceProtocol string - -const ( - TCP = ServiceProtocol("TCP") - UDP = ServiceProtocol("UDP") -) - -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 corev1.Protocol(""), fmt.Errorf("%w: %v", errUnknownServiceProtocol, sp) -} - -func ServiceProtocolFromKube(proto corev1.Protocol) (ServiceProtocol, error) { - switch proto { - case corev1.ProtocolTCP: - return TCP, nil - case corev1.ProtocolUDP: - return UDP, nil - } - - return ServiceProtocol(""), fmt.Errorf("%w: %v", errUnknownServiceProtocol, proto) -} - -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 -} diff --git a/go/manifest/v2beta1/service.go b/go/manifest/v2beta1/service.go deleted file mode 100644 index 4086c8a2..00000000 --- a/go/manifest/v2beta1/service.go +++ /dev/null @@ -1,3 +0,0 @@ -package v2beta1 - -type Services []Service diff --git a/go/manifest/v2beta1/service.pb.go b/go/manifest/v2beta1/service.pb.go deleted file mode 100644 index ce8aa646..00000000 --- a/go/manifest/v2beta1/service.pb.go +++ /dev/null @@ -1,1274 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta1/service.proto - -package v2beta1 - -import ( - fmt "fmt" - v1beta2 "github.com/akash-network/akash-api/go/node/types/v1beta2" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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 - -// StorageParams -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=read_only,json=readOnly,proto3" json:"readOnly" yaml:"readOnly"` -} - -func (m *StorageParams) Reset() { *m = StorageParams{} } -func (*StorageParams) ProtoMessage() {} -func (*StorageParams) Descriptor() ([]byte, []int) { - return fileDescriptor_fa76aee1c3e9a132, []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 -} - -// ServiceParams -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_fa76aee1c3e9a132, []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,rep,name=args,proto3" json:"args" yaml:"args"` - Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env" yaml:"env"` - Resources v1beta2.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_fa76aee1c3e9a132, []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 nil -} - -func (m *Service) GetEnv() []string { - if m != nil { - return m.Env - } - return nil -} - -func (m *Service) GetResources() v1beta2.ResourceUnits { - if m != nil { - return m.Resources - } - return v1beta2.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.v2beta1.StorageParams") - proto.RegisterType((*ServiceParams)(nil), "akash.manifest.v2beta1.ServiceParams") - proto.RegisterType((*Service)(nil), "akash.manifest.v2beta1.Service") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta1/service.proto", fileDescriptor_fa76aee1c3e9a132) -} - -var fileDescriptor_fa76aee1c3e9a132 = []byte{ - // 590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xcd, 0x7c, 0x69, 0x9b, 0x66, 0xfa, 0x05, 0x90, 0x85, 0xc0, 0xad, 0x84, 0xc7, 0x1d, 0x51, - 0x64, 0x51, 0x61, 0xab, 0x41, 0x02, 0x09, 0xb1, 0xb2, 0xc4, 0x1a, 0x34, 0x15, 0x12, 0x62, 0x01, - 0x9a, 0xb8, 0x53, 0xd7, 0x6a, 0xec, 0x89, 0x3c, 0x4e, 0x20, 0x3b, 0x1e, 0x81, 0xf7, 0xe0, 0x45, - 0xb2, 0xac, 0xc4, 0xa6, 0xab, 0x11, 0x24, 0xbb, 0x2c, 0xfd, 0x04, 0x68, 0x7e, 0x8c, 0xa9, 0x40, - 0x54, 0xac, 0x92, 0x7b, 0xee, 0xb9, 0x77, 0xce, 0x9c, 0x39, 0x09, 0xbc, 0x4f, 0xcf, 0xa9, 0x38, - 0x8b, 0x72, 0x5a, 0x64, 0xa7, 0x4c, 0x54, 0xd1, 0x6c, 0x38, 0x62, 0x15, 0x3d, 0x8a, 0x04, 0x2b, - 0x67, 0x59, 0xc2, 0xc2, 0x49, 0xc9, 0x2b, 0xee, 0xdc, 0xd1, 0xac, 0xb0, 0x61, 0x85, 0x96, 0xb5, - 0x77, 0x3b, 0xe5, 0x29, 0xd7, 0x94, 0x48, 0x7d, 0x33, 0xec, 0xbd, 0x87, 0x7f, 0xdf, 0xc9, 0x3e, - 0x4e, 0xb8, 0xb0, 0x9b, 0xf7, 0x1e, 0x18, 0xee, 0x88, 0x0a, 0x16, 0xcd, 0x8e, 0x14, 0x6f, 0x18, - 0x95, 0x4c, 0xf0, 0x69, 0x99, 0xb0, 0x69, 0x91, 0x55, 0xc2, 0xf0, 0xf0, 0x17, 0x00, 0x07, 0xc7, - 0x15, 0x2f, 0x69, 0xca, 0x5e, 0xd1, 0x92, 0xe6, 0xc2, 0x39, 0x84, 0x1b, 0x05, 0xcd, 0x99, 0x0b, - 0x7c, 0x10, 0xf4, 0xe3, 0xbb, 0x6b, 0x89, 0x74, 0x5d, 0x4b, 0xb4, 0x33, 0xa7, 0xf9, 0xf8, 0x19, - 0x56, 0x15, 0x26, 0x1a, 0x74, 0x22, 0xb8, 0x99, 0xf3, 0x69, 0x51, 0xb9, 0xff, 0x69, 0xf6, 0xee, - 0x5a, 0x22, 0x03, 0xd4, 0x12, 0xfd, 0x6f, 0xe8, 0xba, 0xc4, 0xc4, 0xc0, 0xce, 0x73, 0xd8, 0x2f, - 0x19, 0x3d, 0x79, 0xcf, 0x8b, 0xf1, 0xdc, 0xed, 0xfa, 0x20, 0xd8, 0x8e, 0xd1, 0x5a, 0xa2, 0x6d, - 0x05, 0xbe, 0x2c, 0xc6, 0xf3, 0x5a, 0xa2, 0x9b, 0x66, 0xae, 0x41, 0x30, 0xf9, 0xd9, 0xc4, 0x02, - 0x0e, 0x8e, 0xcd, 0x65, 0xad, 0xd8, 0x11, 0xec, 0x09, 0xa3, 0xde, 0x05, 0x7e, 0x37, 0xd8, 0x19, - 0x1e, 0x84, 0x7f, 0xb6, 0x34, 0xbc, 0x72, 0xc9, 0x78, 0x7f, 0x21, 0x51, 0x67, 0x2d, 0x51, 0x33, - 0x5d, 0x4b, 0x74, 0xc3, 0x1c, 0x6b, 0x01, 0x4c, 0x9a, 0x16, 0xfe, 0xba, 0x01, 0x7b, 0xf6, 0xd4, - 0x7f, 0x36, 0x27, 0xcb, 0x95, 0xb4, 0x5f, 0xcc, 0xd1, 0x40, 0x6b, 0x8e, 0x2e, 0x31, 0x31, 0xb0, - 0xf3, 0x14, 0xf6, 0x12, 0x9e, 0xe7, 0xb4, 0x38, 0x71, 0xbb, 0x7e, 0x37, 0xe8, 0xc7, 0xf7, 0x94, - 0x44, 0x0b, 0xb5, 0x12, 0x2d, 0x80, 0x49, 0xd3, 0x52, 0xb2, 0x68, 0x99, 0x0a, 0x77, 0x43, 0x4f, - 0x69, 0x59, 0xaa, 0x6e, 0x65, 0xa9, 0x0a, 0x13, 0x0d, 0x3a, 0x87, 0xb0, 0xcb, 0x8a, 0x99, 0xbb, - 0xa9, 0xb9, 0xbb, 0x0b, 0x89, 0xc0, 0x5a, 0x22, 0x05, 0xd5, 0x12, 0x41, 0x43, 0x67, 0xc5, 0x0c, - 0x13, 0x05, 0x39, 0xa7, 0xea, 0xbd, 0x4c, 0x6c, 0x84, 0xbb, 0xe5, 0x83, 0x60, 0x67, 0xb8, 0x6f, - 0x2d, 0x56, 0xd9, 0x0a, 0x6d, 0xb6, 0x42, 0x62, 0x49, 0xaf, 0x55, 0xb6, 0xe2, 0x03, 0x6b, 0x6f, - 0x3b, 0x5b, 0x4b, 0x74, 0xab, 0x79, 0x57, 0x0b, 0x61, 0xd2, 0xb6, 0x95, 0x57, 0x89, 0x0e, 0x52, - 0xcf, 0x07, 0xc1, 0xc0, 0x78, 0x95, 0x5c, 0x0d, 0x52, 0x62, 0x83, 0xa4, 0x3f, 0x9d, 0x77, 0x70, - 0xcb, 0x04, 0xde, 0xdd, 0xbe, 0xe6, 0xe1, 0xcd, 0xd3, 0xbd, 0xd0, 0xe4, 0x18, 0x59, 0x65, 0x76, - 0xb8, 0x96, 0x68, 0x60, 0xaf, 0xac, 0x6b, 0x4c, 0x6c, 0x43, 0xed, 0x9f, 0xe8, 0xac, 0xb8, 0x7d, - 0x7d, 0xeb, 0xeb, 0xf6, 0xdb, 0x60, 0x21, 0xeb, 0xa7, 0x1d, 0x6e, 0xf7, 0x9b, 0x1a, 0x13, 0xdb, - 0x88, 0xdf, 0x5c, 0x7e, 0xf7, 0x3a, 0x9f, 0x96, 0x1e, 0x58, 0x2c, 0x3d, 0x70, 0xb1, 0xf4, 0xc0, - 0xb7, 0xa5, 0x07, 0x3e, 0xaf, 0xbc, 0xce, 0xc5, 0xca, 0xeb, 0x5c, 0xae, 0xbc, 0xce, 0xdb, 0x27, - 0x69, 0x56, 0x9d, 0x4d, 0x47, 0x61, 0xc2, 0xf3, 0x48, 0x9f, 0xfd, 0xa8, 0x60, 0xd5, 0x07, 0x5e, - 0x9e, 0xdb, 0x8a, 0x4e, 0xb2, 0x28, 0xe5, 0xbf, 0xfd, 0x1d, 0x8c, 0xb6, 0xf4, 0x2f, 0xfb, 0xf1, - 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0xed, 0xf0, 0x71, 0x83, 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 { - for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Args[iNdEx]) - copy(dAtA[i:], m.Args[iNdEx]) - i = encodeVarintService(dAtA, i, uint64(len(m.Args[iNdEx]))) - 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)) - } - } - if len(m.Args) > 0 { - for _, s := range m.Args { - l = len(s) - 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(strings.Replace(f.String(), "StorageParams", "StorageParams", 1), `&`, ``, 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 += fmt.Sprintf("%v", f) + "," - } - 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", "v1beta2.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 = append(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/v2beta1/serviceexpose.pb.go b/go/manifest/v2beta1/serviceexpose.pb.go deleted file mode 100644 index 7eca5b66..00000000 --- a/go/manifest/v2beta1/serviceexpose.pb.go +++ /dev/null @@ -1,729 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta1/serviceexpose.proto - -package v2beta1 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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 - -// ServiceExpose stores exposed ports and hosts details -type ServiceExpose struct { - // port on the container - Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port" yaml:"port"` - // port on the service definition - ExternalPort uint32 `protobuf:"varint,2,opt,name=external_port,json=externalPort,proto3" json:"externalPort" yaml:"externalPort"` - Proto ServiceProtocol `protobuf:"bytes,3,opt,name=proto,proto3,casttype=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=http_options,json=httpOptions,proto3" json:"httpOptions" yaml:"httpOptions"` - // The name of the IP address associated with this, if any - IP string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip" yaml:"ip"` - // The sequence number of the associated endpoint in the on-chain data - EndpointSequenceNumber uint32 `protobuf:"varint,9,opt,name=endpoint_sequence_number,json=endpointSequenceNumber,proto3" json:"endpointSequenceNumber" yaml:"endpointSequenceNumber"` -} - -func (m *ServiceExpose) Reset() { *m = ServiceExpose{} } -func (*ServiceExpose) ProtoMessage() {} -func (*ServiceExpose) Descriptor() ([]byte, []int) { - return fileDescriptor_a282b25ed8ea7811, []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 "" -} - -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 ServiceExposeHTTPOptions{} -} - -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.RegisterType((*ServiceExpose)(nil), "akash.manifest.v2beta1.ServiceExpose") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta1/serviceexpose.proto", fileDescriptor_a282b25ed8ea7811) -} - -var fileDescriptor_a282b25ed8ea7811 = []byte{ - // 534 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x4f, 0x6f, 0xd3, 0x3e, - 0x18, 0xc7, 0xeb, 0x6e, 0xed, 0x56, 0xb7, 0xfd, 0xfd, 0x24, 0x83, 0x46, 0x36, 0xb4, 0xb8, 0xf2, - 0x85, 0xf0, 0x2f, 0x81, 0x4d, 0x02, 0x04, 0xb7, 0x48, 0x48, 0x20, 0x21, 0xa8, 0xb2, 0x1d, 0x10, - 0x97, 0x2a, 0x2d, 0xa6, 0xb5, 0xd6, 0xc6, 0x26, 0x71, 0xc7, 0xb8, 0xf1, 0x06, 0x90, 0x78, 0x07, - 0xbc, 0x9d, 0x1d, 0x77, 0xdc, 0xc9, 0x82, 0xf4, 0x96, 0x63, 0x8e, 0x9c, 0x50, 0x6c, 0x57, 0xeb, - 0xc4, 0x76, 0xcb, 0xf3, 0x7d, 0x3e, 0xdf, 0xc7, 0x5f, 0xf9, 0x71, 0xe0, 0xbd, 0xf8, 0x28, 0xce, - 0x26, 0xc1, 0x2c, 0x4e, 0xd8, 0x27, 0x9a, 0xc9, 0xe0, 0x78, 0x6f, 0x48, 0x65, 0xfc, 0x38, 0xc8, - 0x68, 0x7a, 0xcc, 0x46, 0x94, 0x9e, 0x08, 0x9e, 0x51, 0x5f, 0xa4, 0x5c, 0x72, 0xb4, 0xa5, 0x59, - 0x7f, 0xc9, 0xfa, 0x96, 0xdd, 0xb9, 0x39, 0xe6, 0x63, 0xae, 0x91, 0xa0, 0xfa, 0x32, 0xf4, 0x8e, - 0x77, 0xcd, 0xe4, 0x89, 0x94, 0x82, 0x0b, 0xc9, 0x78, 0x92, 0x19, 0x92, 0xfc, 0x6c, 0xc0, 0xee, - 0x81, 0x39, 0xef, 0xa5, 0x3e, 0x0f, 0xdd, 0x87, 0xeb, 0x82, 0xa7, 0xd2, 0x01, 0x3d, 0xe0, 0x75, - 0xc3, 0x5b, 0x85, 0xc2, 0xba, 0x2e, 0x15, 0x6e, 0x7f, 0x8d, 0x67, 0xd3, 0xe7, 0xa4, 0xaa, 0x48, - 0xa4, 0x45, 0xf4, 0x06, 0x76, 0xe9, 0x89, 0xa4, 0x69, 0x12, 0x4f, 0x07, 0xda, 0x55, 0xd7, 0xae, - 0x3b, 0x85, 0xc2, 0x9d, 0x65, 0xa3, 0x6f, 0xdc, 0x37, 0x8c, 0x7b, 0x55, 0x25, 0xd1, 0x25, 0x08, - 0x85, 0xb0, 0xa1, 0x53, 0x39, 0x6b, 0x3d, 0xe0, 0xb5, 0xc2, 0x07, 0x85, 0xc2, 0x46, 0x28, 0x15, - 0xee, 0xd8, 0xc3, 0x75, 0xea, 0x3f, 0x0a, 0xff, 0x6f, 0x53, 0xf7, 0x2b, 0x61, 0xc4, 0xa7, 0x91, - 0x21, 0xd1, 0x53, 0xb8, 0x61, 0xef, 0xcf, 0x59, 0xd7, 0x53, 0x76, 0x0b, 0x85, 0x97, 0x52, 0xa9, - 0xf0, 0x7f, 0x66, 0x8e, 0x15, 0x48, 0xb4, 0x6c, 0xa1, 0x7d, 0xd8, 0x1c, 0x4f, 0xf9, 0x30, 0x9e, - 0x3a, 0x8d, 0x1e, 0xf0, 0x36, 0xc3, 0xdb, 0x85, 0xc2, 0x56, 0x29, 0x15, 0xee, 0x1a, 0x9b, 0xa9, - 0x49, 0x64, 0x1b, 0x28, 0x80, 0x8d, 0x09, 0xcf, 0x64, 0xe6, 0x34, 0x7b, 0x6b, 0x5e, 0x2b, 0xdc, - 0xae, 0x12, 0x6b, 0xe1, 0x22, 0xb1, 0x2e, 0x49, 0x64, 0x64, 0xf4, 0x1d, 0xc0, 0x4e, 0xb5, 0x85, - 0x81, 0x5d, 0x83, 0xb3, 0xd1, 0x03, 0x5e, 0x7b, 0xef, 0x91, 0x7f, 0xf5, 0x7e, 0xfd, 0x4b, 0xbb, - 0x79, 0x75, 0x78, 0xd8, 0x7f, 0x67, 0x7c, 0xe1, 0xb3, 0x53, 0x85, 0x6b, 0xb9, 0xc2, 0xed, 0x15, - 0xb1, 0x50, 0xb8, 0x5d, 0x0d, 0xb7, 0x65, 0xa9, 0x30, 0xb2, 0x19, 0x2e, 0x44, 0x12, 0xad, 0x22, - 0xe8, 0x2e, 0xac, 0x33, 0xe1, 0x6c, 0xea, 0x9b, 0xda, 0xce, 0x15, 0xae, 0xbf, 0xee, 0x17, 0x0a, - 0xd7, 0x99, 0x28, 0x15, 0x6e, 0x19, 0x33, 0x13, 0x24, 0xaa, 0x33, 0x81, 0xe6, 0xd0, 0xa1, 0xc9, - 0x47, 0xc1, 0x59, 0x22, 0x07, 0x19, 0xfd, 0x3c, 0xa7, 0xc9, 0x88, 0x0e, 0x92, 0xf9, 0x6c, 0x48, - 0x53, 0xa7, 0xa5, 0xd7, 0xfe, 0xa2, 0x50, 0x78, 0x6b, 0xc9, 0x1c, 0x58, 0xe4, 0xad, 0x26, 0x4a, - 0x85, 0x77, 0xed, 0x03, 0xb8, 0xb2, 0x4f, 0xa2, 0x6b, 0x8c, 0xe1, 0xfb, 0xf3, 0xdf, 0x6e, 0xed, - 0x5b, 0xee, 0x82, 0xd3, 0xdc, 0x05, 0x67, 0xb9, 0x0b, 0x7e, 0xe5, 0x2e, 0xf8, 0xb1, 0x70, 0x6b, - 0x67, 0x0b, 0xb7, 0x76, 0xbe, 0x70, 0x6b, 0x1f, 0x9e, 0x8c, 0x99, 0x9c, 0xcc, 0x87, 0xfe, 0x88, - 0xcf, 0x02, 0x7d, 0x8d, 0x0f, 0x13, 0x2a, 0xbf, 0xf0, 0xf4, 0xc8, 0x56, 0xb1, 0x60, 0xc1, 0x98, - 0xff, 0xf3, 0x37, 0x0c, 0x9b, 0xfa, 0xc5, 0xec, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x35, - 0xfb, 0x0f, 0x88, 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 - } - { - 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 len(m.Proto) > 0 { - i -= len(m.Proto) - copy(dAtA[i:], m.Proto) - i = encodeVarintServiceexpose(dAtA, i, uint64(len(m.Proto))) - i-- - dAtA[i] = 0x1a - } - 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)) - } - l = len(m.Proto) - if l > 0 { - n += 1 + l + sovServiceexpose(uint64(l)) - } - 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)) - } - } - 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(strings.Replace(fmt.Sprintf("%v", this.HTTPOptions), "ServiceExposeHTTPOptions", "ServiceExposeHTTPOptions", 1), `&`, ``, 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto", 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.Proto = ServiceProtocol(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 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/manifest/v2beta2/errors.go b/go/manifest/v2beta2/errors.go deleted file mode 100644 index 2f1abada..00000000 --- a/go/manifest/v2beta2/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package v2beta2 - -import ( - "errors" -) - -var ( - ErrInvalidManifest = errors.New("invalid manifest") - ErrManifestCrossValidation = errors.New("manifest cross-validation error") -) diff --git a/go/manifest/v2beta2/group.go b/go/manifest/v2beta2/group.go deleted file mode 100644 index 09ee3e1c..00000000 --- a/go/manifest/v2beta2/group.go +++ /dev/null @@ -1,79 +0,0 @@ -package v2beta2 - -import ( - "fmt" - "sort" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" -) - -var _ dtypes.ResourceGroup = (*Group)(nil) - -// GetName returns the name of group -func (g Group) GetName() string { - return g.Name -} - -func (g Group) GetResourceUnits() dtypes.ResourceUnits { - groups := make(map[uint32]*dtypes.ResourceUnit) - - for _, svc := range g.Services { - if _, exists := groups[svc.Resources.ID]; !exists { - groups[svc.Resources.ID] = &dtypes.ResourceUnit{ - Resources: svc.Resources, - Count: svc.Count, - } - } else { - groups[svc.Resources.ID].Count += svc.Count - } - } - - units := make(dtypes.ResourceUnits, 0, len(groups)) - - for i := range groups { - units = append(units, *groups[i]) - } - - return units -} - -func (g Group) AllHostnames() []string { - allHostnames := make([]string, 0) - for _, service := range g.Services { - for _, expose := range service.Expose { - allHostnames = append(allHostnames, expose.Hosts...) - } - } - - return allHostnames -} - -func (g *Group) Validate(helper *validateManifestGroupsHelper) error { - if 0 == len(g.Services) { - return fmt.Errorf("%w: group %q contains no services", ErrInvalidManifest, g.GetName()) - } - - if !sort.IsSorted(g.Services) { - return fmt.Errorf("%w: group %q services is not sorted", ErrInvalidManifest, g.GetName()) - } - - for _, s := range g.Services { - if err := s.validate(helper); err != nil { - return err - } - } - - return nil -} - -// checkAgainstGSpec check if manifest group is within GroupSpec resources -// NOTE: it modifies caller's gspec -func (g *Group) checkAgainstGSpec(gspec *groupSpec) error { - for _, svc := range g.Services { - if err := svc.checkAgainstGSpec(gspec); err != nil { - return fmt.Errorf("%w: group %q: %w", ErrManifestCrossValidation, g.Name, err) - } - } - - return nil -} diff --git a/go/manifest/v2beta2/group.pb.go b/go/manifest/v2beta2/group.pb.go deleted file mode 100644 index e1a23a1a..00000000 --- a/go/manifest/v2beta2/group.pb.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta2/group.proto - -package v2beta2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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 Services `protobuf:"bytes,2,rep,name=services,proto3,castrepeated=Services" 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 init() { - proto.RegisterType((*Group)(nil), "akash.manifest.v2beta2.Group") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta2/group.proto", fileDescriptor_9735f16570903042) -} - -var fileDescriptor_9735f16570903042 = []byte{ - // 276 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, 0xb4, 0x82, 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, 0x87, 0x8b, 0x03, 0x6a, 0x4e, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xbc, 0x1e, - 0x76, 0xd7, 0xe9, 0x05, 0x43, 0xd4, 0x39, 0xe9, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, 0x9e, 0x3c, - 0x5c, 0xe3, 0xa7, 0x7b, 0xf2, 0xfc, 0x10, 0x93, 0x61, 0x22, 0x4a, 0xab, 0xee, 0xcb, 0x73, 0x40, - 0xd5, 0x17, 0x07, 0xc1, 0x15, 0x5a, 0xb1, 0x74, 0x2c, 0x90, 0x67, 0x70, 0x8a, 0xb8, 0xf1, 0x50, - 0x8e, 0xa1, 0xe1, 0x91, 0x1c, 0xe3, 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, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x83, 0x5d, 0xa3, 0x9b, - 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, 0xea, 0xa7, 0xe7, 0x63, 0x04, - 0x49, 0x12, 0x1b, 0x38, 0x2c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xac, 0x94, 0xcd, 0xe5, - 0x85, 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 += fmt.Sprintf("%v", f) + "," - } - 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/groups.go b/go/manifest/v2beta2/groups.go deleted file mode 100644 index ad5187a5..00000000 --- a/go/manifest/v2beta2/groups.go +++ /dev/null @@ -1,88 +0,0 @@ -package v2beta2 - -import ( - "fmt" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" -) - -type Groups []Group - -func (groups Groups) Validate() error { - helper := validateManifestGroupsHelper{ - hostnames: make(map[string]int), - } - - names := make(map[string]int) // used as a set - - for _, group := range groups { - if err := group.Validate(&helper); err != nil { - return err - } - if _, exists := names[group.GetName()]; exists { - return fmt.Errorf("%w: duplicate group %q", ErrInvalidManifest, group.GetName()) - } - - names[group.GetName()] = 0 // Value stored is not used - } - - if helper.globalServiceCount == 0 { - return fmt.Errorf("%w: zero global services", ErrInvalidManifest) - } - - return nil -} - -func (groups Groups) CheckAgainstGSpecs(gspecs dtypes.GroupSpecs) error { - gspecs = gspecs.Dup() - - if err := groups.Validate(); err != nil { - return err - } - - if len(groups) != len(gspecs) { - return fmt.Errorf("invalid manifest: group count mismatch (%v != %v)", len(groups), len(gspecs)) - } - - dgroupByName := newGroupSpecsHelper(gspecs) - - for _, mgroup := range groups { - dgroup, dgroupExists := dgroupByName[mgroup.GetName()] - - if !dgroupExists { - return fmt.Errorf("invalid manifest: unknown deployment group ('%v')", mgroup.GetName()) - } - - if err := mgroup.checkAgainstGSpec(dgroup); err != nil { - return err - } - } - - for _, gspec := range dgroupByName { - for resID, eps := range gspec.endpoints { - if eps.httpEndpoints > 0 { - return fmt.Errorf("%w: group %q: resources ID (%d): under-utilized (%d) HTTP endpoints", - ErrManifestCrossValidation, gspec.gs.Name, resID, eps.httpEndpoints) - } - - if eps.portEndpoints > 0 { - return fmt.Errorf("%w: group %q: resources ID (%d): under-utilized (%d) PORT endpoints", - ErrManifestCrossValidation, gspec.gs.Name, resID, eps.portEndpoints) - } - - if eps.ipEndpoints > 0 { - return fmt.Errorf("%w: group %q: resources ID (%d): under-utilized (%d) IP endpoints", - ErrManifestCrossValidation, gspec.gs.Name, resID, eps.ipEndpoints) - } - } - - for _, gRes := range gspec.gs.Resources { - if gRes.Count > 0 { - return fmt.Errorf("%w: group %q: resources ID (%d): under-utilized (%d) resources", - ErrManifestCrossValidation, gspec.gs.GetName(), gRes.ID, gRes.Count) - } - } - } - - return nil -} diff --git a/go/manifest/v2beta2/helpers.go b/go/manifest/v2beta2/helpers.go deleted file mode 100644 index a080b6b7..00000000 --- a/go/manifest/v2beta2/helpers.go +++ /dev/null @@ -1,98 +0,0 @@ -package v2beta2 - -import ( - k8svalidation "k8s.io/apimachinery/pkg/util/validation" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" -) - -type validateManifestGroupsHelper struct { - hostnames map[string]int // used as a set - globalServiceCount uint -} - -type validateEndpoints struct { - httpEndpoints uint - portEndpoints uint - ipEndpoints uint -} - -type validateEndpointsHelper map[uint32]*validateEndpoints - -type groupSpec struct { - gs dtypes.GroupSpec - endpoints validateEndpointsHelper -} - -type groupSpecHelper map[string]*groupSpec - -func newGroupSpecsHelper(gspecs dtypes.GroupSpecs) groupSpecHelper { - res := make(groupSpecHelper) - - for _, gspec := range gspecs { - res[gspec.GetName()] = newGroupSpecHelper(*gspec) - } - - return res -} - -func newGroupSpecHelper(gs dtypes.GroupSpec) *groupSpec { - res := &groupSpec{ - gs: gs, - endpoints: make(validateEndpointsHelper), - } - - for _, gRes := range gs.Resources { - vep := &validateEndpoints{} - - for _, ep := range gRes.Endpoints { - switch ep.Kind { - case types.Endpoint_SHARED_HTTP: - vep.httpEndpoints++ - case types.Endpoint_RANDOM_PORT: - vep.portEndpoints++ - case types.Endpoint_LEASED_IP: - vep.ipEndpoints++ - } - } - - res.endpoints[gRes.ID] = vep - } - - return res -} - -func isValidHostname(hostname string) bool { - return len(hostname) <= hostnameMaxLen && 0 == len(k8svalidation.IsDNS1123Subdomain(hostname)) -} - -func (ve *validateEndpoints) tryDecHTTP() bool { - if ve.httpEndpoints == 0 { - return false - } - - ve.httpEndpoints-- - - return true -} - -func (ve *validateEndpoints) tryDecPort() bool { - if ve.portEndpoints == 0 { - return false - } - - ve.portEndpoints-- - - return true -} - -func (ve *validateEndpoints) tryDecIP() bool { - if ve.ipEndpoints == 0 { - return false - } - - ve.ipEndpoints-- - - return true -} diff --git a/go/manifest/v2beta2/httpoptions.pb.go b/go/manifest/v2beta2/httpoptions.pb.go deleted file mode 100644 index cada1f23..00000000 --- a/go/manifest/v2beta2/httpoptions.pb.go +++ /dev/null @@ -1,535 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta2/httpoptions.proto - -package v2beta2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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/manifest.go b/go/manifest/v2beta2/manifest.go deleted file mode 100644 index 69b7ce95..00000000 --- a/go/manifest/v2beta2/manifest.go +++ /dev/null @@ -1,67 +0,0 @@ -package v2beta2 - -import ( - "crypto/sha256" - "encoding/json" - "fmt" - "regexp" - - sdk "github.com/cosmos/cosmos-sdk/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" -) - -var ( - serviceNameValidationRegex = regexp.MustCompile(`^[a-z]([-a-z0-9]*[a-z0-9])?$`) - hostnameMaxLen = 255 -) - -// Manifest store list of groups -type Manifest Groups - -// GetGroups returns a manifest with groups list -func (m Manifest) GetGroups() Groups { - return Groups(m) -} - -// Validate does validation for manifest -func (m Manifest) Validate() error { - if len(m) == 0 { - return fmt.Errorf("%w: manifest is empty", ErrInvalidManifest) - } - - return m.GetGroups().Validate() -} - -func (m Manifest) CheckAgainstDeployment(dgroups []dtypes.Group) error { - gspecs := make([]*dtypes.GroupSpec, 0, len(dgroups)) - - for _, dgroup := range dgroups { - gspec := dgroup.GroupSpec - gspecs = append(gspecs, &gspec) - } - - return m.CheckAgainstGSpecs(gspecs) -} - -func (m Manifest) CheckAgainstGSpecs(gspecs dtypes.GroupSpecs) error { - return m.GetGroups().CheckAgainstGSpecs(gspecs) -} - -// Version calculates the identifying deterministic hash for an SDL. -// Sha256 returns 32 byte sum of the SDL. -func (m Manifest) Version() ([]byte, error) { - data, err := json.Marshal(m) - if err != nil { - return nil, err - } - - sortedBytes, err := sdk.SortJSON(data) - if err != nil { - return nil, err - } - - sum := sha256.Sum256(sortedBytes) - - return sum[:], nil -} diff --git a/go/manifest/v2beta2/manifest_cross_validation_test.go b/go/manifest/v2beta2/manifest_cross_validation_test.go deleted file mode 100644 index a8b08051..00000000 --- a/go/manifest/v2beta2/manifest_cross_validation_test.go +++ /dev/null @@ -1,195 +0,0 @@ -package v2beta2 - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" - tutil "github.com/akash-network/akash-api/go/testutil" - "github.com/akash-network/akash-api/go/testutil/v1beta3" -) - -const ( - validationPrefix = `^manifest cross-validation error: ` - groupPrefix = validationPrefix + `group ".+": ` - resourcesIDPrefix = groupPrefix + `resources ID \(\d+\): ` - servicePrefix = groupPrefix + `service ".+": ` - resourcesMismatchRegex = servicePrefix + `CPU|GPU|Memory|Storage resources mismatch for ID \d+$` - overUtilizedGroup = servicePrefix + `over-utilized replicas \(\d+\) > group spec resources count \(\d+\)$` - overUtilizedEndpoints = servicePrefix + `resources ID \(\d+\): over-utilized HTTP|PORT|IP endpoints$` - underUtilizedGroupResources = resourcesIDPrefix + `under-utilized \(\d+\) resources` - underUtilizedGroupEndpoints = resourcesIDPrefix + `under-utilized \(\d+\) HTTP|PORT|IP endpoints` -) - -func TestManifestWithEmptyDeployment(t *testing.T) { - m := simpleManifest(1) - deployment := make([]dtypes.Group, 0) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) -} - -func simpleDeployment(t *testing.T, expose ServiceExposes, count uint32) []dtypes.Group { - deployment := make([]dtypes.Group, 1) - gid := testutil.GroupID(t) - resources := make(dtypes.ResourceUnits, 1) - resources[0] = dtypes.ResourceUnit{ - Resources: simpleResources(expose), - Count: count, - Price: sdk.NewInt64DecCoin(tutil.CoinDenom, 1), - } - deployment[0] = dtypes.Group{ - GroupID: gid, - State: 0, - GroupSpec: dtypes.GroupSpec{ - Name: nameOfTestGroup, - Requirements: akashtypes.PlacementRequirements{}, - Resources: resources, - }, - } - - return deployment -} - -func TestManifestWithDeployment(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - err := m.CheckAgainstDeployment(deployment) - require.NoError(t, err) -} - -func TestManifestWithDeploymentMultipleCount(t *testing.T) { - addl := uint32(tutil.RandRangeInt(1, 20)) - m := simpleManifest(addl) - - deployment := simpleDeployment(t, m[0].Services[0].Expose, addl) - - err := m.CheckAgainstDeployment(deployment) - require.NoError(t, err) -} - -func TestManifestWithDeploymentMultiple(t *testing.T) { - cpu := int64(tutil.RandRangeInt(1024, 2000)) - storage := int64(tutil.RandRangeInt(2000, 3000)) - memory := int64(tutil.RandRangeInt(3001, 4000)) - - m := make(Manifest, 3) - m[0] = simpleManifest(1)[0] - m[0].Services[0].Resources.CPU.Units.Val = sdk.NewInt(cpu) - m[0].Name = "testgroup-2" - - m[1] = simpleManifest(1)[0] - m[1].Services[0].Resources.Storage[0].Quantity.Val = sdk.NewInt(storage) - m[1].Name = "testgroup-1" - m[1].Services[0].Expose[0].Hosts = []string{"host1.test"} - - m[2] = simpleManifest(1)[0] - m[2].Services[0].Resources.Memory.Quantity.Val = sdk.NewInt(memory) - m[2].Name = "testgroup-0" - m[2].Services[0].Expose[0].Hosts = []string{"host2.test"} - - deployment := make([]dtypes.Group, 3) - deployment[0] = simpleDeployment(t, m[0].Services[0].Expose, 1)[0] - deployment[0].GroupSpec.Resources[0].Memory.Quantity.Val = sdk.NewInt(memory) - deployment[0].GroupSpec.Name = "testgroup-0" - - deployment[1] = simpleDeployment(t, m[1].Services[0].Expose, 1)[0] - deployment[1].GroupSpec.Resources[0].Storage[0].Quantity.Val = sdk.NewInt(storage) - deployment[1].GroupSpec.Name = "testgroup-1" - - deployment[2] = simpleDeployment(t, m[2].Services[0].Expose, 1)[0] - deployment[2].GroupSpec.Resources[0].CPU.Units.Val = sdk.NewInt(cpu) - deployment[2].GroupSpec.Name = "testgroup-2" - - err := m.CheckAgainstDeployment(deployment) - - require.NoError(t, err) -} - -func TestManifestWithDeploymentCPUMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - deployment[0].GroupSpec.Resources[0].CPU.Units.Val = sdk.NewInt(999) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, resourcesMismatchRegex, err) -} - -func TestManifestWithDeploymentGPUMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - deployment[0].GroupSpec.Resources[0].GPU.Units.Val = sdk.NewInt(200) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, resourcesMismatchRegex, err) -} - -func TestManifestWithDeploymentMemoryMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - deployment[0].GroupSpec.Resources[0].Memory.Quantity.Val = sdk.NewInt(99999) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, resourcesMismatchRegex, err) -} - -func TestManifestWithDeploymentStorageMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - deployment[0].GroupSpec.Resources[0].Storage[0].Quantity.Val = sdk.NewInt(99999) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, resourcesMismatchRegex, err) -} - -func TestManifestWithDeploymentCountMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - deployment[0].GroupSpec.Resources[0].Count++ - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, underUtilizedGroupResources, err) -} - -func TestManifestWithManifestGroupMismatch(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - m[0].Services[0].Count++ - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, overUtilizedGroup, err) -} - -func TestManifestWithEndpointMismatchA(t *testing.T) { - m := simpleManifest(1) - - // Make this require an endpoint - m[0].Services[0].Expose[0] = ServiceExpose{ - Port: 2000, - ExternalPort: 0, - Proto: TCP, - Service: "", - Global: true, - Hosts: nil, - } - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - - // Remove an endpoint where the manifest calls for it - deployment[0].GroupSpec.Resources[0].Endpoints = akashtypes.Endpoints{} - - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, overUtilizedEndpoints, err) -} - -func TestManifestWithEndpointMismatchB(t *testing.T) { - m := simpleManifest(1) - deployment := simpleDeployment(t, m[0].Services[0].Expose, 1) - // Add an endpoint where the manifest doesn't call for it - deployment[0].GroupSpec.Resources[0].Endpoints = append(deployment[0].GroupSpec.Resources[0].Endpoints, akashtypes.Endpoint{}) - err := m.CheckAgainstDeployment(deployment) - require.Error(t, err) - require.Regexp(t, underUtilizedGroupEndpoints, err) -} diff --git a/go/manifest/v2beta2/manifest_test.go b/go/manifest/v2beta2/manifest_test.go deleted file mode 100644 index 18caf4ee..00000000 --- a/go/manifest/v2beta2/manifest_test.go +++ /dev/null @@ -1,469 +0,0 @@ -package v2beta2 - -import ( - "bytes" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" - "github.com/akash-network/akash-api/go/testutil/v1beta3" -) - -const ( - nameOfTestService = "test-service" - nameOfTestGroup = "testGroup" -) - -var ( - randCPU1 = uint64(testutil.RandCPUUnits()) - randCPU2 = randCPU1 + 1 - randGPU1 = uint64(testutil.RandGPUUnits()) - randMemory = testutil.RandMemoryQuantity() - randStorage = testutil.RandStorageQuantity() -) - -var randUnits1 = akashtypes.Resources{ - ID: 1, - CPU: &akashtypes.CPU{ - Units: akashtypes.NewResourceValue(randCPU1), - }, - GPU: &akashtypes.GPU{ - Units: akashtypes.NewResourceValue(randGPU1), - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.NewResourceValue(randMemory), - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Quantity: akashtypes.NewResourceValue(randStorage), - }, - }, - Endpoints: akashtypes.Endpoints{}, -} - -var randUnits3 = akashtypes.Resources{ - ID: 1, - CPU: &akashtypes.CPU{ - Units: akashtypes.NewResourceValue(randCPU2), - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.NewResourceValue(randMemory), - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Quantity: akashtypes.NewResourceValue(randStorage), - }, - }, - Endpoints: akashtypes.Endpoints{}, -} - -func simpleResources(exposes ServiceExposes) akashtypes.Resources { - return akashtypes.Resources{ - ID: 1, - CPU: &akashtypes.CPU{ - Units: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randCPU1), - }, - Attributes: nil, - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randMemory), - }, - Attributes: nil, - }, - GPU: &akashtypes.GPU{ - Units: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randGPU1), - }, - Attributes: nil, - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Name: "default", - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(randStorage), - }, - }, - }, - Endpoints: exposes.GetEndpoints(), - } -} - -func TestNilManifestIsInvalid(t *testing.T) { - m := Manifest{} - err := m.Validate() - - require.Error(t, err) - require.Regexp(t, "^.*manifest is empty.*$", err) -} - -func simpleManifest(svcCount uint32) Manifest { - expose := make([]ServiceExpose, 1) - expose[0].Global = true - expose[0].Port = 80 - expose[0].Proto = TCP - expose[0].Hosts = make([]string, 1) - expose[0].Hosts[0] = "host.test" - - services := make([]Service, 1) - services[0] = Service{ - Name: nameOfTestService, - Image: "test/image:1.0", - Command: nil, - Args: nil, - Env: nil, - Resources: simpleResources(expose), - Count: svcCount, - Expose: expose, - } - - m := make(Manifest, 1) - m[0] = Group{ - Name: nameOfTestGroup, - Services: services, - } - - return m -} - -func TestSimpleManifestIsValid(t *testing.T) { - m := simpleManifest(1) - err := m.Validate() - require.NoError(t, err) -} - -func TestSimpleManifestInvalidResourcesID(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Resources.ID = 0 - err := m.Validate() - require.Error(t, err) -} - -func TestManifestWithNoGlobalServicesIsInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Expose[0].Global = false - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*zero global services.*$", err) -} - -func TestManifestWithBadServiceNameIsInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Name = "a_bad_service_name" // should not contain underscores - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*name is invalid.*$", err) - - m[0].Services[0].Name = "a-name-" // should not end with dash - err = m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*name is invalid.*$", err) -} - -func TestManifestWithServiceNameIsValid(t *testing.T) { - m := simpleManifest(1) - - m[0].Services[0].Name = "9aaa-bar" // does not allow starting with a number - err := m.Validate() - require.ErrorIs(t, err, ErrInvalidManifest) - require.Regexp(t, "^.*name is invalid.*$", err) -} - -func TestManifestWithDuplicateHostIsInvalid(t *testing.T) { - m := simpleManifest(1) - hosts := make([]string, 2) - const hostname = "a.test" - hosts[0] = hostname - hosts[1] = hostname - m[0].Services[0].Expose[0].Hosts = hosts - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*hostname.+is duplicated.*$", err) -} - -func TestManifestWithDashInHostname(t *testing.T) { - m := simpleManifest(1) - hosts := make([]string, 1) - hosts[0] = "a-test.com" - m[0].Services[0].Expose[0].Hosts = hosts - err := m.Validate() - require.NoError(t, err) -} - -func TestManifestWithBadHostIsInvalid(t *testing.T) { - m := simpleManifest(1) - hosts := make([]string, 2) - hosts[0] = "bob.test" // valid - hosts[1] = "-bob" // invalid - m[0].Services[0].Expose[0].Hosts = hosts - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*invalid hostname.*$", err) -} - -func TestManifestWithLongHostIsInvalid(t *testing.T) { - m := simpleManifest(1) - hosts := make([]string, 1) - buf := &bytes.Buffer{} - for i := 0; i != 255; i++ { - _, err := buf.WriteRune('a') - require.NoError(t, err) - } - _, err := buf.WriteString(".com") - require.NoError(t, err) - - hosts[0] = buf.String() - m[0].Services[0].Expose[0].Hosts = hosts - err = m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*invalid hostname.*$", err) -} - -func TestManifestWithDuplicateGroupIsInvalid(t *testing.T) { - mDuplicate := make(Manifest, 2) - mDuplicate[0] = simpleManifest(1)[0] - mDuplicate[1] = simpleManifest(1)[0] - mDuplicate[1].Services[0].Expose[0].Hosts[0] = "anotherhost.test" - err := mDuplicate.Validate() - require.Error(t, err) - require.Regexp(t, "^.*duplicate group.*$", err) -} - -func TestManifestWithNoServicesInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services = nil - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*contains no services.*$", err) -} - -func TestManifestWithEmptyServiceNameInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Name = "" - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*service name is empty.*$", err) -} - -func TestManifestWithEmptyImageNameInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Image = "" - err := m.Validate() - require.Error(t, err) - require.Regexp(t, "^.*service.+has empty image name.*$", err) -} - -func TestManifestWithEmptyEnvValueIsValid(t *testing.T) { - m := simpleManifest(1) - envVars := make([]string, 1) - envVars[0] = "FOO=" // sets FOO to empty string - m[0].Services[0].Env = envVars - err := m.Validate() - require.NoError(t, err) -} - -func TestManifestWithEmptyEnvNameIsInvalid(t *testing.T) { - m := simpleManifest(1) - envVars := make([]string, 1) - envVars[0] = "=FOO" // invalid - m[0].Services[0].Env = envVars - err := m.Validate() - require.Error(t, err) - require.Regexp(t, `^.*var\. with an empty name.*$`, err) -} - -func TestManifestWithBadEnvNameIsInvalid(t *testing.T) { - m := simpleManifest(1) - envVars := make([]string, 1) - envVars[0] = "9VAR=FOO" // invalid because it starts with a digit - m[0].Services[0].Env = envVars - err := m.Validate() - require.Error(t, err) - require.Regexp(t, `^.*var\. with an invalid name.*$`, err) -} - -func TestManifestServiceUnknownProtocolIsInvalid(t *testing.T) { - m := simpleManifest(1) - m[0].Services[0].Expose[0].Proto = "ICMP" - err := m.Validate() - require.Error(t, err) - require.Regexp(t, `^.*protocol .+ unknown.*$`, err) -} - -func Test_ValidateManifest(t *testing.T) { - expose := make([]ServiceExpose, 1) - expose[0].Global = true - expose[0].Port = 80 - expose[0].Proto = TCP - expose[0].Hosts = make([]string, 1) - expose[0].Hosts[0] = "host.test" - - tests := []struct { - name string - ok bool - mani Manifest - dgroups []*dtypes.GroupSpec - }{ - { - name: "empty", - ok: false, - }, - - { - name: "single", - ok: true, - mani: []Group{ - { - Name: "foo", - Services: []Service{ - { - Name: "svc1", - Image: "test", - Resources: simpleResources(expose), - Count: 3, - Expose: expose, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: dtypes.ResourceUnits{ - { - Resources: simpleResources(expose), - Count: 3, - }, - }, - }, - }, - }, - - { - name: "multi-mgroup", - ok: true, - mani: []Group{ - { - Name: "foo", - Services: []Service{ - { - Name: "svc1", - Image: "test", - Resources: simpleResources(expose), - Count: 1, - Expose: expose, - }, - { - Name: "svc1", - Image: "test", - Resources: simpleResources(expose), - Count: 2, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: dtypes.ResourceUnits{ - { - Resources: simpleResources(expose), - Count: 3, - }, - }, - }, - }, - }, - - { - name: "mismatch-name", - ok: false, - mani: []Group{ - { - Name: "foo-bad", - Services: []Service{ - { - Name: "svc1", - Image: "test", - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: dtypes.ResourceUnits{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "mismatch-cpu", - ok: false, - mani: []Group{ - { - Name: "foo", - Services: []Service{ - { - Name: "svc1", - Image: "test", - Resources: randUnits3, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{ - { - Name: "foo", - Resources: dtypes.ResourceUnits{ - { - Resources: randUnits1, - Count: 3, - }, - }, - }, - }, - }, - - { - name: "mismatch-group-count", - ok: false, - mani: []Group{ - { - Name: "foo", - Services: []Service{ - { - Name: "svc1", - Image: "test", - Resources: randUnits3, - Count: 3, - }, - }, - }, - }, - dgroups: []*dtypes.GroupSpec{}, - }, - } - - for _, test := range tests { - err := test.mani.CheckAgainstGSpecs(test.dgroups) - if test.ok { - assert.NoError(t, err, test.name) - } else { - assert.Error(t, err, test.name) - } - } -} diff --git a/go/manifest/v2beta2/parse.go b/go/manifest/v2beta2/parse.go deleted file mode 100644 index e6c46a01..00000000 --- a/go/manifest/v2beta2/parse.go +++ /dev/null @@ -1,65 +0,0 @@ -package v2beta2 - -import ( - "errors" - "fmt" - "strings" - - corev1 "k8s.io/api/core/v1" -) - -var ( - errUnknownServiceProtocol = errors.New("unknown service protocol") - ErrUnsupportedServiceProtocol = errors.New("unsupported service protocol") -) - -type ServiceProtocol string - -const ( - TCP = ServiceProtocol("TCP") - UDP = ServiceProtocol("UDP") -) - -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 corev1.Protocol(""), fmt.Errorf("%w: %v", errUnknownServiceProtocol, sp) -} - -func ServiceProtocolFromKube(proto corev1.Protocol) (ServiceProtocol, error) { - switch proto { - case corev1.ProtocolTCP: - return TCP, nil - case corev1.ProtocolUDP: - return UDP, nil - } - - return ServiceProtocol(""), fmt.Errorf("%w: %v", errUnknownServiceProtocol, proto) -} - -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 -} diff --git a/go/manifest/v2beta2/service.go b/go/manifest/v2beta2/service.go deleted file mode 100644 index 454e858a..00000000 --- a/go/manifest/v2beta2/service.go +++ /dev/null @@ -1,108 +0,0 @@ -package v2beta2 - -import ( - "fmt" - "sort" - "strings" - - k8svalidation "k8s.io/apimachinery/pkg/util/validation" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" -) - -func (s *Service) validate(helper *validateManifestGroupsHelper) error { - if len(s.Name) == 0 { - return fmt.Errorf("%w: service name is empty", ErrInvalidManifest) - } - - serviceNameValid := serviceNameValidationRegex.MatchString(s.Name) - if !serviceNameValid { - return fmt.Errorf("%w: service %q name is invalid", ErrInvalidManifest, s.Name) - } - - if len(s.Image) == 0 { - return fmt.Errorf("%w: service %q has empty image name", ErrInvalidManifest, s.Name) - } - - if err := s.Resources.Validate(); err != nil { - return err - } - - for _, envVar := range s.Env { - idx := strings.Index(envVar, "=") - if idx == 0 { - return fmt.Errorf("%w: service %q defines an env. var. with an empty name", ErrInvalidManifest, s.Name) - } - - var envVarName string - if idx > 0 { - envVarName = envVar[0:idx] - } else { - envVarName = envVar - } - - if 0 != len(k8svalidation.IsEnvVarName(envVarName)) { - return fmt.Errorf("%w: service %q defines an env. var. with an invalid name %q", ErrInvalidManifest, s.Name, envVarName) - } - } - - if !sort.IsSorted(s.Expose) { - return fmt.Errorf("%w: service %q: expose is not sorted", ErrInvalidManifest, s.Name) - } - - for _, serviceExpose := range s.Expose { - if err := serviceExpose.validate(helper); err != nil { - return fmt.Errorf("%w: service %q: %w", ErrInvalidManifest, s.Name, err) - } - } - - return nil -} - -func (s *Service) checkAgainstGSpec(gspec *groupSpec) error { - // find resource units by id - var gRes *dtypes.ResourceUnit - - for idx := range gspec.gs.Resources { - if s.Resources.ID == gspec.gs.Resources[idx].ID { - gRes = &gspec.gs.Resources[idx] - break - } - } - - if gRes == nil { - return fmt.Errorf("service %q: not found deployment group resources with ID = %d", s.Name, s.Resources.ID) - } - - if s.Count > gRes.Count { - return fmt.Errorf("service %q: over-utilized replicas (%d) > group spec resources count (%d)", - s.Name, s.Count, gRes.Count) - } - - // do not compare resources directly - if !s.Resources.CPU.Equal(gRes.CPU) { - return fmt.Errorf("service %q: CPU resources mismatch for ID %d", s.Name, s.Resources.ID) - } - - if !s.Resources.GPU.Equal(gRes.GPU) { - return fmt.Errorf("service %q: GPU resources mismatch for ID %d", s.Name, s.Resources.ID) - } - - if !s.Resources.Memory.Equal(gRes.Memory) { - return fmt.Errorf("service %q: Memory resources mismatch for ID %d", s.Name, s.Resources.ID) - } - - if !s.Resources.Storage.Equal(gRes.Storage) { - return fmt.Errorf("service %q: Storage resources mismatch for ID %d", s.Name, s.Resources.ID) - } - - for _, expose := range s.Expose { - if err := expose.checkAgainstResources(gRes, gspec.endpoints); err != nil { - return fmt.Errorf("service %q: resource ID %d: %w", s.Name, gRes.ID, err) - } - } - - gRes.Count -= s.Count - - return nil -} diff --git a/go/manifest/v2beta2/service.pb.go b/go/manifest/v2beta2/service.pb.go deleted file mode 100644 index 165d7f9d..00000000 --- a/go/manifest/v2beta2/service.pb.go +++ /dev/null @@ -1,1679 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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 - -// StorageParams -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=read_only,json=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 -} - -// ServiceParams -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 -} - -// Credentials to fetch image from registry -type ServiceImageCredentials struct { - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host" yaml:"host"` - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email" yaml:"email"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username" yaml:"username"` - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password" yaml:"password"` -} - -func (m *ServiceImageCredentials) Reset() { *m = ServiceImageCredentials{} } -func (*ServiceImageCredentials) ProtoMessage() {} -func (*ServiceImageCredentials) Descriptor() ([]byte, []int) { - return fileDescriptor_de124a4cb11edaa1, []int{2} -} -func (m *ServiceImageCredentials) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceImageCredentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceImageCredentials.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ServiceImageCredentials) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceImageCredentials.Merge(m, src) -} -func (m *ServiceImageCredentials) XXX_Size() int { - return m.Size() -} -func (m *ServiceImageCredentials) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceImageCredentials.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceImageCredentials proto.InternalMessageInfo - -func (m *ServiceImageCredentials) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *ServiceImageCredentials) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *ServiceImageCredentials) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *ServiceImageCredentials) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -// 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,rep,name=args,proto3" json:"args" yaml:"args"` - Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env" yaml:"env"` - Resources v1beta3.Resources `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 ServiceExposes `protobuf:"bytes,8,rep,name=expose,proto3,castrepeated=ServiceExposes" json:"expose" yaml:"expose"` - Params *ServiceParams `protobuf:"bytes,9,opt,name=params,proto3" json:"params" yaml:"params"` - Credentials *ServiceImageCredentials `protobuf:"bytes,10,opt,name=credentials,proto3" json:"credentials" yaml:"credentials"` -} - -func (m *Service) Reset() { *m = Service{} } -func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_de124a4cb11edaa1, []int{3} -} -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 nil -} - -func (m *Service) GetEnv() []string { - if m != nil { - return m.Env - } - return nil -} - -func (m *Service) GetResources() v1beta3.Resources { - if m != nil { - return m.Resources - } - return v1beta3.Resources{} -} - -func (m *Service) GetCount() uint32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *Service) GetExpose() ServiceExposes { - if m != nil { - return m.Expose - } - return nil -} - -func (m *Service) GetParams() *ServiceParams { - if m != nil { - return m.Params - } - return nil -} - -func (m *Service) GetCredentials() *ServiceImageCredentials { - if m != nil { - return m.Credentials - } - return nil -} - -func init() { - proto.RegisterType((*StorageParams)(nil), "akash.manifest.v2beta2.StorageParams") - proto.RegisterType((*ServiceParams)(nil), "akash.manifest.v2beta2.ServiceParams") - proto.RegisterType((*ServiceImageCredentials)(nil), "akash.manifest.v2beta2.ServiceImageCredentials") - proto.RegisterType((*Service)(nil), "akash.manifest.v2beta2.Service") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta2/service.proto", fileDescriptor_de124a4cb11edaa1) -} - -var fileDescriptor_de124a4cb11edaa1 = []byte{ - // 713 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0xbf, 0xb4, 0xf9, 0x99, 0x7c, 0x29, 0xc8, 0x42, 0xd4, 0xad, 0x54, 0x4f, 0x18, 0x51, - 0x29, 0x50, 0x61, 0xab, 0xa9, 0x04, 0x12, 0xb0, 0x32, 0x62, 0xc1, 0x0a, 0x34, 0xdd, 0x20, 0x16, - 0xa0, 0x89, 0x33, 0xb8, 0x56, 0x63, 0x4f, 0xe4, 0x71, 0x52, 0x2a, 0xb1, 0xe0, 0x11, 0x78, 0x0e, - 0x78, 0x91, 0x2e, 0xbb, 0xec, 0x6a, 0x0a, 0xe9, 0x2e, 0x3b, 0xfc, 0x04, 0x68, 0x7e, 0x5c, 0xa7, - 0x80, 0xa8, 0x58, 0x25, 0xe7, 0xdc, 0x73, 0xe7, 0xde, 0x39, 0x73, 0xaf, 0xc1, 0x5d, 0x72, 0x48, - 0xf8, 0x81, 0x9f, 0x90, 0x34, 0x7e, 0x4f, 0x79, 0xee, 0xcf, 0x06, 0x43, 0x9a, 0x93, 0x81, 0xcf, - 0x69, 0x36, 0x8b, 0x43, 0xea, 0x4d, 0x32, 0x96, 0x33, 0xfb, 0xb6, 0x52, 0x79, 0xa5, 0xca, 0x33, - 0xaa, 0xcd, 0x5b, 0x11, 0x8b, 0x98, 0x92, 0xf8, 0xf2, 0x9f, 0x56, 0x6f, 0xde, 0xff, 0xfb, 0x99, - 0xf4, 0xc3, 0x84, 0x71, 0x73, 0xf2, 0x26, 0xd2, 0xda, 0x21, 0xe1, 0xd4, 0x9f, 0xed, 0x4a, 0xdd, - 0x9e, 0x9f, 0x51, 0xce, 0xa6, 0x59, 0x48, 0xb9, 0xd6, 0xa0, 0xaf, 0x16, 0xe8, 0xee, 0xe7, 0x2c, - 0x23, 0x11, 0x7d, 0x45, 0x32, 0x92, 0x70, 0x7b, 0x07, 0xac, 0xa4, 0x24, 0xa1, 0x8e, 0xd5, 0xb3, - 0xfa, 0xed, 0x60, 0x7d, 0x21, 0xa0, 0xc2, 0x85, 0x80, 0x9d, 0x63, 0x92, 0x8c, 0x1f, 0x23, 0x89, - 0x10, 0x56, 0xa4, 0xed, 0x83, 0xd5, 0x84, 0x4d, 0xd3, 0xdc, 0xf9, 0x4f, 0xa9, 0x37, 0x16, 0x02, - 0x6a, 0xa2, 0x10, 0xf0, 0x7f, 0x2d, 0x57, 0x10, 0x61, 0x4d, 0xdb, 0x4f, 0x41, 0x3b, 0xa3, 0x64, - 0xf4, 0x8e, 0xa5, 0xe3, 0x63, 0xa7, 0xde, 0xb3, 0xfa, 0xad, 0x00, 0x2e, 0x04, 0x6c, 0x49, 0xf2, - 0x65, 0x3a, 0x3e, 0x2e, 0x04, 0xbc, 0xa1, 0xf3, 0x4a, 0x06, 0xe1, 0xcb, 0x20, 0xe2, 0xa0, 0xbb, - 0xaf, 0x2f, 0x6a, 0x9a, 0x1d, 0x82, 0x26, 0xd7, 0xdd, 0x3b, 0x56, 0xaf, 0xde, 0xef, 0x0c, 0xb6, - 0xbd, 0x3f, 0xdb, 0xe9, 0x5d, 0xb9, 0x64, 0x70, 0xe7, 0x44, 0xc0, 0xda, 0x42, 0xc0, 0x32, 0xbb, - 0x10, 0x70, 0x4d, 0x97, 0x35, 0x04, 0xc2, 0x65, 0x08, 0xfd, 0xb0, 0xc0, 0xba, 0xa9, 0xfa, 0x22, - 0x21, 0x11, 0x7d, 0x96, 0xd1, 0x11, 0x4d, 0xf3, 0x98, 0x8c, 0x95, 0x59, 0x07, 0x8c, 0xe7, 0xcb, - 0x66, 0x49, 0x5c, 0x99, 0x25, 0x11, 0xc2, 0x8a, 0x94, 0x66, 0xd1, 0x84, 0xc4, 0xe3, 0x65, 0xb3, - 0x14, 0x51, 0x99, 0xa5, 0x20, 0xc2, 0x9a, 0xb6, 0x9f, 0x80, 0xd6, 0x94, 0xd3, 0x4c, 0x3d, 0x47, - 0x5d, 0xe5, 0x28, 0xaf, 0x4a, 0xae, 0xf2, 0xaa, 0x64, 0x10, 0xbe, 0x0c, 0xca, 0xe4, 0x09, 0xe1, - 0xfc, 0x88, 0x65, 0x23, 0x67, 0xa5, 0x4a, 0x2e, 0xb9, 0x2a, 0xb9, 0x64, 0x10, 0xbe, 0x0c, 0xa2, - 0xf3, 0x55, 0xd0, 0x34, 0x77, 0xfe, 0xe7, 0x81, 0x88, 0xa5, 0x49, 0xcb, 0x77, 0x54, 0x44, 0x75, - 0x47, 0x05, 0x11, 0xd6, 0xb4, 0xfd, 0x08, 0x34, 0x43, 0x96, 0x24, 0x24, 0x1d, 0x39, 0xf5, 0x5e, - 0xbd, 0xdf, 0x0e, 0xb6, 0xe4, 0xb3, 0x18, 0xaa, 0x7a, 0x16, 0x43, 0x20, 0x5c, 0x86, 0x64, 0x5b, - 0x24, 0x8b, 0xb8, 0xb3, 0xa2, 0xb2, 0x54, 0x5b, 0x12, 0x57, 0x6d, 0x49, 0x84, 0xb0, 0x22, 0xed, - 0x1d, 0x50, 0xa7, 0xe9, 0xcc, 0x59, 0x55, 0xda, 0x8d, 0x13, 0x01, 0xad, 0x85, 0x80, 0x92, 0x2a, - 0x04, 0x04, 0xc6, 0xfa, 0x74, 0x86, 0xb0, 0xa4, 0xec, 0xa1, 0x9c, 0x51, 0xb3, 0x26, 0x4e, 0xa3, - 0x67, 0xf5, 0x3b, 0x83, 0x2d, 0x33, 0x56, 0x72, 0x97, 0x3c, 0xb3, 0x4b, 0x1e, 0x2e, 0x45, 0xc1, - 0xb6, 0x19, 0xa7, 0x2a, 0xaf, 0x10, 0xf0, 0x66, 0x39, 0xc7, 0x86, 0x42, 0xb8, 0x0a, 0x4b, 0x9f, - 0x42, 0xb5, 0x38, 0xcd, 0x9e, 0xd5, 0xef, 0x6a, 0x9f, 0xc2, 0xab, 0x8b, 0x13, 0x9a, 0xc5, 0x51, - 0xbf, 0xf6, 0x04, 0x34, 0xf4, 0x72, 0x3b, 0xad, 0x6b, 0x06, 0x5d, 0x3f, 0xdb, 0x73, 0x25, 0x0e, - 0x76, 0x4d, 0x67, 0x26, 0xb9, 0x10, 0xb0, 0x6b, 0xae, 0xab, 0x30, 0xfa, 0x72, 0x0e, 0xd7, 0xae, - 0x64, 0x70, 0x6c, 0xa4, 0xf6, 0x5b, 0xd0, 0x98, 0xa8, 0x6d, 0x71, 0xda, 0xca, 0x83, 0xeb, 0x2a, - 0x9a, 0xd5, 0x82, 0xc6, 0x5d, 0x93, 0x5c, 0x55, 0xd4, 0x18, 0x61, 0x13, 0xb0, 0x3f, 0x82, 0x4e, - 0x58, 0xad, 0x92, 0x03, 0x54, 0x11, 0xff, 0x9a, 0x22, 0xbf, 0x6e, 0x60, 0x70, 0xcf, 0x94, 0x5b, - 0x3e, 0xab, 0x10, 0xd0, 0x36, 0x1e, 0x56, 0x24, 0xc2, 0xcb, 0x92, 0xe0, 0xf5, 0xd9, 0x77, 0xb7, - 0xf6, 0x69, 0xee, 0x5a, 0x27, 0x73, 0xd7, 0x3a, 0x9d, 0xbb, 0xd6, 0xb7, 0xb9, 0x6b, 0x7d, 0xbe, - 0x70, 0x6b, 0xa7, 0x17, 0x6e, 0xed, 0xec, 0xc2, 0xad, 0xbd, 0x79, 0x18, 0xc5, 0xf9, 0xc1, 0x74, - 0xe8, 0x85, 0x2c, 0xf1, 0x55, 0x53, 0x0f, 0x52, 0x9a, 0x1f, 0xb1, 0xec, 0xd0, 0x20, 0x32, 0x89, - 0xfd, 0x88, 0xfd, 0xf6, 0x29, 0x1e, 0x36, 0xd4, 0x97, 0x75, 0xef, 0x67, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x11, 0xd3, 0x4b, 0xa0, 0xff, 0x05, 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 *ServiceImageCredentials) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceImageCredentials) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceImageCredentials) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintService(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x22 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintService(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0x1a - } - if len(m.Email) > 0 { - i -= len(m.Email) - copy(dAtA[i:], m.Email) - i = encodeVarintService(dAtA, i, uint64(len(m.Email))) - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintService(dAtA, i, uint64(len(m.Host))) - 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.Credentials != nil { - { - size, err := m.Credentials.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - 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 { - for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Args[iNdEx]) - copy(dAtA[i:], m.Args[iNdEx]) - i = encodeVarintService(dAtA, i, uint64(len(m.Args[iNdEx]))) - 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 *ServiceImageCredentials) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovService(uint64(l)) - } - l = len(m.Email) - if l > 0 { - n += 1 + l + sovService(uint64(l)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovService(uint64(l)) - } - l = len(m.Password) - if l > 0 { - 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)) - } - } - if len(m.Args) > 0 { - for _, s := range m.Args { - l = len(s) - 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)) - } - if m.Credentials != nil { - l = m.Credentials.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(strings.Replace(f.String(), "StorageParams", "StorageParams", 1), `&`, ``, 1) + "," - } - repeatedStringForStorage += "}" - s := strings.Join([]string{`&ServiceParams{`, - `Storage:` + repeatedStringForStorage + `,`, - `}`, - }, "") - return s -} -func (this *ServiceImageCredentials) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceImageCredentials{`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `Email:` + fmt.Sprintf("%v", this.Email) + `,`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `}`, - }, "") - return s -} -func (this *Service) String() string { - if this == nil { - return "nil" - } - repeatedStringForExpose := "[]ServiceExpose{" - for _, f := range this.Expose { - repeatedStringForExpose += fmt.Sprintf("%v", f) + "," - } - 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), "Resources", "v1beta3.Resources", 1), `&`, ``, 1) + `,`, - `Count:` + fmt.Sprintf("%v", this.Count) + `,`, - `Expose:` + repeatedStringForExpose + `,`, - `Params:` + strings.Replace(this.Params.String(), "ServiceParams", "ServiceParams", 1) + `,`, - `Credentials:` + strings.Replace(this.Credentials.String(), "ServiceImageCredentials", "ServiceImageCredentials", 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 *ServiceImageCredentials) Unmarshal(dAtA []byte) 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: ServiceImageCredentials: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceImageCredentials: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", 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.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.Email = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", 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.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", 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.Password = string(dAtA[iNdEx:postIndex]) - 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 = append(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 - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", 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.Credentials == nil { - m.Credentials = &ServiceImageCredentials{} - } - if err := m.Credentials.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/service_expose_test.go b/go/manifest/v2beta2/service_expose_test.go deleted file mode 100644 index 0a5a533c..00000000 --- a/go/manifest/v2beta2/service_expose_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package v2beta2 - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestShouldBeIngress(t *testing.T) { - // Should not create ingress for something on port 81 - exp := ServiceExpose{ - Global: true, - Proto: TCP, - Port: 81, - } - - require.False(t, exp.IsIngress()) - - exp = ServiceExpose{ - Global: true, - Proto: TCP, - Port: 80, - } - - // Should create ingress for something on port 80 - require.True(t, exp.IsIngress()) - - exp = ServiceExpose{ - Global: false, - Proto: TCP, - Port: 80, - } - - // Should not create ingress for something on port 80 that is not Global - require.False(t, exp.IsIngress()) - - exp = ServiceExpose{ - Global: true, - Proto: UDP, - Port: 80, - } - - // Should not create ingress for something on port 80 that is UDP - require.False(t, exp.IsIngress()) -} diff --git a/go/manifest/v2beta2/serviceexpose.go b/go/manifest/v2beta2/serviceexpose.go deleted file mode 100644 index c6b65ab9..00000000 --- a/go/manifest/v2beta2/serviceexpose.go +++ /dev/null @@ -1,108 +0,0 @@ -package v2beta2 - -import ( - "fmt" - "math" - "sort" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" -) - -func (s *ServiceExpose) GetEndpoints() types.Endpoints { - if !s.Global { - return types.Endpoints{} - } - - endpoints := make(types.Endpoints, 0, 1) - - if len(s.IP) != 0 { - endpoints = make(types.Endpoints, 0, 2) - - endpoints = append( - endpoints, - types.Endpoint{ - Kind: types.Endpoint_LEASED_IP, - SequenceNumber: s.EndpointSequenceNumber, - }, - ) - } - - kind := types.Endpoint_RANDOM_PORT - if s.IsIngress() { - kind = types.Endpoint_SHARED_HTTP - } - - endpoints = append(endpoints, types.Endpoint{Kind: kind}) - - sort.Sort(endpoints) - - return endpoints -} - -func (s *ServiceExpose) validate(helper *validateManifestGroupsHelper) error { - if s.Port == 0 || s.Port > math.MaxUint16 { - return fmt.Errorf("port value must be 0 < value <= 65535 ") - } - - switch s.Proto { - case TCP, UDP: - break - default: - return fmt.Errorf("protocol %q unknown", s.Proto) - } - - if s.Global { - helper.globalServiceCount++ - } - - for _, host := range s.Hosts { - if !isValidHostname(host) { - return fmt.Errorf("has invalid hostname %q", host) - } - - _, exists := helper.hostnames[host] - if exists { - return fmt.Errorf("hostname %q is duplicated, this is not allowed", host) - } - helper.hostnames[host] = 0 // Value stored does not matter - } - - return nil -} - -func (s *ServiceExpose) checkAgainstResources(res *dtypes.ResourceUnit, eps validateEndpointsHelper) error { - if s.Global { - eph := eps[res.ID] - - if s.IsIngress() { - if !eph.tryDecHTTP() { - return fmt.Errorf("over-utilized HTTP endpoints") - } - } else { - if !eph.tryDecPort() { - return fmt.Errorf("over-utilized PORT endpoints") - } - } - - if len(s.IP) > 0 { - if !eph.tryDecIP() { - return fmt.Errorf("over-utilized IP endpoints") - } - } - } - - return nil -} - -func (s *ServiceExpose) IsIngress() bool { - return s.Proto == TCP && s.Global && 80 == s.GetExternalPort() -} - -func (s *ServiceExpose) GetExternalPort() int32 { - if s.ExternalPort == 0 { - return int32(s.Port) - } - - return int32(s.ExternalPort) -} diff --git a/go/manifest/v2beta2/serviceexpose.pb.go b/go/manifest/v2beta2/serviceexpose.pb.go deleted file mode 100644 index 4323ffe6..00000000 --- a/go/manifest/v2beta2/serviceexpose.pb.go +++ /dev/null @@ -1,666 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/manifest/v2beta2/serviceexpose.proto - -package v2beta2 - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - 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 - -// ServiceExpose stores exposed ports and hosts details -type ServiceExpose struct { - // port on the container - Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port" yaml:"port"` - // port on the service definition - ExternalPort uint32 `protobuf:"varint,2,opt,name=external_port,json=externalPort,proto3" json:"externalPort" yaml:"externalPort"` - Proto ServiceProtocol `protobuf:"bytes,3,opt,name=proto,proto3,casttype=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=http_options,json=httpOptions,proto3" json:"httpOptions" yaml:"httpOptions"` - // The name of the IP address associated with this, if any - IP string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip" yaml:"ip"` - // The sequence number of the associated endpoint in the on-chain data - EndpointSequenceNumber uint32 `protobuf:"varint,9,opt,name=endpoint_sequence_number,json=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 init() { - proto.RegisterType((*ServiceExpose)(nil), "akash.manifest.v2beta2.ServiceExpose") -} - -func init() { - proto.RegisterFile("akash/manifest/v2beta2/serviceexpose.proto", fileDescriptor_e8dad39b3d78f39d) -} - -var fileDescriptor_e8dad39b3d78f39d = []byte{ - // 540 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0xed, 0x34, 0x49, 0x9b, 0x4b, 0x02, 0xd2, 0x81, 0x8a, 0x5b, 0x54, 0x5f, 0xe4, 0x05, - 0xf3, 0xcf, 0x46, 0xa9, 0x04, 0xa8, 0x6c, 0x96, 0x90, 0x40, 0x42, 0x10, 0xb9, 0x1d, 0x10, 0x4b, - 0xe4, 0x84, 0x23, 0x39, 0x35, 0xf1, 0x1d, 0xf6, 0xa5, 0x94, 0x8d, 0x91, 0x05, 0x89, 0x8f, 0xc0, - 0xc2, 0x77, 0xe9, 0xd8, 0xb1, 0xd3, 0x09, 0x9c, 0xcd, 0xa3, 0x47, 0x26, 0xe4, 0xbb, 0xb3, 0x9a, - 0xaa, 0xed, 0xe6, 0xf7, 0x79, 0x7f, 0xcf, 0x7b, 0x8f, 0xee, 0x3d, 0x83, 0x07, 0xd1, 0x61, 0x94, - 0x4e, 0xfd, 0x79, 0x14, 0x93, 0x4f, 0x38, 0xe5, 0xfe, 0x51, 0x7f, 0x84, 0x79, 0xd4, 0xf7, 0x53, - 0x9c, 0x1c, 0x91, 0x31, 0xc6, 0xc7, 0x8c, 0xa6, 0xd8, 0x63, 0x09, 0xe5, 0x14, 0x6e, 0x4a, 0xd6, - 0xab, 0x58, 0x4f, 0xb3, 0xdb, 0xb7, 0x27, 0x74, 0x42, 0x25, 0xe2, 0x97, 0x5f, 0x8a, 0xde, 0x76, - 0xaf, 0x99, 0x3c, 0xe5, 0x9c, 0x51, 0xc6, 0x09, 0x8d, 0x53, 0x45, 0x3a, 0xbf, 0x1b, 0xa0, 0xbb, - 0xaf, 0xce, 0x7b, 0x29, 0xcf, 0x83, 0x0f, 0x41, 0x9d, 0xd1, 0x84, 0x5b, 0x66, 0xcf, 0x74, 0xbb, - 0xc1, 0x9d, 0x5c, 0x20, 0x59, 0x17, 0x02, 0xb5, 0xbf, 0x46, 0xf3, 0xd9, 0x9e, 0x53, 0x56, 0x4e, - 0x28, 0x45, 0xf8, 0x06, 0x74, 0xf1, 0x31, 0xc7, 0x49, 0x1c, 0xcd, 0x86, 0xd2, 0x55, 0x93, 0xae, - 0x7b, 0xb9, 0x40, 0x9d, 0xaa, 0x31, 0x50, 0xee, 0x5b, 0xca, 0xbd, 0xaa, 0x3a, 0xe1, 0x05, 0x08, - 0x06, 0xa0, 0x21, 0x53, 0x59, 0x6b, 0x3d, 0xd3, 0x6d, 0x05, 0x8f, 0x72, 0x81, 0x94, 0x50, 0x08, - 0xd4, 0xd1, 0x87, 0xcb, 0xd4, 0xff, 0x04, 0xba, 0xa9, 0x53, 0x0f, 0x4a, 0x61, 0x4c, 0x67, 0xa1, - 0x22, 0xe1, 0x33, 0xb0, 0xae, 0xef, 0xcf, 0xaa, 0xcb, 0x29, 0x3b, 0xb9, 0x40, 0x95, 0x54, 0x08, - 0x74, 0x43, 0xcd, 0xd1, 0x82, 0x13, 0x56, 0x2d, 0xb8, 0x0b, 0x9a, 0x93, 0x19, 0x1d, 0x45, 0x33, - 0xab, 0xd1, 0x33, 0xdd, 0x8d, 0xe0, 0x6e, 0x2e, 0x90, 0x56, 0x0a, 0x81, 0xba, 0xca, 0xa6, 0x6a, - 0x27, 0xd4, 0x0d, 0xe8, 0x83, 0xc6, 0x94, 0xa6, 0x3c, 0xb5, 0x9a, 0xbd, 0x35, 0xb7, 0x15, 0x6c, - 0x95, 0x89, 0xa5, 0x70, 0x9e, 0x58, 0x96, 0x4e, 0xa8, 0x64, 0xf8, 0xc3, 0x04, 0x9d, 0x72, 0x0b, - 0x43, 0xbd, 0x06, 0x6b, 0xbd, 0x67, 0xba, 0xed, 0xfe, 0x13, 0xef, 0xea, 0xfd, 0x7a, 0x17, 0x76, - 0xf3, 0xea, 0xe0, 0x60, 0xf0, 0x4e, 0xf9, 0x82, 0xe7, 0x27, 0x02, 0x19, 0x99, 0x40, 0xed, 0x15, - 0x31, 0x17, 0xa8, 0x5d, 0x0e, 0xd7, 0x65, 0x21, 0x10, 0xd4, 0x19, 0xce, 0x45, 0x27, 0x5c, 0x45, - 0xe0, 0x7d, 0x50, 0x23, 0xcc, 0xda, 0x90, 0x37, 0xb5, 0x95, 0x09, 0x54, 0x7b, 0x3d, 0xc8, 0x05, - 0xaa, 0x11, 0x56, 0x08, 0xd4, 0x52, 0x66, 0xc2, 0x9c, 0xb0, 0x46, 0x18, 0x5c, 0x00, 0x0b, 0xc7, - 0x1f, 0x19, 0x25, 0x31, 0x1f, 0xa6, 0xf8, 0xf3, 0x02, 0xc7, 0x63, 0x3c, 0x8c, 0x17, 0xf3, 0x11, - 0x4e, 0xac, 0x96, 0x5c, 0xfb, 0x8b, 0x5c, 0xa0, 0xcd, 0x8a, 0xd9, 0xd7, 0xc8, 0x5b, 0x49, 0x14, - 0x02, 0xed, 0xe8, 0x07, 0x70, 0x65, 0xdf, 0x09, 0xaf, 0x31, 0xee, 0xd5, 0xbf, 0xff, 0x42, 0x46, - 0xf0, 0xfe, 0xec, 0xaf, 0x6d, 0x7c, 0xcb, 0x6c, 0xf3, 0x24, 0xb3, 0xcd, 0xd3, 0xcc, 0x36, 0xff, - 0x64, 0xb6, 0xf9, 0x73, 0x69, 0x1b, 0xa7, 0x4b, 0xdb, 0x38, 0x5b, 0xda, 0xc6, 0x87, 0xa7, 0x13, - 0xc2, 0xa7, 0x8b, 0x91, 0x37, 0xa6, 0x73, 0x5f, 0x5e, 0xe6, 0xe3, 0x18, 0xf3, 0x2f, 0x34, 0x39, - 0xd4, 0x55, 0xc4, 0x88, 0x3f, 0xa1, 0x97, 0xfe, 0x89, 0x51, 0x53, 0xbe, 0x9b, 0xdd, 0xff, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xb3, 0x23, 0xc2, 0x68, 0x8e, 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 - } - { - 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 len(m.Proto) > 0 { - i -= len(m.Proto) - copy(dAtA[i:], m.Proto) - i = encodeVarintServiceexpose(dAtA, i, uint64(len(m.Proto))) - i-- - dAtA[i] = 0x1a - } - 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)) - } - l = len(m.Proto) - if l > 0 { - n += 1 + l + sovServiceexpose(uint64(l)) - } - 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)) - } - } - 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(strings.Replace(fmt.Sprintf("%v", this.HTTPOptions), "ServiceExposeHTTPOptions", "ServiceExposeHTTPOptions", 1), `&`, ``, 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proto", 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.Proto = ServiceProtocol(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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 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/manifest/v2beta2/serviceexposes.go b/go/manifest/v2beta2/serviceexposes.go deleted file mode 100644 index 6dbc5de4..00000000 --- a/go/manifest/v2beta2/serviceexposes.go +++ /dev/null @@ -1,51 +0,0 @@ -package v2beta2 - -import ( - "sort" - - types "github.com/akash-network/akash-api/go/node/types/v1beta3" -) - -type ServiceExposes []ServiceExpose - -var _ sort.Interface = (*ServiceExposes)(nil) - -func (s ServiceExposes) Len() int { - return len(s) -} - -func (s ServiceExposes) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s ServiceExposes) Less(i, j int) bool { - a, b := s[i], s[j] - - if a.Service != b.Service { - return a.Service < b.Service - } - - if a.Port != b.Port { - return a.Port < b.Port - } - - if a.Proto != b.Proto { - return a.Proto < b.Proto - } - - if a.Global != b.Global { - return a.Global - } - - return false -} - -func (s ServiceExposes) GetEndpoints() types.Endpoints { - endpoints := make(types.Endpoints, 0) - - for _, expose := range s { - endpoints = append(endpoints, expose.GetEndpoints()...) - } - - return endpoints -} diff --git a/go/manifest/v2beta2/services.go b/go/manifest/v2beta2/services.go deleted file mode 100644 index 8bdfc0b6..00000000 --- a/go/manifest/v2beta2/services.go +++ /dev/null @@ -1,21 +0,0 @@ -package v2beta2 - -import ( - "sort" -) - -type Services []Service - -var _ sort.Interface = (*ServiceExposes)(nil) - -func (s Services) Len() int { - return len(s) -} - -func (s Services) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s Services) Less(i, j int) bool { - return s[i].Name < s[j].Name -} diff --git a/go/manifest/v2beta3/group.go b/go/manifest/v2beta3/group.go index 543102a8..acaf9143 100644 --- a/go/manifest/v2beta3/group.go +++ b/go/manifest/v2beta3/group.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" ) var _ dtypes.ResourceGroup = (*Group)(nil) diff --git a/go/manifest/v2beta3/group.pb.go b/go/manifest/v2beta3/group.pb.go index b78b6e33..8e985525 100644 --- a/go/manifest/v2beta3/group.pb.go +++ b/go/manifest/v2beta3/group.pb.go @@ -5,8 +5,8 @@ package v2beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -72,7 +72,7 @@ func init() { } var fileDescriptor_d7cd4686cd5336b6 = []byte{ - // 276 bytes of a gzipped FileDescriptorProto + // 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, 0xd6, 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, @@ -84,13 +84,12 @@ var fileDescriptor_d7cd4686cd5336b6 = []byte{ 0x28, 0x87, 0x8b, 0x03, 0x6a, 0x4e, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xbc, 0x1e, 0x76, 0xd7, 0xe9, 0x05, 0x43, 0xd4, 0x39, 0xe9, 0x9f, 0xb8, 0x27, 0xcf, 0xf0, 0xea, 0x9e, 0x3c, 0x5c, 0xe3, 0xa7, 0x7b, 0xf2, 0xfc, 0x10, 0x93, 0x61, 0x22, 0x4a, 0xab, 0xee, 0xcb, 0x73, 0x40, - 0xd5, 0x17, 0x07, 0xc1, 0x15, 0x5a, 0xb1, 0x74, 0x2c, 0x90, 0x67, 0x70, 0x8a, 0xb8, 0xf1, 0x50, + 0xd5, 0x17, 0x07, 0xc1, 0x15, 0x5a, 0xb1, 0x74, 0x2c, 0x90, 0x67, 0x70, 0x72, 0xb8, 0xf1, 0x50, 0x8e, 0xa1, 0xe1, 0x91, 0x1c, 0xe3, 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, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x83, 0x5d, 0xa3, 0x9b, - 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, 0xea, 0xa7, 0xe7, 0x63, 0x04, - 0x49, 0x12, 0x1b, 0x38, 0x2c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xb6, 0xb3, 0x7b, - 0x85, 0x01, 0x00, 0x00, + 0xc9, 0x15, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, 0x42, 0x02, 0xc3, 0xeb, 0x49, + 0x6c, 0x60, 0x3f, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x47, 0x00, 0xbb, 0x6d, 0x01, + 0x00, 0x00, } func (m *Group) Marshal() (dAtA []byte, err error) { diff --git a/go/manifest/v2beta3/groups.go b/go/manifest/v2beta3/groups.go index 1572fe09..576c4bbe 100644 --- a/go/manifest/v2beta3/groups.go +++ b/go/manifest/v2beta3/groups.go @@ -3,7 +3,7 @@ package v2beta3 import ( "fmt" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" ) type Groups []Group diff --git a/go/manifest/v2beta3/helpers.go b/go/manifest/v2beta3/helpers.go index d5acd63c..f38e6c88 100644 --- a/go/manifest/v2beta3/helpers.go +++ b/go/manifest/v2beta3/helpers.go @@ -3,8 +3,8 @@ package v2beta3 import ( k8svalidation "k8s.io/apimachinery/pkg/util/validation" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - resources "github.com/akash-network/akash-api/go/node/types/resources/v1" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + resources "pkg.akt.io/go/node/types/resources/v1beta4" ) type validateManifestGroupsHelper struct { @@ -31,7 +31,7 @@ func newGroupSpecsHelper(gspecs dtypes.GroupSpecs) groupSpecHelper { res := make(groupSpecHelper) for _, gspec := range gspecs { - res[gspec.GetName()] = newGroupSpecHelper(*gspec) + res[gspec.GetName()] = newGroupSpecHelper(gspec) } return res diff --git a/go/manifest/v2beta3/httpoptions.pb.go b/go/manifest/v2beta3/httpoptions.pb.go index dd66334c..b412afee 100644 --- a/go/manifest/v2beta3/httpoptions.pb.go +++ b/go/manifest/v2beta3/httpoptions.pb.go @@ -5,8 +5,8 @@ package v2beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -118,32 +118,31 @@ func init() { } var fileDescriptor_ee317fccaba20357 = []byte{ - // 397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x31, 0xcb, 0xd3, 0x40, - 0x1c, 0x87, 0x13, 0xab, 0x85, 0x46, 0x0b, 0x12, 0x45, 0x42, 0x87, 0x4b, 0x0d, 0x08, 0x1d, 0x34, - 0x01, 0x0b, 0x82, 0x4e, 0x12, 0x11, 0xea, 0xa4, 0xa4, 0x19, 0x8a, 0x4b, 0xb8, 0xb4, 0x67, 0x7a, - 0xd4, 0xcb, 0x85, 0xdc, 0xb5, 0x26, 0x9d, 0xfc, 0x08, 0x7e, 0xac, 0x8e, 0x1d, 0x3b, 0xc5, 0xf7, - 0x4d, 0xb7, 0x8e, 0xfd, 0x04, 0x2f, 0x97, 0xe4, 0x7d, 0x73, 0xb4, 0x5b, 0xf2, 0xfc, 0x1f, 0x1e, - 0x7e, 0xc3, 0x69, 0x23, 0xb8, 0x82, 0x6c, 0xe9, 0x10, 0x18, 0xe3, 0x5f, 0x88, 0x71, 0x67, 0xf3, - 0x3e, 0x44, 0x1c, 0x8e, 0x9d, 0x25, 0xe7, 0x09, 0x4d, 0x38, 0xa6, 0x31, 0xb3, 0x93, 0x94, 0x72, - 0xaa, 0xbf, 0xaa, 0x4c, 0xfb, 0xde, 0xb4, 0x1b, 0x73, 0xf0, 0x32, 0xa2, 0x11, 0xad, 0x14, 0x47, - 0x7c, 0xd5, 0xb6, 0xf5, 0xbf, 0xa3, 0x19, 0x53, 0x94, 0x6e, 0xf0, 0x1c, 0x7d, 0xcd, 0x12, 0xca, - 0xd0, 0xc4, 0xf7, 0x7f, 0x7c, 0xaf, 0x83, 0xfa, 0x37, 0xad, 0x4f, 0x60, 0x16, 0x84, 0x74, 0x91, - 0x07, 0x0c, 0x6f, 0x91, 0xa1, 0x0e, 0xd5, 0x51, 0xdf, 0x7d, 0x73, 0x2a, 0xcc, 0xa7, 0x04, 0x66, - 0x2e, 0x5d, 0xe4, 0x53, 0xbc, 0x45, 0xe7, 0xc2, 0xd4, 0x73, 0x48, 0x7e, 0x7f, 0xb2, 0x24, 0x68, - 0x79, 0xb2, 0xa2, 0x4f, 0xb4, 0x67, 0x29, 0x82, 0x8b, 0x80, 0x63, 0x82, 0xe8, 0x9a, 0x1b, 0x8f, - 0xda, 0x92, 0xe0, 0x7e, 0x8d, 0xdb, 0x92, 0x04, 0x2d, 0x4f, 0x56, 0x44, 0x89, 0xa1, 0xb8, 0x2d, - 0x75, 0xda, 0x92, 0xe0, 0x57, 0x25, 0x09, 0x5a, 0x9e, 0xac, 0xe8, 0x9f, 0x35, 0x2d, 0x46, 0x19, - 0x0f, 0x78, 0x8a, 0x11, 0x33, 0x1e, 0x57, 0x9d, 0xd7, 0xa7, 0xc2, 0xec, 0x09, 0xea, 0x0b, 0x78, - 0x2e, 0xcc, 0xe7, 0x75, 0xe5, 0x01, 0x59, 0x5e, 0x7b, 0x16, 0x5b, 0xea, 0x42, 0xb3, 0xe5, 0x49, - 0xbb, 0xa5, 0x92, 0x2e, 0xb7, 0x48, 0xd0, 0xf2, 0x64, 0x45, 0x9f, 0x35, 0x5b, 0xe6, 0x90, 0x21, - 0x66, 0x74, 0x87, 0x9d, 0x51, 0xcf, 0xfd, 0xb8, 0x2b, 0x4c, 0xf5, 0x54, 0x98, 0x2f, 0xc4, 0xe5, - 0x8b, 0x38, 0xbc, 0xa5, 0x04, 0x73, 0x44, 0x12, 0x9e, 0x9f, 0x0b, 0x73, 0xd0, 0x36, 0x2f, 0x8e, - 0xcd, 0xc6, 0x8a, 0xba, 0xb3, 0xc3, 0x2d, 0x50, 0xfe, 0x96, 0x40, 0xdd, 0x95, 0x40, 0xdd, 0x97, - 0x40, 0xbd, 0x29, 0x81, 0xfa, 0xef, 0x08, 0x94, 0xfd, 0x11, 0x28, 0x87, 0x23, 0x50, 0x7e, 0x7e, - 0x88, 0x30, 0x5f, 0xae, 0x43, 0x7b, 0x4e, 0x89, 0x53, 0x3d, 0x9e, 0x77, 0x31, 0xe2, 0x7f, 0x68, - 0xba, 0x6a, 0xfe, 0x60, 0x82, 0x9d, 0x88, 0x5e, 0xbd, 0xbd, 0xb0, 0x5b, 0x3d, 0xa1, 0xf1, 0x5d, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xe0, 0x99, 0x5a, 0x9c, 0x02, 0x00, 0x00, + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0xb1, 0x4b, 0xeb, 0x40, + 0x1c, 0xc7, 0x93, 0xd7, 0xf7, 0x0a, 0xcd, 0x7b, 0x85, 0x47, 0x14, 0x09, 0x1d, 0x2e, 0x35, 0x20, + 0x74, 0x90, 0x04, 0xec, 0xa4, 0x53, 0x89, 0x08, 0x75, 0x52, 0xd2, 0x0c, 0xe2, 0x12, 0xae, 0xed, + 0xd9, 0x1e, 0x35, 0xb9, 0x90, 0x3b, 0x4b, 0xd2, 0xc9, 0x3f, 0xc1, 0x3f, 0xab, 0x63, 0xc7, 0x4e, + 0x51, 0xd3, 0xad, 0x63, 0xff, 0x02, 0xb9, 0x24, 0x9a, 0xa3, 0xdd, 0x8e, 0xcf, 0xef, 0xc3, 0x87, + 0xef, 0x70, 0x4a, 0x07, 0xce, 0x20, 0x9d, 0x5a, 0x3e, 0x0c, 0xf0, 0x13, 0xa2, 0xcc, 0x9a, 0x5f, + 0x0c, 0x11, 0x83, 0x5d, 0x6b, 0xca, 0x58, 0x48, 0x42, 0x86, 0x49, 0x40, 0xcd, 0x30, 0x22, 0x8c, + 0xa8, 0x27, 0xb9, 0x69, 0x7e, 0x9b, 0x66, 0x69, 0xb6, 0x8e, 0x27, 0x64, 0x42, 0x72, 0xc5, 0xe2, + 0xaf, 0xc2, 0x36, 0xde, 0x6b, 0x8a, 0x36, 0x40, 0xd1, 0x1c, 0x8f, 0xd0, 0x4d, 0x1c, 0x12, 0x8a, + 0xfa, 0xae, 0x7b, 0x7f, 0x57, 0x04, 0xd5, 0x5b, 0xa5, 0xe9, 0xc3, 0xd8, 0x1b, 0x92, 0x71, 0xe2, + 0x51, 0xbc, 0x40, 0x9a, 0xdc, 0x96, 0x3b, 0x4d, 0xfb, 0x6c, 0x9b, 0xea, 0x7f, 0x7d, 0x18, 0xdb, + 0x64, 0x9c, 0x0c, 0xf0, 0x02, 0xed, 0x52, 0x5d, 0x4d, 0xa0, 0xff, 0x7c, 0x65, 0x08, 0xd0, 0x70, + 0x44, 0x45, 0xed, 0x2b, 0xff, 0x22, 0x04, 0xc7, 0x1e, 0xc3, 0x3e, 0x22, 0x2f, 0x4c, 0xfb, 0x55, + 0x95, 0x38, 0x77, 0x0b, 0x5c, 0x95, 0x04, 0x68, 0x38, 0xa2, 0xc2, 0x4b, 0x14, 0x05, 0x55, 0xa9, + 0x56, 0x95, 0x38, 0x3f, 0x28, 0x09, 0xd0, 0x70, 0x44, 0x45, 0xed, 0x29, 0x4a, 0x80, 0x62, 0xe6, + 0xb1, 0x08, 0x23, 0xaa, 0xfd, 0xce, 0x3b, 0xa7, 0xdb, 0x54, 0x6f, 0x70, 0xea, 0x72, 0xb8, 0x4b, + 0xf5, 0xff, 0x45, 0xe5, 0x07, 0x19, 0x4e, 0x75, 0xe6, 0x5b, 0x8a, 0x42, 0xb9, 0xe5, 0x4f, 0xb5, + 0x25, 0x97, 0xf6, 0xb7, 0x08, 0xd0, 0x70, 0x44, 0x45, 0x7d, 0x28, 0xb7, 0x8c, 0x20, 0x45, 0x54, + 0xab, 0xb7, 0x6b, 0x9d, 0x86, 0x7d, 0xb9, 0x4c, 0x75, 0x79, 0x9b, 0xea, 0x47, 0xfc, 0x72, 0xcd, + 0x0f, 0xe7, 0xc4, 0xc7, 0x0c, 0xf9, 0x21, 0x4b, 0x76, 0xa9, 0xde, 0xaa, 0x9a, 0x7b, 0xc7, 0x72, + 0x63, 0x4e, 0xed, 0xde, 0xfa, 0x13, 0x48, 0xaf, 0x19, 0x90, 0x97, 0x19, 0x90, 0x57, 0x19, 0x90, + 0x3f, 0x32, 0x20, 0xbf, 0x6d, 0x80, 0xb4, 0xda, 0x00, 0x69, 0xbd, 0x01, 0xd2, 0x23, 0x08, 0x67, + 0x13, 0x13, 0xce, 0x98, 0x89, 0xf9, 0xd7, 0x38, 0xf8, 0x63, 0xc3, 0x7a, 0xfe, 0x55, 0xba, 0x5f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x86, 0xb7, 0x0d, 0x84, 0x02, 0x00, 0x00, } func (m *ServiceExposeHTTPOptions) Marshal() (dAtA []byte, err error) { diff --git a/go/manifest/v2beta3/manifest.go b/go/manifest/v2beta3/manifest.go index 8c03c174..1aadf797 100644 --- a/go/manifest/v2beta3/manifest.go +++ b/go/manifest/v2beta3/manifest.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" ) var ( @@ -34,11 +34,11 @@ func (m Manifest) Validate() error { } func (m Manifest) CheckAgainstDeployment(dgroups []dtypes.Group) error { - gspecs := make([]*dtypes.GroupSpec, 0, len(dgroups)) + gspecs := make([]dtypes.GroupSpec, 0, len(dgroups)) for _, dgroup := range dgroups { gspec := dgroup.GroupSpec - gspecs = append(gspecs, &gspec) + gspecs = append(gspecs, gspec) } return m.CheckAgainstGSpecs(gspecs) diff --git a/go/manifest/v2beta3/manifest_cross_validation_test.go b/go/manifest/v2beta3/manifest_cross_validation_test.go index be975179..112f72f1 100644 --- a/go/manifest/v2beta3/manifest_cross_validation_test.go +++ b/go/manifest/v2beta3/manifest_cross_validation_test.go @@ -3,14 +3,15 @@ package v2beta3 import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/akash-network/akash-api/go/node/client/testutil/v1beta3" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - tutil "github.com/akash-network/akash-api/go/testutil" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + attr "pkg.akt.io/go/node/types/attributes/v1" + akashtypes "pkg.akt.io/go/node/types/resources/v1beta4" + tutil "pkg.akt.io/go/testutil" + testutil "pkg.akt.io/go/testutil/v1beta3" ) const ( @@ -42,8 +43,8 @@ func simpleDeployment(t *testing.T, expose ServiceExposes, count uint32) []dtype Price: sdk.NewInt64DecCoin(tutil.CoinDenom, 1), } deployment[0] = dtypes.Group{ - GroupID: gid, - State: 0, + ID: gid, + State: 0, GroupSpec: dtypes.GroupSpec{ Name: nameOfTestGroup, Requirements: attr.PlacementRequirements{}, diff --git a/go/manifest/v2beta3/manifest_test.go b/go/manifest/v2beta3/manifest_test.go index 12eaf81f..5f6c8768 100644 --- a/go/manifest/v2beta3/manifest_test.go +++ b/go/manifest/v2beta3/manifest_test.go @@ -4,13 +4,14 @@ import ( "bytes" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/akash-network/akash-api/go/node/client/testutil/v1beta3" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - resources "github.com/akash-network/akash-api/go/node/types/resources/v1" + sdk "github.com/cosmos/cosmos-sdk/types" + + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + resources "pkg.akt.io/go/node/types/resources/v1beta4" + "pkg.akt.io/go/testutil" ) const ( @@ -307,7 +308,7 @@ func Test_ValidateManifest(t *testing.T) { name string ok bool mani Manifest - dgroups []*dtypes.GroupSpec + dgroups []dtypes.GroupSpec }{ { name: "empty", @@ -331,7 +332,7 @@ func Test_ValidateManifest(t *testing.T) { }, }, }, - dgroups: []*dtypes.GroupSpec{ + dgroups: []dtypes.GroupSpec{ { Name: "foo", Resources: dtypes.ResourceUnits{ @@ -367,7 +368,7 @@ func Test_ValidateManifest(t *testing.T) { }, }, }, - dgroups: []*dtypes.GroupSpec{ + dgroups: []dtypes.GroupSpec{ { Name: "foo", Resources: dtypes.ResourceUnits{ @@ -396,7 +397,7 @@ func Test_ValidateManifest(t *testing.T) { }, }, }, - dgroups: []*dtypes.GroupSpec{ + dgroups: []dtypes.GroupSpec{ { Name: "foo", Resources: dtypes.ResourceUnits{ @@ -425,7 +426,7 @@ func Test_ValidateManifest(t *testing.T) { }, }, }, - dgroups: []*dtypes.GroupSpec{ + dgroups: []dtypes.GroupSpec{ { Name: "foo", Resources: dtypes.ResourceUnits{ @@ -454,7 +455,7 @@ func Test_ValidateManifest(t *testing.T) { }, }, }, - dgroups: []*dtypes.GroupSpec{}, + dgroups: []dtypes.GroupSpec{}, }, } diff --git a/go/manifest/v2beta3/service.go b/go/manifest/v2beta3/service.go index 023ad3d4..6ca956fd 100644 --- a/go/manifest/v2beta3/service.go +++ b/go/manifest/v2beta3/service.go @@ -7,7 +7,7 @@ import ( k8svalidation "k8s.io/apimachinery/pkg/util/validation" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" ) func (s *Service) validate(helper *validateManifestGroupsHelper) error { diff --git a/go/manifest/v2beta3/service.pb.go b/go/manifest/v2beta3/service.pb.go index 4073c98d..41d7a47b 100644 --- a/go/manifest/v2beta3/service.pb.go +++ b/go/manifest/v2beta3/service.pb.go @@ -5,12 +5,12 @@ package v2beta3 import ( fmt "fmt" - v1 "github.com/akash-network/akash-api/go/node/types/resources/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1beta4 "pkg.akt.io/go/node/types/resources/v1beta4" reflect "reflect" strings "strings" ) @@ -208,15 +208,16 @@ func (m *ImageCredentials) GetPassword() string { // 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,rep,name=args,proto3" json:"args" yaml:"args"` - Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env" yaml:"env"` - Resources v1.Resources `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 ServiceExposes `protobuf:"bytes,8,rep,name=expose,proto3,castrepeated=ServiceExposes" json:"expose" yaml:"expose"` - Params *ServiceParams `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty" yaml:"params,omitempty"` + 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,rep,name=args,proto3" json:"args" yaml:"args"` + Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env" yaml:"env"` + Resources v1beta4.Resources `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 ServiceExposes `protobuf:"bytes,8,rep,name=expose,proto3,castrepeated=ServiceExposes" json:"expose" yaml:"expose"` + Params *ServiceParams `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty" yaml:"params,omitempty"` + Credentials *ImageCredentials `protobuf:"bytes,10,opt,name=credentials,proto3" json:"credentials" yaml:"credentials"` } func (m *Service) Reset() { *m = Service{} } @@ -286,11 +287,11 @@ func (m *Service) GetEnv() []string { return nil } -func (m *Service) GetResources() v1.Resources { +func (m *Service) GetResources() v1beta4.Resources { if m != nil { return m.Resources } - return v1.Resources{} + return v1beta4.Resources{} } func (m *Service) GetCount() uint32 { @@ -314,6 +315,13 @@ func (m *Service) GetParams() *ServiceParams { return nil } +func (m *Service) GetCredentials() *ImageCredentials { + if m != nil { + return m.Credentials + } + return nil +} + func init() { proto.RegisterType((*StorageParams)(nil), "akash.manifest.v2beta3.StorageParams") proto.RegisterType((*ServiceParams)(nil), "akash.manifest.v2beta3.ServiceParams") @@ -326,53 +334,53 @@ func init() { } var fileDescriptor_6d5964c4976d68e5 = []byte{ - // 727 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbd, 0x6f, 0xd3, 0x4e, - 0x18, 0x8e, 0x7f, 0x49, 0xf3, 0x71, 0xf9, 0xb5, 0x54, 0x16, 0x50, 0xb7, 0x02, 0x5f, 0x38, 0x51, - 0x11, 0x51, 0xb0, 0xd5, 0x56, 0x02, 0x89, 0x8f, 0xc5, 0x88, 0x81, 0x09, 0x74, 0x2c, 0x88, 0x05, - 0x5d, 0x9c, 0xc3, 0xb5, 0x1a, 0xfb, 0x22, 0x9f, 0x93, 0xd2, 0x8d, 0x95, 0x8d, 0xbf, 0x03, 0xfe, - 0x91, 0x8e, 0x1d, 0x3b, 0x1d, 0x90, 0x6e, 0x19, 0x33, 0xb2, 0x80, 0xee, 0xc3, 0x75, 0x02, 0x85, - 0x8a, 0x29, 0x79, 0x9e, 0xf7, 0x79, 0xfd, 0x7e, 0x1f, 0xb8, 0x49, 0xf6, 0x09, 0xdf, 0xf3, 0x13, - 0x92, 0xc6, 0x6f, 0x29, 0xcf, 0xfd, 0xf1, 0x4e, 0x8f, 0xe6, 0x64, 0xd7, 0xe7, 0x34, 0x1b, 0xc7, - 0x21, 0xf5, 0x86, 0x19, 0xcb, 0x99, 0x7d, 0x55, 0xa9, 0xbc, 0x42, 0xe5, 0x19, 0xd5, 0xc6, 0xe5, - 0x88, 0x45, 0x4c, 0x49, 0x7c, 0xf9, 0x4f, 0xab, 0x37, 0x6e, 0xff, 0xfd, 0x9b, 0xf4, 0xdd, 0x90, - 0x71, 0xf3, 0xe5, 0x8d, 0x5b, 0x5a, 0xdb, 0x23, 0x9c, 0xfa, 0x19, 0xe5, 0x6c, 0x94, 0x85, 0x94, - 0xfb, 0xe3, 0xed, 0x12, 0x68, 0x21, 0xfa, 0x6c, 0x81, 0xe5, 0x97, 0x39, 0xcb, 0x48, 0x44, 0x5f, - 0x90, 0x8c, 0x24, 0xdc, 0xde, 0x02, 0xb5, 0x94, 0x24, 0xd4, 0xb1, 0x3a, 0x56, 0xb7, 0x15, 0xac, - 0x4d, 0x05, 0x54, 0x78, 0x26, 0x60, 0xfb, 0x90, 0x24, 0x83, 0x07, 0x48, 0x22, 0x84, 0x15, 0x69, - 0xfb, 0x60, 0x29, 0x61, 0xa3, 0x34, 0x77, 0xfe, 0x53, 0xea, 0xf5, 0xa9, 0x80, 0x9a, 0x98, 0x09, - 0xf8, 0xbf, 0x96, 0x2b, 0x88, 0xb0, 0xa6, 0xed, 0x47, 0xa0, 0x95, 0x51, 0xd2, 0x7f, 0xc3, 0xd2, - 0xc1, 0xa1, 0x53, 0xed, 0x58, 0xdd, 0x66, 0x00, 0xa7, 0x02, 0x36, 0x25, 0xf9, 0x3c, 0x1d, 0x1c, - 0xce, 0x04, 0xbc, 0xa4, 0xfd, 0x0a, 0x06, 0xe1, 0x33, 0x23, 0xfa, 0x21, 0xb3, 0xd5, 0xe5, 0x9a, - 0x6c, 0x7b, 0xa0, 0xc1, 0x75, 0xfa, 0x8e, 0xd5, 0xa9, 0x76, 0xdb, 0x3b, 0x9b, 0xde, 0xf9, 0x4d, - 0xf5, 0x16, 0xaa, 0x0c, 0x6e, 0x1c, 0x09, 0x58, 0x99, 0x0a, 0x58, 0x78, 0xcf, 0x04, 0x5c, 0xd1, - 0x71, 0x0d, 0x81, 0x70, 0x61, 0xb2, 0x3f, 0x58, 0xa0, 0x1d, 0x66, 0xb4, 0x4f, 0xd3, 0x3c, 0x26, - 0x03, 0xee, 0x80, 0x8e, 0xd5, 0x6d, 0xef, 0x74, 0xff, 0x14, 0xe8, 0x59, 0x42, 0x22, 0xfa, 0xa4, - 0xd4, 0x07, 0x8f, 0x8f, 0x04, 0xb4, 0xa6, 0x02, 0x5e, 0x99, 0xfb, 0xc8, 0x1d, 0x96, 0xc4, 0x39, - 0x4d, 0x86, 0xb9, 0xac, 0xf8, 0x9a, 0x8e, 0x7c, 0xae, 0x19, 0xe1, 0xf9, 0xd8, 0x68, 0x6a, 0x81, - 0xd5, 0x5f, 0x03, 0xc8, 0x91, 0xed, 0x31, 0x9e, 0xcf, 0x8f, 0x4c, 0xe2, 0x72, 0x64, 0x12, 0x21, - 0xac, 0x48, 0x39, 0x32, 0x9a, 0x90, 0x78, 0x30, 0x3f, 0x32, 0x45, 0x94, 0x23, 0x53, 0x10, 0x61, - 0x4d, 0xdb, 0x0f, 0x41, 0x73, 0xc4, 0x69, 0xa6, 0x96, 0xa2, 0xaa, 0x7c, 0xd4, 0xc4, 0x0a, 0xae, - 0x9c, 0x58, 0xc1, 0x20, 0x7c, 0x66, 0x94, 0xce, 0x43, 0xc2, 0xf9, 0x01, 0xcb, 0xfa, 0x4e, 0xad, - 0x74, 0x2e, 0xb8, 0xd2, 0xb9, 0x60, 0x10, 0x3e, 0x33, 0xa2, 0xef, 0x35, 0xd0, 0x30, 0xe3, 0xfe, - 0xe7, 0xb5, 0x8c, 0x65, 0x93, 0xe6, 0x6b, 0x54, 0x44, 0x59, 0xa3, 0x82, 0x08, 0x6b, 0xda, 0xbe, - 0x0f, 0x1a, 0x21, 0x4b, 0x12, 0x92, 0xf6, 0x9d, 0x6a, 0xa7, 0xda, 0x6d, 0x05, 0xd7, 0xe5, 0x6e, - 0x18, 0xaa, 0xdc, 0x0d, 0x43, 0x20, 0x5c, 0x98, 0x64, 0x5a, 0x24, 0x8b, 0xb8, 0x53, 0x53, 0x5e, - 0x2a, 0x2d, 0x89, 0xcb, 0xb4, 0x24, 0x42, 0x58, 0x91, 0xf6, 0x16, 0xa8, 0xd2, 0x74, 0xec, 0x2c, - 0x29, 0xed, 0xba, 0xd9, 0x0a, 0x49, 0xcd, 0x04, 0x04, 0xa6, 0xf5, 0xe9, 0x18, 0x61, 0x49, 0xd9, - 0x91, 0xbc, 0x14, 0x73, 0xac, 0x4e, 0x5d, 0xad, 0x1c, 0x32, 0x2b, 0x27, 0xcf, 0xda, 0x2b, 0x2f, - 0x79, 0xbc, 0xed, 0xe1, 0x02, 0x04, 0x9b, 0x66, 0xb1, 0x4b, 0xe7, 0x99, 0x80, 0xab, 0xc5, 0x49, - 0x19, 0x0a, 0xe1, 0xd2, 0x2c, 0x9b, 0x15, 0xaa, 0x1b, 0x6e, 0x74, 0xac, 0xee, 0xb2, 0x6e, 0x56, - 0xb8, 0x78, 0xc3, 0xa1, 0xb9, 0x61, 0xf5, 0x6b, 0x0f, 0x41, 0x5d, 0x3f, 0x36, 0x4e, 0xf3, 0x82, - 0x93, 0xd3, 0xb3, 0x7b, 0xaa, 0xc4, 0xc1, 0xb6, 0xc9, 0xcc, 0x38, 0xcf, 0x04, 0x5c, 0x36, 0x35, - 0x2b, 0x8c, 0x3e, 0x7d, 0x81, 0x2b, 0x0b, 0x1e, 0x1c, 0x1b, 0xa9, 0x9d, 0x81, 0xfa, 0x50, 0xdd, - 0xad, 0xd3, 0x52, 0x8d, 0xb8, 0x28, 0xa2, 0x39, 0xf2, 0x5d, 0xd3, 0xe2, 0x55, 0xed, 0xbc, 0x70, - 0x73, 0x6b, 0xc5, 0xda, 0x2d, 0x5a, 0x10, 0x36, 0x91, 0x82, 0x57, 0x27, 0xdf, 0xdc, 0xca, 0xfb, - 0x89, 0x6b, 0x1d, 0x4d, 0x5c, 0xeb, 0x78, 0xe2, 0x5a, 0x5f, 0x27, 0xae, 0xf5, 0xf1, 0xd4, 0xad, - 0x1c, 0x9f, 0xba, 0x95, 0x93, 0x53, 0xb7, 0xf2, 0xfa, 0x5e, 0x14, 0xe7, 0x7b, 0xa3, 0x9e, 0x17, - 0xb2, 0xc4, 0x57, 0xf9, 0xdc, 0x4d, 0x69, 0x7e, 0xc0, 0xb2, 0x7d, 0x83, 0xc8, 0x30, 0xf6, 0x23, - 0xf6, 0xdb, 0x83, 0xdd, 0xab, 0xab, 0xa7, 0x77, 0xf7, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, - 0x13, 0xfe, 0x07, 0x25, 0x06, 0x00, 0x00, + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x3b, 0x6f, 0x13, 0x4d, + 0x14, 0xf5, 0x7c, 0x4e, 0xfc, 0x18, 0x7f, 0x09, 0xd1, 0x0a, 0xc8, 0x26, 0x82, 0x1d, 0x33, 0x22, + 0xc2, 0x90, 0x68, 0xad, 0x24, 0x48, 0x48, 0x3c, 0x24, 0xb4, 0x88, 0x82, 0x0a, 0x34, 0x74, 0x34, + 0x68, 0xbc, 0x1e, 0x9c, 0x55, 0xbc, 0x0f, 0xed, 0xac, 0x0d, 0xe9, 0x68, 0xe9, 0xf8, 0x1d, 0xf0, + 0x47, 0x52, 0xa6, 0x4c, 0x35, 0x80, 0xd3, 0xb9, 0xdc, 0x82, 0x16, 0x34, 0x8f, 0xcd, 0xda, 0x24, + 0x10, 0x21, 0xaa, 0xe4, 0x9e, 0x7b, 0xee, 0xdc, 0xe7, 0xf1, 0xc2, 0x9b, 0x74, 0x9f, 0xf2, 0xbd, + 0x6e, 0x48, 0xa3, 0xe0, 0x0d, 0xe3, 0x59, 0x77, 0xbc, 0xd3, 0x63, 0x19, 0xdd, 0xed, 0x72, 0x96, + 0x8e, 0x03, 0x9f, 0xb9, 0x49, 0x1a, 0x67, 0xb1, 0x75, 0x55, 0xb1, 0xdc, 0x82, 0xe5, 0x1a, 0xd6, + 0xfa, 0xe5, 0x41, 0x3c, 0x88, 0x15, 0xa5, 0x2b, 0xff, 0xd3, 0xec, 0xf5, 0x3b, 0x7f, 0x7e, 0x93, + 0xbd, 0x4b, 0x62, 0x6e, 0x5e, 0x5e, 0xdf, 0xd2, 0xdc, 0x1e, 0xe5, 0xac, 0x9b, 0x32, 0x1e, 0x8f, + 0x52, 0x9f, 0xf1, 0xee, 0x78, 0x5b, 0x46, 0xdc, 0x2d, 0x11, 0xcd, 0xc6, 0x9f, 0x01, 0x5c, 0x7a, + 0x99, 0xc5, 0x29, 0x1d, 0xb0, 0x17, 0x34, 0xa5, 0x21, 0xb7, 0x36, 0xe1, 0x42, 0x44, 0x43, 0x66, + 0x83, 0x36, 0xe8, 0x34, 0xbd, 0xd5, 0xa9, 0x40, 0xca, 0xce, 0x05, 0x6a, 0x1d, 0xd0, 0x70, 0x78, + 0x1f, 0x4b, 0x0b, 0x13, 0x05, 0x5a, 0x5d, 0xb8, 0x18, 0xc6, 0xa3, 0x28, 0xb3, 0xff, 0x53, 0xec, + 0xb5, 0xa9, 0x40, 0x1a, 0xc8, 0x05, 0xfa, 0x5f, 0xd3, 0x95, 0x89, 0x89, 0x86, 0xad, 0x87, 0xb0, + 0x99, 0x32, 0xda, 0x7f, 0x1d, 0x47, 0xc3, 0x03, 0xbb, 0xda, 0x06, 0x9d, 0x86, 0x87, 0xa6, 0x02, + 0x35, 0x24, 0xf8, 0x3c, 0x1a, 0x1e, 0xe4, 0x02, 0x5d, 0xd2, 0x71, 0x05, 0x82, 0xc9, 0xa9, 0x13, + 0xff, 0x90, 0xd5, 0xea, 0x9e, 0x4d, 0xb5, 0x3d, 0x58, 0xe7, 0xba, 0x7c, 0x1b, 0xb4, 0xab, 0x9d, + 0xd6, 0xce, 0x86, 0x7b, 0xfe, 0x64, 0xdd, 0xb9, 0x2e, 0xbd, 0x1b, 0x87, 0x02, 0x55, 0xa6, 0x02, + 0x15, 0xd1, 0xb9, 0x40, 0xcb, 0x3a, 0xaf, 0x01, 0x30, 0x29, 0x5c, 0xd6, 0x07, 0x00, 0x5b, 0x7e, + 0xca, 0xfa, 0x2c, 0xca, 0x02, 0x3a, 0xe4, 0x36, 0x6c, 0x83, 0x4e, 0x6b, 0xa7, 0xf3, 0xbb, 0x44, + 0xcf, 0x42, 0x3a, 0x60, 0x4f, 0x4a, 0xbe, 0xf7, 0xe8, 0x50, 0x20, 0x30, 0x15, 0xe8, 0xca, 0xcc, + 0x23, 0x5b, 0x71, 0x18, 0x64, 0x2c, 0x4c, 0x32, 0xd9, 0xf1, 0x35, 0x9d, 0xf9, 0x5c, 0x37, 0x26, + 0xb3, 0xb9, 0xf1, 0x14, 0xc0, 0x95, 0x5f, 0x13, 0xc8, 0x95, 0xed, 0xc5, 0x3c, 0x9b, 0x5d, 0x99, + 0xb4, 0xcb, 0x95, 0x49, 0x0b, 0x13, 0x05, 0xca, 0x95, 0xb1, 0x90, 0x06, 0xc3, 0xd9, 0x95, 0x29, + 0xa0, 0x5c, 0x99, 0x32, 0x31, 0xd1, 0xb0, 0xf5, 0x00, 0x36, 0x46, 0x9c, 0xa5, 0xea, 0x28, 0xaa, + 0x2a, 0x46, 0x6d, 0xac, 0xc0, 0xca, 0x8d, 0x15, 0x08, 0x26, 0xa7, 0x4e, 0x19, 0x9c, 0x50, 0xce, + 0xdf, 0xc6, 0x69, 0xdf, 0x5e, 0x28, 0x83, 0x0b, 0xac, 0x0c, 0x2e, 0x10, 0x4c, 0x4e, 0x9d, 0xf8, + 0xfb, 0x22, 0xac, 0x9b, 0x75, 0xff, 0xf5, 0x59, 0x06, 0x72, 0x48, 0xb3, 0x3d, 0x2a, 0xa0, 0xec, + 0x51, 0x99, 0x98, 0x68, 0xd8, 0xba, 0x07, 0xeb, 0x7e, 0x1c, 0x86, 0x34, 0xea, 0xdb, 0xd5, 0x76, + 0xb5, 0xd3, 0xf4, 0xae, 0xcb, 0xdb, 0x30, 0x50, 0x79, 0x1b, 0x06, 0xc0, 0xa4, 0x70, 0xc9, 0xb2, + 0x68, 0x3a, 0xe0, 0xf6, 0x82, 0x8a, 0x52, 0x65, 0x49, 0xbb, 0x2c, 0x4b, 0x5a, 0x98, 0x28, 0xd0, + 0xda, 0x84, 0x55, 0x16, 0x8d, 0xed, 0x45, 0xc5, 0x5d, 0x33, 0x57, 0x21, 0xa1, 0x5c, 0x20, 0x68, + 0x46, 0x1f, 0x8d, 0x31, 0x91, 0x90, 0x35, 0x94, 0x4a, 0x31, 0x62, 0xb5, 0x6b, 0xea, 0xe4, 0x6e, + 0x99, 0x93, 0x93, 0xda, 0x76, 0x4b, 0x25, 0x1b, 0x6d, 0xbb, 0xa4, 0x40, 0xbc, 0x0d, 0x73, 0xdd, + 0xe5, 0x0b, 0xb9, 0x40, 0x2b, 0x85, 0xae, 0x0c, 0x84, 0x49, 0xe9, 0x96, 0x13, 0xf3, 0x95, 0x90, + 0xeb, 0x6d, 0xd0, 0x59, 0xd2, 0x13, 0xf3, 0xe7, 0x85, 0xec, 0x1b, 0x21, 0xab, 0xbf, 0x56, 0x02, + 0x6b, 0xfa, 0x67, 0xc7, 0x6e, 0x5c, 0xa0, 0x3b, 0xbd, 0xc0, 0xa7, 0x8a, 0xec, 0x6d, 0x9b, 0xca, + 0x4c, 0x70, 0x2e, 0xd0, 0x92, 0x69, 0x5c, 0xd9, 0xf8, 0xd3, 0x17, 0xb4, 0x3c, 0x17, 0xc1, 0x89, + 0xa1, 0x5a, 0x29, 0xac, 0x25, 0x4a, 0xbc, 0x76, 0x53, 0x4d, 0xe3, 0xa2, 0x8c, 0x46, 0xe9, 0xbb, + 0x66, 0xce, 0x2b, 0x3a, 0x78, 0x4e, 0x78, 0xab, 0xc5, 0xed, 0xcd, 0x7b, 0x30, 0x31, 0x99, 0xac, + 0xd1, 0xbf, 0x29, 0xff, 0xb6, 0xc9, 0x3d, 0xfb, 0x48, 0x2e, 0x90, 0x75, 0x46, 0xef, 0xf3, 0x2a, + 0xf7, 0x1e, 0x1f, 0x7f, 0x73, 0x2a, 0xef, 0x27, 0x0e, 0x38, 0x9c, 0x38, 0xe0, 0x68, 0xe2, 0x80, + 0xaf, 0x13, 0x07, 0x7c, 0x3c, 0x71, 0x2a, 0x47, 0x27, 0x4e, 0xe5, 0xf8, 0xc4, 0xa9, 0xbc, 0x72, + 0x92, 0xfd, 0x81, 0x4b, 0xf7, 0x33, 0x37, 0x90, 0x1f, 0x8a, 0x33, 0x5f, 0x86, 0x5e, 0x4d, 0xfd, + 0xbc, 0xef, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xbb, 0xfc, 0xf9, 0x8e, 0x06, 0x00, 0x00, } func (m *StorageParams) Marshal() (dAtA []byte, err error) { @@ -542,6 +550,18 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Credentials != nil { + { + size, err := m.Credentials.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } if m.Params != nil { { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) @@ -749,6 +769,10 @@ func (m *Service) Size() (n int) { l = m.Params.Size() n += 1 + l + sovService(uint64(l)) } + if m.Credentials != nil { + l = m.Credentials.Size() + n += 1 + l + sovService(uint64(l)) + } return n } @@ -814,10 +838,11 @@ func (this *Service) String() string { `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), "Resources", "v1.Resources", 1), `&`, ``, 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resources", "v1beta4.Resources", 1), `&`, ``, 1) + `,`, `Count:` + fmt.Sprintf("%v", this.Count) + `,`, `Expose:` + repeatedStringForExpose + `,`, `Params:` + strings.Replace(this.Params.String(), "ServiceParams", "ServiceParams", 1) + `,`, + `Credentials:` + strings.Replace(this.Credentials.String(), "ImageCredentials", "ImageCredentials", 1) + `,`, `}`, }, "") return s @@ -1573,6 +1598,42 @@ func (m *Service) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", 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.Credentials == nil { + m.Credentials = &ImageCredentials{} + } + if err := m.Credentials.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/go/manifest/v2beta3/serviceexpose.go b/go/manifest/v2beta3/serviceexpose.go index 63c04bbd..c074e9d5 100644 --- a/go/manifest/v2beta3/serviceexpose.go +++ b/go/manifest/v2beta3/serviceexpose.go @@ -5,8 +5,8 @@ import ( "math" "sort" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - resources "github.com/akash-network/akash-api/go/node/types/resources/v1" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + resources "pkg.akt.io/go/node/types/resources/v1beta4" ) func (s *ServiceExpose) GetEndpoints() resources.Endpoints { diff --git a/go/manifest/v2beta3/serviceexpose.pb.go b/go/manifest/v2beta3/serviceexpose.pb.go index 88a5540b..eaa53436 100644 --- a/go/manifest/v2beta3/serviceexpose.pb.go +++ b/go/manifest/v2beta3/serviceexpose.pb.go @@ -5,8 +5,8 @@ package v2beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -83,41 +83,40 @@ func init() { } var fileDescriptor_0cbeaeb8a333db8d = []byte{ - // 540 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0xed, 0x34, 0x49, 0x9b, 0x4b, 0x02, 0xd2, 0x81, 0x8a, 0x5b, 0x54, 0x5f, 0xe4, 0x05, - 0xf3, 0xcf, 0x46, 0x8d, 0x04, 0xa8, 0x6c, 0x96, 0x90, 0x40, 0x42, 0x10, 0xb9, 0x1d, 0x10, 0x4b, - 0xe4, 0x84, 0x23, 0x39, 0x35, 0xf1, 0x1d, 0xf6, 0xa5, 0x94, 0x8d, 0x91, 0x05, 0x89, 0x8f, 0xc0, - 0xc2, 0x77, 0xe9, 0xd8, 0xb1, 0xd3, 0x09, 0x9c, 0xcd, 0xa3, 0x47, 0x26, 0xe4, 0xbb, 0xb3, 0x9a, - 0xaa, 0xed, 0xe6, 0xf7, 0x79, 0x7f, 0xcf, 0x7b, 0x8f, 0xee, 0x3d, 0x83, 0x07, 0xd1, 0x61, 0x94, - 0x4e, 0xfd, 0x79, 0x14, 0x93, 0x4f, 0x38, 0xe5, 0xfe, 0xd1, 0xee, 0x08, 0xf3, 0xa8, 0xef, 0xa7, - 0x38, 0x39, 0x22, 0x63, 0x8c, 0x8f, 0x19, 0x4d, 0xb1, 0xc7, 0x12, 0xca, 0x29, 0xdc, 0x94, 0xac, - 0x57, 0xb1, 0x9e, 0x66, 0xb7, 0x6f, 0x4f, 0xe8, 0x84, 0x4a, 0xc4, 0x2f, 0xbf, 0x14, 0xbd, 0xed, - 0x5e, 0x33, 0x79, 0xca, 0x39, 0xa3, 0x8c, 0x13, 0x1a, 0xa7, 0x8a, 0x74, 0x7e, 0x37, 0x40, 0x77, - 0x5f, 0x9d, 0xf7, 0x52, 0x9e, 0x07, 0x1f, 0x82, 0x3a, 0xa3, 0x09, 0xb7, 0xcc, 0x9e, 0xe9, 0x76, - 0x83, 0x3b, 0xb9, 0x40, 0xb2, 0x2e, 0x04, 0x6a, 0x7f, 0x8d, 0xe6, 0xb3, 0x3d, 0xa7, 0xac, 0x9c, - 0x50, 0x8a, 0xf0, 0x0d, 0xe8, 0xe2, 0x63, 0x8e, 0x93, 0x38, 0x9a, 0x0d, 0xa5, 0xab, 0x26, 0x5d, - 0xf7, 0x72, 0x81, 0x3a, 0x55, 0x63, 0xa0, 0xdc, 0xb7, 0x94, 0x7b, 0x55, 0x75, 0xc2, 0x0b, 0x10, - 0x0c, 0x40, 0x43, 0xa6, 0xb2, 0xd6, 0x7a, 0xa6, 0xdb, 0x0a, 0x1e, 0xe5, 0x02, 0x29, 0xa1, 0x10, - 0xa8, 0xa3, 0x0f, 0x97, 0xa9, 0xff, 0x09, 0x74, 0x53, 0xa7, 0x1e, 0x94, 0xc2, 0x98, 0xce, 0x42, - 0x45, 0xc2, 0x67, 0x60, 0x5d, 0xdf, 0x9f, 0x55, 0x97, 0x53, 0x76, 0x72, 0x81, 0x2a, 0xa9, 0x10, - 0xe8, 0x86, 0x9a, 0xa3, 0x05, 0x27, 0xac, 0x5a, 0xb0, 0x0f, 0x9a, 0x93, 0x19, 0x1d, 0x45, 0x33, - 0xab, 0xd1, 0x33, 0xdd, 0x8d, 0xe0, 0x6e, 0x2e, 0x90, 0x56, 0x0a, 0x81, 0xba, 0xca, 0xa6, 0x6a, - 0x27, 0xd4, 0x0d, 0xe8, 0x83, 0xc6, 0x94, 0xa6, 0x3c, 0xb5, 0x9a, 0xbd, 0x35, 0xb7, 0x15, 0x6c, - 0x95, 0x89, 0xa5, 0x70, 0x9e, 0x58, 0x96, 0x4e, 0xa8, 0x64, 0xf8, 0xc3, 0x04, 0x9d, 0x72, 0x0b, - 0x43, 0xbd, 0x06, 0x6b, 0xbd, 0x67, 0xba, 0xed, 0xdd, 0x27, 0xde, 0xd5, 0xfb, 0xf5, 0x2e, 0xec, - 0xe6, 0xd5, 0xc1, 0xc1, 0xe0, 0x9d, 0xf2, 0x05, 0xcf, 0x4f, 0x04, 0x32, 0x32, 0x81, 0xda, 0x2b, - 0x62, 0x2e, 0x50, 0xbb, 0x1c, 0xae, 0xcb, 0x42, 0x20, 0xa8, 0x33, 0x9c, 0x8b, 0x4e, 0xb8, 0x8a, - 0xc0, 0xfb, 0xa0, 0x46, 0x98, 0xb5, 0x21, 0x6f, 0x6a, 0x2b, 0x13, 0xa8, 0xf6, 0x7a, 0x90, 0x0b, - 0x54, 0x23, 0xac, 0x10, 0xa8, 0xa5, 0xcc, 0x84, 0x39, 0x61, 0x8d, 0x30, 0xb8, 0x00, 0x16, 0x8e, - 0x3f, 0x32, 0x4a, 0x62, 0x3e, 0x4c, 0xf1, 0xe7, 0x05, 0x8e, 0xc7, 0x78, 0x18, 0x2f, 0xe6, 0x23, - 0x9c, 0x58, 0x2d, 0xb9, 0xf6, 0x17, 0xb9, 0x40, 0x9b, 0x15, 0xb3, 0xaf, 0x91, 0xb7, 0x92, 0x28, - 0x04, 0xda, 0xd1, 0x0f, 0xe0, 0xca, 0xbe, 0x13, 0x5e, 0x63, 0xdc, 0xab, 0x7f, 0xff, 0x85, 0x8c, - 0xe0, 0xfd, 0xd9, 0x5f, 0xdb, 0xf8, 0x96, 0xd9, 0xe6, 0x49, 0x66, 0x9b, 0xa7, 0x99, 0x6d, 0xfe, - 0xc9, 0x6c, 0xf3, 0xe7, 0xd2, 0x36, 0x4e, 0x97, 0xb6, 0x71, 0xb6, 0xb4, 0x8d, 0x0f, 0x4f, 0x27, - 0x84, 0x4f, 0x17, 0x23, 0x6f, 0x4c, 0xe7, 0xbe, 0xbc, 0xcc, 0xc7, 0x31, 0xe6, 0x5f, 0x68, 0x72, - 0xa8, 0xab, 0x88, 0x11, 0x7f, 0x42, 0x2f, 0xfd, 0x13, 0xa3, 0xa6, 0x7c, 0x37, 0xfd, 0xff, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xb0, 0x45, 0x14, 0x05, 0x8e, 0x03, 0x00, 0x00, + // 526 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xed, 0xb4, 0x49, 0x9b, 0x4b, 0x02, 0xd2, 0x81, 0x8a, 0x5b, 0x54, 0xbf, 0xe8, 0x16, + 0xcc, 0x0f, 0x39, 0xa8, 0x19, 0x40, 0x65, 0x41, 0x96, 0x90, 0x40, 0x42, 0x10, 0xb9, 0x9d, 0x58, + 0x22, 0x27, 0x1c, 0x89, 0x95, 0xc4, 0x77, 0xc4, 0x97, 0xaa, 0x6c, 0x8c, 0x2c, 0x48, 0xfc, 0x09, + 0x2c, 0xfc, 0x2f, 0x1d, 0x3b, 0x76, 0x3a, 0x81, 0xb3, 0x79, 0xf4, 0xc8, 0x84, 0x7c, 0x77, 0x51, + 0x53, 0xd1, 0x6e, 0x7e, 0xdf, 0xf7, 0xf9, 0xbe, 0xfb, 0xea, 0xde, 0x19, 0x3d, 0x8a, 0x26, 0x51, + 0x3a, 0xee, 0xcc, 0xa2, 0x24, 0xfe, 0x44, 0x53, 0xd1, 0x39, 0x39, 0x18, 0x50, 0x11, 0x75, 0x3b, + 0x29, 0x9d, 0x9f, 0xc4, 0x43, 0x4a, 0x4f, 0x39, 0x4b, 0xa9, 0xcf, 0xe7, 0x4c, 0x30, 0xbc, 0xa3, + 0x58, 0x7f, 0xc5, 0xfa, 0x86, 0xdd, 0xbb, 0x3b, 0x62, 0x23, 0xa6, 0x90, 0x4e, 0xf9, 0xa5, 0xe9, + 0x3d, 0xef, 0x86, 0xc9, 0x63, 0x21, 0x38, 0xe3, 0x22, 0x66, 0x49, 0xaa, 0x49, 0xf2, 0xab, 0x8a, + 0x5a, 0x47, 0xfa, 0xbc, 0x57, 0xea, 0x3c, 0xfc, 0x18, 0x6d, 0x72, 0x36, 0x17, 0x8e, 0xdd, 0xb6, + 0xbd, 0x56, 0x70, 0x2f, 0x97, 0xa0, 0xea, 0x42, 0x42, 0xe3, 0x4b, 0x34, 0x9b, 0x1e, 0x92, 0xb2, + 0x22, 0xa1, 0x12, 0xf1, 0x5b, 0xd4, 0xa2, 0xa7, 0x82, 0xce, 0x93, 0x68, 0xda, 0x57, 0xae, 0x8a, + 0x72, 0x3d, 0xc8, 0x25, 0x34, 0x57, 0x8d, 0x9e, 0x76, 0xdf, 0xd1, 0xee, 0x75, 0x95, 0x84, 0x57, + 0x20, 0x1c, 0xa0, 0xaa, 0x4a, 0xe5, 0x6c, 0xb4, 0x6d, 0xaf, 0x1e, 0x3c, 0xc9, 0x25, 0x68, 0xa1, + 0x90, 0xd0, 0x34, 0x87, 0xab, 0xd4, 0x7f, 0x25, 0xdc, 0x36, 0xa9, 0x7b, 0xa5, 0x30, 0x64, 0xd3, + 0x50, 0x93, 0xf8, 0x19, 0xda, 0x32, 0xf7, 0xe7, 0x6c, 0xaa, 0x29, 0xfb, 0xb9, 0x84, 0x95, 0x54, + 0x48, 0xb8, 0xa5, 0xe7, 0x18, 0x81, 0x84, 0xab, 0x16, 0xee, 0xa2, 0xda, 0x68, 0xca, 0x06, 0xd1, + 0xd4, 0xa9, 0xb6, 0x6d, 0x6f, 0x3b, 0xb8, 0x9f, 0x4b, 0x30, 0x4a, 0x21, 0xa1, 0xa5, 0x6d, 0xba, + 0x26, 0xa1, 0x69, 0xe0, 0x0e, 0xaa, 0x8e, 0x59, 0x2a, 0x52, 0xa7, 0xd6, 0xde, 0xf0, 0xea, 0xc1, + 0x6e, 0x99, 0x58, 0x09, 0x97, 0x89, 0x55, 0x49, 0x42, 0x2d, 0xe3, 0xef, 0x36, 0x6a, 0x96, 0x5b, + 0xe8, 0x9b, 0x35, 0x38, 0x5b, 0x6d, 0xdb, 0x6b, 0x1c, 0x3c, 0xf5, 0xaf, 0xdf, 0xaf, 0x7f, 0x65, + 0x37, 0xaf, 0x8f, 0x8f, 0x7b, 0xef, 0xb5, 0x2f, 0x78, 0x7e, 0x26, 0xc1, 0xca, 0x24, 0x34, 0xd6, + 0xc4, 0x5c, 0x42, 0xa3, 0x1c, 0x6e, 0xca, 0x42, 0x02, 0x36, 0x19, 0x2e, 0x45, 0x12, 0xae, 0x23, + 0xf8, 0x21, 0xaa, 0xc4, 0xdc, 0xd9, 0x56, 0x37, 0xb5, 0x9b, 0x49, 0xa8, 0xbc, 0xe9, 0xe5, 0x12, + 0x2a, 0x31, 0x2f, 0x24, 0xd4, 0xb5, 0x39, 0xe6, 0x24, 0xac, 0xc4, 0x1c, 0x2f, 0x90, 0x43, 0x93, + 0x8f, 0x9c, 0xc5, 0x89, 0xe8, 0xa7, 0xf4, 0xf3, 0x82, 0x26, 0x43, 0xda, 0x4f, 0x16, 0xb3, 0x01, + 0x9d, 0x3b, 0x75, 0xb5, 0xf6, 0x17, 0xb9, 0x84, 0x9d, 0x15, 0x73, 0x64, 0x90, 0x77, 0x8a, 0x28, + 0x24, 0xec, 0x9b, 0x07, 0x70, 0x6d, 0x9f, 0x84, 0x37, 0x18, 0x0f, 0x37, 0xbf, 0xfd, 0x04, 0x2b, + 0x78, 0x79, 0xf1, 0xc7, 0xb5, 0xbe, 0x66, 0xae, 0x7d, 0x96, 0xb9, 0xf6, 0x79, 0xe6, 0xda, 0xbf, + 0x33, 0xd7, 0xfe, 0xb1, 0x74, 0xad, 0xf3, 0xa5, 0x6b, 0x5d, 0x2c, 0x5d, 0xeb, 0x83, 0xcb, 0x27, + 0x23, 0x3f, 0x9a, 0x08, 0x3f, 0x2e, 0x7f, 0x85, 0xff, 0xde, 0xfe, 0xa0, 0xa6, 0xde, 0x47, 0xf7, + 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x6b, 0x02, 0x3d, 0x76, 0x03, 0x00, 0x00, } func (m *ServiceExpose) Marshal() (dAtA []byte, err error) { diff --git a/go/manifest/v2beta3/serviceexposes.go b/go/manifest/v2beta3/serviceexposes.go index c639fe71..268c2e52 100644 --- a/go/manifest/v2beta3/serviceexposes.go +++ b/go/manifest/v2beta3/serviceexposes.go @@ -3,7 +3,7 @@ package v2beta3 import ( "sort" - resources "github.com/akash-network/akash-api/go/node/types/resources/v1" + resources "pkg.akt.io/go/node/types/resources/v1beta4" ) type ServiceExposes []ServiceExpose diff --git a/go/node/audit/v1/audit.pb.go b/go/node/audit/v1/audit.pb.go new file mode 100644 index 00000000..3315720f --- /dev/null +++ b/go/node/audit/v1/audit.pb.go @@ -0,0 +1,1142 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1/audit.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" +) + +// 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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,4,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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_88024e67b7102602, []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() pkg_akt_io_go_node_types_attributes_v1.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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.Attributes" json:"attributes" yaml:"attributes"` +} + +func (m *AuditedAttributes) Reset() { *m = AuditedAttributes{} } +func (*AuditedAttributes) ProtoMessage() {} +func (*AuditedAttributes) Descriptor() ([]byte, []int) { + return fileDescriptor_88024e67b7102602, []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() pkg_akt_io_go_node_types_attributes_v1.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 (*AttributesResponse) ProtoMessage() {} +func (*AttributesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_88024e67b7102602, []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 (*AttributesFilters) ProtoMessage() {} +func (*AttributesFilters) Descriptor() ([]byte, []int) { + return fileDescriptor_88024e67b7102602, []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 +} + +func init() { + proto.RegisterType((*Provider)(nil), "akash.audit.v1.Provider") + proto.RegisterType((*AuditedAttributes)(nil), "akash.audit.v1.AuditedAttributes") + proto.RegisterType((*AttributesResponse)(nil), "akash.audit.v1.AttributesResponse") + proto.RegisterType((*AttributesFilters)(nil), "akash.audit.v1.AttributesFilters") +} + +func init() { proto.RegisterFile("akash/audit/v1/audit.proto", fileDescriptor_88024e67b7102602) } + +var fileDescriptor_88024e67b7102602 = []byte{ + // 434 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x53, 0x31, 0x8f, 0xd3, 0x30, + 0x18, 0x8d, 0x73, 0x70, 0xf4, 0x0c, 0x1c, 0xaa, 0xc5, 0x10, 0x7a, 0x22, 0x3e, 0xcc, 0x40, 0x27, + 0x47, 0xe1, 0x84, 0x90, 0x8e, 0xe9, 0x32, 0x30, 0xa3, 0x8c, 0x88, 0x25, 0x55, 0xac, 0x12, 0x7a, + 0xd4, 0x51, 0xec, 0x0b, 0xea, 0x5f, 0x60, 0x81, 0xb1, 0x63, 0x59, 0xe1, 0x8f, 0x74, 0xec, 0xc8, + 0x64, 0x50, 0xbb, 0xa0, 0x8c, 0xf9, 0x05, 0x28, 0x76, 0xd2, 0x24, 0x02, 0x24, 0x36, 0xd8, 0xec, + 0xf7, 0xbe, 0xef, 0xe5, 0x7d, 0xef, 0x8b, 0xe1, 0x28, 0x9a, 0x45, 0xe2, 0xb5, 0x17, 0x5d, 0xc5, + 0x89, 0xf4, 0x72, 0xdf, 0x1c, 0x68, 0x9a, 0x71, 0xc9, 0xd1, 0xb1, 0xe6, 0xa8, 0x81, 0x72, 0x7f, + 0x74, 0x77, 0xca, 0xa7, 0x5c, 0x53, 0x5e, 0x75, 0x32, 0x55, 0xa3, 0xb1, 0x51, 0x98, 0x44, 0x82, + 0x79, 0x91, 0x94, 0x59, 0x32, 0xb9, 0x92, 0x4c, 0x68, 0xad, 0xe6, 0x66, 0x2a, 0xc9, 0xd2, 0x86, + 0x83, 0x17, 0x19, 0xcf, 0x93, 0x98, 0x65, 0xc8, 0x83, 0xd7, 0xf9, 0xbb, 0x39, 0xcb, 0x1c, 0x70, + 0x0a, 0xc6, 0x47, 0xc1, 0xbd, 0x42, 0x61, 0x03, 0x94, 0x0a, 0xdf, 0x5a, 0x44, 0x6f, 0x2f, 0xcf, + 0x89, 0xbe, 0x92, 0xd0, 0xc0, 0xe8, 0x29, 0xbc, 0xa1, 0x9d, 0xf0, 0xcc, 0xb1, 0x75, 0xcb, 0xfd, + 0x42, 0xe1, 0x06, 0x2a, 0x15, 0x3e, 0x36, 0x4d, 0x35, 0x40, 0xc2, 0x86, 0x42, 0x9f, 0x00, 0x84, + 0xad, 0x31, 0xe7, 0xda, 0xe9, 0xc1, 0xf8, 0xe6, 0xe3, 0x87, 0xd4, 0x0c, 0x57, 0xd9, 0xa6, 0x2d, + 0x4b, 0x73, 0x9f, 0x5e, 0x34, 0xb7, 0xe0, 0xd5, 0x5a, 0x61, 0xab, 0x50, 0xb8, 0xd3, 0x5e, 0x2a, + 0x3c, 0xac, 0x3f, 0xb4, 0xc7, 0xc8, 0xe7, 0x6f, 0xd8, 0x4f, 0x67, 0x53, 0x1a, 0xcd, 0x24, 0x4d, + 0xaa, 0x70, 0xbc, 0x39, 0x8f, 0x99, 0x27, 0x17, 0x29, 0x13, 0xfd, 0x4c, 0x5a, 0x71, 0x11, 0x76, + 0x54, 0xc9, 0x17, 0x1b, 0x0e, 0x2f, 0x2a, 0xbf, 0x2c, 0x6e, 0x2b, 0xfe, 0x5d, 0x46, 0x07, 0xff, + 0x61, 0x46, 0xe7, 0x83, 0xe5, 0x0a, 0x5b, 0x3f, 0x56, 0xd8, 0x22, 0xef, 0x01, 0x44, 0x9d, 0x22, + 0x26, 0x52, 0x3e, 0x17, 0x0c, 0xbd, 0xe9, 0xcd, 0x00, 0xf4, 0x0c, 0x0f, 0x68, 0xff, 0x27, 0xa6, + 0xbf, 0xa4, 0x1c, 0x3c, 0xfa, 0xcb, 0x09, 0xfe, 0x60, 0xe6, 0x03, 0x80, 0xc3, 0x56, 0xed, 0x79, + 0x72, 0x29, 0x59, 0x26, 0xd0, 0x33, 0x38, 0xa8, 0xb3, 0x35, 0x4e, 0x8e, 0x02, 0x5c, 0x28, 0xbc, + 0xc7, 0x4a, 0x85, 0xef, 0xf4, 0x76, 0x21, 0x48, 0xb8, 0x27, 0xd1, 0x19, 0x3c, 0xd4, 0xfb, 0x14, + 0x8e, 0xad, 0x5b, 0x4f, 0x0a, 0x85, 0x6b, 0xa4, 0x54, 0xf8, 0x76, 0x67, 0xf3, 0x82, 0x84, 0x35, + 0xd1, 0x3a, 0x0a, 0x9e, 0xac, 0xb7, 0x2e, 0xd8, 0x6c, 0x5d, 0xf0, 0x7d, 0xeb, 0x82, 0x8f, 0x3b, + 0xd7, 0xda, 0xec, 0x5c, 0xeb, 0xeb, 0xce, 0xb5, 0x5e, 0x9e, 0xfc, 0x66, 0x03, 0xcd, 0xd3, 0x9f, + 0x1c, 0xea, 0x57, 0x7a, 0xf6, 0x33, 0x00, 0x00, 0xff, 0xff, 0x73, 0x3c, 0x99, 0x60, 0x13, 0x04, + 0x00, 0x00, +} + +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 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 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, v1.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, v1.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 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/v1/codec.go similarity index 86% rename from go/node/audit/v1beta3/codec.go rename to go/node/audit/v1/codec.go index fccd976f..53592d0a 100644 --- a/go/node/audit/v1beta3/codec.go +++ b/go/node/audit/v1/codec.go @@ -1,15 +1,14 @@ -package v1beta3 +package v1 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() + // amino = codec.NewLegacyAmino() // ModuleCdc references the global x/audit module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is @@ -20,11 +19,11 @@ var ( ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ) -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} +// func init() { +// RegisterLegacyAminoCodec(amino) +// cryptocodec.RegisterCrypto(amino) +// amino.Seal() +// } // RegisterLegacyAminoCodec register concrete types on codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { diff --git a/go/node/audit/v1beta4/errors.go b/go/node/audit/v1/errors.go similarity index 88% rename from go/node/audit/v1beta4/errors.go rename to go/node/audit/v1/errors.go index 17ab735f..e49ba3e2 100644 --- a/go/node/audit/v1beta4/errors.go +++ b/go/node/audit/v1/errors.go @@ -1,7 +1,7 @@ -package v1beta4 +package v1 import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) const ( diff --git a/go/node/audit/v1/event.go b/go/node/audit/v1/event.go new file mode 100644 index 00000000..da7e0802 --- /dev/null +++ b/go/node/audit/v1/event.go @@ -0,0 +1,118 @@ +package v1 + +// import ( +// sdk "github.com/cosmos/cosmos-sdk/types" +// +// "pkg.akt.io/go/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/v1/event.pb.go b/go/node/audit/v1/event.pb.go new file mode 100644 index 00000000..19685255 --- /dev/null +++ b/go/node/audit/v1/event.pb.go @@ -0,0 +1,597 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1/event.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventTrustedAuditorCreated defines an SDK message for signing a provider attributes +type EventTrustedAuditorCreated 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"` +} + +func (m *EventTrustedAuditorCreated) Reset() { *m = EventTrustedAuditorCreated{} } +func (m *EventTrustedAuditorCreated) String() string { return proto.CompactTextString(m) } +func (*EventTrustedAuditorCreated) ProtoMessage() {} +func (*EventTrustedAuditorCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_18857e57236f769d, []int{0} +} +func (m *EventTrustedAuditorCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTrustedAuditorCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTrustedAuditorCreated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTrustedAuditorCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTrustedAuditorCreated.Merge(m, src) +} +func (m *EventTrustedAuditorCreated) XXX_Size() int { + return m.Size() +} +func (m *EventTrustedAuditorCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventTrustedAuditorCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTrustedAuditorCreated proto.InternalMessageInfo + +func (m *EventTrustedAuditorCreated) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *EventTrustedAuditorCreated) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +// EventTrustedAuditorCreated defines an SDK message for signing a provider attributes +type EventTrustedAuditorDeleted 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"` +} + +func (m *EventTrustedAuditorDeleted) Reset() { *m = EventTrustedAuditorDeleted{} } +func (m *EventTrustedAuditorDeleted) String() string { return proto.CompactTextString(m) } +func (*EventTrustedAuditorDeleted) ProtoMessage() {} +func (*EventTrustedAuditorDeleted) Descriptor() ([]byte, []int) { + return fileDescriptor_18857e57236f769d, []int{1} +} +func (m *EventTrustedAuditorDeleted) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTrustedAuditorDeleted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTrustedAuditorDeleted.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventTrustedAuditorDeleted) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTrustedAuditorDeleted.Merge(m, src) +} +func (m *EventTrustedAuditorDeleted) XXX_Size() int { + return m.Size() +} +func (m *EventTrustedAuditorDeleted) XXX_DiscardUnknown() { + xxx_messageInfo_EventTrustedAuditorDeleted.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTrustedAuditorDeleted proto.InternalMessageInfo + +func (m *EventTrustedAuditorDeleted) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *EventTrustedAuditorDeleted) GetAuditor() string { + if m != nil { + return m.Auditor + } + return "" +} + +func init() { + proto.RegisterType((*EventTrustedAuditorCreated)(nil), "akash.audit.v1.EventTrustedAuditorCreated") + proto.RegisterType((*EventTrustedAuditorDeleted)(nil), "akash.audit.v1.EventTrustedAuditorDeleted") +} + +func init() { proto.RegisterFile("akash/audit/v1/event.proto", fileDescriptor_18857e57236f769d) } + +var fileDescriptor_18857e57236f769d = []byte{ + // 267 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, + 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xe9, 0x81, 0xe5, 0xf4, 0xca, 0x0c, + 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x64, 0x72, + 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x48, 0x29, 0x6d, 0x63, 0xe4, 0x92, + 0x72, 0x05, 0x19, 0x18, 0x52, 0x54, 0x5a, 0x5c, 0x92, 0x9a, 0xe2, 0x08, 0x32, 0x29, 0xbf, 0xc8, + 0xb9, 0x28, 0x35, 0xb1, 0x24, 0x35, 0x45, 0xc8, 0x9d, 0x8b, 0x35, 0xbf, 0x3c, 0x2f, 0xb5, 0x48, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0xc9, 0xf0, 0xd5, 0x3d, 0x79, 0x88, 0xc0, 0xa7, 0x7b, 0xf2, + 0x3c, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0x60, 0xae, 0xd2, 0xa5, 0x2d, 0xba, 0x22, 0x50, 0x83, + 0x1d, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x83, 0x20, 0xca, + 0x85, 0xfc, 0xb9, 0xd8, 0x13, 0x21, 0x46, 0x4b, 0x30, 0x81, 0x8d, 0x32, 0x7d, 0x75, 0x4f, 0x1e, + 0x26, 0xf4, 0xe9, 0x9e, 0x3c, 0x1f, 0xc4, 0x30, 0xa8, 0x00, 0x6e, 0xe3, 0x60, 0x5a, 0x70, 0x39, + 0xdc, 0x25, 0x35, 0x27, 0x75, 0x50, 0x3b, 0xdc, 0xc9, 0xf4, 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, 0xa4, 0x0b, 0xb2, 0xd3, 0xf5, 0x12, 0xb3, 0x4b, 0xf4, 0x32, 0x41, 0xb1, + 0xa7, 0x9f, 0x97, 0x9f, 0x92, 0x0a, 0x8f, 0xf5, 0x24, 0x36, 0x70, 0x7c, 0x19, 0x03, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xb6, 0x3b, 0x11, 0x61, 0x0e, 0x02, 0x00, 0x00, +} + +func (m *EventTrustedAuditorCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTrustedAuditorCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTrustedAuditorCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintEvent(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 = encodeVarintEvent(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTrustedAuditorDeleted) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventTrustedAuditorDeleted) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTrustedAuditorDeleted) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintEvent(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 = encodeVarintEvent(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventTrustedAuditorCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventTrustedAuditorDeleted) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventTrustedAuditorCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTrustedAuditorCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTrustedAuditorCreated: 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTrustedAuditorDeleted) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTrustedAuditorDeleted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTrustedAuditorDeleted: 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 ErrIntOverflowEvent + } + 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 ErrInvalidLengthEvent + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auditor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta1/genesis.pb.go b/go/node/audit/v1/genesis.pb.go similarity index 79% rename from go/node/audit/v1beta1/genesis.pb.go rename to go/node/audit/v1/genesis.pb.go index d6b05d39..3ac91a5a 100644 --- a/go/node/audit/v1beta1/genesis.pb.go +++ b/go/node/audit/v1/genesis.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta1/genesis.proto +// source: akash/audit/v1/genesis.proto -package v1beta1 +package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -32,7 +32,7 @@ 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_c832388e2ecc1d8d, []int{0} + return fileDescriptor_94ddb7af951b07fa, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -69,28 +69,27 @@ func (m *GenesisState) GetAttributes() []AuditedAttributes { } func init() { - proto.RegisterType((*GenesisState)(nil), "akash.audit.v1beta1.GenesisState") + proto.RegisterType((*GenesisState)(nil), "akash.audit.v1.GenesisState") } -func init() { proto.RegisterFile("akash/audit/v1beta1/genesis.proto", fileDescriptor_c832388e2ecc1d8d) } +func init() { proto.RegisterFile("akash/audit/v1/genesis.proto", fileDescriptor_94ddb7af951b07fa) } -var fileDescriptor_c832388e2ecc1d8d = []byte{ - // 230 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, 0xd4, - 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, 0xc9, 0xfd, 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, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xf3, - 0xcb, 0x8a, 0x92, 0x73, 0xb2, 0xf5, 0x21, 0xbe, 0xa9, 0x80, 0xfa, 0xa7, 0xa4, 0xb2, 0x20, 0xb5, - 0x18, 0xe6, 0xab, 0x24, 0x36, 0xb0, 0x87, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x3f, - 0x6b, 0x0a, 0x41, 0x01, 0x00, 0x00, +var fileDescriptor_94ddb7af951b07fa = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xea, 0x81, 0x65, 0xf5, + 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, + 0x14, 0x9a, 0x19, 0x10, 0xe5, 0x60, 0x39, 0xa5, 0x2a, 0x2e, 0x1e, 0x77, 0x88, 0x91, 0xc1, 0x25, + 0x89, 0x25, 0xa9, 0x42, 0x59, 0x5c, 0x5c, 0x89, 0x25, 0x25, 0x45, 0x99, 0x49, 0xa5, 0x25, 0xa9, + 0xc5, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x8a, 0x7a, 0xa8, 0xd6, 0xe8, 0x39, 0x82, 0x18, + 0xa9, 0x29, 0x8e, 0x70, 0x85, 0x4e, 0xea, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x8f, 0xa4, + 0xf9, 0xd3, 0x3d, 0x79, 0xc1, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, 0x84, 0x98, 0x52, 0x10, 0x92, + 0x02, 0x27, 0xd3, 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, 0x92, 0x2e, 0xc8, + 0x4e, 0xd7, 0x4b, 0xcc, 0x2e, 0xd1, 0xcb, 0x04, 0x79, 0x44, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0xee, + 0xfc, 0x24, 0x36, 0xb0, 0xcb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x25, 0x53, 0x40, 0xd7, + 0x1b, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/audit/v1beta1/key.go b/go/node/audit/v1/key.go similarity index 94% rename from go/node/audit/v1beta1/key.go rename to go/node/audit/v1/key.go index a51b4703..edeca02d 100644 --- a/go/node/audit/v1beta1/key.go +++ b/go/node/audit/v1/key.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 const ( // ModuleName is the module name constant used in many places diff --git a/go/node/audit/v1/msg.pb.go b/go/node/audit/v1/msg.pb.go new file mode 100644 index 00000000..9c86843d --- /dev/null +++ b/go/node/audit/v1/msg.pb.go @@ -0,0 +1,968 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1/msg.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" +) + +// 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 + +// 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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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_9d1c9151241de91a, []int{0} +} +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() pkg_akt_io_go_node_types_attributes_v1.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_9d1c9151241de91a, []int{1} +} +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_9d1c9151241de91a, []int{2} +} +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_9d1c9151241de91a, []int{3} +} +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((*MsgSignProviderAttributes)(nil), "akash.audit.v1.MsgSignProviderAttributes") + proto.RegisterType((*MsgSignProviderAttributesResponse)(nil), "akash.audit.v1.MsgSignProviderAttributesResponse") + proto.RegisterType((*MsgDeleteProviderAttributes)(nil), "akash.audit.v1.MsgDeleteProviderAttributes") + proto.RegisterType((*MsgDeleteProviderAttributesResponse)(nil), "akash.audit.v1.MsgDeleteProviderAttributesResponse") +} + +func init() { proto.RegisterFile("akash/audit/v1/msg.proto", fileDescriptor_9d1c9151241de91a) } + +var fileDescriptor_9d1c9151241de91a = []byte{ + // 441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x53, 0x4f, 0x6b, 0xd4, 0x40, + 0x1c, 0x4d, 0x5a, 0xff, 0xd0, 0xa9, 0x2c, 0x18, 0x0a, 0x4d, 0xb7, 0x90, 0xa9, 0x59, 0x84, 0x45, + 0x71, 0x42, 0x94, 0x5e, 0x7a, 0x6b, 0x10, 0x3c, 0x15, 0x25, 0xbd, 0x89, 0x20, 0x59, 0x33, 0x8c, + 0x21, 0xdd, 0x4c, 0x98, 0x99, 0x46, 0xf6, 0xea, 0x27, 0xf0, 0x23, 0xe8, 0xd5, 0x93, 0x07, 0x3f, + 0xc4, 0x1e, 0x17, 0x4f, 0x9e, 0x46, 0xd9, 0x3d, 0xa8, 0x39, 0x06, 0x3f, 0x80, 0x64, 0x26, 0xc9, + 0xee, 0xa2, 0xeb, 0xbd, 0xb7, 0xbc, 0xf7, 0x7e, 0xf3, 0x32, 0xef, 0xfd, 0x12, 0x60, 0x47, 0x69, + 0xc4, 0x5f, 0x7b, 0xd1, 0x65, 0x9c, 0x08, 0xaf, 0xf0, 0xbd, 0x31, 0x27, 0x28, 0x67, 0x54, 0x50, + 0xab, 0xa7, 0x14, 0xa4, 0x14, 0x54, 0xf8, 0xfd, 0x3d, 0x42, 0x09, 0x55, 0x92, 0x57, 0x3f, 0xe9, + 0xa9, 0xfe, 0xc1, 0x2b, 0xca, 0xc7, 0x94, 0xbf, 0xd4, 0x82, 0x06, 0x8d, 0xb4, 0xaf, 0x51, 0x6d, + 0xb9, 0xe6, 0xdc, 0x1f, 0xea, 0x77, 0x8e, 0x22, 0x8e, 0xbd, 0x48, 0x08, 0x96, 0x8c, 0x2e, 0x05, + 0xe6, 0xf5, 0x4c, 0x87, 0xf4, 0xa4, 0xfb, 0x6b, 0x0b, 0x1c, 0x9c, 0x71, 0x72, 0x9e, 0x90, 0xec, + 0x19, 0xa3, 0x45, 0x12, 0x63, 0x76, 0xda, 0x1d, 0xb0, 0x9e, 0x80, 0xeb, 0xf4, 0x4d, 0x86, 0x99, + 0x6d, 0x1e, 0x99, 0xc3, 0x9d, 0xc0, 0x2f, 0x25, 0xd4, 0x44, 0x25, 0xe1, 0xad, 0x49, 0x34, 0xbe, + 0x38, 0x71, 0x15, 0x74, 0xbf, 0x7c, 0x7e, 0xb0, 0xd7, 0x5c, 0xed, 0x34, 0x8e, 0x19, 0xe6, 0xfc, + 0x5c, 0xb0, 0x24, 0x23, 0xa1, 0x1e, 0xb7, 0x9e, 0x82, 0x9b, 0x2a, 0x26, 0x65, 0xf6, 0x96, 0xb2, + 0x3a, 0x2e, 0x25, 0x6c, 0xa9, 0x4a, 0xc2, 0x9e, 0x36, 0x6b, 0x88, 0xcd, 0x76, 0xed, 0x11, 0xeb, + 0x83, 0x09, 0xc0, 0x32, 0x99, 0xbd, 0x7d, 0xb4, 0x3d, 0xdc, 0x7d, 0x38, 0x40, 0xba, 0xd1, 0x3a, + 0x37, 0x5a, 0xaa, 0xa8, 0xf0, 0x51, 0x17, 0x2a, 0x78, 0x31, 0x95, 0xd0, 0x28, 0x25, 0x5c, 0x39, + 0x5e, 0x49, 0x78, 0xbb, 0xb9, 0x40, 0xc7, 0xb9, 0x1f, 0xbf, 0x41, 0x3f, 0x4f, 0x09, 0x8a, 0x52, + 0x81, 0x92, 0x7a, 0x23, 0x5e, 0x46, 0x63, 0xec, 0x89, 0x49, 0x8e, 0xf9, 0x7a, 0xa9, 0x4b, 0x73, + 0x1e, 0xae, 0xb8, 0x9e, 0xf4, 0x7e, 0xbe, 0x87, 0xc6, 0xdb, 0x1f, 0x9f, 0xee, 0xe9, 0x12, 0xdc, + 0x01, 0xb8, 0xb3, 0xb1, 0xea, 0x10, 0xf3, 0x9c, 0x66, 0x1c, 0xbb, 0xbf, 0x4d, 0x70, 0x78, 0xc6, + 0xc9, 0x63, 0x7c, 0x81, 0x05, 0xbe, 0x52, 0x2b, 0xb9, 0x0f, 0xae, 0xa5, 0x78, 0xa2, 0x77, 0xb1, + 0x13, 0xec, 0x97, 0x12, 0x2a, 0x5c, 0x49, 0xb8, 0xab, 0xad, 0x6a, 0xe4, 0x86, 0x8a, 0xfc, 0xab, + 0x9b, 0xbb, 0x60, 0xf0, 0x9f, 0xd4, 0x6d, 0x3b, 0xc1, 0xf1, 0x74, 0xee, 0x98, 0xb3, 0xb9, 0x63, + 0x7e, 0x9f, 0x3b, 0xe6, 0xbb, 0x85, 0x63, 0xcc, 0x16, 0x8e, 0xf1, 0x75, 0xe1, 0x18, 0xcf, 0x0f, + 0xff, 0xb1, 0xab, 0xf6, 0x9f, 0x1b, 0xdd, 0x50, 0x1f, 0xfb, 0xa3, 0x3f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x22, 0x11, 0x04, 0x1a, 0x8c, 0x03, 0x00, 0x00, +} + +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 = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auditor) > 0 { + i -= len(m.Auditor) + copy(dAtA[i:], m.Auditor) + i = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovMsg(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMsg(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 + sovMsg(uint64(l)) + } + l = len(m.Auditor) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Keys) > 0 { + for _, s := range m.Keys { + l = len(s) + n += 1 + l + sovMsg(uint64(l)) + } + } + return n +} + +func (m *MsgDeleteProviderAttributesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1.Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/audit/v1beta4/msgs.go b/go/node/audit/v1/msgs.go similarity index 85% rename from go/node/audit/v1beta4/msgs.go rename to go/node/audit/v1/msgs.go index 2f7f7645..9cd4e7f3 100644 --- a/go/node/audit/v1beta4/msgs.go +++ b/go/node/audit/v1/msgs.go @@ -1,4 +1,4 @@ -package v1beta4 +package v1 import ( sdk "github.com/cosmos/cosmos-sdk/types" @@ -29,11 +29,11 @@ func (m MsgSignProviderAttributes) Type() string { // 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") + return sdkerrors.ErrInvalidAddress.Wrap("MsgCreate: Invalid Owner Address") } if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + return sdkerrors.ErrInvalidAddress.Wrap("MsgCreate: Invalid Auditor Address") } return nil @@ -68,11 +68,11 @@ func (m MsgDeleteProviderAttributes) Type() string { // 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") + return sdkerrors.ErrInvalidAddress.Wrap("MsgCreate: Invalid Owner Address") } if _, err := sdk.AccAddressFromBech32(m.Auditor); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Auditor Address") + return sdkerrors.ErrInvalidAddress.Wrap("MsgCreate: Invalid Auditor Address") } return nil diff --git a/go/node/audit/v1beta1/query.pb.go b/go/node/audit/v1/query.pb.go similarity index 89% rename from go/node/audit/v1beta1/query.pb.go rename to go/node/audit/v1/query.pb.go index eaf4661c..f1a419f6 100644 --- a/go/node/audit/v1beta1/query.pb.go +++ b/go/node/audit/v1/query.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta1/query.proto +// source: akash/audit/v1/query.proto -package v1beta1 +package v1 import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -40,7 +40,7 @@ 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_57c276f283e450c2, []int{0} + return fileDescriptor_966c8e0ace08c293, []int{0} } func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ 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_57c276f283e450c2, []int{1} + return fileDescriptor_966c8e0ace08c293, []int{1} } func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -145,7 +145,7 @@ func (m *QueryAllProvidersAttributesRequest) Reset() { *m = QueryAllProv func (m *QueryAllProvidersAttributesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllProvidersAttributesRequest) ProtoMessage() {} func (*QueryAllProvidersAttributesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57c276f283e450c2, []int{2} + return fileDescriptor_966c8e0ace08c293, []int{2} } func (m *QueryAllProvidersAttributesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ func (m *QueryProviderAttributesRequest) Reset() { *m = QueryProviderAtt func (m *QueryProviderAttributesRequest) String() string { return proto.CompactTextString(m) } func (*QueryProviderAttributesRequest) ProtoMessage() {} func (*QueryProviderAttributesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57c276f283e450c2, []int{3} + return fileDescriptor_966c8e0ace08c293, []int{3} } func (m *QueryProviderAttributesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +244,7 @@ func (m *QueryProviderAuditorRequest) Reset() { *m = QueryProviderAudito func (m *QueryProviderAuditorRequest) String() string { return proto.CompactTextString(m) } func (*QueryProviderAuditorRequest) ProtoMessage() {} func (*QueryProviderAuditorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57c276f283e450c2, []int{4} + return fileDescriptor_966c8e0ace08c293, []int{4} } func (m *QueryProviderAuditorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -297,7 +297,7 @@ func (m *QueryAuditorAttributesRequest) Reset() { *m = QueryAuditorAttri func (m *QueryAuditorAttributesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAuditorAttributesRequest) ProtoMessage() {} func (*QueryAuditorAttributesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_57c276f283e450c2, []int{5} + return fileDescriptor_966c8e0ace08c293, []int{5} } func (m *QueryAuditorAttributesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -341,53 +341,53 @@ func (m *QueryAuditorAttributesRequest) GetPagination() *query.PageRequest { } func init() { - proto.RegisterType((*QueryProvidersResponse)(nil), "akash.audit.v1beta1.QueryProvidersResponse") - proto.RegisterType((*QueryProviderRequest)(nil), "akash.audit.v1beta1.QueryProviderRequest") - proto.RegisterType((*QueryAllProvidersAttributesRequest)(nil), "akash.audit.v1beta1.QueryAllProvidersAttributesRequest") - proto.RegisterType((*QueryProviderAttributesRequest)(nil), "akash.audit.v1beta1.QueryProviderAttributesRequest") - proto.RegisterType((*QueryProviderAuditorRequest)(nil), "akash.audit.v1beta1.QueryProviderAuditorRequest") - proto.RegisterType((*QueryAuditorAttributesRequest)(nil), "akash.audit.v1beta1.QueryAuditorAttributesRequest") -} - -func init() { proto.RegisterFile("akash/audit/v1beta1/query.proto", fileDescriptor_57c276f283e450c2) } - -var fileDescriptor_57c276f283e450c2 = []byte{ - // 559 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0xc7, 0xeb, 0xa2, 0x82, 0xea, 0x9d, 0x66, 0xaa, 0xa9, 0x14, 0x96, 0x56, 0x39, 0x40, 0x35, - 0xc0, 0xde, 0x32, 0xc4, 0x04, 0x17, 0xb4, 0x1d, 0xb6, 0x13, 0x08, 0x72, 0xe4, 0xe6, 0x74, 0x56, - 0x16, 0x2d, 0x8b, 0xb3, 0xd8, 0x29, 0x4c, 0x68, 0x48, 0xf0, 0x04, 0x48, 0xbc, 0x05, 0xe2, 0x02, - 0x57, 0x5e, 0x60, 0xc7, 0x49, 0x5c, 0x38, 0x0d, 0xd4, 0xf2, 0x20, 0x28, 0x76, 0x92, 0x36, 0x4b, - 0x4b, 0xbb, 0xc1, 0xad, 0x69, 0xfe, 0xdf, 0xff, 0xff, 0xfb, 0x3e, 0x7f, 0x31, 0x6c, 0xd3, 0x7d, - 0x2a, 0xf6, 0x08, 0x8d, 0x77, 0x3d, 0x49, 0xfa, 0x6b, 0x0e, 0x93, 0x74, 0x8d, 0x1c, 0xc6, 0x2c, - 0x3a, 0xc2, 0x61, 0xc4, 0x25, 0x47, 0xd7, 0x95, 0x00, 0x2b, 0x01, 0x4e, 0x05, 0xad, 0x86, 0xcb, - 0x5d, 0xae, 0xde, 0x93, 0xe4, 0x97, 0x96, 0xb6, 0x6e, 0xb9, 0x9c, 0xbb, 0x3e, 0x23, 0x34, 0xf4, - 0x08, 0x0d, 0x02, 0x2e, 0xa9, 0xf4, 0x78, 0x20, 0xd2, 0xb7, 0x2b, 0x3d, 0x2e, 0x0e, 0xb8, 0x20, - 0x0e, 0x15, 0x4c, 0x27, 0xe4, 0x79, 0x21, 0x75, 0xbd, 0x40, 0x89, 0x53, 0xed, 0x44, 0x2a, 0x8d, - 0xa0, 0x04, 0xe6, 0x17, 0x00, 0x97, 0x5e, 0x24, 0x1e, 0xcf, 0x23, 0xde, 0xf7, 0x76, 0x59, 0x24, - 0x6c, 0x26, 0x42, 0x1e, 0x08, 0x86, 0x9e, 0xc1, 0x7a, 0x98, 0xfd, 0xd9, 0x04, 0x9d, 0x2b, 0xdd, - 0x05, 0x6b, 0x19, 0x4f, 0x68, 0x02, 0x67, 0xa5, 0x5b, 0x8b, 0x27, 0x67, 0xed, 0xca, 0xa7, 0x9f, - 0xed, 0xfa, 0xc8, 0x6c, 0x64, 0x81, 0x76, 0x20, 0x1c, 0xf1, 0x35, 0xab, 0x1d, 0xd0, 0x5d, 0xb0, - 0xee, 0x60, 0xdd, 0x0c, 0x4e, 0x9a, 0xc1, 0x7a, 0x5c, 0xb9, 0x2d, 0x75, 0x59, 0x06, 0x63, 0x8f, - 0x95, 0x9a, 0xdb, 0xb0, 0x51, 0x40, 0xb6, 0xd9, 0x61, 0xcc, 0x84, 0x44, 0x4d, 0x78, 0x4d, 0x81, - 0xf1, 0xa8, 0x09, 0x3a, 0xa0, 0x5b, 0xb7, 0xb3, 0x47, 0xd4, 0x80, 0x35, 0xfe, 0x2a, 0x60, 0x91, - 0x4a, 0xad, 0xdb, 0xfa, 0xc1, 0xf4, 0xa1, 0xa9, 0x7c, 0x36, 0x7d, 0x3f, 0x07, 0xde, 0x94, 0x32, - 0xf2, 0x9c, 0x58, 0x32, 0x91, 0xb9, 0x6e, 0x17, 0xb0, 0x81, 0xc2, 0xbe, 0x3d, 0x13, 0x5b, 0xd5, - 0x16, 0xa8, 0xdf, 0x42, 0xa3, 0x40, 0x5d, 0x4e, 0xca, 0x29, 0xc1, 0x18, 0xe5, 0xb9, 0xfc, 0xea, - 0xa5, 0xf3, 0x9f, 0xc2, 0x9b, 0xc5, 0x7c, 0x3d, 0x9b, 0xcb, 0x0e, 0xef, 0x1d, 0x80, 0xcb, 0x7a, - 0x7a, 0x5a, 0x56, 0x6e, 0x67, 0xba, 0xe3, 0x7f, 0x6a, 0xc9, 0x3a, 0xab, 0xc1, 0x9a, 0x62, 0x40, - 0x5f, 0x01, 0x5c, 0x9a, 0x7c, 0x8c, 0x68, 0x63, 0xe2, 0xce, 0xce, 0x3e, 0xf8, 0xd6, 0xdd, 0xe9, - 0x85, 0xa5, 0x8f, 0xc5, 0xb4, 0xde, 0x7f, 0xff, 0xfd, 0xb1, 0x7a, 0x0f, 0xad, 0x90, 0xa9, 0x5f, - 0x1c, 0xa1, 0x79, 0x04, 0xf1, 0x3d, 0x21, 0x13, 0x68, 0x54, 0xde, 0x06, 0xb4, 0x3e, 0x3b, 0xf7, - 0x1f, 0x61, 0x1f, 0x2b, 0xd8, 0x07, 0xc8, 0x9a, 0x0f, 0xf6, 0x8d, 0x3a, 0xf1, 0x63, 0x0d, 0xfd, - 0x0d, 0xc0, 0x1b, 0xe7, 0x56, 0x68, 0x8c, 0x7d, 0x75, 0x0e, 0xf6, 0xc2, 0xde, 0x5d, 0x0c, 0xfc, - 0x89, 0x02, 0x7f, 0x84, 0x36, 0xe6, 0x04, 0x4f, 0x17, 0xee, 0x38, 0x6b, 0x01, 0x7d, 0x06, 0x70, - 0xb1, 0x4c, 0x6d, 0xfd, 0x65, 0x45, 0xa6, 0x6c, 0xf7, 0xc5, 0xb8, 0x1f, 0x2a, 0xee, 0x55, 0x84, - 0x53, 0xee, 0xec, 0x52, 0x2c, 0xa2, 0xf3, 0x68, 0x8c, 0x38, 0x19, 0xf6, 0xd6, 0xce, 0xc9, 0xc0, - 0x00, 0xa7, 0x03, 0x03, 0xfc, 0x1a, 0x18, 0xe0, 0xc3, 0xd0, 0xa8, 0x9c, 0x0e, 0x8d, 0xca, 0x8f, - 0xa1, 0x51, 0x79, 0x79, 0xdf, 0xf5, 0xe4, 0x5e, 0xec, 0xe0, 0x1e, 0x3f, 0x20, 0xbc, 0x1f, 0xf5, - 0xfc, 0xfd, 0xd4, 0xfa, 0x75, 0x3a, 0x06, 0x79, 0x14, 0x32, 0x91, 0xf9, 0x3b, 0x57, 0xd5, 0x6d, - 0xbf, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xa4, 0x67, 0xcf, 0xa6, 0x06, 0x00, 0x00, + proto.RegisterType((*QueryProvidersResponse)(nil), "akash.audit.v1.QueryProvidersResponse") + proto.RegisterType((*QueryProviderRequest)(nil), "akash.audit.v1.QueryProviderRequest") + proto.RegisterType((*QueryAllProvidersAttributesRequest)(nil), "akash.audit.v1.QueryAllProvidersAttributesRequest") + proto.RegisterType((*QueryProviderAttributesRequest)(nil), "akash.audit.v1.QueryProviderAttributesRequest") + proto.RegisterType((*QueryProviderAuditorRequest)(nil), "akash.audit.v1.QueryProviderAuditorRequest") + proto.RegisterType((*QueryAuditorAttributesRequest)(nil), "akash.audit.v1.QueryAuditorAttributesRequest") +} + +func init() { proto.RegisterFile("akash/audit/v1/query.proto", fileDescriptor_966c8e0ace08c293) } + +var fileDescriptor_966c8e0ace08c293 = []byte{ + // 548 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0xeb, 0xa2, 0x82, 0xea, 0x49, 0x48, 0xb3, 0xaa, 0x29, 0x74, 0x90, 0x55, 0x91, 0xd8, + 0x0a, 0x53, 0x6d, 0x25, 0xb0, 0x0b, 0xb7, 0xed, 0x30, 0xc4, 0x01, 0x69, 0xe4, 0xc8, 0xcd, 0xa5, + 0x56, 0x88, 0x1a, 0xe2, 0x2c, 0x76, 0x8b, 0x10, 0x1a, 0x12, 0x7c, 0x02, 0x24, 0xce, 0x5c, 0xe0, + 0x86, 0xf6, 0x41, 0x76, 0x9c, 0xc4, 0x85, 0x13, 0xa0, 0x96, 0x0f, 0x82, 0x62, 0x27, 0x69, 0xd3, + 0x74, 0xcb, 0x54, 0xed, 0x16, 0xe7, 0x79, 0xf9, 0xff, 0x9e, 0x17, 0x1b, 0xb6, 0xe9, 0x90, 0x8a, + 0xd7, 0x84, 0x8e, 0x06, 0xbe, 0x24, 0x63, 0x9b, 0x1c, 0x8f, 0x58, 0xfc, 0x0e, 0x47, 0x31, 0x97, + 0x1c, 0xdd, 0x56, 0x36, 0xac, 0x6c, 0x78, 0x6c, 0xb7, 0x5b, 0x1e, 0xf7, 0xb8, 0x32, 0x91, 0xe4, + 0x4b, 0x7b, 0xb5, 0xef, 0x7a, 0x9c, 0x7b, 0x01, 0x23, 0x34, 0xf2, 0x09, 0x0d, 0x43, 0x2e, 0xa9, + 0xf4, 0x79, 0x28, 0x52, 0xeb, 0xc3, 0x57, 0x5c, 0xbc, 0xe1, 0x82, 0xf4, 0xa9, 0x60, 0x3a, 0x39, + 0x19, 0xdb, 0x7d, 0x26, 0xa9, 0x4d, 0x22, 0xea, 0xf9, 0xa1, 0x72, 0x4e, 0x7d, 0x17, 0x59, 0xb4, + 0xb0, 0xb2, 0x59, 0xa7, 0x00, 0x6e, 0xbc, 0x48, 0xc2, 0x8f, 0x62, 0x3e, 0xf6, 0x07, 0x2c, 0x16, + 0x2e, 0x13, 0x11, 0x0f, 0x05, 0x43, 0xcf, 0x60, 0x33, 0xca, 0x7e, 0x1a, 0xa0, 0x73, 0xa3, 0xbb, + 0xe6, 0x18, 0xb8, 0x88, 0x8e, 0xb3, 0xa8, 0x83, 0xf5, 0xb3, 0xdf, 0x5b, 0xb5, 0x1f, 0x7f, 0xb6, + 0x9a, 0xb3, 0x3c, 0xb3, 0x68, 0xf4, 0x14, 0xc2, 0x19, 0x95, 0x51, 0xef, 0x80, 0xee, 0x9a, 0xb3, + 0x83, 0x75, 0x09, 0x38, 0x29, 0x01, 0xeb, 0xfe, 0xa4, 0x25, 0xe0, 0x23, 0xea, 0xb1, 0x8c, 0xc3, + 0x9d, 0x0b, 0xb5, 0x0e, 0x61, 0xab, 0x40, 0xeb, 0xb2, 0xe3, 0x11, 0x13, 0x12, 0x19, 0xf0, 0x96, + 0x62, 0xe2, 0xb1, 0x01, 0x3a, 0xa0, 0xdb, 0x74, 0xb3, 0x23, 0x6a, 0xc1, 0x06, 0x7f, 0x1b, 0xb2, + 0x58, 0xa9, 0x36, 0x5d, 0x7d, 0xb0, 0x02, 0x68, 0xa9, 0x3c, 0xfb, 0x41, 0x90, 0x03, 0xef, 0x4b, + 0x19, 0xfb, 0xfd, 0x91, 0x64, 0x22, 0xcb, 0x7a, 0x58, 0xc0, 0x06, 0x0a, 0x7b, 0xbb, 0x12, 0x5b, + 0xc5, 0x16, 0xa8, 0x3f, 0x40, 0xb3, 0x40, 0x5d, 0x56, 0xca, 0x29, 0xc1, 0x1c, 0xe5, 0x82, 0x7e, + 0x7d, 0x65, 0xfd, 0xe7, 0x70, 0xb3, 0xa8, 0xaf, 0x7b, 0xb3, 0x6a, 0xf3, 0x3e, 0x02, 0x78, 0x4f, + 0x77, 0x4f, 0xbb, 0x95, 0xcb, 0xb9, 0x38, 0xe3, 0x35, 0x95, 0xe4, 0x7c, 0x6b, 0xc0, 0x86, 0x62, + 0x40, 0xdf, 0x01, 0xdc, 0x58, 0x3e, 0x46, 0xe4, 0x2c, 0xae, 0x6b, 0xf5, 0xcc, 0xdb, 0xdb, 0x4b, + 0x63, 0x4a, 0xb7, 0xc3, 0xea, 0x7d, 0xfa, 0xf9, 0xef, 0x4b, 0x7d, 0x07, 0xdd, 0x27, 0xcb, 0x6e, + 0x17, 0xa1, 0x79, 0x62, 0x12, 0xf8, 0x42, 0x26, 0x94, 0xa8, 0x3c, 0x7e, 0x84, 0x2f, 0x55, 0x5b, + 0x9d, 0x6e, 0x4f, 0xd1, 0x11, 0xd4, 0xab, 0xa4, 0x7b, 0xaf, 0x66, 0x7a, 0xa2, 0x29, 0x4f, 0x01, + 0xbc, 0xb3, 0xb0, 0x24, 0x73, 0xb0, 0xbb, 0x97, 0xc3, 0x16, 0x96, 0xea, 0xca, 0xa4, 0x4f, 0x14, + 0xe9, 0x63, 0xe4, 0x54, 0x93, 0xa6, 0x3b, 0x74, 0x92, 0x31, 0xa3, 0xaf, 0x00, 0xae, 0x97, 0x31, + 0x7b, 0xcb, 0xa7, 0x7e, 0xc1, 0xae, 0x5e, 0x19, 0xd4, 0x56, 0xa0, 0xbb, 0xe8, 0x41, 0x0a, 0x9a, + 0xbd, 0x6e, 0x39, 0x2b, 0x8f, 0xe7, 0x10, 0x93, 0x76, 0x1e, 0xec, 0x9d, 0x4d, 0x4c, 0x70, 0x3e, + 0x31, 0xc1, 0xdf, 0x89, 0x09, 0x3e, 0x4f, 0xcd, 0xda, 0xf9, 0xd4, 0xac, 0xfd, 0x9a, 0x9a, 0xb5, + 0x97, 0x9b, 0xd1, 0xd0, 0xc3, 0x74, 0x28, 0xb1, 0x9f, 0xbc, 0xf9, 0x24, 0xe4, 0x03, 0x96, 0x57, + 0xde, 0xbf, 0xa9, 0x9e, 0xe6, 0x47, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x94, 0xf3, 0x96, 0xcf, + 0x44, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -430,7 +430,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) AllProvidersAttributes(ctx context.Context, in *QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { out := new(QueryProvidersResponse) - err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Query/AllProvidersAttributes", in, out, opts...) + err := c.cc.Invoke(ctx, "/akash.audit.v1.Query/AllProvidersAttributes", in, out, opts...) if err != nil { return nil, err } @@ -439,7 +439,7 @@ func (c *queryClient) AllProvidersAttributes(ctx context.Context, in *QueryAllPr func (c *queryClient) ProviderAttributes(ctx context.Context, in *QueryProviderAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { out := new(QueryProvidersResponse) - err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Query/ProviderAttributes", in, out, opts...) + err := c.cc.Invoke(ctx, "/akash.audit.v1.Query/ProviderAttributes", in, out, opts...) if err != nil { return nil, err } @@ -448,7 +448,7 @@ func (c *queryClient) ProviderAttributes(ctx context.Context, in *QueryProviderA func (c *queryClient) ProviderAuditorAttributes(ctx context.Context, in *QueryProviderAuditorRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { out := new(QueryProvidersResponse) - err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Query/ProviderAuditorAttributes", in, out, opts...) + err := c.cc.Invoke(ctx, "/akash.audit.v1.Query/ProviderAuditorAttributes", in, out, opts...) if err != nil { return nil, err } @@ -457,7 +457,7 @@ func (c *queryClient) ProviderAuditorAttributes(ctx context.Context, in *QueryPr func (c *queryClient) AuditorAttributes(ctx context.Context, in *QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { out := new(QueryProvidersResponse) - err := c.cc.Invoke(ctx, "/akash.audit.v1beta1.Query/AuditorAttributes", in, out, opts...) + err := c.cc.Invoke(ctx, "/akash.audit.v1.Query/AuditorAttributes", in, out, opts...) if err != nil { return nil, err } @@ -515,7 +515,7 @@ func _Query_AllProvidersAttributes_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.audit.v1beta1.Query/AllProvidersAttributes", + FullMethod: "/akash.audit.v1.Query/AllProvidersAttributes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AllProvidersAttributes(ctx, req.(*QueryAllProvidersAttributesRequest)) @@ -533,7 +533,7 @@ func _Query_ProviderAttributes_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.audit.v1beta1.Query/ProviderAttributes", + FullMethod: "/akash.audit.v1.Query/ProviderAttributes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ProviderAttributes(ctx, req.(*QueryProviderAttributesRequest)) @@ -551,7 +551,7 @@ func _Query_ProviderAuditorAttributes_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.audit.v1beta1.Query/ProviderAuditorAttributes", + FullMethod: "/akash.audit.v1.Query/ProviderAuditorAttributes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ProviderAuditorAttributes(ctx, req.(*QueryProviderAuditorRequest)) @@ -569,7 +569,7 @@ func _Query_AuditorAttributes_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.audit.v1beta1.Query/AuditorAttributes", + FullMethod: "/akash.audit.v1.Query/AuditorAttributes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AuditorAttributes(ctx, req.(*QueryAuditorAttributesRequest)) @@ -578,7 +578,7 @@ func _Query_AuditorAttributes_Handler(srv interface{}, ctx context.Context, dec } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "akash.audit.v1beta1.Query", + ServiceName: "akash.audit.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -599,7 +599,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "akash/audit/v1beta1/query.proto", + Metadata: "akash/audit/v1/query.proto", } func (m *QueryProvidersResponse) Marshal() (dAtA []byte, err error) { diff --git a/go/node/audit/v1beta4/query.pb.gw.go b/go/node/audit/v1/query.pb.gw.go similarity index 97% rename from go/node/audit/v1beta4/query.pb.gw.go rename to go/node/audit/v1/query.pb.gw.go index 0fdbf37c..1965702c 100644 --- a/go/node/audit/v1beta4/query.pb.gw.go +++ b/go/node/audit/v1/query.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/audit/v1beta4/query.proto +// source: akash/audit/v1/query.proto /* -Package v1beta4 is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1beta4 +package v1 import ( "context" @@ -512,13 +512,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } 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", "v1beta4", "attributes", "list"}, "", runtime.AssumeColonVerbOpt(true))) + 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", "v1", "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", "v1beta4", "attributes", "owner", "list"}, "", runtime.AssumeColonVerbOpt(true))) + 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", "v1", "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", "v1beta4", "attributes", "auditor", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + 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", "v1", "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", "v1beta4", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(true))) + 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", "v1", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/audit/v1/service.pb.go b/go/node/audit/v1/service.pb.go new file mode 100644 index 00000000..80add340 --- /dev/null +++ b/go/node/audit/v1/service.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/audit/v1/service.proto + +package v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + 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/audit/v1/service.proto", fileDescriptor_767ce8698e34fe92) } + +var fileDescriptor_767ce8698e34fe92 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, + 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xea, 0x81, 0x65, 0xf5, + 0xca, 0x0c, 0xa5, 0xc4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x73, 0x8b, 0xd3, 0x41, 0x8a, + 0x73, 0x8b, 0xd3, 0x21, 0x0a, 0xa5, 0x24, 0xd0, 0x8c, 0x81, 0xcb, 0x18, 0x35, 0x31, 0x71, 0x31, + 0xfb, 0x16, 0xa7, 0x0b, 0x95, 0x71, 0x89, 0x05, 0x67, 0xa6, 0xe7, 0x05, 0x14, 0xe5, 0x97, 0x65, + 0xa6, 0xa4, 0x16, 0x39, 0x96, 0x94, 0x14, 0x65, 0x26, 0x95, 0x96, 0xa4, 0x16, 0x0b, 0x69, 0xea, + 0xa1, 0xda, 0xa2, 0xe7, 0x5b, 0x9c, 0x8e, 0x5d, 0xa9, 0x94, 0x21, 0xd1, 0x4a, 0x83, 0x52, 0x8b, + 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0x6a, 0xb8, 0x24, 0x5c, 0x52, 0x73, 0x52, 0x4b, 0x52, 0xb1, + 0xd8, 0xac, 0x8d, 0xc5, 0x38, 0x5c, 0x8a, 0xa5, 0x8c, 0x49, 0x50, 0x0c, 0xb3, 0x5d, 0x8a, 0xb5, + 0xe1, 0xf9, 0x06, 0x2d, 0x46, 0x27, 0xd3, 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, 0x92, 0x2e, 0xc8, 0x4e, 0xd7, 0x4b, 0xcc, 0x2e, 0xd1, 0xcb, 0xcc, 0xd7, 0x4f, 0xcf, 0xd7, + 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x87, 0x62, 0x12, 0x1b, 0x38, 0x08, 0x8d, 0x01, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x0d, 0x2c, 0x33, 0xf9, 0xa5, 0x01, 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.v1.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.v1.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.v1.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.v1.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.v1.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/v1/service.proto", +} diff --git a/go/node/audit/v1beta1/types.go b/go/node/audit/v1/types.go similarity index 97% rename from go/node/audit/v1beta1/types.go rename to go/node/audit/v1/types.go index 46164a43..ced713d7 100644 --- a/go/node/audit/v1beta1/types.go +++ b/go/node/audit/v1/types.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 import ( "bytes" diff --git a/go/node/audit/v1beta1/audit.pb.go b/go/node/audit/v1beta1/audit.pb.go deleted file mode 100644 index f296481c..00000000 --- a/go/node/audit/v1beta1/audit.pb.go +++ /dev/null @@ -1,2079 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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/v1beta1/codec.go b/go/node/audit/v1beta1/codec.go deleted file mode 100644 index ac6eb2c1..00000000 --- a/go/node/audit/v1beta1/codec.go +++ /dev/null @@ -1,43 +0,0 @@ -package v1beta1 - -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() -} - -// RegisterLegacyAminoCodec 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/v1beta1/errors.go b/go/node/audit/v1beta1/errors.go deleted file mode 100644 index d540e894..00000000 --- a/go/node/audit/v1beta1/errors.go +++ /dev/null @@ -1 +0,0 @@ -package v1beta1 diff --git a/go/node/audit/v1beta1/event.go b/go/node/audit/v1beta1/event.go deleted file mode 100644 index ecbdfc7e..00000000 --- a/go/node/audit/v1beta1/event.go +++ /dev/null @@ -1,118 +0,0 @@ -package v1beta1 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta1/msgs.go b/go/node/audit/v1beta1/msgs.go deleted file mode 100644 index 90800b74..00000000 --- a/go/node/audit/v1beta1/msgs.go +++ /dev/null @@ -1,94 +0,0 @@ -package v1beta1 - -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/v1beta1/query.pb.gw.go b/go/node/audit/v1beta1/query.pb.gw.go deleted file mode 100644 index 2dc65845..00000000 --- a/go/node/audit/v1beta1/query.pb.gw.go +++ /dev/null @@ -1,532 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/audit/v1beta2/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_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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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/audit.pb.go b/go/node/audit/v1beta2/audit.pb.go deleted file mode 100644 index 72d1e653..00000000 --- a/go/node/audit/v1beta2/audit.pb.go +++ /dev/null @@ -1,2079 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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 deleted file mode 100644 index 2969ac8c..00000000 --- a/go/node/audit/v1beta2/codec.go +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index 16357253..00000000 --- a/go/node/audit/v1beta2/errors.go +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index b24795c7..00000000 --- a/go/node/audit/v1beta2/event.go +++ /dev/null @@ -1,118 +0,0 @@ -package v1beta2 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index a5af778f..00000000 --- a/go/node/audit/v1beta2/genesis.pb.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/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 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 deleted file mode 100644 index 43cbb76e..00000000 --- a/go/node/audit/v1beta2/key.go +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 2940f9e3..00000000 --- a/go/node/audit/v1beta2/msgs.go +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index c9352b7c..00000000 --- a/go/node/audit/v1beta2/query.pb.go +++ /dev/null @@ -1,1718 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 01a89373..00000000 --- a/go/node/audit/v1beta2/query.pb.gw.go +++ /dev/null @@ -1,532 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index 698e8605..00000000 --- a/go/node/audit/v1beta2/types.go +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 21995801..00000000 --- a/go/node/audit/v1beta3/audit.pb.go +++ /dev/null @@ -1,2079 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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/errors.go b/go/node/audit/v1beta3/errors.go deleted file mode 100644 index 3b635413..00000000 --- a/go/node/audit/v1beta3/errors.go +++ /dev/null @@ -1,16 +0,0 @@ -package v1beta3 - -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/v1beta3/event.go b/go/node/audit/v1beta3/event.go deleted file mode 100644 index 50a5afdb..00000000 --- a/go/node/audit/v1beta3/event.go +++ /dev/null @@ -1,118 +0,0 @@ -package v1beta3 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 1e277909..00000000 --- a/go/node/audit/v1beta3/genesis.pb.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta3/genesis.proto - -package v1beta3 - -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 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 deleted file mode 100644 index 390ed084..00000000 --- a/go/node/audit/v1beta3/key.go +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 4a501915..00000000 --- a/go/node/audit/v1beta3/msgs.go +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index 47ce9a68..00000000 --- a/go/node/audit/v1beta3/query.pb.go +++ /dev/null @@ -1,1718 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 189e7bb0..00000000 --- a/go/node/audit/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,532 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index afd5ba14..00000000 --- a/go/node/audit/v1beta3/types.go +++ /dev/null @@ -1,33 +0,0 @@ -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/audit/v1beta4/audit.pb.go b/go/node/audit/v1beta4/audit.pb.go deleted file mode 100644 index 5d2ef354..00000000 --- a/go/node/audit/v1beta4/audit.pb.go +++ /dev/null @@ -1,2080 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta4/audit.proto - -package v1beta4 - -import ( - context "context" - fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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_attributes_v1.Attributes `protobuf:"bytes,4,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_b75b0e7d403816e8, []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_attributes_v1.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_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_b75b0e7d403816e8, []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_attributes_v1.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_b75b0e7d403816e8, []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_b75b0e7d403816e8, []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_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_b75b0e7d403816e8, []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_attributes_v1.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_b75b0e7d403816e8, []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_b75b0e7d403816e8, []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_b75b0e7d403816e8, []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.v1beta4.Provider") - proto.RegisterType((*AuditedAttributes)(nil), "akash.audit.v1beta4.AuditedAttributes") - proto.RegisterType((*AttributesResponse)(nil), "akash.audit.v1beta4.AttributesResponse") - proto.RegisterType((*AttributesFilters)(nil), "akash.audit.v1beta4.AttributesFilters") - proto.RegisterType((*MsgSignProviderAttributes)(nil), "akash.audit.v1beta4.MsgSignProviderAttributes") - proto.RegisterType((*MsgSignProviderAttributesResponse)(nil), "akash.audit.v1beta4.MsgSignProviderAttributesResponse") - proto.RegisterType((*MsgDeleteProviderAttributes)(nil), "akash.audit.v1beta4.MsgDeleteProviderAttributes") - proto.RegisterType((*MsgDeleteProviderAttributesResponse)(nil), "akash.audit.v1beta4.MsgDeleteProviderAttributesResponse") -} - -func init() { proto.RegisterFile("akash/audit/v1beta4/audit.proto", fileDescriptor_b75b0e7d403816e8) } - -var fileDescriptor_b75b0e7d403816e8 = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x6f, 0xd3, 0x40, - 0x18, 0xcd, 0x39, 0xa1, 0x24, 0x57, 0x7e, 0x28, 0x06, 0x41, 0x9a, 0x0a, 0x5f, 0xb9, 0x08, 0x88, - 0x84, 0xb0, 0x49, 0x8b, 0xa0, 0x2a, 0x53, 0x2d, 0x84, 0xc4, 0x10, 0x09, 0x99, 0x8d, 0xcd, 0x21, - 0x27, 0xd7, 0x4a, 0x9a, 0x8b, 0x7c, 0x97, 0x54, 0xd9, 0x98, 0x58, 0x81, 0x8d, 0xb1, 0x33, 0x13, - 0x2b, 0xac, 0x0c, 0x74, 0xec, 0xc8, 0x74, 0xa0, 0x64, 0x41, 0x1e, 0xfd, 0x17, 0xa0, 0xdc, 0xd9, - 0x71, 0x22, 0x6a, 0x44, 0xa6, 0x0a, 0xa9, 0x9b, 0xbf, 0xf7, 0xfd, 0xb8, 0xf7, 0xbd, 0x7b, 0x27, - 0x43, 0xe4, 0x76, 0x5c, 0xb6, 0x67, 0xb9, 0x83, 0xb6, 0xcf, 0xad, 0x61, 0xa3, 0x45, 0xb8, 0xfb, - 0x40, 0x45, 0x66, 0x3f, 0xa0, 0x9c, 0xea, 0x57, 0x64, 0x81, 0xa9, 0xa0, 0xb8, 0xa0, 0x7a, 0xd5, - 0xa3, 0x1e, 0x95, 0x79, 0x6b, 0xfa, 0xa5, 0x4a, 0xab, 0x75, 0x35, 0xab, 0xe5, 0x32, 0x62, 0xb9, - 0x9c, 0x07, 0x7e, 0x6b, 0xc0, 0x09, 0xb3, 0x86, 0x8d, 0x34, 0x52, 0x95, 0xf8, 0x93, 0x06, 0x8b, - 0xcf, 0x03, 0x3a, 0xf4, 0xdb, 0x24, 0xd0, 0x2d, 0x78, 0x8e, 0x1e, 0xf4, 0x48, 0x50, 0x01, 0x1b, - 0xa0, 0x5e, 0xb2, 0xd7, 0x42, 0x81, 0x14, 0x10, 0x09, 0x74, 0x61, 0xe4, 0xee, 0x77, 0x77, 0xb0, - 0x0c, 0xb1, 0xa3, 0x60, 0xfd, 0x11, 0x3c, 0x2f, 0xe9, 0xd0, 0xa0, 0xa2, 0xc9, 0x96, 0x1b, 0xa1, - 0x40, 0x09, 0x14, 0x09, 0x74, 0x49, 0x35, 0xc5, 0x00, 0x76, 0x92, 0x94, 0xfe, 0x19, 0x40, 0x98, - 0x12, 0xab, 0x14, 0x36, 0xf2, 0xf5, 0xd5, 0xcd, 0x9a, 0xa9, 0x36, 0x9c, 0xd2, 0x36, 0xd3, 0xac, - 0x39, 0x6c, 0x98, 0xbb, 0x49, 0x64, 0xf3, 0x23, 0x81, 0x72, 0xa1, 0x40, 0x73, 0xed, 0x91, 0x40, - 0xe5, 0xf8, 0xa0, 0x19, 0x86, 0x3f, 0xfe, 0x40, 0xcf, 0x3c, 0x9f, 0xef, 0x0d, 0x5a, 0xe6, 0x2b, - 0xba, 0x6f, 0xc9, 0xc9, 0xf7, 0x7a, 0x84, 0x1f, 0xd0, 0xa0, 0x13, 0x47, 0x6e, 0xdf, 0xb7, 0x3c, - 0x6a, 0xf5, 0x68, 0x9b, 0x58, 0x7c, 0xd4, 0x27, 0x6c, 0x51, 0xab, 0xf4, 0x50, 0xe6, 0xcc, 0x9d, - 0x86, 0xbf, 0x6a, 0xb0, 0xbc, 0x3b, 0xdd, 0x83, 0xb4, 0xd3, 0x8a, 0xd3, 0xd3, 0x2e, 0xff, 0x1f, - 0x69, 0xb7, 0x53, 0xfc, 0x70, 0x88, 0xc0, 0xaf, 0x43, 0x94, 0xc3, 0x6f, 0x01, 0xd4, 0xe7, 0x8a, - 0x08, 0xeb, 0xd3, 0x1e, 0x23, 0x3a, 0x5d, 0xd8, 0x0d, 0xc8, 0xdd, 0x6e, 0x9b, 0x27, 0x38, 0xdf, - 0xfc, 0xe3, 0x0a, 0xec, 0x3b, 0xff, 0xb8, 0x5e, 0x36, 0xa3, 0x72, 0x3a, 0xed, 0xa9, 0xdf, 0xe5, - 0x24, 0x60, 0xfa, 0x63, 0x58, 0x8c, 0x85, 0x57, 0x74, 0x4a, 0x36, 0x0a, 0x05, 0x9a, 0x61, 0x91, - 0x40, 0x97, 0x17, 0x2e, 0x8a, 0x61, 0x67, 0x96, 0xd4, 0xb7, 0xe0, 0x8a, 0xbc, 0x6c, 0x56, 0xd1, - 0x64, 0xeb, 0x7a, 0x28, 0x50, 0x8c, 0x44, 0x02, 0x5d, 0x9c, 0xb3, 0x05, 0xc3, 0x4e, 0x9c, 0x98, - 0x63, 0xf4, 0x4d, 0x83, 0x6b, 0x4d, 0xe6, 0xbd, 0xf0, 0xbd, 0x5e, 0xf2, 0x46, 0xcf, 0x1c, 0xb7, - 0xa4, 0xe3, 0x0a, 0x52, 0xc9, 0x1a, 0xbc, 0x99, 0x29, 0x64, 0xe2, 0x3d, 0xfc, 0x05, 0xc0, 0xf5, - 0x26, 0xf3, 0x9e, 0x90, 0x2e, 0xe1, 0xe4, 0x54, 0x05, 0xbf, 0x0b, 0x0b, 0x1d, 0x32, 0x52, 0x4a, - 0x97, 0xec, 0xeb, 0xa1, 0x40, 0x32, 0x8e, 0x04, 0x5a, 0x55, 0x2d, 0xd3, 0x08, 0x3b, 0x12, 0x8c, - 0x37, 0xbc, 0x05, 0x6b, 0x7f, 0xe1, 0x9e, 0xec, 0xb8, 0xf9, 0x5e, 0x83, 0xf9, 0x26, 0xf3, 0xf4, - 0xd7, 0x00, 0x5e, 0xcb, 0xf0, 0x95, 0x79, 0xe2, 0x73, 0xcb, 0x94, 0xaf, 0xfa, 0x70, 0xb9, 0xfa, - 0xd9, 0x53, 0x7f, 0x03, 0x60, 0x25, 0x53, 0xeb, 0xfb, 0x59, 0x43, 0xb3, 0x3a, 0xaa, 0xdb, 0xcb, - 0x76, 0x24, 0x44, 0x6c, 0xe7, 0x68, 0x6c, 0x80, 0xe3, 0xb1, 0x01, 0x7e, 0x8e, 0x0d, 0xf0, 0x6e, - 0x62, 0xe4, 0x8e, 0x27, 0x46, 0xee, 0xfb, 0xc4, 0xc8, 0xbd, 0xdc, 0x5e, 0xc2, 0x93, 0x0b, 0x3f, - 0xee, 0xd6, 0x8a, 0xfc, 0xbd, 0x6e, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x98, 0xb4, 0x0e, - 0xd6, 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/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, v1.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, v1.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, v1.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/v1beta4/codec.go b/go/node/audit/v1beta4/codec.go deleted file mode 100644 index fcb6f4ad..00000000 --- a/go/node/audit/v1beta4/codec.go +++ /dev/null @@ -1,43 +0,0 @@ -package v1beta4 - -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/audit 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() -} - -// RegisterLegacyAminoCodec 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/v1beta4/event.go b/go/node/audit/v1beta4/event.go deleted file mode 100644 index f1ee63b1..00000000 --- a/go/node/audit/v1beta4/event.go +++ /dev/null @@ -1,118 +0,0 @@ -package v1beta4 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta4/genesis.pb.go b/go/node/audit/v1beta4/genesis.pb.go deleted file mode 100644 index e9e73aec..00000000 --- a/go/node/audit/v1beta4/genesis.pb.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta4/genesis.proto - -package v1beta4 - -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 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_8765efef2ccff99f, []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.v1beta4.GenesisState") -} - -func init() { proto.RegisterFile("akash/audit/v1beta4/genesis.proto", fileDescriptor_8765efef2ccff99f) } - -var fileDescriptor_8765efef2ccff99f = []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, 0xd1, - 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, 0xb9, 0x56, 0xa5, 0xbe, 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/v1beta4/key.go b/go/node/audit/v1beta4/key.go deleted file mode 100644 index 4d1b760d..00000000 --- a/go/node/audit/v1beta4/key.go +++ /dev/null @@ -1,16 +0,0 @@ -package v1beta4 - -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/v1beta4/query.pb.go b/go/node/audit/v1beta4/query.pb.go deleted file mode 100644 index 6eac5200..00000000 --- a/go/node/audit/v1beta4/query.pb.go +++ /dev/null @@ -1,1718 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/audit/v1beta4/query.proto - -package v1beta4 - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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_70c8ef9c680a758f, []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_70c8ef9c680a758f, []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_70c8ef9c680a758f, []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_70c8ef9c680a758f, []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_70c8ef9c680a758f, []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_70c8ef9c680a758f, []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.v1beta4.QueryProvidersResponse") - proto.RegisterType((*QueryProviderRequest)(nil), "akash.audit.v1beta4.QueryProviderRequest") - proto.RegisterType((*QueryAllProvidersAttributesRequest)(nil), "akash.audit.v1beta4.QueryAllProvidersAttributesRequest") - proto.RegisterType((*QueryProviderAttributesRequest)(nil), "akash.audit.v1beta4.QueryProviderAttributesRequest") - proto.RegisterType((*QueryProviderAuditorRequest)(nil), "akash.audit.v1beta4.QueryProviderAuditorRequest") - proto.RegisterType((*QueryAuditorAttributesRequest)(nil), "akash.audit.v1beta4.QueryAuditorAttributesRequest") -} - -func init() { proto.RegisterFile("akash/audit/v1beta4/query.proto", fileDescriptor_70c8ef9c680a758f) } - -var fileDescriptor_70c8ef9c680a758f = []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, 0xb2, 0x89, 0x01, 0x17, 0xb4, 0x1d, 0xc6, 0x09, 0x34, 0x72, 0xe4, 0xe6, 0xae, 0x56, - 0x16, 0xad, 0xcb, 0xcb, 0x62, 0x67, 0x13, 0x42, 0x43, 0x82, 0x4f, 0x80, 0xc4, 0xb7, 0x40, 0x5c, - 0xe0, 0xca, 0x17, 0xd8, 0x71, 0x12, 0x17, 0x4e, 0x03, 0xb5, 0x7c, 0x10, 0x14, 0x3b, 0x69, 0x9b, - 0xa5, 0xa5, 0xdd, 0xd8, 0xad, 0xae, 0xff, 0xef, 0xfd, 0x7f, 0xef, 0xf9, 0xd9, 0xc1, 0x75, 0xbe, - 0xc7, 0xe5, 0x2e, 0xe3, 0x51, 0xc7, 0x53, 0xec, 0x70, 0xa5, 0x2d, 0x14, 0x5f, 0x63, 0x07, 0x91, - 0x08, 0xdf, 0xd0, 0x20, 0x04, 0x05, 0xe4, 0xa6, 0x16, 0x50, 0x2d, 0xa0, 0x89, 0xa0, 0x56, 0x71, - 0xc1, 0x05, 0xbd, 0xcf, 0xe2, 0x5f, 0x46, 0x5a, 0xbb, 0xe3, 0x02, 0xb8, 0x5d, 0xc1, 0x78, 0xe0, - 0x31, 0xee, 0xfb, 0xa0, 0xb8, 0xf2, 0xc0, 0x97, 0xc9, 0xee, 0xd2, 0x0e, 0xc8, 0x7d, 0x90, 0xac, - 0xcd, 0xa5, 0x30, 0x0e, 0x89, 0xdf, 0x0a, 0x0b, 0xb8, 0xeb, 0xf9, 0x5a, 0x9c, 0x68, 0xc7, 0x52, - 0x19, 0x04, 0x2d, 0x68, 0x7e, 0x45, 0x78, 0xe1, 0x55, 0x9c, 0x63, 0x3b, 0x84, 0x43, 0xaf, 0x23, - 0x42, 0xe9, 0x08, 0x19, 0x80, 0x2f, 0x05, 0x79, 0x89, 0xcb, 0x41, 0xfa, 0x67, 0x15, 0x35, 0xae, - 0xb5, 0xe6, 0xec, 0x45, 0x3a, 0xa6, 0x08, 0x9a, 0x86, 0x6e, 0xce, 0x9f, 0x9c, 0xd5, 0x0b, 0x9f, - 0x7f, 0xd5, 0xcb, 0xc3, 0x64, 0xc3, 0x14, 0xe4, 0x39, 0xc6, 0x43, 0xbe, 0x6a, 0xb1, 0x81, 0x5a, - 0x73, 0xf6, 0x3d, 0x6a, 0x8a, 0xa1, 0x71, 0x31, 0xd4, 0xb4, 0x2b, 0x29, 0x86, 0x6e, 0x73, 0x57, - 0xa4, 0x30, 0xce, 0x48, 0x68, 0x73, 0x0b, 0x57, 0x32, 0xc8, 0x8e, 0x38, 0x88, 0x84, 0x54, 0xa4, - 0x8a, 0x6f, 0x68, 0x30, 0x08, 0xab, 0xa8, 0x81, 0x5a, 0x65, 0x27, 0x5d, 0x92, 0x0a, 0x2e, 0xc1, - 0x91, 0x2f, 0x42, 0xed, 0x5a, 0x76, 0xcc, 0xa2, 0xd9, 0xc5, 0x4d, 0x9d, 0x67, 0xa3, 0xdb, 0x1d, - 0x00, 0x6f, 0x28, 0x15, 0x7a, 0xed, 0x48, 0x09, 0x99, 0x66, 0xdd, 0xca, 0x60, 0x23, 0x8d, 0x7d, - 0x77, 0x2a, 0xb6, 0x8e, 0xcd, 0x50, 0xbf, 0xc3, 0x56, 0x86, 0x3a, 0xef, 0x34, 0xa0, 0x44, 0x23, - 0x94, 0xe7, 0xfc, 0x8b, 0x97, 0xf6, 0x7f, 0x81, 0x6f, 0x67, 0xfd, 0x4d, 0x6f, 0x2e, 0xdb, 0xbc, - 0xf7, 0x08, 0x2f, 0x9a, 0xee, 0x19, 0x59, 0xbe, 0x9c, 0xc9, 0x19, 0xaf, 0xa8, 0x24, 0xfb, 0xac, - 0x84, 0x4b, 0x9a, 0x81, 0x7c, 0x43, 0x78, 0x61, 0xfc, 0x31, 0x92, 0xf5, 0xb1, 0x33, 0x3b, 0xfd, - 0xe0, 0x6b, 0xf7, 0x27, 0x07, 0xe6, 0x2e, 0x4b, 0xd3, 0xfe, 0xf0, 0xe3, 0xcf, 0xa7, 0xe2, 0x03, - 0xb2, 0xc4, 0x26, 0xde, 0x38, 0xc6, 0x07, 0x16, 0xac, 0xeb, 0x49, 0x15, 0x43, 0x93, 0xfc, 0x34, - 0x90, 0xd5, 0xe9, 0xbe, 0xff, 0x09, 0xfb, 0x54, 0xc3, 0xae, 0x11, 0x7b, 0x36, 0xd8, 0xb7, 0xfa, - 0xc4, 0x8f, 0x0d, 0xf4, 0x77, 0x84, 0x6f, 0x9d, 0x1b, 0xa1, 0x11, 0xf6, 0xe5, 0x19, 0xd8, 0x33, - 0x73, 0x77, 0x31, 0xf0, 0x67, 0x1a, 0xfc, 0x09, 0x59, 0x9f, 0x11, 0x3c, 0x19, 0xb8, 0xe3, 0xb4, - 0x04, 0xf2, 0x05, 0xe1, 0xf9, 0x3c, 0xb5, 0xfd, 0x8f, 0x11, 0x99, 0x30, 0xdd, 0x17, 0xe3, 0x7e, - 0xa4, 0xb9, 0x97, 0x09, 0x4d, 0xb8, 0xd3, 0x47, 0x31, 0x8b, 0x0e, 0xe1, 0x08, 0x71, 0xdc, 0xec, - 0x4d, 0xe7, 0xa4, 0x67, 0xa1, 0xd3, 0x9e, 0x85, 0x7e, 0xf7, 0x2c, 0xf4, 0xb1, 0x6f, 0x15, 0x4e, - 0xfb, 0x56, 0xe1, 0x67, 0xdf, 0x2a, 0xbc, 0x7e, 0xec, 0x7a, 0x6a, 0x37, 0x6a, 0xd3, 0x1d, 0xd8, - 0x37, 0x39, 0x1f, 0xfa, 0x42, 0x1d, 0x41, 0xb8, 0x97, 0xac, 0xe2, 0x4f, 0x87, 0x0b, 0xcc, 0x87, - 0x8e, 0xc8, 0x76, 0xa9, 0x7d, 0x5d, 0x3f, 0xfc, 0xab, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, - 0xf3, 0x6e, 0x52, 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/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/v1beta4/types.go b/go/node/audit/v1beta4/types.go deleted file mode 100644 index 818fabdb..00000000 --- a/go/node/audit/v1beta4/types.go +++ /dev/null @@ -1,33 +0,0 @@ -package v1beta4 - -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/v1beta1/cert.go b/go/node/cert/v1/cert.go similarity index 84% rename from go/node/cert/v1beta1/cert.go rename to go/node/cert/v1/cert.go index 8f088267..35158600 100644 --- a/go/node/cert/v1beta1/cert.go +++ b/go/node/cert/v1/cert.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 import ( "crypto/x509" @@ -45,16 +45,16 @@ func ParseAndValidateCertificate(owner sdk.Address, crt, pub []byte) (*x509.Cert return cert, nil } -func (m *CertificateID) String() string { +func (m *ID) String() string { return fmt.Sprintf("%s/%s", m.Owner, m.Serial) } -func (m *CertificateID) Equals(val CertificateID) bool { +func (m *ID) Equals(val ID) 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" { + if val, exists := State_name[int32(m.State)]; !exists || val == "invalid" { return ErrInvalidState } @@ -66,6 +66,6 @@ func (m Certificate) Validate(owner sdk.Address) error { return nil } -func (m Certificate) IsState(state Certificate_State) bool { +func (m Certificate) IsState(state State) bool { return m.State == state } diff --git a/go/node/cert/v1/cert.pb.go b/go/node/cert/v1/cert.pb.go new file mode 100644 index 00000000..f6ab3499 --- /dev/null +++ b/go/node/cert/v1/cert.pb.go @@ -0,0 +1,678 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1/cert.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// State is an enum which refers to state of deployment +type State int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + CertificateStateInvalid State = 0 + // CertificateValid denotes state for deployment active + CertificateValid State = 1 + // CertificateRevoked denotes state for deployment closed + CertificateRevoked State = 2 +) + +var State_name = map[int32]string{ + 0: "invalid", + 1: "valid", + 2: "revoked", +} + +var State_value = map[string]int32{ + "invalid": 0, + "valid": 1, + "revoked": 2, +} + +func (x State) String() string { + return proto.EnumName(State_name, int32(x)) +} + +func (State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_aed64ec87f738ef2, []int{0} +} + +// ID stores owner and sequence number +type ID 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 *ID) Reset() { *m = ID{} } +func (*ID) ProtoMessage() {} +func (*ID) Descriptor() ([]byte, []int) { + return fileDescriptor_aed64ec87f738ef2, []int{0} +} +func (m *ID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ID) XXX_Merge(src proto.Message) { + xxx_messageInfo_ID.Merge(m, src) +} +func (m *ID) XXX_Size() int { + return m.Size() +} +func (m *ID) XXX_DiscardUnknown() { + xxx_messageInfo_ID.DiscardUnknown(m) +} + +var xxx_messageInfo_ID proto.InternalMessageInfo + +func (m *ID) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *ID) GetSerial() string { + if m != nil { + return m.Serial + } + return "" +} + +// Certificate stores state, certificate and it's public key +type Certificate struct { + State State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.cert.v1.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_aed64ec87f738ef2, []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() 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 +} + +func init() { + proto.RegisterEnum("akash.cert.v1.State", State_name, State_value) + proto.RegisterType((*ID)(nil), "akash.cert.v1.ID") + proto.RegisterType((*Certificate)(nil), "akash.cert.v1.Certificate") +} + +func init() { proto.RegisterFile("akash/cert/v1/cert.proto", fileDescriptor_aed64ec87f738ef2) } + +var fileDescriptor_aed64ec87f738ef2 = []byte{ + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xc1, 0x6b, 0xd4, 0x40, + 0x14, 0xc6, 0x33, 0xeb, 0xa6, 0xd5, 0x69, 0x2b, 0xcb, 0x10, 0x6c, 0x9a, 0x42, 0x26, 0x8c, 0x97, + 0x45, 0x31, 0x61, 0xad, 0xa7, 0xde, 0x8c, 0x8a, 0xf4, 0x9a, 0x82, 0x07, 0x2f, 0x32, 0xdd, 0x8c, + 0x31, 0x64, 0x9b, 0x59, 0x26, 0x63, 0xa4, 0x07, 0xef, 0xb2, 0x78, 0xf0, 0xe8, 0x65, 0xa1, 0xe0, + 0xbf, 0x20, 0xfe, 0x0d, 0x1e, 0x8b, 0x27, 0x4f, 0x41, 0x76, 0x2f, 0xb2, 0xc7, 0xfd, 0x0b, 0x24, + 0x6f, 0x22, 0xdd, 0x9e, 0x92, 0xef, 0xfb, 0x7e, 0xf3, 0x78, 0x1f, 0x3c, 0xec, 0xf2, 0x82, 0x57, + 0xef, 0xa2, 0xb1, 0x50, 0x3a, 0xaa, 0x47, 0xf0, 0x0d, 0xa7, 0x4a, 0x6a, 0x49, 0xf6, 0x20, 0x09, + 0xc1, 0xa9, 0x47, 0x9e, 0x93, 0xc9, 0x4c, 0x42, 0x12, 0xb5, 0x7f, 0x06, 0xf2, 0x0e, 0xc6, 0xb2, + 0x3a, 0x97, 0xd5, 0x1b, 0x13, 0x18, 0x61, 0x22, 0xf6, 0x19, 0xe1, 0xde, 0xc9, 0x73, 0xf2, 0x12, + 0xdb, 0xf2, 0x43, 0x29, 0x94, 0x8b, 0x02, 0x34, 0xbc, 0x13, 0x8f, 0x56, 0x0d, 0x35, 0xc6, 0xba, + 0xa1, 0xbb, 0x17, 0xfc, 0x7c, 0x72, 0xcc, 0x40, 0xb2, 0x5f, 0xdf, 0x1f, 0x39, 0xdd, 0x80, 0xa7, + 0x69, 0xaa, 0x44, 0x55, 0x9d, 0x6a, 0x95, 0x97, 0x59, 0x62, 0x70, 0x72, 0x84, 0xb7, 0x2a, 0xa1, + 0x72, 0x3e, 0x71, 0x7b, 0x30, 0xe9, 0x70, 0xd5, 0xd0, 0xce, 0x59, 0x37, 0x74, 0xcf, 0x8c, 0x32, + 0x9a, 0x25, 0x5d, 0x70, 0x7c, 0xfb, 0xeb, 0x25, 0xb5, 0xfe, 0x5e, 0x52, 0x8b, 0xfd, 0x40, 0x78, + 0xe7, 0x99, 0x50, 0x3a, 0x7f, 0x9b, 0x8f, 0xb9, 0x16, 0xe4, 0x05, 0xb6, 0x2b, 0xcd, 0xb5, 0x80, + 0x69, 0x77, 0x1f, 0x3b, 0xe1, 0x8d, 0xba, 0xe1, 0x69, 0x9b, 0xc5, 0x07, 0xed, 0xb6, 0x80, 0x5d, + 0x6f, 0x0b, 0x92, 0x25, 0xc6, 0x26, 0x0f, 0x71, 0xbf, 0x7d, 0xe2, 0xde, 0x0a, 0xd0, 0x70, 0x37, + 0xde, 0x5f, 0x35, 0x14, 0xf4, 0xba, 0xa1, 0x3b, 0x06, 0x6f, 0x15, 0x4b, 0xc0, 0x6c, 0x2b, 0x4c, + 0xdf, 0x9f, 0x15, 0xe2, 0xc2, 0xed, 0x03, 0x0e, 0x15, 0x8c, 0x73, 0x5d, 0xc1, 0x68, 0x96, 0x74, + 0xc1, 0x83, 0x8f, 0xd8, 0x86, 0x65, 0xc8, 0x10, 0x6f, 0xe7, 0x65, 0xcd, 0x27, 0x79, 0x3a, 0xb0, + 0xbc, 0xc3, 0xd9, 0x3c, 0xd8, 0xdf, 0xe8, 0x03, 0xc8, 0x89, 0x89, 0x09, 0xc5, 0xb6, 0xe1, 0x90, + 0xe7, 0xcc, 0xe6, 0xc1, 0x60, 0x83, 0x7b, 0x05, 0xc0, 0x7d, 0xbc, 0xad, 0x44, 0x2d, 0x0b, 0x91, + 0x0e, 0x7a, 0xde, 0xbd, 0xd9, 0x3c, 0x20, 0x1b, 0x48, 0x62, 0x12, 0xaf, 0xff, 0xe9, 0x9b, 0x6f, + 0xc5, 0x4f, 0x7e, 0x2e, 0x7c, 0x74, 0xb5, 0xf0, 0xd1, 0x9f, 0x85, 0x8f, 0xbe, 0x2c, 0x7d, 0xeb, + 0x6a, 0xe9, 0x5b, 0xbf, 0x97, 0xbe, 0xf5, 0xda, 0x9b, 0x16, 0x59, 0xc8, 0x0b, 0x1d, 0xe6, 0xed, + 0x49, 0x44, 0xa5, 0x4c, 0xc5, 0xff, 0x3b, 0x3a, 0xdb, 0x82, 0x1b, 0x38, 0xfa, 0x17, 0x00, 0x00, + 0xff, 0xff, 0x96, 0xa3, 0xd3, 0x01, 0x5f, 0x02, 0x00, 0x00, +} + +func (m *ID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ID) 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 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 *ID) 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 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 *ID) Unmarshal(dAtA []byte) 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: ID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ID: 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 |= 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 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/v1beta1/codec.go b/go/node/cert/v1/codec.go similarity index 85% rename from go/node/cert/v1beta1/codec.go rename to go/node/cert/v1/codec.go index 99c3bc2e..bdebf494 100644 --- a/go/node/cert/v1beta1/codec.go +++ b/go/node/cert/v1/codec.go @@ -1,16 +1,13 @@ -package v1beta1 +package v1 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. @@ -20,12 +17,6 @@ var ( 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(&MsgCreateCertificate{}, ModuleName+"/"+MsgTypeCreateCertificate, nil) diff --git a/go/node/cert/v1beta3/errors.go b/go/node/cert/v1/errors.go similarity index 96% rename from go/node/cert/v1beta3/errors.go rename to go/node/cert/v1/errors.go index daa527a8..876f3357 100644 --- a/go/node/cert/v1beta3/errors.go +++ b/go/node/cert/v1/errors.go @@ -1,9 +1,9 @@ -package v1beta3 +package v1 import ( "errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) const ( diff --git a/go/node/cert/v1/filters.pb.go b/go/node/cert/v1/filters.pb.go new file mode 100644 index 00000000..41d696d0 --- /dev/null +++ b/go/node/cert/v1/filters.pb.go @@ -0,0 +1,428 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1/filters.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// 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_b8f3ca07a7278a9e, []int{0} +} +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 "" +} + +func init() { + proto.RegisterType((*CertificateFilter)(nil), "akash.cert.v1.CertificateFilter") +} + +func init() { proto.RegisterFile("akash/cert/v1/filters.proto", fileDescriptor_b8f3ca07a7278a9e) } + +var fileDescriptor_b8f3ca07a7278a9e = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4e, 0x2d, 0x2a, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0xcb, 0xcc, 0x29, 0x49, 0x2d, + 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x4b, 0xea, 0x81, 0x24, 0xf5, 0xca, + 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x32, 0xfa, 0x20, 0x16, 0x44, 0x91, 0x94, 0x64, + 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x4a, 0x49, 0xa0, 0x1a, 0x0e, + 0x36, 0x07, 0x2c, 0xa3, 0x74, 0x82, 0x91, 0x4b, 0xd0, 0x39, 0xb5, 0xa8, 0x24, 0x33, 0x2d, 0x33, + 0x39, 0xb1, 0x24, 0xd5, 0x0d, 0x6c, 0xad, 0x90, 0x3b, 0x17, 0x6b, 0x7e, 0x79, 0x5e, 0x6a, 0x91, + 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xe1, 0xab, 0x7b, 0xf2, 0x10, 0x81, 0x4f, 0xf7, 0xe4, + 0x79, 0x2a, 0x13, 0x73, 0x73, 0xac, 0x94, 0xc0, 0x5c, 0xa5, 0x4b, 0x5b, 0x74, 0x45, 0xa0, 0x36, + 0x39, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0x41, 0x94, + 0x0b, 0x19, 0x73, 0xb1, 0x15, 0xa7, 0x16, 0x65, 0x26, 0xe6, 0x48, 0x30, 0x81, 0x4d, 0x92, 0x7e, + 0x75, 0x4f, 0x1e, 0x2a, 0xf2, 0xe9, 0x9e, 0x3c, 0x2f, 0xc4, 0x28, 0x08, 0x5f, 0x29, 0x08, 0x2a, + 0x21, 0xa4, 0xcf, 0xc5, 0x5a, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xc1, 0x0c, 0xd6, 0x23, 0x09, 0xb2, + 0x1d, 0x2c, 0x80, 0xb0, 0x1d, 0xcc, 0x55, 0x0a, 0x82, 0x08, 0x5b, 0xb1, 0xbc, 0x58, 0x20, 0xcf, + 0xe0, 0x64, 0x72, 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, 0x52, 0x05, 0xd9, + 0xe9, 0x7a, 0x89, 0xd9, 0x25, 0x7a, 0x99, 0xa0, 0x00, 0xd3, 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x85, + 0x45, 0x12, 0x1b, 0x38, 0x1c, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xac, 0xa8, 0x39, + 0x80, 0x01, 0x00, 0x00, +} + +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 = encodeVarintFilters(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 = encodeVarintFilters(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 = encodeVarintFilters(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFilters(dAtA []byte, offset int, v uint64) int { + offset -= sovFilters(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovFilters(uint64(l)) + } + l = len(m.Serial) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + return n +} + +func sovFilters(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFilters(x uint64) (n int) { + return sovFilters(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowFilters + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFilters(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFilters + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFilters(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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrInvalidLengthFilters + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFilters + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFilters + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFilters = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFilters = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFilters = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta1/genesis.go b/go/node/cert/v1/genesis.go similarity index 98% rename from go/node/cert/v1beta1/genesis.go rename to go/node/cert/v1/genesis.go index c245a5b7..6433543b 100644 --- a/go/node/cert/v1beta1/genesis.go +++ b/go/node/cert/v1/genesis.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 import ( "bytes" diff --git a/go/node/cert/v1beta1/genesis.pb.go b/go/node/cert/v1/genesis.pb.go similarity index 82% rename from go/node/cert/v1beta1/genesis.pb.go rename to go/node/cert/v1/genesis.pb.go index a2b97b62..2f275cfc 100644 --- a/go/node/cert/v1beta1/genesis.pb.go +++ b/go/node/cert/v1/genesis.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta1/genesis.proto +// source: akash/cert/v1/genesis.proto -package v1beta1 +package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -33,7 +34,7 @@ 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_4ec22c8e0afb2f99, []int{0} + return fileDescriptor_079f259b80baefa9, []int{0} } func (m *GenesisCertificate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -85,7 +86,7 @@ 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_4ec22c8e0afb2f99, []int{1} + return fileDescriptor_079f259b80baefa9, []int{1} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,34 +123,35 @@ func (m *GenesisState) GetCertificates() GenesisCertificates { } func init() { - proto.RegisterType((*GenesisCertificate)(nil), "akash.cert.v1beta1.GenesisCertificate") - proto.RegisterType((*GenesisState)(nil), "akash.cert.v1beta1.GenesisState") + proto.RegisterType((*GenesisCertificate)(nil), "akash.cert.v1.GenesisCertificate") + proto.RegisterType((*GenesisState)(nil), "akash.cert.v1.GenesisState") } -func init() { proto.RegisterFile("akash/cert/v1beta1/genesis.proto", fileDescriptor_4ec22c8e0afb2f99) } +func init() { proto.RegisterFile("akash/cert/v1/genesis.proto", fileDescriptor_079f259b80baefa9) } -var fileDescriptor_4ec22c8e0afb2f99 = []byte{ - // 315 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, 0xd4, 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, 0x72, 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, 0x9d, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, - 0xe4, 0xfc, 0x5c, 0xfd, 0xfc, 0xb2, 0xa2, 0xe4, 0x9c, 0x6c, 0x7d, 0x48, 0xc4, 0x55, 0x40, 0xa2, - 0xae, 0xa4, 0xb2, 0x20, 0xb5, 0x18, 0x16, 0x81, 0x49, 0x6c, 0xe0, 0x68, 0x32, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xfe, 0x8e, 0x65, 0xd0, 0x13, 0x02, 0x00, 0x00, +var fileDescriptor_079f259b80baefa9 = []byte{ + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4e, 0x2d, 0x2a, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, + 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x4b, 0xea, 0x81, 0x24, 0xf5, 0xca, + 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x32, 0xfa, 0x20, 0x16, 0x44, 0x91, 0x94, 0x64, + 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x4a, 0x49, 0xa0, 0x1a, 0x0e, + 0x36, 0x07, 0x2c, 0xa3, 0x74, 0x8c, 0x91, 0x4b, 0xc8, 0x1d, 0x62, 0x97, 0x73, 0x6a, 0x51, 0x49, + 0x66, 0x5a, 0x66, 0x72, 0x62, 0x49, 0xaa, 0x90, 0x3b, 0x17, 0x6b, 0x7e, 0x79, 0x5e, 0x6a, 0x91, + 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xe1, 0xab, 0x7b, 0xf2, 0x10, 0x81, 0x4f, 0xf7, 0xe4, + 0x79, 0x2a, 0x13, 0x73, 0x73, 0xac, 0x94, 0xc0, 0x5c, 0xa5, 0x4b, 0x5b, 0x74, 0x45, 0xa0, 0x56, + 0x39, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0x41, 0x94, + 0x0b, 0xa5, 0x73, 0x71, 0x27, 0x23, 0xcc, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, + 0x43, 0xf1, 0x8f, 0x1e, 0x92, 0xcd, 0x4e, 0x9a, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x8f, + 0xac, 0xed, 0xd3, 0x3d, 0x79, 0x21, 0x88, 0xa5, 0x48, 0x82, 0x4a, 0x41, 0xc8, 0x4a, 0x94, 0x66, + 0x31, 0x72, 0xf1, 0x40, 0x3d, 0x12, 0x5c, 0x02, 0xf2, 0x42, 0x27, 0x23, 0x17, 0x0f, 0x92, 0x82, + 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x45, 0x34, 0xbb, 0x31, 0x3d, 0xef, 0xe4, 0x04, + 0x75, 0x02, 0x8a, 0xf6, 0x4f, 0xf7, 0xe4, 0x85, 0x31, 0xdc, 0x50, 0xac, 0xb4, 0xea, 0xbe, 0xbc, + 0x30, 0xa6, 0x11, 0xc5, 0x41, 0x28, 0x7a, 0x9d, 0x4c, 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, 0x4a, 0xaa, 0x20, 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x13, 0x14, 0x97, + 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xb0, 0x68, 0x4a, 0x62, 0x03, 0x47, 0x91, 0x31, 0x20, 0x00, 0x00, + 0xff, 0xff, 0x5e, 0xa2, 0x83, 0xa7, 0x1b, 0x02, 0x00, 0x00, } func (m *GenesisCertificate) Marshal() (dAtA []byte, err error) { diff --git a/go/node/cert/v1beta1/key.go b/go/node/cert/v1/key.go similarity index 94% rename from go/node/cert/v1beta1/key.go rename to go/node/cert/v1/key.go index 690af193..d76da27c 100644 --- a/go/node/cert/v1beta1/key.go +++ b/go/node/cert/v1/key.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 const ( // ModuleName is the module name constant used in many places diff --git a/go/node/cert/v1/msg.pb.go b/go/node/cert/v1/msg.pb.go new file mode 100644 index 00000000..414c4416 --- /dev/null +++ b/go/node/cert/v1/msg.pb.go @@ -0,0 +1,852 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1/msg.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// 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_d3964b4ee733a8c2, []int{0} +} +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_d3964b4ee733a8c2, []int{1} +} +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 ID `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_d3964b4ee733a8c2, []int{2} +} +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() ID { + if m != nil { + return m.ID + } + return ID{} +} + +// 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_d3964b4ee733a8c2, []int{3} +} +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.RegisterType((*MsgCreateCertificate)(nil), "akash.cert.v1.MsgCreateCertificate") + proto.RegisterType((*MsgCreateCertificateResponse)(nil), "akash.cert.v1.MsgCreateCertificateResponse") + proto.RegisterType((*MsgRevokeCertificate)(nil), "akash.cert.v1.MsgRevokeCertificate") + proto.RegisterType((*MsgRevokeCertificateResponse)(nil), "akash.cert.v1.MsgRevokeCertificateResponse") +} + +func init() { proto.RegisterFile("akash/cert/v1/msg.proto", fileDescriptor_d3964b4ee733a8c2) } + +var fileDescriptor_d3964b4ee733a8c2 = []byte{ + // 396 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x31, 0x6f, 0x9b, 0x40, + 0x18, 0x05, 0xea, 0x5a, 0x32, 0xb6, 0x2b, 0x15, 0x59, 0x32, 0xa5, 0x2d, 0x67, 0xdd, 0x64, 0xb5, + 0x2a, 0xc8, 0x75, 0x27, 0x4f, 0x2d, 0xb6, 0x54, 0x79, 0xe8, 0x42, 0xb7, 0x0e, 0x8d, 0xb0, 0xb9, + 0x90, 0x13, 0x31, 0x87, 0x38, 0xe2, 0xc8, 0x6b, 0x7e, 0x41, 0x7e, 0x42, 0x7e, 0x42, 0x86, 0xfc, + 0x08, 0x8f, 0x4e, 0xa6, 0x4c, 0xa7, 0x08, 0x0f, 0x89, 0x18, 0xf9, 0x05, 0x11, 0x77, 0x78, 0x40, + 0xc9, 0x76, 0xef, 0x7b, 0xdf, 0xbd, 0xf7, 0x3d, 0x3d, 0xb5, 0xef, 0x85, 0x1e, 0x3d, 0xb1, 0x97, + 0x28, 0x49, 0xed, 0xf5, 0xc8, 0x5e, 0xd1, 0xc0, 0x8a, 0x13, 0x92, 0x12, 0xad, 0xcb, 0x09, 0xab, + 0x24, 0xac, 0xf5, 0xc8, 0xe8, 0x05, 0x24, 0x20, 0x9c, 0xb1, 0xcb, 0x97, 0x58, 0x32, 0x3e, 0x2c, + 0x09, 0x5d, 0x11, 0x7a, 0x24, 0x08, 0x01, 0x2a, 0xaa, 0x2f, 0x50, 0xa9, 0x58, 0x13, 0x36, 0xf4, + 0xba, 0x23, 0x37, 0xe0, 0x0c, 0xbc, 0x95, 0xd5, 0xde, 0x1f, 0x1a, 0x4c, 0x13, 0xe4, 0xa5, 0x68, + 0x8a, 0x92, 0x14, 0x1f, 0xe3, 0xa5, 0x97, 0x22, 0xed, 0xb7, 0xfa, 0x96, 0x9c, 0x47, 0x28, 0xd1, + 0xe5, 0x81, 0x3c, 0x6c, 0x39, 0xa3, 0x9c, 0x01, 0x31, 0x28, 0x18, 0xe8, 0x6c, 0xbc, 0xd5, 0xe9, + 0x04, 0x72, 0x08, 0xef, 0x6e, 0xbe, 0xf5, 0xaa, 0x2b, 0x7e, 0xf9, 0x7e, 0x82, 0x28, 0xfd, 0x9b, + 0x26, 0x38, 0x0a, 0x5c, 0xb1, 0xae, 0x7d, 0x55, 0x1b, 0xa5, 0x9f, 0xae, 0x0c, 0xe4, 0x61, 0xc7, + 0xe9, 0xe7, 0x0c, 0x70, 0x5c, 0x30, 0xd0, 0x16, 0x32, 0x25, 0x82, 0x2e, 0x1f, 0x6a, 0x63, 0xb5, + 0x19, 0x9f, 0x2d, 0x42, 0xb4, 0xd1, 0xdf, 0xf0, 0xf5, 0x8f, 0x39, 0x03, 0xd5, 0xa4, 0x60, 0xa0, + 0x2b, 0x3e, 0x08, 0x0c, 0xdd, 0x8a, 0x98, 0xbc, 0x7b, 0xba, 0x02, 0xd2, 0xc5, 0xe3, 0xf5, 0x17, + 0xe1, 0x08, 0x4d, 0xf5, 0xd3, 0x6b, 0x91, 0x5c, 0x44, 0x63, 0x12, 0x51, 0x04, 0xff, 0xf3, 0xc8, + 0x2e, 0x5a, 0x93, 0xb0, 0x16, 0xf9, 0xa7, 0xaa, 0x60, 0x9f, 0xe7, 0x6d, 0x7f, 0x7f, 0x6f, 0xd5, + 0xba, 0xb0, 0xe6, 0x33, 0xe7, 0xf3, 0x96, 0x01, 0x29, 0x63, 0x40, 0x99, 0xcf, 0x72, 0x06, 0x14, + 0xec, 0x17, 0x0c, 0xb4, 0xc4, 0x45, 0xd8, 0x87, 0xae, 0x82, 0xfd, 0x49, 0xa3, 0xbc, 0xa4, 0xf2, + 0x7f, 0xa1, 0x7f, 0xf0, 0x77, 0x7e, 0x6c, 0x33, 0x53, 0xde, 0x65, 0xa6, 0xfc, 0x90, 0x99, 0xf2, + 0xe5, 0xde, 0x94, 0x76, 0x7b, 0x53, 0xba, 0xdf, 0x9b, 0xd2, 0x3f, 0x23, 0x0e, 0x03, 0xcb, 0x0b, + 0x53, 0x0b, 0x97, 0x95, 0xdb, 0x11, 0xf1, 0xd1, 0xa1, 0xb4, 0x45, 0x93, 0x17, 0x36, 0x7e, 0x0e, + 0x00, 0x00, 0xff, 0xff, 0xe8, 0xbb, 0xda, 0xf2, 0x3e, 0x02, 0x00, 0x00, +} + +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 = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovMsg(uint64(l)) + } + l = len(m.Cert) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovMsg(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 + sovMsg(uint64(l)) + return n +} + +func (m *MsgRevokeCertificateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/cert/v1beta1/msgs.go b/go/node/cert/v1/msgs.go similarity index 91% rename from go/node/cert/v1beta1/msgs.go rename to go/node/cert/v1/msgs.go index a5988bc9..7103cf53 100644 --- a/go/node/cert/v1beta1/msgs.go +++ b/go/node/cert/v1/msgs.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 import ( "math/big" @@ -32,7 +32,7 @@ func (m MsgCreateCertificate) Type() string { func (m MsgCreateCertificate) ValidateBasic() error { owner, err := sdk.AccAddressFromBech32(m.Owner) if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Owner Address") + return sdkerrors.ErrInvalidAddress.Wrap("MsgCreate: Invalid Owner Address") } _, err = ParseAndValidateCertificate(owner, m.Cert, m.Pubkey) @@ -59,6 +59,7 @@ func (m MsgCreateCertificate) GetSigners() []sdk.AccAddress { } // ====MsgRevokeCertificate==== + // Route implements the sdk.Msg interface func (m MsgRevokeCertificate) Route() string { return RouterKey @@ -72,7 +73,7 @@ func (m MsgRevokeCertificate) Type() string { // 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") + return sdkerrors.ErrInvalidAddress.Wrap("MsgRevoke: Invalid Owner Address") } if _, valid := new(big.Int).SetString(m.ID.Serial, 10); !valid { diff --git a/go/node/cert/v1beta1/query.pb.go b/go/node/cert/v1/query.pb.go similarity index 85% rename from go/node/cert/v1beta1/query.pb.go rename to go/node/cert/v1/query.pb.go index 850b2d8d..f0eeff22 100644 --- a/go/node/cert/v1beta1/query.pb.go +++ b/go/node/cert/v1/query.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta1/query.proto +// source: akash/cert/v1/query.proto -package v1beta1 +package v1 import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,7 +30,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// CertificateResponse is used by QueryCertificatesResponse +// 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"` @@ -40,7 +40,7 @@ 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_253641229681779f, []int{0} + return fileDescriptor_2e5d14d61992fa41, []int{0} } func (m *CertificateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ func (m *QueryCertificatesRequest) Reset() { *m = QueryCertificatesReque func (m *QueryCertificatesRequest) String() string { return proto.CompactTextString(m) } func (*QueryCertificatesRequest) ProtoMessage() {} func (*QueryCertificatesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_253641229681779f, []int{1} + return fileDescriptor_2e5d14d61992fa41, []int{1} } func (m *QueryCertificatesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -146,7 +146,7 @@ func (m *QueryCertificatesResponse) Reset() { *m = QueryCertificatesResp func (m *QueryCertificatesResponse) String() string { return proto.CompactTextString(m) } func (*QueryCertificatesResponse) ProtoMessage() {} func (*QueryCertificatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_253641229681779f, []int{2} + return fileDescriptor_2e5d14d61992fa41, []int{2} } func (m *QueryCertificatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,45 +190,45 @@ func (m *QueryCertificatesResponse) GetPagination() *query.PageResponse { } func init() { - proto.RegisterType((*CertificateResponse)(nil), "akash.cert.v1beta1.CertificateResponse") - proto.RegisterType((*QueryCertificatesRequest)(nil), "akash.cert.v1beta1.QueryCertificatesRequest") - proto.RegisterType((*QueryCertificatesResponse)(nil), "akash.cert.v1beta1.QueryCertificatesResponse") + proto.RegisterType((*CertificateResponse)(nil), "akash.cert.v1.CertificateResponse") + proto.RegisterType((*QueryCertificatesRequest)(nil), "akash.cert.v1.QueryCertificatesRequest") + proto.RegisterType((*QueryCertificatesResponse)(nil), "akash.cert.v1.QueryCertificatesResponse") } -func init() { proto.RegisterFile("akash/cert/v1beta1/query.proto", fileDescriptor_253641229681779f) } +func init() { proto.RegisterFile("akash/cert/v1/query.proto", fileDescriptor_2e5d14d61992fa41) } -var fileDescriptor_253641229681779f = []byte{ +var fileDescriptor_2e5d14d61992fa41 = []byte{ // 478 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xb1, 0x6e, 0xd4, 0x30, - 0x18, 0xc7, 0xcf, 0x05, 0x4e, 0xc2, 0x57, 0x16, 0xd3, 0xe1, 0x38, 0x4a, 0x72, 0x8a, 0x54, 0xee, - 0x40, 0xad, 0xad, 0x5e, 0x37, 0xc6, 0x54, 0x3a, 0x56, 0xc8, 0xc8, 0xe6, 0x44, 0x6e, 0x6a, 0x35, - 0x17, 0xa7, 0xb1, 0xaf, 0xe2, 0x56, 0x9e, 0x00, 0x89, 0x8d, 0x19, 0x09, 0x89, 0x27, 0xe0, 0x11, - 0xba, 0x51, 0x89, 0x85, 0x29, 0xa0, 0x3b, 0xa6, 0x8e, 0x7d, 0x02, 0x14, 0xdb, 0xa1, 0x46, 0xa4, - 0xba, 0x6e, 0x89, 0xff, 0xdf, 0xff, 0xff, 0xfd, 0xbe, 0xcf, 0x09, 0xf4, 0xe8, 0x09, 0x95, 0xc7, - 0x24, 0x61, 0xa5, 0x22, 0x67, 0xfb, 0x31, 0x53, 0x74, 0x9f, 0x9c, 0xce, 0x59, 0xb9, 0xc0, 0x45, - 0x29, 0x94, 0x40, 0x48, 0xeb, 0xb8, 0xd6, 0xb1, 0xd5, 0x07, 0x5b, 0xa9, 0x48, 0x85, 0x96, 0x49, - 0xfd, 0x64, 0x2a, 0x07, 0xdb, 0xa9, 0x10, 0x69, 0xc6, 0x08, 0x2d, 0x38, 0xa1, 0x79, 0x2e, 0x14, - 0x55, 0x5c, 0xe4, 0xd2, 0xaa, 0xcf, 0x13, 0x21, 0x67, 0x42, 0x92, 0x98, 0x4a, 0x66, 0x1a, 0xfc, - 0x6d, 0x57, 0xd0, 0x94, 0xe7, 0xba, 0xd8, 0xd6, 0x3e, 0x69, 0x61, 0xd2, 0x00, 0x5a, 0x0e, 0xbe, - 0x02, 0xf8, 0xf0, 0x90, 0x95, 0x8a, 0x1f, 0xf1, 0x84, 0x2a, 0x16, 0x31, 0x59, 0x88, 0x5c, 0x32, - 0x94, 0xc1, 0x5e, 0x72, 0x7d, 0xdc, 0x07, 0x43, 0x30, 0xee, 0x4d, 0x7c, 0xfc, 0xff, 0x00, 0xd8, - 0x71, 0x87, 0xcf, 0xce, 0x2b, 0xbf, 0x73, 0x59, 0xf9, 0xae, 0xf7, 0xaa, 0xf2, 0xd1, 0x82, 0xce, - 0xb2, 0x17, 0x81, 0x73, 0x18, 0x44, 0x6e, 0x09, 0x3a, 0x80, 0x5d, 0xc9, 0x4a, 0x4e, 0xb3, 0xfe, - 0xc6, 0x10, 0x8c, 0xef, 0x87, 0x8f, 0x2f, 0x2b, 0xdf, 0x9e, 0x5c, 0x55, 0xfe, 0x03, 0x63, 0x37, - 0xef, 0x41, 0x64, 0x85, 0xe0, 0x33, 0x80, 0xfd, 0xd7, 0xf5, 0xf0, 0x0e, 0x81, 0x8c, 0xd8, 0xe9, - 0x9c, 0x49, 0x85, 0x0e, 0x61, 0xf7, 0x88, 0x67, 0x8a, 0x95, 0x16, 0x7d, 0x67, 0x0d, 0xfa, 0x54, - 0x17, 0x87, 0x77, 0xeb, 0x01, 0x22, 0x6b, 0x45, 0x53, 0x08, 0xaf, 0xf7, 0xa9, 0xd1, 0x7a, 0x93, - 0xa7, 0xd8, 0x2c, 0x1f, 0xd7, 0xcb, 0xc7, 0xe6, 0x76, 0x9b, 0xbc, 0x57, 0x34, 0x65, 0x16, 0x20, - 0x72, 0x9c, 0xc1, 0x37, 0x00, 0x1f, 0xb5, 0x90, 0xda, 0x55, 0x73, 0xb8, 0xe9, 0xec, 0x42, 0xf6, - 0xc1, 0xf0, 0xce, 0xb8, 0x37, 0x19, 0xad, 0x01, 0x6e, 0xec, 0xe1, 0x76, 0x8d, 0xfc, 0xe5, 0xa7, - 0xbf, 0xd5, 0x16, 0x1e, 0xfd, 0x13, 0x8d, 0x5e, 0xb6, 0x0c, 0x34, 0x5a, 0x3b, 0x90, 0x8d, 0x72, - 0xac, 0x93, 0x4f, 0x00, 0xde, 0xd3, 0x13, 0xa1, 0x8f, 0x00, 0x6e, 0xba, 0x9d, 0xd1, 0x6e, 0x1b, - 0xf8, 0x4d, 0xf7, 0x34, 0xd8, 0xbb, 0x65, 0xb5, 0x61, 0x08, 0xf6, 0xde, 0x7d, 0xff, 0xfd, 0x61, - 0x63, 0x84, 0x76, 0xc8, 0x0d, 0x9f, 0x75, 0xe3, 0x20, 0x19, 0x97, 0x2a, 0x9c, 0x9e, 0x2f, 0x3d, - 0x70, 0xb1, 0xf4, 0xc0, 0xaf, 0xa5, 0x07, 0xde, 0xaf, 0xbc, 0xce, 0xc5, 0xca, 0xeb, 0xfc, 0x58, - 0x79, 0x9d, 0x37, 0xbb, 0x29, 0x57, 0xc7, 0xf3, 0x18, 0x27, 0x62, 0x46, 0xc4, 0x59, 0x99, 0x64, - 0x27, 0x36, 0xf1, 0xad, 0xc9, 0x54, 0x8b, 0x82, 0xc9, 0x26, 0x39, 0xee, 0xea, 0x9f, 0xe5, 0xe0, - 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x95, 0x96, 0xca, 0xe1, 0x03, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xbf, 0x6f, 0x13, 0x31, + 0x14, 0x8e, 0x0b, 0x44, 0xc2, 0x69, 0x17, 0xd3, 0xe1, 0x7a, 0xad, 0xee, 0xc2, 0x0d, 0x24, 0x30, + 0xd8, 0x4a, 0xca, 0xc4, 0xc0, 0x70, 0x48, 0x65, 0x85, 0x1b, 0xd9, 0x9c, 0xd4, 0x35, 0x56, 0xae, + 0xe7, 0xeb, 0xd9, 0x8d, 0xd4, 0x95, 0x91, 0x09, 0x09, 0xfe, 0x02, 0x46, 0x56, 0xfe, 0x89, 0x8a, + 0xa9, 0x12, 0x0b, 0xd3, 0x81, 0x12, 0xa6, 0x8e, 0xfd, 0x0b, 0xd0, 0xd9, 0x8e, 0xea, 0x43, 0x89, + 0xba, 0xdd, 0xbd, 0xef, 0xfb, 0xde, 0xfb, 0xde, 0x0f, 0xc3, 0x3d, 0x3a, 0xa3, 0xea, 0x3d, 0x99, + 0xb2, 0x4a, 0x93, 0xf9, 0x88, 0x9c, 0x9d, 0xb3, 0xea, 0x02, 0x97, 0x95, 0xd4, 0x12, 0xed, 0x18, + 0x08, 0x37, 0x10, 0x9e, 0x8f, 0xc2, 0x5d, 0x2e, 0xb9, 0x34, 0x08, 0x69, 0xbe, 0x2c, 0x29, 0x3c, + 0xe0, 0x52, 0xf2, 0x9c, 0x11, 0x5a, 0x0a, 0x42, 0x8b, 0x42, 0x6a, 0xaa, 0x85, 0x2c, 0x94, 0x43, + 0x9f, 0x4d, 0xa5, 0x3a, 0x95, 0x8a, 0x4c, 0xa8, 0x62, 0x36, 0x37, 0x99, 0x8f, 0x26, 0x4c, 0xd3, + 0x11, 0x29, 0x29, 0x17, 0x85, 0x21, 0x3b, 0x6e, 0xd0, 0x76, 0x62, 0xca, 0x5a, 0x64, 0xbf, 0x8d, + 0x9c, 0x88, 0x5c, 0xb3, 0xca, 0x95, 0x48, 0xbe, 0x03, 0xf8, 0xe8, 0x15, 0xab, 0xb4, 0x38, 0x11, + 0x53, 0xaa, 0x59, 0xc6, 0x54, 0x29, 0x0b, 0xc5, 0x10, 0x87, 0xbd, 0xe9, 0x6d, 0x38, 0x00, 0x7d, + 0x30, 0xec, 0x8d, 0x43, 0xdc, 0xea, 0x09, 0x7b, 0xc2, 0xf4, 0xe9, 0x65, 0x1d, 0x77, 0xae, 0xeb, + 0xd8, 0x97, 0xdd, 0xd4, 0x31, 0xba, 0xa0, 0xa7, 0xf9, 0x8b, 0xc4, 0x0b, 0x26, 0x99, 0x4f, 0x41, + 0x87, 0xb0, 0xab, 0x58, 0x25, 0x68, 0x1e, 0x6c, 0xf5, 0xc1, 0xf0, 0x61, 0xba, 0x7f, 0x5d, 0xc7, + 0x2e, 0x72, 0x53, 0xc7, 0x3b, 0x56, 0x6e, 0xff, 0x93, 0xcc, 0x01, 0xc9, 0x57, 0x00, 0x83, 0xb7, + 0xcd, 0x3c, 0x3c, 0x07, 0x2a, 0x63, 0x67, 0xe7, 0x4c, 0x69, 0xf4, 0x12, 0x76, 0x6d, 0x8f, 0xce, + 0x75, 0x7f, 0xb3, 0xeb, 0x23, 0xc3, 0x4b, 0xef, 0x37, 0xde, 0x33, 0xa7, 0x42, 0x47, 0x10, 0xde, + 0x4e, 0xd7, 0xb8, 0xea, 0x8d, 0x9f, 0x60, 0xbb, 0x0a, 0xdc, 0xac, 0x02, 0xdb, 0x35, 0xbb, 0x55, + 0xe0, 0x37, 0x94, 0x33, 0x57, 0x3b, 0xf3, 0x94, 0xc9, 0x0f, 0x00, 0xf7, 0xd6, 0x98, 0x74, 0x03, + 0x3e, 0x86, 0xdb, 0xde, 0x18, 0x54, 0x00, 0xfa, 0xf7, 0x86, 0xbd, 0x71, 0xb2, 0xd9, 0xeb, 0x4a, + 0x99, 0x1e, 0x34, 0x6e, 0xbf, 0xfd, 0x8e, 0x77, 0xd7, 0xe5, 0xcd, 0x5a, 0x59, 0xd1, 0xeb, 0x35, + 0xbd, 0x0c, 0xee, 0xec, 0xc5, 0xa5, 0xf2, 0xa4, 0xe3, 0x2f, 0x00, 0x3e, 0x30, 0xcd, 0xa0, 0x8f, + 0x00, 0x6e, 0xfb, 0x95, 0xd1, 0xe0, 0x3f, 0xcf, 0x9b, 0x16, 0x13, 0x0e, 0xef, 0x26, 0xda, 0xca, + 0xc9, 0xe0, 0xc3, 0xcf, 0xbf, 0x9f, 0xb7, 0x1e, 0xa3, 0x98, 0x78, 0xb7, 0x6b, 0x8f, 0x7a, 0xc5, + 0x25, 0xb9, 0x50, 0x3a, 0x7d, 0x7e, 0xb9, 0x88, 0xc0, 0xd5, 0x22, 0x02, 0x7f, 0x16, 0x11, 0xf8, + 0xb4, 0x8c, 0x3a, 0x57, 0xcb, 0xa8, 0xf3, 0x6b, 0x19, 0x75, 0xde, 0x85, 0xe5, 0x8c, 0x63, 0x3a, + 0xd3, 0x58, 0x34, 0x0f, 0x8e, 0x14, 0xf2, 0x98, 0xad, 0x9e, 0xc0, 0xa4, 0x6b, 0x6e, 0xff, 0xf0, + 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xb7, 0x91, 0x67, 0xbe, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -257,7 +257,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Certificates(ctx context.Context, in *QueryCertificatesRequest, opts ...grpc.CallOption) (*QueryCertificatesResponse, error) { out := new(QueryCertificatesResponse) - err := c.cc.Invoke(ctx, "/akash.cert.v1beta1.Query/Certificates", in, out, opts...) + err := c.cc.Invoke(ctx, "/akash.cert.v1.Query/Certificates", in, out, opts...) if err != nil { return nil, err } @@ -292,7 +292,7 @@ func _Query_Certificates_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.cert.v1beta1.Query/Certificates", + FullMethod: "/akash.cert.v1.Query/Certificates", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Certificates(ctx, req.(*QueryCertificatesRequest)) @@ -301,7 +301,7 @@ func _Query_Certificates_Handler(srv interface{}, ctx context.Context, dec func( } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "akash.cert.v1beta1.Query", + ServiceName: "akash.cert.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -310,7 +310,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "akash/cert/v1beta1/query.proto", + Metadata: "akash/cert/v1/query.proto", } func (m *CertificateResponse) Marshal() (dAtA []byte, err error) { diff --git a/go/node/cert/v1beta1/query.pb.gw.go b/go/node/cert/v1/query.pb.gw.go similarity index 97% rename from go/node/cert/v1beta1/query.pb.gw.go rename to go/node/cert/v1/query.pb.gw.go index ee54fd8d..d8a96db6 100644 --- a/go/node/cert/v1beta1/query.pb.gw.go +++ b/go/node/cert/v1/query.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/cert/v1beta2/query.proto +// source: akash/cert/v1/query.proto /* -Package v1beta1 is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1beta1 +package v1 import ( "context" @@ -163,7 +163,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta2", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "1", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/cert/v1/service.pb.go b/go/node/cert/v1/service.pb.go new file mode 100644 index 00000000..75af1756 --- /dev/null +++ b/go/node/cert/v1/service.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/cert/v1/service.proto + +package v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + 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/cert/v1/service.proto", fileDescriptor_b880d9d2b395389a) } + +var fileDescriptor_b880d9d2b395389a = []byte{ + // 222 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x4e, 0x2d, 0x2a, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, + 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x4b, 0xea, 0x81, 0x24, 0xf5, 0xca, + 0x0c, 0xa5, 0xc4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x73, 0x8b, 0xd3, 0x41, 0x6a, 0x73, + 0x8b, 0xd3, 0x21, 0xea, 0xa4, 0xc4, 0x51, 0x0d, 0x81, 0x4b, 0x18, 0xdd, 0x62, 0xe4, 0x62, 0xf6, + 0x2d, 0x4e, 0x17, 0x4a, 0xe5, 0x12, 0x74, 0x2e, 0x4a, 0x4d, 0x2c, 0x49, 0x75, 0x4e, 0x2d, 0x2a, + 0xc9, 0x4c, 0xcb, 0x4c, 0x4e, 0x2c, 0x49, 0x15, 0x52, 0xd6, 0x43, 0x31, 0x5e, 0xcf, 0xb7, 0x38, + 0x1d, 0x43, 0x91, 0x94, 0x36, 0x11, 0x8a, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x41, + 0xd6, 0x04, 0xa5, 0x96, 0xe5, 0x67, 0x13, 0xb2, 0x06, 0x43, 0x11, 0x36, 0x6b, 0x30, 0x14, 0xc1, + 0xac, 0x91, 0x62, 0x6d, 0x78, 0xbe, 0x41, 0x8b, 0xd1, 0xc9, 0xe4, 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, 0xa4, 0x0a, 0xb2, 0xd3, 0xf5, 0x12, 0xb3, 0x4b, 0xf4, 0x32, 0xf3, + 0xf5, 0xd3, 0xf3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x61, 0x81, 0x93, 0xc4, 0x06, 0x0e, 0x19, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x0c, 0xaf, 0x74, 0x79, 0x01, 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.v1.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.v1.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.v1.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.v1.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.v1.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/v1/service.proto", +} diff --git a/go/node/cert/v1beta3/types.go b/go/node/cert/v1/types.go similarity index 94% rename from go/node/cert/v1beta3/types.go rename to go/node/cert/v1/types.go index 4402f697..878976c0 100644 --- a/go/node/cert/v1beta3/types.go +++ b/go/node/cert/v1/types.go @@ -1,4 +1,4 @@ -package v1beta3 +package v1 import ( "bytes" @@ -18,7 +18,7 @@ type CertID struct { Serial big.Int } -func ToCertID(id CertificateID) (CertID, error) { +func ToCertID(id ID) (CertID, error) { addr, err := sdk.AccAddressFromBech32(id.Owner) if err != nil { return CertID{}, err diff --git a/go/node/cert/v1beta3/utils/constants.go b/go/node/cert/v1/utils/constants.go similarity index 100% rename from go/node/cert/v1beta3/utils/constants.go rename to go/node/cert/v1/utils/constants.go diff --git a/go/node/cert/v1beta3/utils/key_pair_manager.go b/go/node/cert/v1/utils/key_pair_manager.go similarity index 99% rename from go/node/cert/v1beta3/utils/key_pair_manager.go rename to go/node/cert/v1/utils/key_pair_manager.go index 4d27026a..6b07c1c9 100644 --- a/go/node/cert/v1beta3/utils/key_pair_manager.go +++ b/go/node/cert/v1/utils/key_pair_manager.go @@ -22,7 +22,7 @@ import ( sdkclient "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" - types "github.com/akash-network/akash-api/go/node/cert/v1beta3" + types "pkg.akt.io/go/node/cert/v1" ) var ( diff --git a/go/node/cert/v1beta3/utils/utils.go b/go/node/cert/v1/utils/utils.go similarity index 96% rename from go/node/cert/v1beta3/utils/utils.go rename to go/node/cert/v1/utils/utils.go index c8ea0e95..64032cae 100644 --- a/go/node/cert/v1beta3/utils/utils.go +++ b/go/node/cert/v1/utils/utils.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" + ctypes "pkg.akt.io/go/node/cert/v1" ) // LoadAndQueryCertificateForAccount wraps LoadAndQueryPEMForAccount and tls.X509KeyPair diff --git a/go/node/cert/v1beta1/cert.pb.go b/go/node/cert/v1beta1/cert.pb.go deleted file mode 100644 index edb7680c..00000000 --- a/go/node/cert/v1beta1/cert.pb.go +++ /dev/null @@ -1,1775 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta1/cert.proto - -package v1beta1 - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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_6bba68168592156e, []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_6bba68168592156e, []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.v1beta1.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_6bba68168592156e, []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_6bba68168592156e, []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_6bba68168592156e, []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_6bba68168592156e, []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_6bba68168592156e, []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_6bba68168592156e, []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.v1beta1.Certificate_State", Certificate_State_name, Certificate_State_value) - proto.RegisterType((*CertificateID)(nil), "akash.cert.v1beta1.CertificateID") - proto.RegisterType((*Certificate)(nil), "akash.cert.v1beta1.Certificate") - proto.RegisterType((*CertificateFilter)(nil), "akash.cert.v1beta1.CertificateFilter") - proto.RegisterType((*MsgCreateCertificate)(nil), "akash.cert.v1beta1.MsgCreateCertificate") - proto.RegisterType((*MsgCreateCertificateResponse)(nil), "akash.cert.v1beta1.MsgCreateCertificateResponse") - proto.RegisterType((*MsgRevokeCertificate)(nil), "akash.cert.v1beta1.MsgRevokeCertificate") - proto.RegisterType((*MsgRevokeCertificateResponse)(nil), "akash.cert.v1beta1.MsgRevokeCertificateResponse") -} - -func init() { proto.RegisterFile("akash/cert/v1beta1/cert.proto", fileDescriptor_6bba68168592156e) } - -var fileDescriptor_6bba68168592156e = []byte{ - // 580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xb1, 0x6f, 0xda, 0x4e, - 0x14, 0xb6, 0x0d, 0x24, 0xbf, 0x1c, 0xc9, 0x4f, 0xc4, 0x42, 0x0d, 0x75, 0x1a, 0x1f, 0xbd, 0xaa, - 0x12, 0x52, 0x2b, 0xbb, 0x21, 0x1b, 0x23, 0x41, 0x91, 0x18, 0x22, 0x55, 0xae, 0x94, 0xa1, 0x9b, - 0xc1, 0x57, 0x72, 0x82, 0x60, 0x64, 0x5f, 0x68, 0x19, 0xaa, 0xae, 0x15, 0x53, 0xc7, 0x2e, 0x48, - 0x91, 0xfa, 0x07, 0xb4, 0x7f, 0x45, 0x95, 0x31, 0x63, 0xa7, 0x53, 0x05, 0x43, 0x2b, 0x46, 0xfe, - 0x82, 0xca, 0xef, 0x40, 0xb8, 0x32, 0xb4, 0xc9, 0xd2, 0xcd, 0xef, 0x7d, 0xdf, 0xf9, 0x7d, 0xdf, - 0x7d, 0xa7, 0x87, 0x0e, 0xdc, 0xb6, 0x1b, 0x9e, 0xdb, 0x4d, 0x1a, 0x70, 0xbb, 0x7f, 0xd8, 0xa0, - 0xdc, 0x3d, 0x84, 0xc2, 0xea, 0x05, 0x3e, 0xf7, 0x75, 0x1d, 0x60, 0x0b, 0x3a, 0x73, 0xd8, 0xc8, - 0xb7, 0xfc, 0x96, 0x0f, 0xb0, 0x1d, 0x7d, 0x49, 0x26, 0x79, 0x87, 0x76, 0x8e, 0x69, 0xc0, 0xd9, - 0x2b, 0xd6, 0x74, 0x39, 0xad, 0xd7, 0x74, 0x1b, 0x65, 0xfc, 0xd7, 0x5d, 0x1a, 0x14, 0xd4, 0xa2, - 0x5a, 0xda, 0xaa, 0xde, 0x9f, 0x0a, 0x2c, 0x1b, 0x33, 0x81, 0xb7, 0x07, 0xee, 0x45, 0xa7, 0x42, - 0xa0, 0x24, 0x8e, 0x6c, 0xeb, 0x47, 0x68, 0x23, 0xa4, 0x01, 0x73, 0x3b, 0x05, 0x0d, 0x4e, 0xec, - 0x4f, 0x05, 0x9e, 0x77, 0x66, 0x02, 0xef, 0xc8, 0x23, 0xb2, 0x26, 0xce, 0x1c, 0xa8, 0xfc, 0xf7, - 0xf1, 0x0a, 0x2b, 0x3f, 0xaf, 0xb0, 0x42, 0xbe, 0x6a, 0x28, 0x1b, 0x53, 0xa0, 0x9f, 0xa1, 0x4c, - 0xc8, 0x5d, 0x4e, 0xe1, 0x6f, 0xff, 0x97, 0x1f, 0x5b, 0x49, 0x2b, 0x56, 0x8c, 0x6f, 0xbd, 0x88, - 0xc8, 0x52, 0x26, 0x9c, 0x5b, 0xca, 0x84, 0x92, 0x38, 0xb2, 0xad, 0x3f, 0x41, 0xe9, 0xe8, 0x1f, - 0x85, 0x54, 0x51, 0x2d, 0x6d, 0x57, 0xf7, 0xa6, 0x02, 0x43, 0x3d, 0x13, 0x38, 0x2b, 0xe9, 0x51, - 0x45, 0x1c, 0x68, 0x46, 0x9e, 0x7a, 0x97, 0x8d, 0x36, 0x1d, 0x14, 0xd2, 0x40, 0x07, 0x4f, 0xb2, - 0xb3, 0xf4, 0x24, 0x6b, 0xe2, 0xcc, 0x01, 0xf2, 0x16, 0x65, 0x40, 0x8c, 0x5e, 0x42, 0x9b, 0xac, - 0xdb, 0x77, 0x3b, 0xcc, 0xcb, 0x29, 0xc6, 0xfe, 0x70, 0x54, 0xdc, 0x8b, 0x09, 0x06, 0x4a, 0x5d, - 0xc2, 0x3a, 0x46, 0x19, 0xc9, 0x53, 0x8d, 0xfc, 0x70, 0x54, 0xcc, 0xc5, 0x78, 0x67, 0x40, 0x78, - 0x84, 0x36, 0x03, 0xda, 0xf7, 0xdb, 0xd4, 0xcb, 0x69, 0xc6, 0xbd, 0xe1, 0xa8, 0xa8, 0xc7, 0x28, - 0x8e, 0x44, 0x8c, 0xf4, 0xfb, 0x4f, 0xa6, 0x42, 0xbe, 0xa8, 0x68, 0x37, 0x06, 0x9e, 0xb0, 0x0e, - 0xa7, 0xc1, 0xbf, 0x89, 0x33, 0x9a, 0x22, 0x43, 0x4b, 0x2d, 0xa7, 0xfc, 0x29, 0x8d, 0x4a, 0x1a, - 0xb2, 0xff, 0xac, 0xa2, 0xfc, 0x69, 0xd8, 0x3a, 0x0e, 0xa8, 0xcb, 0x69, 0xfc, 0x11, 0xdc, 0x59, - 0xf5, 0x22, 0x5d, 0xed, 0x6e, 0xe9, 0xa6, 0x6e, 0x9d, 0xee, 0x5c, 0xb1, 0x89, 0x1e, 0xac, 0x12, - 0xec, 0xd0, 0xb0, 0xe7, 0x77, 0x43, 0x4a, 0xba, 0x60, 0x48, 0x06, 0x13, 0x37, 0xf4, 0x1c, 0x69, - 0xcc, 0x03, 0x37, 0xd9, 0xf2, 0xc3, 0xbf, 0x3c, 0xe9, 0x7a, 0xad, 0x7a, 0x70, 0x2d, 0xb0, 0x32, - 0x16, 0x58, 0xab, 0xd7, 0xa6, 0x02, 0x6b, 0xcc, 0x9b, 0x09, 0xbc, 0x25, 0x75, 0x31, 0x8f, 0x38, - 0x1a, 0xf3, 0x7e, 0xd3, 0x93, 0x98, 0xb7, 0xd0, 0x53, 0xfe, 0xa1, 0xa2, 0xd4, 0x69, 0xd8, 0xd2, - 0x7d, 0xb4, 0x9b, 0xbc, 0xe5, 0xd2, 0x2a, 0x21, 0xab, 0xec, 0x19, 0xcf, 0x6e, 0xcb, 0x5c, 0x0c, - 0x8e, 0x06, 0x26, 0x6f, 0x61, 0xdd, 0xc0, 0x04, 0x73, 0xed, 0xc0, 0xb5, 0x4e, 0xab, 0x27, 0xd7, - 0x63, 0x53, 0xbd, 0x19, 0x9b, 0xea, 0xf7, 0xb1, 0xa9, 0x7e, 0x98, 0x98, 0xca, 0xcd, 0xc4, 0x54, - 0xbe, 0x4d, 0x4c, 0xe5, 0xe5, 0xd3, 0x16, 0xe3, 0xe7, 0x97, 0x0d, 0xab, 0xe9, 0x5f, 0xd8, 0x7e, - 0x3f, 0x68, 0x76, 0xda, 0xb6, 0xdc, 0x9e, 0x6f, 0xe4, 0xfe, 0xe4, 0x83, 0x1e, 0x0d, 0x17, 0x5b, - 0xb4, 0xb1, 0x01, 0x7b, 0xf1, 0xe8, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x23, 0x39, 0x51, - 0x62, 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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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/v1beta1/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/v1beta1/errors.go b/go/node/cert/v1beta1/errors.go deleted file mode 100644 index 16670e1e..00000000 --- a/go/node/cert/v1beta1/errors.go +++ /dev/null @@ -1,19 +0,0 @@ -package v1beta1 - -import ( - "github.com/pkg/errors" -) - -var ( - // 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") -) diff --git a/go/node/cert/v1beta1/types.go b/go/node/cert/v1beta1/types.go deleted file mode 100644 index 2458610a..00000000 --- a/go/node/cert/v1beta1/types.go +++ /dev/null @@ -1,70 +0,0 @@ -package v1beta1 - -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/v1beta2/cert.go b/go/node/cert/v1beta2/cert.go deleted file mode 100644 index adbc6aca..00000000 --- a/go/node/cert/v1beta2/cert.go +++ /dev/null @@ -1,71 +0,0 @@ -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 deleted file mode 100644 index a58d05d8..00000000 --- a/go/node/cert/v1beta2/cert.pb.go +++ /dev/null @@ -1,1775 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta2/cert.proto - -package v1beta2 - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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 deleted file mode 100644 index 0689b574..00000000 --- a/go/node/cert/v1beta2/codec.go +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index a8a76ce3..00000000 --- a/go/node/cert/v1beta2/errors.go +++ /dev/null @@ -1,34 +0,0 @@ -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 deleted file mode 100644 index fb866daf..00000000 --- a/go/node/cert/v1beta2/genesis.go +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index c460a9ba..00000000 --- a/go/node/cert/v1beta2/genesis.pb.go +++ /dev/null @@ -1,561 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/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 - -// 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 deleted file mode 100644 index 97f23e3b..00000000 --- a/go/node/cert/v1beta2/key.go +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index de1abb2f..00000000 --- a/go/node/cert/v1beta2/msgs.go +++ /dev/null @@ -1,98 +0,0 @@ -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 deleted file mode 100644 index 9ce28e7a..00000000 --- a/go/node/cert/v1beta2/query.pb.go +++ /dev/null @@ -1,954 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index bf0f7790..00000000 --- a/go/node/cert/v1beta2/query.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// 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(true))) -) - -var ( - forward_Query_Certificates_0 = runtime.ForwardResponseMessage -) diff --git a/go/node/cert/v1beta2/types.go b/go/node/cert/v1beta2/types.go deleted file mode 100644 index 38b541f7..00000000 --- a/go/node/cert/v1beta2/types.go +++ /dev/null @@ -1,70 +0,0 @@ -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 deleted file mode 100644 index 404d14f7..00000000 --- a/go/node/cert/v1beta3/cert.go +++ /dev/null @@ -1,71 +0,0 @@ -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 deleted file mode 100644 index 1e44aa58..00000000 --- a/go/node/cert/v1beta3/cert.pb.go +++ /dev/null @@ -1,1775 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta3/cert.proto - -package v1beta3 - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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 deleted file mode 100644 index faef3ce3..00000000 --- a/go/node/cert/v1beta3/codec.go +++ /dev/null @@ -1,43 +0,0 @@ -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/genesis.go b/go/node/cert/v1beta3/genesis.go deleted file mode 100644 index 9b49f8cc..00000000 --- a/go/node/cert/v1beta3/genesis.go +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index de4b528c..00000000 --- a/go/node/cert/v1beta3/genesis.pb.go +++ /dev/null @@ -1,561 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/cert/v1beta3/genesis.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index ace5bb82..00000000 --- a/go/node/cert/v1beta3/key.go +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 86dd0d94..00000000 --- a/go/node/cert/v1beta3/msgs.go +++ /dev/null @@ -1,98 +0,0 @@ -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 deleted file mode 100644 index 7f4c09c0..00000000 --- a/go/node/cert/v1beta3/query.pb.go +++ /dev/null @@ -1,954 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 4694c126..00000000 --- a/go/node/cert/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// 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(true))) -) - -var ( - forward_Query_Certificates_0 = runtime.ForwardResponseMessage -) diff --git a/go/node/client/akash.pb.go b/go/node/client/akash.pb.go index 503fbd7e..c7147fbc 100644 --- a/go/node/client/akash.pb.go +++ b/go/node/client/akash.pb.go @@ -5,8 +5,8 @@ package client import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("akash/discovery/v1/akash.proto", fileDescriptor_bf31dd3d85bbd20d) } var fileDescriptor_bf31dd3d85bbd20d = []byte{ - // 225 bytes of a gzipped FileDescriptorProto + // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0xc9, 0x2c, 0x4e, 0xce, 0x2f, 0x4b, 0x2d, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x07, 0x0b, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x41, 0x38, 0x70, 0x79, 0xbd, 0x32, 0x43, @@ -84,13 +84,11 @@ var fileDescriptor_bf31dd3d85bbd20d = []byte{ 0xc5, 0xea, 0x08, 0xd2, 0x2d, 0x54, 0xc2, 0xc5, 0x8d, 0xa4, 0x47, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x4e, 0x0f, 0xd3, 0x3a, 0x3d, 0x67, 0xb0, 0x32, 0xcf, 0xbc, 0xb4, 0x7c, 0x27, 0xe3, 0x47, 0xf7, 0xe4, 0xb9, 0x10, 0xfc, 0x57, 0xf7, 0xe4, 0x91, 0x0d, 0xf9, 0x74, 0x4f, 0x5e, 0xa8, - 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x49, 0x50, 0x29, 0x88, 0x2b, 0x19, 0x61, 0x80, 0xf7, 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, 0x19, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, - 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0x02, 0x40, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, - 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0x85, 0x7a, 0x36, 0x89, 0x0d, - 0xec, 0x25, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0xd8, 0x43, 0x8d, 0x44, 0x01, 0x00, - 0x00, + 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x49, 0x50, 0x29, 0x88, 0x2b, 0x19, 0xc9, 0x80, 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, 0x92, 0x2c, 0xc8, 0x4e, 0xd7, 0x4b, 0xcc, 0x2e, + 0xd1, 0xcb, 0x04, 0xb9, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0xea, 0xa9, 0x24, 0x36, 0xb0, 0xd3, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xe4, 0x42, 0xd4, 0x2c, 0x01, 0x00, 0x00, } func (m *Akash) Marshal() (dAtA []byte, err error) { diff --git a/go/node/client/client.go b/go/node/client/client.go index fa8c8f99..bb10bdba 100644 --- a/go/node/client/client.go +++ b/go/node/client/client.go @@ -4,13 +4,12 @@ import ( "context" "errors" - tmjclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" + tmjclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" sdkclient "github.com/cosmos/cosmos-sdk/client" - cltypes "github.com/akash-network/akash-api/go/node/client/types" - "github.com/akash-network/akash-api/go/node/client/v1beta2" - "github.com/akash-network/akash-api/go/node/client/v1beta3" + cltypes "pkg.akt.io/go/node/client/types" + "pkg.akt.io/go/node/client/v1beta3" ) var ( @@ -18,7 +17,7 @@ var ( ) const ( - // DefaultClientApiVersion indicates the default ApiVersion of the client. + // DefaultClientAPIVersion indicates the default ApiVersion of the client. DefaultClientAPIVersion = "v1beta2" ) @@ -53,8 +52,6 @@ func DiscoverClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn, var cl interface{} switch result.ClientInfo.ApiVersion { - case "v1beta2": - cl, err = v1beta2.NewClient(ctx, cctx, opts...) case "v1beta3": cl, err = v1beta3.NewClient(ctx, cctx, opts...) default: @@ -72,6 +69,45 @@ func DiscoverClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn, return nil } +func DiscoverLightClient(ctx context.Context, cctx sdkclient.Context, setup SetupFn) error { + rpc, err := tmjclient.New(cctx.NodeURI) + if err != nil { + return err + } + + result := new(Akash) + + if !cctx.Offline { + params := make(map[string]interface{}) + _, _ = rpc.Call(ctx, "akash", params, result) + } + + // if client info is nil, mostly likely "akash" endpoint is not yet supported on the node + // fallback to manually set version to DefaultClientApiVersion + if result.ClientInfo == nil || cctx.Offline { + result.ClientInfo = &ClientInfo{ApiVersion: DefaultClientAPIVersion} + } + + var cl interface{} + + switch result.ClientInfo.ApiVersion { + case "v1beta3": + cl, err = v1beta3.NewLightClient(cctx) + default: + err = ErrUnknownClientVersion + } + + if err != nil { + return err + } + + if err = setup(cl); err != nil { + return err + } + + return nil +} + // DiscoverQueryClient queries an RPC node to get the version of the client and executes a SetupFn function // passing a new versioned QueryClient instance as parameter. // If any error occurs when calling the RPC node or the Cosmos SDK client Context is set to offline the default value of @@ -97,8 +133,6 @@ func DiscoverQueryClient(ctx context.Context, cctx sdkclient.Context, setup Setu var cl interface{} switch result.ClientInfo.ApiVersion { - case "v1beta2": - cl = v1beta2.NewQueryClient(cctx) case "v1beta3": cl = v1beta3.NewQueryClient(cctx) default: diff --git a/go/node/client/client_info.pb.go b/go/node/client/client_info.pb.go index 8218fcf8..c910088f 100644 --- a/go/node/client/client_info.pb.go +++ b/go/node/client/client_info.pb.go @@ -5,8 +5,8 @@ package client import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -77,7 +77,7 @@ func init() { } var fileDescriptor_d0e1ef320145891a = []byte{ - // 223 bytes of a gzipped FileDescriptorProto + // 206 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0xc9, 0x2c, 0x4e, 0xce, 0x2f, 0x4b, 0x2d, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x89, 0xcf, 0xcc, 0x4b, 0xcb, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, @@ -86,12 +86,11 @@ var fileDescriptor_d0e1ef320145891a = []byte{ 0x69, 0xf9, 0x42, 0x21, 0x5c, 0xdc, 0x89, 0x05, 0x99, 0xf1, 0x65, 0xa9, 0x45, 0xc5, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0xc6, 0x8f, 0xee, 0xc9, 0x73, 0x39, 0x16, 0x64, 0x86, 0x41, 0x44, 0x5f, 0xdd, 0x93, 0x47, 0x56, 0xf4, 0xe9, 0x9e, 0xbc, 0x50, 0x65, 0x62, 0x6e, - 0x8e, 0x95, 0x12, 0x92, 0xa0, 0x52, 0x10, 0x57, 0x22, 0x5c, 0x83, 0x93, 0xf7, 0x89, 0x47, 0x72, + 0x8e, 0x95, 0x12, 0x92, 0xa0, 0x52, 0x10, 0x57, 0x22, 0x5c, 0x83, 0x93, 0xf1, 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, 0x19, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, - 0xe7, 0xe7, 0xea, 0x83, 0x9d, 0xac, 0x9b, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, - 0x16, 0x64, 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, 0xa7, 0xa4, 0x42, 0x7d, 0x99, 0xc4, 0x06, 0x76, - 0xb7, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x3d, 0x00, 0x57, 0x09, 0x01, 0x00, 0x00, + 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x49, 0x16, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, + 0x65, 0x82, 0x1c, 0xa5, 0x9f, 0x97, 0x9f, 0x92, 0x0a, 0xf5, 0x4d, 0x12, 0x1b, 0xd8, 0x7d, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0xac, 0x71, 0x7a, 0xf1, 0x00, 0x00, 0x00, } func (m *ClientInfo) Marshal() (dAtA []byte, err error) { diff --git a/go/node/client/testutil/v1beta3/base.go b/go/node/client/testutil/v1beta3/base.go deleted file mode 100644 index c9d067b8..00000000 --- a/go/node/client/testutil/v1beta3/base.go +++ /dev/null @@ -1,121 +0,0 @@ -package testutil - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/rand" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1" - - // ensure sdkutil.init() to seal SDK config for the tests - _ "github.com/akash-network/akash-api/go/sdkutil" -) - -// CoinDenom provides ability to create coins in test functions and -// pass them into testutil functionality. -const ( - CoinDenom = "uakt" - BechPrefix = "akash" -) - -// Name generates a random name with the given prefix -func Name(_ testing.TB, prefix string) string { - return fmt.Sprintf("%s-%v", prefix, rand.Uint64()) // nolint: gosec -} - -// Hostname generates a random hostname with a "test.com" domain -func Hostname(t testing.TB) string { - return Name(t, "hostname") + ".test.com" -} - -func ProviderHostname(t testing.TB) string { - return "https://" + Hostname(t) -} - -// Attribute generates a random sdk.Attribute -func Attribute(t testing.TB) attr.Attribute { - t.Helper() - return attr.NewStringAttribute(Name(t, "attr-key"), Name(t, "attr-value")) -} - -// Attributes generates a set of sdk.Attribute -func Attributes(t testing.TB) []attr.Attribute { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make([]attr.Attribute, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, Attribute(t)) - } - return vals -} - -// PlacementRequirements generates placement requirements -func PlacementRequirements(t testing.TB) atypes.PlacementRequirements { - return atypes.PlacementRequirements{ - Attributes: Attributes(t), - } -} - -func RandCPUUnits() uint { - return RandRangeUint( - dtypes.GetValidationConfig().Unit.Min.CPU, - dtypes.GetValidationConfig().Unit.Max.CPU) -} - -func RandGPUUnits() uint { - return RandRangeUint( - dtypes.GetValidationConfig().Unit.Min.GPU, - dtypes.GetValidationConfig().Unit.Max.GPU) -} - -func RandMemoryQuantity() uint64 { - return RandRangeUint64( - dtypes.GetValidationConfig().Unit.Min.Memory, - dtypes.GetValidationConfig().Unit.Max.Memory) -} - -func RandStorageQuantity() uint64 { - return RandRangeUint64( - dtypes.GetValidationConfig().Unit.Min.Storage, - dtypes.GetValidationConfig().Unit.Max.Storage) -} - -// Resources produces an attribute list for populating a Group's -// 'Resources' fields. -func Resources(t testing.TB) []dtypes.ResourceUnit { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make(dtypes.ResourceUnits, 0, count) - for i := 0; i < count; i++ { - coin := sdk.NewDecCoin(CoinDenom, sdk.NewInt(rand.Int63n(9999)+1)) - res := dtypes.ResourceUnit{ - Resources: types.Resources{ - ID: uint32(i) + 1, - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.CPU)), - }, - GPU: &types.GPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.GPU)), - }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Memory), - }, - Storage: types.Volumes{ - types.Storage{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Storage), - }, - }, - }, - Count: 1, - Price: coin, - } - vals = append(vals, res) - } - return vals -} diff --git a/go/node/client/testutil/v1beta3/cert.go b/go/node/client/testutil/v1beta3/cert.go deleted file mode 100644 index f8b7e7ba..00000000 --- a/go/node/client/testutil/v1beta3/cert.go +++ /dev/null @@ -1,211 +0,0 @@ -package testutil - -import ( - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "math/big" - "net" - "testing" - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - types "github.com/akash-network/akash-api/go/node/cert/v1beta3" - certutils "github.com/akash-network/akash-api/go/node/cert/v1beta3/utils" - clientmocks "github.com/akash-network/akash-api/go/node/client/v1beta3/mocks" -) - -type TestCertificate struct { - Cert []tls.Certificate - Serial big.Int - PEM struct { - Cert []byte - Priv []byte - Pub []byte - } -} - -type certificateOption struct { - domains []string - nbf time.Time - naf time.Time - qclient *clientmocks.QueryClient -} - -type CertificateOption func(*certificateOption) - -func CertificateOptionDomains(domains []string) CertificateOption { - return func(opt *certificateOption) { - opt.domains = domains - } -} - -func CertificateOptionNotBefore(tm time.Time) CertificateOption { - return func(opt *certificateOption) { - opt.nbf = tm - } -} - -func CertificateOptionNotAfter(tm time.Time) CertificateOption { - return func(opt *certificateOption) { - opt.naf = tm - } -} - -func CertificateOptionMocks(val *clientmocks.QueryClient) CertificateOption { - return func(opt *certificateOption) { - opt.qclient = val - } -} - -func Certificate(t testing.TB, addr sdk.Address, opts ...CertificateOption) TestCertificate { - t.Helper() - - opt := &certificateOption{} - - for _, o := range opts { - o(opt) - } - - priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatal(err) - } - - if opt.nbf.IsZero() { - opt.nbf = time.Now() - } - - if opt.naf.IsZero() { - opt.naf = opt.nbf.Add(time.Hour * 24 * 365) - } - - extKeyUsage := []x509.ExtKeyUsage{ - x509.ExtKeyUsageClientAuth, - } - - if len(opt.domains) != 0 { - extKeyUsage = append(extKeyUsage, x509.ExtKeyUsageServerAuth) - } - - template := x509.Certificate{ - SerialNumber: new(big.Int).SetInt64(time.Now().UTC().UnixNano()), - Subject: pkix.Name{ - CommonName: addr.String(), - ExtraNames: []pkix.AttributeTypeAndValue{ - { - Type: certutils.AuthVersionOID, - Value: "v0.0.1", - }, - }, - }, - Issuer: pkix.Name{ - CommonName: addr.String(), - }, - NotBefore: opt.nbf, - NotAfter: opt.naf, - KeyUsage: x509.KeyUsageDataEncipherment | x509.KeyUsageKeyEncipherment, - ExtKeyUsage: extKeyUsage, - BasicConstraintsValid: true, - } - - var ips []net.IP - - for i := len(opt.domains) - 1; i >= 0; i-- { - if ip := net.ParseIP(opt.domains[i]); ip != nil { - ips = append(ips, ip) - opt.domains = append(opt.domains[:i], opt.domains[i+1:]...) - } - } - - if len(opt.domains) != 0 || len(ips) != 0 { - template.PermittedDNSDomainsCritical = true - template.PermittedDNSDomains = opt.domains - template.DNSNames = opt.domains - template.IPAddresses = ips - } - - var certDer []byte - if certDer, err = x509.CreateCertificate(rand.Reader, &template, &template, priv.Public(), priv); err != nil { - t.Fatal(err) - } - - var keyDer []byte - if keyDer, err = x509.MarshalPKCS8PrivateKey(priv); err != nil { - t.Fatal(err) - } - - var pubKeyDer []byte - if pubKeyDer, err = x509.MarshalPKIXPublicKey(priv.Public()); err != nil { - t.Fatal(err) - } - - res := TestCertificate{ - Serial: *template.SerialNumber, - PEM: struct { - Cert []byte - Priv []byte - Pub []byte - }{ - Cert: pem.EncodeToMemory(&pem.Block{ - Type: types.PemBlkTypeCertificate, - Bytes: certDer, - }), - Priv: pem.EncodeToMemory(&pem.Block{ - Type: types.PemBlkTypeECPrivateKey, - Bytes: keyDer, - }), - Pub: pem.EncodeToMemory(&pem.Block{ - Type: types.PemBlkTypeECPublicKey, - Bytes: pubKeyDer, - }), - }, - } - - cert, err := tls.X509KeyPair(res.PEM.Cert, res.PEM.Priv) - if err != nil { - t.Fatal(err) - } - - res.Cert = append(res.Cert, cert) - - if opt.qclient != nil { - opt.qclient.On("Certificates", - mock.Anything, - &types.QueryCertificatesRequest{ - Filter: types.CertificateFilter{ - Owner: addr.String(), - Serial: res.Serial.String(), - State: "valid", - }, - }). - Return(&types.QueryCertificatesResponse{ - Certificates: types.CertificatesResponse{ - types.CertificateResponse{ - Certificate: types.Certificate{ - State: types.CertificateValid, - Cert: res.PEM.Cert, - Pubkey: res.PEM.Pub, - }, - Serial: res.Serial.String(), - }, - }, - }, nil) - } - return res -} - -func CertificateRequireEqualResponse(t *testing.T, cert TestCertificate, resp types.CertificateResponse, state types.Certificate_State) { - t.Helper() - - require.Equal(t, state, resp.Certificate.State) - require.Equal(t, cert.PEM.Cert, resp.Certificate.Cert) - require.Equal(t, cert.PEM.Pub, resp.Certificate.Pubkey) -} diff --git a/go/node/client/testutil/v1beta3/channel_wait.go b/go/node/client/testutil/v1beta3/channel_wait.go deleted file mode 100644 index f9ef17e4..00000000 --- a/go/node/client/testutil/v1beta3/channel_wait.go +++ /dev/null @@ -1,71 +0,0 @@ -package testutil - -import ( - "reflect" - "testing" - "time" -) - -func ChannelWaitForValueUpTo(t *testing.T, waitOn interface{}, waitFor time.Duration) interface{} { - cases := make([]reflect.SelectCase, 2) - cases[0] = reflect.SelectCase{ - Dir: reflect.SelectRecv, - Chan: reflect.ValueOf(waitOn), - Send: reflect.Value{}, - } - - delayChan := time.After(waitFor) - - cases[1] = reflect.SelectCase{ - Dir: reflect.SelectRecv, - Chan: reflect.ValueOf(delayChan), - Send: reflect.Value{}, - } - - idx, v, ok := reflect.Select(cases) - if !ok { - t.Fatal("Channel has been closed") - } - if idx != 0 { - t.Fatalf("No message after waiting %v seconds", waitFor) - } - - return v.Interface() -} - -const waitForDefault = 10 * time.Second - -func ChannelWaitForValue(t *testing.T, waitOn interface{}) interface{} { - return ChannelWaitForValueUpTo(t, waitOn, waitForDefault) -} - -func ChannelWaitForCloseUpTo(t *testing.T, waitOn interface{}, waitFor time.Duration) { - cases := make([]reflect.SelectCase, 2) - cases[0] = reflect.SelectCase{ - Dir: reflect.SelectRecv, - Chan: reflect.ValueOf(waitOn), - Send: reflect.Value{}, - } - - delayChan := time.After(waitFor) - - cases[1] = reflect.SelectCase{ - Dir: reflect.SelectRecv, - Chan: reflect.ValueOf(delayChan), - Send: reflect.Value{}, - } - - idx, v, ok := reflect.Select(cases) - if !ok { - return // Channel closed, everything OK - } - if idx != 0 { - t.Fatalf("channel not closed after waiting %v seconds", waitOn) - } - - t.Fatalf("got unexpected message: %v", v.Interface()) -} - -func ChannelWaitForClose(t *testing.T, waitOn interface{}) { - ChannelWaitForCloseUpTo(t, waitOn, waitForDefault) -} diff --git a/go/node/client/testutil/v1beta3/deployment.go b/go/node/client/testutil/v1beta3/deployment.go deleted file mode 100644 index 2f11b57b..00000000 --- a/go/node/client/testutil/v1beta3/deployment.go +++ /dev/null @@ -1,61 +0,0 @@ -package testutil - -import ( - "crypto/sha256" - "math/rand" - "testing" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" -) - -// sum256Seed provides a consistent sha256 value for initial Deployment.Version -const sum256Seed = "hihi" - -// DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version -var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed)) - -// Deployment generates a dtype.Deployment in state `DeploymentActive` -func Deployment(t testing.TB) dtypes.Deployment { - t.Helper() - return dtypes.Deployment{ - DeploymentID: DeploymentID(t), - State: dtypes.DeploymentActive, - Version: DefaultDeploymentVersion[:], - } -} - -// DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` -// with a set of random required attributes -func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group { - t.Helper() - return dtypes.Group{ - GroupID: dtypes.MakeGroupID(did, gseq), - State: dtypes.GroupOpen, - GroupSpec: dtypes.GroupSpec{ - Name: Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - }, - } -} - -// GroupSpec generator -func GroupSpec(t testing.TB) dtypes.GroupSpec { - t.Helper() - return dtypes.GroupSpec{ - Name: Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - } -} - -// DeploymentGroups returns a set of deployment groups generated by DeploymentGroup -func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group { - t.Helper() - count := rand.Intn(5) + 5 // nolint:gosec - vals := make([]dtypes.Group, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, DeploymentGroup(t, did, gseq+uint32(i))) - } - return vals -} diff --git a/go/node/client/testutil/v1beta3/ids.go b/go/node/client/testutil/v1beta3/ids.go deleted file mode 100644 index 8c1e9aea..00000000 --- a/go/node/client/testutil/v1beta3/ids.go +++ /dev/null @@ -1,102 +0,0 @@ -package testutil - -import ( - cryptorand "crypto/rand" - "crypto/sha256" - "math/rand" - "testing" - - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto/ed25519" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta5" -) - -func Keyring(t testing.TB) keyring.Keyring { - t.Helper() - obj := keyring.NewInMemory() - return obj -} - -// AccAddress provides an Account's Address bytes from a ed25519 generated -// private key. -func AccAddress(t testing.TB) sdk.AccAddress { - t.Helper() - privKey := ed25519.GenPrivKey() - return sdk.AccAddress(privKey.PubKey().Address()) -} - -func Key(t testing.TB) ed25519.PrivKey { - t.Helper() - return ed25519.GenPrivKey() -} - -func DeploymentID(t testing.TB) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: AccAddress(t).String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -func DeploymentIDForAccount(t testing.TB, addr sdk.Address) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: addr.String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -// DeploymentVersion provides a random sha256 sum for simulating Deployments. -func DeploymentVersion(t testing.TB) []byte { - t.Helper() - src := make([]byte, 128) - _, err := cryptorand.Read(src) - if err != nil { - t.Fatal(err) - } - sum := sha256.Sum256(src) - return sum[:] -} - -func GroupID(t testing.TB) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentID(t), rand.Uint32()) // nolint: gosec -} - -func GroupIDForAccount(t testing.TB, addr sdk.Address) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func OrderID(t testing.TB) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupID(t), rand.Uint32()) // nolint: gosec -} - -func OrderIDForAccount(t testing.TB, addr sdk.Address) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func BidID(t testing.TB) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderID(t), AccAddress(t)) -} - -func BidIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderIDForAccount(t, owner), provider.Bytes()) -} - -func LeaseID(t testing.TB) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidID(t)) -} - -func LeaseIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidIDForAccount(t, owner, provider)) -} diff --git a/go/node/client/testutil/v1beta3/log.go b/go/node/client/testutil/v1beta3/log.go deleted file mode 100644 index 3935d5e0..00000000 --- a/go/node/client/testutil/v1beta3/log.go +++ /dev/null @@ -1,27 +0,0 @@ -package testutil - -import ( - "sync" - "testing" - - "github.com/tendermint/tendermint/libs/log" -) - -func Logger(t testing.TB) log.Logger { - return log.NewTMLogger(&testWriter{TB: t}) -} - -// Source: https://git.sr.ht/~samwhited/testlog/tree/b1b3e8e82fd6990e91ce9d0fbcbe69ac2d9b1f98/testlog.go -type testWriter struct { - testing.TB - lock sync.Mutex -} - -func (tw *testWriter) Write(p []byte) (int, error) { - defer tw.lock.Unlock() - tw.lock.Lock() - - tw.Helper() - tw.Logf("%s", p) - return len(p), nil -} diff --git a/go/node/client/testutil/v1beta3/sdk.go b/go/node/client/testutil/v1beta3/sdk.go deleted file mode 100644 index b530b7fd..00000000 --- a/go/node/client/testutil/v1beta3/sdk.go +++ /dev/null @@ -1,43 +0,0 @@ -package testutil - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func Coin(t testing.TB) sdk.Coin { - t.Helper() - return sdk.NewCoin("testcoin", sdk.NewInt(int64(RandRangeInt(1, 1000)))) // nolint: gosec -} - -func DecCoin(t testing.TB) sdk.DecCoin { - t.Helper() - return sdk.NewDecCoin("testcoin", sdk.NewInt(int64(RandRangeInt(1, 1000)))) // nolint: gosec -} - -// AkashCoinRandom provides simple interface to the Akash sdk.Coin type. -func AkashCoinRandom(t testing.TB) sdk.Coin { - t.Helper() - amt := sdk.NewInt(int64(RandRangeInt(1, 1000))) - return sdk.NewCoin(CoinDenom, amt) -} - -// AkashCoin provides simple interface to the Akash sdk.Coin type. -func AkashCoin(t testing.TB, amount int64) sdk.Coin { - t.Helper() - amt := sdk.NewInt(amount) - return sdk.NewCoin(CoinDenom, amt) -} - -func AkashDecCoin(t testing.TB, amount int64) sdk.DecCoin { - t.Helper() - amt := sdk.NewInt(amount) - return sdk.NewDecCoin(CoinDenom, amt) -} - -func AkashDecCoinRandom(t testing.TB) sdk.DecCoin { - t.Helper() - amt := sdk.NewInt(int64(RandRangeInt(1, 1000))) - return sdk.NewDecCoin(CoinDenom, amt) -} diff --git a/go/node/client/testutil/v1beta3/types.go b/go/node/client/testutil/v1beta3/types.go deleted file mode 100644 index 887debb9..00000000 --- a/go/node/client/testutil/v1beta3/types.go +++ /dev/null @@ -1,23 +0,0 @@ -package testutil - -import ( - "math/rand" -) - -func RandRangeInt(min, max int) int { - return rand.Intn(max-min) + min // nolint: gosec -} - -func RandRangeUint(min, max uint) uint { - val := rand.Uint64() // nolint: gosec - val %= uint64(max - min) - val += uint64(min) - return uint(val) -} - -func RandRangeUint64(min, max uint64) uint64 { - val := rand.Uint64() // nolint: gosec - val %= max - min - val += min - return val -} diff --git a/go/node/client/v1beta1/client.go b/go/node/client/v1beta1/client.go deleted file mode 100644 index 10e23672..00000000 --- a/go/node/client/v1beta1/client.go +++ /dev/null @@ -1,189 +0,0 @@ -package v1beta1 - -import ( - "context" - - "github.com/pkg/errors" - "google.golang.org/grpc" - - tmrpc "github.com/tendermint/tendermint/rpc/core/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta3" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" -) - -var ( - ErrClientNotFound = errors.New("client not found") -) - -//go:generate mockery --name Query --output ./mocks -type Query interface { - dtypes.QueryClient - mtypes.QueryClient - ptypes.QueryClient - atypes.QueryClient - ctypes.QueryClient -} - -//go:generate mockery --name Tx --output ./mocks -type Tx interface { - Broadcast(context.Context, ...sdk.Msg) error -} - -//go:generate mockery --name Node --output ./mocks -type Node interface { - SyncInfo(ctx context.Context) (*tmrpc.SyncInfo, error) -} - -//go:generate mockery --name Client --output ./mocks -type Client interface { - Query() Query - Tx() Tx - Node() Node -} - -type qclient struct { - dclient dtypes.QueryClient - mclient mtypes.QueryClient - pclient ptypes.QueryClient - aclient atypes.QueryClient - cclient ctypes.QueryClient -} - -// NewQueryClient creates new query client instance -func NewQueryClient( - dclient dtypes.QueryClient, - mclient mtypes.QueryClient, - pclient ptypes.QueryClient, - aclient atypes.QueryClient, - cclient ctypes.QueryClient, -) Query { - return &qclient{ - dclient: dclient, - mclient: mclient, - pclient: pclient, - aclient: aclient, - cclient: cclient, - } -} - -func (c *qclient) Deployments(ctx context.Context, in *dtypes.QueryDeploymentsRequest, opts ...grpc.CallOption) (*dtypes.QueryDeploymentsResponse, error) { - if c.dclient == nil { - return &dtypes.QueryDeploymentsResponse{}, ErrClientNotFound - } - return c.dclient.Deployments(ctx, in, opts...) -} - -func (c *qclient) Deployment(ctx context.Context, in *dtypes.QueryDeploymentRequest, opts ...grpc.CallOption) (*dtypes.QueryDeploymentResponse, error) { - if c.dclient == nil { - return &dtypes.QueryDeploymentResponse{}, ErrClientNotFound - } - return c.dclient.Deployment(ctx, in, opts...) -} - -func (c *qclient) Group(ctx context.Context, in *dtypes.QueryGroupRequest, opts ...grpc.CallOption) (*dtypes.QueryGroupResponse, error) { - if c.dclient == nil { - return &dtypes.QueryGroupResponse{}, ErrClientNotFound - } - return c.dclient.Group(ctx, in, opts...) -} - -func (c *qclient) Orders(ctx context.Context, in *mtypes.QueryOrdersRequest, opts ...grpc.CallOption) (*mtypes.QueryOrdersResponse, error) { - if c.mclient == nil { - return &mtypes.QueryOrdersResponse{}, ErrClientNotFound - } - return c.mclient.Orders(ctx, in, opts...) -} - -func (c *qclient) Order(ctx context.Context, in *mtypes.QueryOrderRequest, opts ...grpc.CallOption) (*mtypes.QueryOrderResponse, error) { - if c.mclient == nil { - return &mtypes.QueryOrderResponse{}, ErrClientNotFound - } - return c.mclient.Order(ctx, in, opts...) -} - -func (c *qclient) Bids(ctx context.Context, in *mtypes.QueryBidsRequest, opts ...grpc.CallOption) (*mtypes.QueryBidsResponse, error) { - if c.mclient == nil { - return &mtypes.QueryBidsResponse{}, ErrClientNotFound - } - return c.mclient.Bids(ctx, in, opts...) -} - -func (c *qclient) Bid(ctx context.Context, in *mtypes.QueryBidRequest, opts ...grpc.CallOption) (*mtypes.QueryBidResponse, error) { - if c.mclient == nil { - return &mtypes.QueryBidResponse{}, ErrClientNotFound - } - return c.mclient.Bid(ctx, in, opts...) -} - -func (c *qclient) Leases(ctx context.Context, in *mtypes.QueryLeasesRequest, opts ...grpc.CallOption) (*mtypes.QueryLeasesResponse, error) { - if c.mclient == nil { - return &mtypes.QueryLeasesResponse{}, ErrClientNotFound - } - return c.mclient.Leases(ctx, in, opts...) -} - -func (c *qclient) Lease(ctx context.Context, in *mtypes.QueryLeaseRequest, opts ...grpc.CallOption) (*mtypes.QueryLeaseResponse, error) { - if c.mclient == nil { - return &mtypes.QueryLeaseResponse{}, ErrClientNotFound - } - return c.mclient.Lease(ctx, in, opts...) -} - -func (c *qclient) Providers(ctx context.Context, in *ptypes.QueryProvidersRequest, opts ...grpc.CallOption) (*ptypes.QueryProvidersResponse, error) { - if c.pclient == nil { - return &ptypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.pclient.Providers(ctx, in, opts...) -} - -func (c *qclient) Provider(ctx context.Context, in *ptypes.QueryProviderRequest, opts ...grpc.CallOption) (*ptypes.QueryProviderResponse, error) { - if c.pclient == nil { - return &ptypes.QueryProviderResponse{}, ErrClientNotFound - } - return c.pclient.Provider(ctx, in, opts...) -} - -// AllProvidersAttributes queries all providers -func (c *qclient) AllProvidersAttributes(ctx context.Context, in *atypes.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.aclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.AllProvidersAttributes(ctx, in, opts...) -} - -// ProviderAttributes queries all provider signed attributes -func (c *qclient) ProviderAttributes(ctx context.Context, in *atypes.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.aclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.ProviderAttributes(ctx, in, opts...) -} - -// ProviderAuditorAttributes queries provider signed attributes by specific validator -func (c *qclient) ProviderAuditorAttributes(ctx context.Context, in *atypes.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.aclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.ProviderAuditorAttributes(ctx, in, opts...) -} - -// AuditorAttributes queries all providers signed by this validator -func (c *qclient) AuditorAttributes(ctx context.Context, in *atypes.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.aclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.AuditorAttributes(ctx, in, opts...) -} - -func (c *qclient) Certificates(ctx context.Context, in *ctypes.QueryCertificatesRequest, opts ...grpc.CallOption) (*ctypes.QueryCertificatesResponse, error) { - if c.cclient == nil { - return &ctypes.QueryCertificatesResponse{}, ErrClientNotFound - } - return c.cclient.Certificates(ctx, in, opts...) -} diff --git a/go/node/client/v1beta1/mocks/client.go b/go/node/client/v1beta1/mocks/client.go deleted file mode 100644 index d77d89e4..00000000 --- a/go/node/client/v1beta1/mocks/client.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - v1beta1 "github.com/akash-network/akash-api/go/node/client/v1beta1" - mock "github.com/stretchr/testify/mock" -) - -// Client is an autogenerated mock type for the Client type -type Client struct { - mock.Mock -} - -type Client_Expecter struct { - mock *mock.Mock -} - -func (_m *Client) EXPECT() *Client_Expecter { - return &Client_Expecter{mock: &_m.Mock} -} - -// Node provides a mock function with given fields: -func (_m *Client) Node() v1beta1.Node { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Node") - } - - var r0 v1beta1.Node - if rf, ok := ret.Get(0).(func() v1beta1.Node); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta1.Node) - } - } - - return r0 -} - -// Client_Node_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Node' -type Client_Node_Call struct { - *mock.Call -} - -// Node is a helper method to define mock.On call -func (_e *Client_Expecter) Node() *Client_Node_Call { - return &Client_Node_Call{Call: _e.mock.On("Node")} -} - -func (_c *Client_Node_Call) Run(run func()) *Client_Node_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Node_Call) Return(_a0 v1beta1.Node) *Client_Node_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Node_Call) RunAndReturn(run func() v1beta1.Node) *Client_Node_Call { - _c.Call.Return(run) - return _c -} - -// Query provides a mock function with given fields: -func (_m *Client) Query() v1beta1.Query { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Query") - } - - var r0 v1beta1.Query - if rf, ok := ret.Get(0).(func() v1beta1.Query); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta1.Query) - } - } - - return r0 -} - -// Client_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type Client_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -func (_e *Client_Expecter) Query() *Client_Query_Call { - return &Client_Query_Call{Call: _e.mock.On("Query")} -} - -func (_c *Client_Query_Call) Run(run func()) *Client_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Query_Call) Return(_a0 v1beta1.Query) *Client_Query_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Query_Call) RunAndReturn(run func() v1beta1.Query) *Client_Query_Call { - _c.Call.Return(run) - return _c -} - -// Tx provides a mock function with given fields: -func (_m *Client) Tx() v1beta1.Tx { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Tx") - } - - var r0 v1beta1.Tx - if rf, ok := ret.Get(0).(func() v1beta1.Tx); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta1.Tx) - } - } - - return r0 -} - -// Client_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' -type Client_Tx_Call struct { - *mock.Call -} - -// Tx is a helper method to define mock.On call -func (_e *Client_Expecter) Tx() *Client_Tx_Call { - return &Client_Tx_Call{Call: _e.mock.On("Tx")} -} - -func (_c *Client_Tx_Call) Run(run func()) *Client_Tx_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Tx_Call) Return(_a0 v1beta1.Tx) *Client_Tx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Tx_Call) RunAndReturn(run func() v1beta1.Tx) *Client_Tx_Call { - _c.Call.Return(run) - return _c -} - -// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClient(t interface { - mock.TestingT - Cleanup(func()) -}) *Client { - mock := &Client{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta1/mocks/node.go b/go/node/client/v1beta1/mocks/node.go deleted file mode 100644 index 47f5a823..00000000 --- a/go/node/client/v1beta1/mocks/node.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - coretypes "github.com/tendermint/tendermint/rpc/core/types" -) - -// Node is an autogenerated mock type for the Node type -type Node struct { - mock.Mock -} - -type Node_Expecter struct { - mock *mock.Mock -} - -func (_m *Node) EXPECT() *Node_Expecter { - return &Node_Expecter{mock: &_m.Mock} -} - -// SyncInfo provides a mock function with given fields: ctx -func (_m *Node) SyncInfo(ctx context.Context) (*coretypes.SyncInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SyncInfo") - } - - var r0 *coretypes.SyncInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.SyncInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.SyncInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.SyncInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Node_SyncInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncInfo' -type Node_SyncInfo_Call struct { - *mock.Call -} - -// SyncInfo is a helper method to define mock.On call -// - ctx context.Context -func (_e *Node_Expecter) SyncInfo(ctx interface{}) *Node_SyncInfo_Call { - return &Node_SyncInfo_Call{Call: _e.mock.On("SyncInfo", ctx)} -} - -func (_c *Node_SyncInfo_Call) Run(run func(ctx context.Context)) *Node_SyncInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Node_SyncInfo_Call) Return(_a0 *coretypes.SyncInfo, _a1 error) *Node_SyncInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Node_SyncInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.SyncInfo, error)) *Node_SyncInfo_Call { - _c.Call.Return(run) - return _c -} - -// NewNode creates a new instance of Node. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNode(t interface { - mock.TestingT - Cleanup(func()) -}) *Node { - mock := &Node{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta1/mocks/query.go b/go/node/client/v1beta1/mocks/query.go deleted file mode 100644 index 32763e64..00000000 --- a/go/node/client/v1beta1/mocks/query.go +++ /dev/null @@ -1,1232 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - context "context" - - certv1beta3 "github.com/akash-network/akash-api/go/node/cert/v1beta3" - - deploymentv1beta3 "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - - grpc "google.golang.org/grpc" - - marketv1beta3 "github.com/akash-network/akash-api/go/node/market/v1beta3" - - mock "github.com/stretchr/testify/mock" - - providerv1beta3 "github.com/akash-network/akash-api/go/node/provider/v1beta3" - - v1beta3 "github.com/akash-network/akash-api/go/node/audit/v1beta3" -) - -// Query is an autogenerated mock type for the Query type -type Query struct { - mock.Mock -} - -type Query_Expecter struct { - mock *mock.Mock -} - -func (_m *Query) EXPECT() *Query_Expecter { - return &Query_Expecter{mock: &_m.Mock} -} - -// AllProvidersAttributes provides a mock function with given fields: ctx, in, opts -func (_m *Query) AllProvidersAttributes(ctx context.Context, in *v1beta3.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AllProvidersAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_AllProvidersAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllProvidersAttributes' -type Query_AllProvidersAttributes_Call struct { - *mock.Call -} - -// AllProvidersAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryAllProvidersAttributesRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) AllProvidersAttributes(ctx interface{}, in interface{}, opts ...interface{}) *Query_AllProvidersAttributes_Call { - return &Query_AllProvidersAttributes_Call{Call: _e.mock.On("AllProvidersAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_AllProvidersAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption)) *Query_AllProvidersAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryAllProvidersAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_AllProvidersAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *Query_AllProvidersAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_AllProvidersAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *Query_AllProvidersAttributes_Call { - _c.Call.Return(run) - return _c -} - -// AuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *Query) AuditorAttributes(ctx context.Context, in *v1beta3.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AuditorAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_AuditorAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuditorAttributes' -type Query_AuditorAttributes_Call struct { - *mock.Call -} - -// AuditorAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryAuditorAttributesRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) AuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *Query_AuditorAttributes_Call { - return &Query_AuditorAttributes_Call{Call: _e.mock.On("AuditorAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_AuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryAuditorAttributesRequest, opts ...grpc.CallOption)) *Query_AuditorAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryAuditorAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_AuditorAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *Query_AuditorAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_AuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *Query_AuditorAttributes_Call { - _c.Call.Return(run) - return _c -} - -// Bid provides a mock function with given fields: ctx, in, opts -func (_m *Query) Bid(ctx context.Context, in *marketv1beta3.QueryBidRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryBidResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Bid") - } - - var r0 *marketv1beta3.QueryBidResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryBidRequest, ...grpc.CallOption) (*marketv1beta3.QueryBidResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryBidRequest, ...grpc.CallOption) *marketv1beta3.QueryBidResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryBidResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryBidRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Bid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bid' -type Query_Bid_Call struct { - *mock.Call -} - -// Bid is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryBidRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Bid(ctx interface{}, in interface{}, opts ...interface{}) *Query_Bid_Call { - return &Query_Bid_Call{Call: _e.mock.On("Bid", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Bid_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryBidRequest, opts ...grpc.CallOption)) *Query_Bid_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryBidRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Bid_Call) Return(_a0 *marketv1beta3.QueryBidResponse, _a1 error) *Query_Bid_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Bid_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryBidRequest, ...grpc.CallOption) (*marketv1beta3.QueryBidResponse, error)) *Query_Bid_Call { - _c.Call.Return(run) - return _c -} - -// Bids provides a mock function with given fields: ctx, in, opts -func (_m *Query) Bids(ctx context.Context, in *marketv1beta3.QueryBidsRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryBidsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Bids") - } - - var r0 *marketv1beta3.QueryBidsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryBidsRequest, ...grpc.CallOption) (*marketv1beta3.QueryBidsResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryBidsRequest, ...grpc.CallOption) *marketv1beta3.QueryBidsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryBidsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryBidsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Bids_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bids' -type Query_Bids_Call struct { - *mock.Call -} - -// Bids is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryBidsRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Bids(ctx interface{}, in interface{}, opts ...interface{}) *Query_Bids_Call { - return &Query_Bids_Call{Call: _e.mock.On("Bids", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Bids_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryBidsRequest, opts ...grpc.CallOption)) *Query_Bids_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryBidsRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Bids_Call) Return(_a0 *marketv1beta3.QueryBidsResponse, _a1 error) *Query_Bids_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Bids_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryBidsRequest, ...grpc.CallOption) (*marketv1beta3.QueryBidsResponse, error)) *Query_Bids_Call { - _c.Call.Return(run) - return _c -} - -// Certificates provides a mock function with given fields: ctx, in, opts -func (_m *Query) Certificates(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Certificates") - } - - var r0 *certv1beta3.QueryCertificatesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) *certv1beta3.QueryCertificatesResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*certv1beta3.QueryCertificatesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Certificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Certificates' -type Query_Certificates_Call struct { - *mock.Call -} - -// Certificates is a helper method to define mock.On call -// - ctx context.Context -// - in *certv1beta3.QueryCertificatesRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Certificates(ctx interface{}, in interface{}, opts ...interface{}) *Query_Certificates_Call { - return &Query_Certificates_Call{Call: _e.mock.On("Certificates", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Certificates_Call) Run(run func(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption)) *Query_Certificates_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*certv1beta3.QueryCertificatesRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Certificates_Call) Return(_a0 *certv1beta3.QueryCertificatesResponse, _a1 error) *Query_Certificates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Certificates_Call) RunAndReturn(run func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)) *Query_Certificates_Call { - _c.Call.Return(run) - return _c -} - -// Deployment provides a mock function with given fields: ctx, in, opts -func (_m *Query) Deployment(ctx context.Context, in *deploymentv1beta3.QueryDeploymentRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Deployment") - } - - var r0 *deploymentv1beta3.QueryDeploymentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) *deploymentv1beta3.QueryDeploymentResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryDeploymentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Deployment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deployment' -type Query_Deployment_Call struct { - *mock.Call -} - -// Deployment is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryDeploymentRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Deployment(ctx interface{}, in interface{}, opts ...interface{}) *Query_Deployment_Call { - return &Query_Deployment_Call{Call: _e.mock.On("Deployment", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Deployment_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryDeploymentRequest, opts ...grpc.CallOption)) *Query_Deployment_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryDeploymentRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Deployment_Call) Return(_a0 *deploymentv1beta3.QueryDeploymentResponse, _a1 error) *Query_Deployment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Deployment_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error)) *Query_Deployment_Call { - _c.Call.Return(run) - return _c -} - -// Deployments provides a mock function with given fields: ctx, in, opts -func (_m *Query) Deployments(ctx context.Context, in *deploymentv1beta3.QueryDeploymentsRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Deployments") - } - - var r0 *deploymentv1beta3.QueryDeploymentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) *deploymentv1beta3.QueryDeploymentsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryDeploymentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Deployments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deployments' -type Query_Deployments_Call struct { - *mock.Call -} - -// Deployments is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryDeploymentsRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Deployments(ctx interface{}, in interface{}, opts ...interface{}) *Query_Deployments_Call { - return &Query_Deployments_Call{Call: _e.mock.On("Deployments", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Deployments_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryDeploymentsRequest, opts ...grpc.CallOption)) *Query_Deployments_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryDeploymentsRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Deployments_Call) Return(_a0 *deploymentv1beta3.QueryDeploymentsResponse, _a1 error) *Query_Deployments_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Deployments_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error)) *Query_Deployments_Call { - _c.Call.Return(run) - return _c -} - -// Group provides a mock function with given fields: ctx, in, opts -func (_m *Query) Group(ctx context.Context, in *deploymentv1beta3.QueryGroupRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Group") - } - - var r0 *deploymentv1beta3.QueryGroupResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) *deploymentv1beta3.QueryGroupResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryGroupResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Group_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Group' -type Query_Group_Call struct { - *mock.Call -} - -// Group is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryGroupRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Group(ctx interface{}, in interface{}, opts ...interface{}) *Query_Group_Call { - return &Query_Group_Call{Call: _e.mock.On("Group", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Group_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryGroupRequest, opts ...grpc.CallOption)) *Query_Group_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryGroupRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Group_Call) Return(_a0 *deploymentv1beta3.QueryGroupResponse, _a1 error) *Query_Group_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Group_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error)) *Query_Group_Call { - _c.Call.Return(run) - return _c -} - -// Lease provides a mock function with given fields: ctx, in, opts -func (_m *Query) Lease(ctx context.Context, in *marketv1beta3.QueryLeaseRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryLeaseResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Lease") - } - - var r0 *marketv1beta3.QueryLeaseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryLeaseRequest, ...grpc.CallOption) (*marketv1beta3.QueryLeaseResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryLeaseRequest, ...grpc.CallOption) *marketv1beta3.QueryLeaseResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryLeaseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryLeaseRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Lease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lease' -type Query_Lease_Call struct { - *mock.Call -} - -// Lease is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryLeaseRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Lease(ctx interface{}, in interface{}, opts ...interface{}) *Query_Lease_Call { - return &Query_Lease_Call{Call: _e.mock.On("Lease", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Lease_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryLeaseRequest, opts ...grpc.CallOption)) *Query_Lease_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryLeaseRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Lease_Call) Return(_a0 *marketv1beta3.QueryLeaseResponse, _a1 error) *Query_Lease_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Lease_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryLeaseRequest, ...grpc.CallOption) (*marketv1beta3.QueryLeaseResponse, error)) *Query_Lease_Call { - _c.Call.Return(run) - return _c -} - -// Leases provides a mock function with given fields: ctx, in, opts -func (_m *Query) Leases(ctx context.Context, in *marketv1beta3.QueryLeasesRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryLeasesResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Leases") - } - - var r0 *marketv1beta3.QueryLeasesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryLeasesRequest, ...grpc.CallOption) (*marketv1beta3.QueryLeasesResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryLeasesRequest, ...grpc.CallOption) *marketv1beta3.QueryLeasesResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryLeasesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryLeasesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Leases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Leases' -type Query_Leases_Call struct { - *mock.Call -} - -// Leases is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryLeasesRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Leases(ctx interface{}, in interface{}, opts ...interface{}) *Query_Leases_Call { - return &Query_Leases_Call{Call: _e.mock.On("Leases", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Leases_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryLeasesRequest, opts ...grpc.CallOption)) *Query_Leases_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryLeasesRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Leases_Call) Return(_a0 *marketv1beta3.QueryLeasesResponse, _a1 error) *Query_Leases_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Leases_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryLeasesRequest, ...grpc.CallOption) (*marketv1beta3.QueryLeasesResponse, error)) *Query_Leases_Call { - _c.Call.Return(run) - return _c -} - -// Order provides a mock function with given fields: ctx, in, opts -func (_m *Query) Order(ctx context.Context, in *marketv1beta3.QueryOrderRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryOrderResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Order") - } - - var r0 *marketv1beta3.QueryOrderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryOrderRequest, ...grpc.CallOption) (*marketv1beta3.QueryOrderResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryOrderRequest, ...grpc.CallOption) *marketv1beta3.QueryOrderResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryOrderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryOrderRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Order_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Order' -type Query_Order_Call struct { - *mock.Call -} - -// Order is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryOrderRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Order(ctx interface{}, in interface{}, opts ...interface{}) *Query_Order_Call { - return &Query_Order_Call{Call: _e.mock.On("Order", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Order_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryOrderRequest, opts ...grpc.CallOption)) *Query_Order_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryOrderRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Order_Call) Return(_a0 *marketv1beta3.QueryOrderResponse, _a1 error) *Query_Order_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Order_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryOrderRequest, ...grpc.CallOption) (*marketv1beta3.QueryOrderResponse, error)) *Query_Order_Call { - _c.Call.Return(run) - return _c -} - -// Orders provides a mock function with given fields: ctx, in, opts -func (_m *Query) Orders(ctx context.Context, in *marketv1beta3.QueryOrdersRequest, opts ...grpc.CallOption) (*marketv1beta3.QueryOrdersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Orders") - } - - var r0 *marketv1beta3.QueryOrdersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryOrdersRequest, ...grpc.CallOption) (*marketv1beta3.QueryOrdersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *marketv1beta3.QueryOrdersRequest, ...grpc.CallOption) *marketv1beta3.QueryOrdersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketv1beta3.QueryOrdersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *marketv1beta3.QueryOrdersRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Orders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Orders' -type Query_Orders_Call struct { - *mock.Call -} - -// Orders is a helper method to define mock.On call -// - ctx context.Context -// - in *marketv1beta3.QueryOrdersRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Orders(ctx interface{}, in interface{}, opts ...interface{}) *Query_Orders_Call { - return &Query_Orders_Call{Call: _e.mock.On("Orders", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Orders_Call) Run(run func(ctx context.Context, in *marketv1beta3.QueryOrdersRequest, opts ...grpc.CallOption)) *Query_Orders_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*marketv1beta3.QueryOrdersRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Orders_Call) Return(_a0 *marketv1beta3.QueryOrdersResponse, _a1 error) *Query_Orders_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Orders_Call) RunAndReturn(run func(context.Context, *marketv1beta3.QueryOrdersRequest, ...grpc.CallOption) (*marketv1beta3.QueryOrdersResponse, error)) *Query_Orders_Call { - _c.Call.Return(run) - return _c -} - -// Provider provides a mock function with given fields: ctx, in, opts -func (_m *Query) Provider(ctx context.Context, in *providerv1beta3.QueryProviderRequest, opts ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Provider") - } - - var r0 *providerv1beta3.QueryProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) *providerv1beta3.QueryProviderResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*providerv1beta3.QueryProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Provider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Provider' -type Query_Provider_Call struct { - *mock.Call -} - -// Provider is a helper method to define mock.On call -// - ctx context.Context -// - in *providerv1beta3.QueryProviderRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Provider(ctx interface{}, in interface{}, opts ...interface{}) *Query_Provider_Call { - return &Query_Provider_Call{Call: _e.mock.On("Provider", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Provider_Call) Run(run func(ctx context.Context, in *providerv1beta3.QueryProviderRequest, opts ...grpc.CallOption)) *Query_Provider_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*providerv1beta3.QueryProviderRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Provider_Call) Return(_a0 *providerv1beta3.QueryProviderResponse, _a1 error) *Query_Provider_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Provider_Call) RunAndReturn(run func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error)) *Query_Provider_Call { - _c.Call.Return(run) - return _c -} - -// ProviderAttributes provides a mock function with given fields: ctx, in, opts -func (_m *Query) ProviderAttributes(ctx context.Context, in *v1beta3.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ProviderAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_ProviderAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderAttributes' -type Query_ProviderAttributes_Call struct { - *mock.Call -} - -// ProviderAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryProviderAttributesRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) ProviderAttributes(ctx interface{}, in interface{}, opts ...interface{}) *Query_ProviderAttributes_Call { - return &Query_ProviderAttributes_Call{Call: _e.mock.On("ProviderAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_ProviderAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryProviderAttributesRequest, opts ...grpc.CallOption)) *Query_ProviderAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryProviderAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_ProviderAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *Query_ProviderAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_ProviderAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *Query_ProviderAttributes_Call { - _c.Call.Return(run) - return _c -} - -// ProviderAuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *Query) ProviderAuditorAttributes(ctx context.Context, in *v1beta3.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ProviderAuditorAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_ProviderAuditorAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderAuditorAttributes' -type Query_ProviderAuditorAttributes_Call struct { - *mock.Call -} - -// ProviderAuditorAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryProviderAuditorRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) ProviderAuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *Query_ProviderAuditorAttributes_Call { - return &Query_ProviderAuditorAttributes_Call{Call: _e.mock.On("ProviderAuditorAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_ProviderAuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryProviderAuditorRequest, opts ...grpc.CallOption)) *Query_ProviderAuditorAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryProviderAuditorRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_ProviderAuditorAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *Query_ProviderAuditorAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_ProviderAuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *Query_ProviderAuditorAttributes_Call { - _c.Call.Return(run) - return _c -} - -// Providers provides a mock function with given fields: ctx, in, opts -func (_m *Query) Providers(ctx context.Context, in *providerv1beta3.QueryProvidersRequest, opts ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Providers") - } - - var r0 *providerv1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) *providerv1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*providerv1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query_Providers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Providers' -type Query_Providers_Call struct { - *mock.Call -} - -// Providers is a helper method to define mock.On call -// - ctx context.Context -// - in *providerv1beta3.QueryProvidersRequest -// - opts ...grpc.CallOption -func (_e *Query_Expecter) Providers(ctx interface{}, in interface{}, opts ...interface{}) *Query_Providers_Call { - return &Query_Providers_Call{Call: _e.mock.On("Providers", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *Query_Providers_Call) Run(run func(ctx context.Context, in *providerv1beta3.QueryProvidersRequest, opts ...grpc.CallOption)) *Query_Providers_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*providerv1beta3.QueryProvidersRequest), variadicArgs...) - }) - return _c -} - -func (_c *Query_Providers_Call) Return(_a0 *providerv1beta3.QueryProvidersResponse, _a1 error) *Query_Providers_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Query_Providers_Call) RunAndReturn(run func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error)) *Query_Providers_Call { - _c.Call.Return(run) - return _c -} - -// NewQuery creates a new instance of Query. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewQuery(t interface { - mock.TestingT - Cleanup(func()) -}) *Query { - mock := &Query{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta1/mocks/tx.go b/go/node/client/v1beta1/mocks/tx.go deleted file mode 100644 index 6846b8a1..00000000 --- a/go/node/client/v1beta1/mocks/tx.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - context "context" - - types "github.com/cosmos/cosmos-sdk/types" - mock "github.com/stretchr/testify/mock" -) - -// Tx is an autogenerated mock type for the Tx type -type Tx struct { - mock.Mock -} - -type Tx_Expecter struct { - mock *mock.Mock -} - -func (_m *Tx) EXPECT() *Tx_Expecter { - return &Tx_Expecter{mock: &_m.Mock} -} - -// Broadcast provides a mock function with given fields: _a0, _a1 -func (_m *Tx) Broadcast(_a0 context.Context, _a1 ...types.Msg) error { - _va := make([]interface{}, len(_a1)) - for _i := range _a1 { - _va[_i] = _a1[_i] - } - var _ca []interface{} - _ca = append(_ca, _a0) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Broadcast") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ...types.Msg) error); ok { - r0 = rf(_a0, _a1...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Tx_Broadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Broadcast' -type Tx_Broadcast_Call struct { - *mock.Call -} - -// Broadcast is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 ...types.Msg -func (_e *Tx_Expecter) Broadcast(_a0 interface{}, _a1 ...interface{}) *Tx_Broadcast_Call { - return &Tx_Broadcast_Call{Call: _e.mock.On("Broadcast", - append([]interface{}{_a0}, _a1...)...)} -} - -func (_c *Tx_Broadcast_Call) Run(run func(_a0 context.Context, _a1 ...types.Msg)) *Tx_Broadcast_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]types.Msg, len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(types.Msg) - } - } - run(args[0].(context.Context), variadicArgs...) - }) - return _c -} - -func (_c *Tx_Broadcast_Call) Return(_a0 error) *Tx_Broadcast_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Tx_Broadcast_Call) RunAndReturn(run func(context.Context, ...types.Msg) error) *Tx_Broadcast_Call { - _c.Call.Return(run) - return _c -} - -// NewTx creates a new instance of Tx. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTx(t interface { - mock.TestingT - Cleanup(func()) -}) *Tx { - mock := &Tx{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta2/client.go b/go/node/client/v1beta2/client.go deleted file mode 100644 index 1f3c8e5c..00000000 --- a/go/node/client/v1beta2/client.go +++ /dev/null @@ -1,143 +0,0 @@ -package v1beta2 - -import ( - "context" - "fmt" - - sdkclient "github.com/cosmos/cosmos-sdk/client" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evdtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - slashtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - staketypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/x/authz" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/gogo/protobuf/proto" - tmrpc "github.com/tendermint/tendermint/rpc/core/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" - cltypes "github.com/akash-network/akash-api/go/node/client/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta4" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" -) - -// QueryClient is the interface that exposes query modules. -// -//go:generate mockery --name QueryClient --output ./mocks -type QueryClient interface { - dtypes.QueryClient - mtypes.QueryClient - ptypes.QueryClient - atypes.QueryClient - ctypes.QueryClient - Auth() authtypes.QueryClient - Authz() authz.QueryClient - Bank() banktypes.QueryClient - Distribution() disttypes.QueryClient - Evidence() evdtypes.QueryClient - Feegrant() feegranttypes.QueryClient - Gov() govtypes.QueryClient - Mint() minttypes.QueryClient - Params() paramtypes.QueryClient - Slashing() slashtypes.QueryClient - Staking() staketypes.QueryClient - Upgrade() upgradetypes.QueryClient - - ClientContext() sdkclient.Context -} - -// TxClient is the interface that wraps the Broadcast method. -// Broadcast broadcasts a transaction. A transaction is composed of 1 or many messages. This allows several -// operations to be performed in a single transaction. -// A transaction broadcast can be configured with an arbitrary number of BroadcastOption. -// -//go:generate mockery --name TxClient --output ./mocks -type TxClient interface { - Broadcast(context.Context, []sdk.Msg, ...BroadcastOption) (interface{}, error) -} - -//go:generate mockery --name NodeClient --output ./mocks -type NodeClient interface { - SyncInfo(ctx context.Context) (*tmrpc.SyncInfo, error) -} - -// Client is the umbrella interface that exposes every other client's modules. -// -//go:generate mockery --name Client --output ./mocks -type Client interface { - Query() QueryClient - Tx() TxClient - Node() NodeClient - ClientContext() sdkclient.Context - PrintMessage(interface{}) error -} - -type client struct { - qclient *queryClient - tx TxClient - node *node -} - -var _ Client = (*client)(nil) - -// NewClient creates a new client. -func NewClient(ctx context.Context, cctx sdkclient.Context, opts ...cltypes.ClientOption) (Client, error) { - nd := newNode(cctx) - - cl := &client{ - qclient: newQueryClient(cctx), - node: nd, - } - - var err error - cl.tx, err = newSerialTx(ctx, cctx, nd, opts...) - if err != nil { - return nil, err - } - - return cl, nil -} - -// Query implements Client by returning the QueryClient instance of the client. -func (cl *client) Query() QueryClient { - return cl.qclient -} - -// Tx implements Client by returning the TxClient instance of the client. -func (cl *client) Tx() TxClient { - return cl.tx -} - -// Node implements Client by returning the NodeClient instance of the client. -func (cl *client) Node() NodeClient { - return cl.node -} - -// ClientContext implements Client by returning the Cosmos SDK client context instance of the client. -func (cl *client) ClientContext() sdkclient.Context { - return cl.qclient.cctx -} - -// PrintMessage implements Client by printing the raw message passed as parameter. -func (cl *client) PrintMessage(msg interface{}) error { - var err error - - switch m := msg.(type) { - case proto.Message: - err = cl.qclient.cctx.PrintProto(m) - case []byte: - err = cl.qclient.cctx.PrintString(fmt.Sprintf("%s\n", string(m))) - } - - return err -} diff --git a/go/node/client/v1beta2/errors.go b/go/node/client/v1beta2/errors.go deleted file mode 100644 index a5af3fcf..00000000 --- a/go/node/client/v1beta2/errors.go +++ /dev/null @@ -1,11 +0,0 @@ -package v1beta2 - -import ( - "errors" -) - -var ( - // ErrClientNotFound is a new error with message "Client not found" - ErrClientNotFound = errors.New("client not found") - ErrNodeNotSynced = errors.New("rpc node is not catching up") -) diff --git a/go/node/client/v1beta2/mocks/client.go b/go/node/client/v1beta2/mocks/client.go deleted file mode 100644 index ee15a525..00000000 --- a/go/node/client/v1beta2/mocks/client.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - client "github.com/cosmos/cosmos-sdk/client" - mock "github.com/stretchr/testify/mock" - - v1beta2 "github.com/akash-network/akash-api/go/node/client/v1beta2" -) - -// Client is an autogenerated mock type for the Client type -type Client struct { - mock.Mock -} - -type Client_Expecter struct { - mock *mock.Mock -} - -func (_m *Client) EXPECT() *Client_Expecter { - return &Client_Expecter{mock: &_m.Mock} -} - -// ClientContext provides a mock function with given fields: -func (_m *Client) ClientContext() client.Context { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ClientContext") - } - - var r0 client.Context - if rf, ok := ret.Get(0).(func() client.Context); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(client.Context) - } - - return r0 -} - -// Client_ClientContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientContext' -type Client_ClientContext_Call struct { - *mock.Call -} - -// ClientContext is a helper method to define mock.On call -func (_e *Client_Expecter) ClientContext() *Client_ClientContext_Call { - return &Client_ClientContext_Call{Call: _e.mock.On("ClientContext")} -} - -func (_c *Client_ClientContext_Call) Run(run func()) *Client_ClientContext_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_ClientContext_Call) Return(_a0 client.Context) *Client_ClientContext_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_ClientContext_Call) RunAndReturn(run func() client.Context) *Client_ClientContext_Call { - _c.Call.Return(run) - return _c -} - -// Node provides a mock function with given fields: -func (_m *Client) Node() v1beta2.NodeClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Node") - } - - var r0 v1beta2.NodeClient - if rf, ok := ret.Get(0).(func() v1beta2.NodeClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta2.NodeClient) - } - } - - return r0 -} - -// Client_Node_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Node' -type Client_Node_Call struct { - *mock.Call -} - -// Node is a helper method to define mock.On call -func (_e *Client_Expecter) Node() *Client_Node_Call { - return &Client_Node_Call{Call: _e.mock.On("Node")} -} - -func (_c *Client_Node_Call) Run(run func()) *Client_Node_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Node_Call) Return(_a0 v1beta2.NodeClient) *Client_Node_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Node_Call) RunAndReturn(run func() v1beta2.NodeClient) *Client_Node_Call { - _c.Call.Return(run) - return _c -} - -// PrintMessage provides a mock function with given fields: _a0 -func (_m *Client) PrintMessage(_a0 interface{}) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PrintMessage") - } - - var r0 error - if rf, ok := ret.Get(0).(func(interface{}) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Client_PrintMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrintMessage' -type Client_PrintMessage_Call struct { - *mock.Call -} - -// PrintMessage is a helper method to define mock.On call -// - _a0 interface{} -func (_e *Client_Expecter) PrintMessage(_a0 interface{}) *Client_PrintMessage_Call { - return &Client_PrintMessage_Call{Call: _e.mock.On("PrintMessage", _a0)} -} - -func (_c *Client_PrintMessage_Call) Run(run func(_a0 interface{})) *Client_PrintMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) - }) - return _c -} - -func (_c *Client_PrintMessage_Call) Return(_a0 error) *Client_PrintMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_PrintMessage_Call) RunAndReturn(run func(interface{}) error) *Client_PrintMessage_Call { - _c.Call.Return(run) - return _c -} - -// Query provides a mock function with given fields: -func (_m *Client) Query() v1beta2.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Query") - } - - var r0 v1beta2.QueryClient - if rf, ok := ret.Get(0).(func() v1beta2.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta2.QueryClient) - } - } - - return r0 -} - -// Client_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type Client_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -func (_e *Client_Expecter) Query() *Client_Query_Call { - return &Client_Query_Call{Call: _e.mock.On("Query")} -} - -func (_c *Client_Query_Call) Run(run func()) *Client_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Query_Call) Return(_a0 v1beta2.QueryClient) *Client_Query_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Query_Call) RunAndReturn(run func() v1beta2.QueryClient) *Client_Query_Call { - _c.Call.Return(run) - return _c -} - -// Tx provides a mock function with given fields: -func (_m *Client) Tx() v1beta2.TxClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Tx") - } - - var r0 v1beta2.TxClient - if rf, ok := ret.Get(0).(func() v1beta2.TxClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(v1beta2.TxClient) - } - } - - return r0 -} - -// Client_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' -type Client_Tx_Call struct { - *mock.Call -} - -// Tx is a helper method to define mock.On call -func (_e *Client_Expecter) Tx() *Client_Tx_Call { - return &Client_Tx_Call{Call: _e.mock.On("Tx")} -} - -func (_c *Client_Tx_Call) Run(run func()) *Client_Tx_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Tx_Call) Return(_a0 v1beta2.TxClient) *Client_Tx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Tx_Call) RunAndReturn(run func() v1beta2.TxClient) *Client_Tx_Call { - _c.Call.Return(run) - return _c -} - -// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClient(t interface { - mock.TestingT - Cleanup(func()) -}) *Client { - mock := &Client{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta2/mocks/node_client.go b/go/node/client/v1beta2/mocks/node_client.go deleted file mode 100644 index e567347b..00000000 --- a/go/node/client/v1beta2/mocks/node_client.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - coretypes "github.com/tendermint/tendermint/rpc/core/types" -) - -// NodeClient is an autogenerated mock type for the NodeClient type -type NodeClient struct { - mock.Mock -} - -type NodeClient_Expecter struct { - mock *mock.Mock -} - -func (_m *NodeClient) EXPECT() *NodeClient_Expecter { - return &NodeClient_Expecter{mock: &_m.Mock} -} - -// SyncInfo provides a mock function with given fields: ctx -func (_m *NodeClient) SyncInfo(ctx context.Context) (*coretypes.SyncInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SyncInfo") - } - - var r0 *coretypes.SyncInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.SyncInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.SyncInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.SyncInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NodeClient_SyncInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncInfo' -type NodeClient_SyncInfo_Call struct { - *mock.Call -} - -// SyncInfo is a helper method to define mock.On call -// - ctx context.Context -func (_e *NodeClient_Expecter) SyncInfo(ctx interface{}) *NodeClient_SyncInfo_Call { - return &NodeClient_SyncInfo_Call{Call: _e.mock.On("SyncInfo", ctx)} -} - -func (_c *NodeClient_SyncInfo_Call) Run(run func(ctx context.Context)) *NodeClient_SyncInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *NodeClient_SyncInfo_Call) Return(_a0 *coretypes.SyncInfo, _a1 error) *NodeClient_SyncInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *NodeClient_SyncInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.SyncInfo, error)) *NodeClient_SyncInfo_Call { - _c.Call.Return(run) - return _c -} - -// NewNodeClient creates a new instance of NodeClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNodeClient(t interface { - mock.TestingT - Cleanup(func()) -}) *NodeClient { - mock := &NodeClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta2/mocks/query_client.go b/go/node/client/v1beta2/mocks/query_client.go deleted file mode 100644 index 2d6f4733..00000000 --- a/go/node/client/v1beta2/mocks/query_client.go +++ /dev/null @@ -1,1866 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - authz "github.com/cosmos/cosmos-sdk/x/authz" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - certv1beta3 "github.com/akash-network/akash-api/go/node/cert/v1beta3" - - client "github.com/cosmos/cosmos-sdk/client" - - context "context" - - deploymentv1beta3 "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - - feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" - - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - grpc "google.golang.org/grpc" - - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - - mock "github.com/stretchr/testify/mock" - - proposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - - providerv1beta3 "github.com/akash-network/akash-api/go/node/provider/v1beta3" - - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - types "github.com/cosmos/cosmos-sdk/x/auth/types" - - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - v1beta3 "github.com/akash-network/akash-api/go/node/audit/v1beta3" - - v1beta4 "github.com/akash-network/akash-api/go/node/market/v1beta4" -) - -// QueryClient is an autogenerated mock type for the QueryClient type -type QueryClient struct { - mock.Mock -} - -type QueryClient_Expecter struct { - mock *mock.Mock -} - -func (_m *QueryClient) EXPECT() *QueryClient_Expecter { - return &QueryClient_Expecter{mock: &_m.Mock} -} - -// AllProvidersAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) AllProvidersAttributes(ctx context.Context, in *v1beta3.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AllProvidersAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_AllProvidersAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllProvidersAttributes' -type QueryClient_AllProvidersAttributes_Call struct { - *mock.Call -} - -// AllProvidersAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryAllProvidersAttributesRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) AllProvidersAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_AllProvidersAttributes_Call { - return &QueryClient_AllProvidersAttributes_Call{Call: _e.mock.On("AllProvidersAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_AllProvidersAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AllProvidersAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryAllProvidersAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_AllProvidersAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *QueryClient_AllProvidersAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_AllProvidersAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *QueryClient_AllProvidersAttributes_Call { - _c.Call.Return(run) - return _c -} - -// AuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) AuditorAttributes(ctx context.Context, in *v1beta3.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for AuditorAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_AuditorAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuditorAttributes' -type QueryClient_AuditorAttributes_Call struct { - *mock.Call -} - -// AuditorAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryAuditorAttributesRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) AuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_AuditorAttributes_Call { - return &QueryClient_AuditorAttributes_Call{Call: _e.mock.On("AuditorAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_AuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryAuditorAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AuditorAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryAuditorAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_AuditorAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *QueryClient_AuditorAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_AuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *QueryClient_AuditorAttributes_Call { - _c.Call.Return(run) - return _c -} - -// Auth provides a mock function with given fields: -func (_m *QueryClient) Auth() types.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Auth") - } - - var r0 types.QueryClient - if rf, ok := ret.Get(0).(func() types.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(types.QueryClient) - } - } - - return r0 -} - -// QueryClient_Auth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Auth' -type QueryClient_Auth_Call struct { - *mock.Call -} - -// Auth is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Auth() *QueryClient_Auth_Call { - return &QueryClient_Auth_Call{Call: _e.mock.On("Auth")} -} - -func (_c *QueryClient_Auth_Call) Run(run func()) *QueryClient_Auth_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Auth_Call) Return(_a0 types.QueryClient) *QueryClient_Auth_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Auth_Call) RunAndReturn(run func() types.QueryClient) *QueryClient_Auth_Call { - _c.Call.Return(run) - return _c -} - -// Authz provides a mock function with given fields: -func (_m *QueryClient) Authz() authz.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Authz") - } - - var r0 authz.QueryClient - if rf, ok := ret.Get(0).(func() authz.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(authz.QueryClient) - } - } - - return r0 -} - -// QueryClient_Authz_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authz' -type QueryClient_Authz_Call struct { - *mock.Call -} - -// Authz is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Authz() *QueryClient_Authz_Call { - return &QueryClient_Authz_Call{Call: _e.mock.On("Authz")} -} - -func (_c *QueryClient_Authz_Call) Run(run func()) *QueryClient_Authz_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Authz_Call) Return(_a0 authz.QueryClient) *QueryClient_Authz_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Authz_Call) RunAndReturn(run func() authz.QueryClient) *QueryClient_Authz_Call { - _c.Call.Return(run) - return _c -} - -// Bank provides a mock function with given fields: -func (_m *QueryClient) Bank() banktypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Bank") - } - - var r0 banktypes.QueryClient - if rf, ok := ret.Get(0).(func() banktypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(banktypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Bank_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bank' -type QueryClient_Bank_Call struct { - *mock.Call -} - -// Bank is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Bank() *QueryClient_Bank_Call { - return &QueryClient_Bank_Call{Call: _e.mock.On("Bank")} -} - -func (_c *QueryClient_Bank_Call) Run(run func()) *QueryClient_Bank_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Bank_Call) Return(_a0 banktypes.QueryClient) *QueryClient_Bank_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Bank_Call) RunAndReturn(run func() banktypes.QueryClient) *QueryClient_Bank_Call { - _c.Call.Return(run) - return _c -} - -// Bid provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Bid(ctx context.Context, in *v1beta4.QueryBidRequest, opts ...grpc.CallOption) (*v1beta4.QueryBidResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Bid") - } - - var r0 *v1beta4.QueryBidResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryBidRequest, ...grpc.CallOption) (*v1beta4.QueryBidResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryBidRequest, ...grpc.CallOption) *v1beta4.QueryBidResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryBidResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryBidRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Bid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bid' -type QueryClient_Bid_Call struct { - *mock.Call -} - -// Bid is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryBidRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Bid(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Bid_Call { - return &QueryClient_Bid_Call{Call: _e.mock.On("Bid", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Bid_Call) Run(run func(ctx context.Context, in *v1beta4.QueryBidRequest, opts ...grpc.CallOption)) *QueryClient_Bid_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryBidRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Bid_Call) Return(_a0 *v1beta4.QueryBidResponse, _a1 error) *QueryClient_Bid_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Bid_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryBidRequest, ...grpc.CallOption) (*v1beta4.QueryBidResponse, error)) *QueryClient_Bid_Call { - _c.Call.Return(run) - return _c -} - -// Bids provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Bids(ctx context.Context, in *v1beta4.QueryBidsRequest, opts ...grpc.CallOption) (*v1beta4.QueryBidsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Bids") - } - - var r0 *v1beta4.QueryBidsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryBidsRequest, ...grpc.CallOption) (*v1beta4.QueryBidsResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryBidsRequest, ...grpc.CallOption) *v1beta4.QueryBidsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryBidsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryBidsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Bids_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bids' -type QueryClient_Bids_Call struct { - *mock.Call -} - -// Bids is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryBidsRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Bids(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Bids_Call { - return &QueryClient_Bids_Call{Call: _e.mock.On("Bids", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Bids_Call) Run(run func(ctx context.Context, in *v1beta4.QueryBidsRequest, opts ...grpc.CallOption)) *QueryClient_Bids_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryBidsRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Bids_Call) Return(_a0 *v1beta4.QueryBidsResponse, _a1 error) *QueryClient_Bids_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Bids_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryBidsRequest, ...grpc.CallOption) (*v1beta4.QueryBidsResponse, error)) *QueryClient_Bids_Call { - _c.Call.Return(run) - return _c -} - -// Certificates provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Certificates(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Certificates") - } - - var r0 *certv1beta3.QueryCertificatesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) *certv1beta3.QueryCertificatesResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*certv1beta3.QueryCertificatesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Certificates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Certificates' -type QueryClient_Certificates_Call struct { - *mock.Call -} - -// Certificates is a helper method to define mock.On call -// - ctx context.Context -// - in *certv1beta3.QueryCertificatesRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Certificates(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Certificates_Call { - return &QueryClient_Certificates_Call{Call: _e.mock.On("Certificates", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Certificates_Call) Run(run func(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption)) *QueryClient_Certificates_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*certv1beta3.QueryCertificatesRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Certificates_Call) Return(_a0 *certv1beta3.QueryCertificatesResponse, _a1 error) *QueryClient_Certificates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Certificates_Call) RunAndReturn(run func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)) *QueryClient_Certificates_Call { - _c.Call.Return(run) - return _c -} - -// ClientContext provides a mock function with given fields: -func (_m *QueryClient) ClientContext() client.Context { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ClientContext") - } - - var r0 client.Context - if rf, ok := ret.Get(0).(func() client.Context); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(client.Context) - } - - return r0 -} - -// QueryClient_ClientContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientContext' -type QueryClient_ClientContext_Call struct { - *mock.Call -} - -// ClientContext is a helper method to define mock.On call -func (_e *QueryClient_Expecter) ClientContext() *QueryClient_ClientContext_Call { - return &QueryClient_ClientContext_Call{Call: _e.mock.On("ClientContext")} -} - -func (_c *QueryClient_ClientContext_Call) Run(run func()) *QueryClient_ClientContext_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_ClientContext_Call) Return(_a0 client.Context) *QueryClient_ClientContext_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_ClientContext_Call) RunAndReturn(run func() client.Context) *QueryClient_ClientContext_Call { - _c.Call.Return(run) - return _c -} - -// Deployment provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Deployment(ctx context.Context, in *deploymentv1beta3.QueryDeploymentRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Deployment") - } - - var r0 *deploymentv1beta3.QueryDeploymentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) *deploymentv1beta3.QueryDeploymentResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryDeploymentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Deployment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deployment' -type QueryClient_Deployment_Call struct { - *mock.Call -} - -// Deployment is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryDeploymentRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Deployment(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Deployment_Call { - return &QueryClient_Deployment_Call{Call: _e.mock.On("Deployment", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Deployment_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryDeploymentRequest, opts ...grpc.CallOption)) *QueryClient_Deployment_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryDeploymentRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Deployment_Call) Return(_a0 *deploymentv1beta3.QueryDeploymentResponse, _a1 error) *QueryClient_Deployment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Deployment_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentResponse, error)) *QueryClient_Deployment_Call { - _c.Call.Return(run) - return _c -} - -// Deployments provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Deployments(ctx context.Context, in *deploymentv1beta3.QueryDeploymentsRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Deployments") - } - - var r0 *deploymentv1beta3.QueryDeploymentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) *deploymentv1beta3.QueryDeploymentsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryDeploymentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Deployments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deployments' -type QueryClient_Deployments_Call struct { - *mock.Call -} - -// Deployments is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryDeploymentsRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Deployments(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Deployments_Call { - return &QueryClient_Deployments_Call{Call: _e.mock.On("Deployments", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Deployments_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryDeploymentsRequest, opts ...grpc.CallOption)) *QueryClient_Deployments_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryDeploymentsRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Deployments_Call) Return(_a0 *deploymentv1beta3.QueryDeploymentsResponse, _a1 error) *QueryClient_Deployments_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Deployments_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryDeploymentsResponse, error)) *QueryClient_Deployments_Call { - _c.Call.Return(run) - return _c -} - -// Distribution provides a mock function with given fields: -func (_m *QueryClient) Distribution() distributiontypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Distribution") - } - - var r0 distributiontypes.QueryClient - if rf, ok := ret.Get(0).(func() distributiontypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(distributiontypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Distribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Distribution' -type QueryClient_Distribution_Call struct { - *mock.Call -} - -// Distribution is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Distribution() *QueryClient_Distribution_Call { - return &QueryClient_Distribution_Call{Call: _e.mock.On("Distribution")} -} - -func (_c *QueryClient_Distribution_Call) Run(run func()) *QueryClient_Distribution_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Distribution_Call) Return(_a0 distributiontypes.QueryClient) *QueryClient_Distribution_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Distribution_Call) RunAndReturn(run func() distributiontypes.QueryClient) *QueryClient_Distribution_Call { - _c.Call.Return(run) - return _c -} - -// Evidence provides a mock function with given fields: -func (_m *QueryClient) Evidence() evidencetypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Evidence") - } - - var r0 evidencetypes.QueryClient - if rf, ok := ret.Get(0).(func() evidencetypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(evidencetypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Evidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Evidence' -type QueryClient_Evidence_Call struct { - *mock.Call -} - -// Evidence is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Evidence() *QueryClient_Evidence_Call { - return &QueryClient_Evidence_Call{Call: _e.mock.On("Evidence")} -} - -func (_c *QueryClient_Evidence_Call) Run(run func()) *QueryClient_Evidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Evidence_Call) Return(_a0 evidencetypes.QueryClient) *QueryClient_Evidence_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Evidence_Call) RunAndReturn(run func() evidencetypes.QueryClient) *QueryClient_Evidence_Call { - _c.Call.Return(run) - return _c -} - -// Feegrant provides a mock function with given fields: -func (_m *QueryClient) Feegrant() feegrant.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Feegrant") - } - - var r0 feegrant.QueryClient - if rf, ok := ret.Get(0).(func() feegrant.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(feegrant.QueryClient) - } - } - - return r0 -} - -// QueryClient_Feegrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Feegrant' -type QueryClient_Feegrant_Call struct { - *mock.Call -} - -// Feegrant is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Feegrant() *QueryClient_Feegrant_Call { - return &QueryClient_Feegrant_Call{Call: _e.mock.On("Feegrant")} -} - -func (_c *QueryClient_Feegrant_Call) Run(run func()) *QueryClient_Feegrant_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Feegrant_Call) Return(_a0 feegrant.QueryClient) *QueryClient_Feegrant_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Feegrant_Call) RunAndReturn(run func() feegrant.QueryClient) *QueryClient_Feegrant_Call { - _c.Call.Return(run) - return _c -} - -// Gov provides a mock function with given fields: -func (_m *QueryClient) Gov() govtypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Gov") - } - - var r0 govtypes.QueryClient - if rf, ok := ret.Get(0).(func() govtypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(govtypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Gov_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Gov' -type QueryClient_Gov_Call struct { - *mock.Call -} - -// Gov is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Gov() *QueryClient_Gov_Call { - return &QueryClient_Gov_Call{Call: _e.mock.On("Gov")} -} - -func (_c *QueryClient_Gov_Call) Run(run func()) *QueryClient_Gov_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Gov_Call) Return(_a0 govtypes.QueryClient) *QueryClient_Gov_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Gov_Call) RunAndReturn(run func() govtypes.QueryClient) *QueryClient_Gov_Call { - _c.Call.Return(run) - return _c -} - -// Group provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Group(ctx context.Context, in *deploymentv1beta3.QueryGroupRequest, opts ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Group") - } - - var r0 *deploymentv1beta3.QueryGroupResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) *deploymentv1beta3.QueryGroupResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta3.QueryGroupResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Group_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Group' -type QueryClient_Group_Call struct { - *mock.Call -} - -// Group is a helper method to define mock.On call -// - ctx context.Context -// - in *deploymentv1beta3.QueryGroupRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Group(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Group_Call { - return &QueryClient_Group_Call{Call: _e.mock.On("Group", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Group_Call) Run(run func(ctx context.Context, in *deploymentv1beta3.QueryGroupRequest, opts ...grpc.CallOption)) *QueryClient_Group_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*deploymentv1beta3.QueryGroupRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Group_Call) Return(_a0 *deploymentv1beta3.QueryGroupResponse, _a1 error) *QueryClient_Group_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Group_Call) RunAndReturn(run func(context.Context, *deploymentv1beta3.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta3.QueryGroupResponse, error)) *QueryClient_Group_Call { - _c.Call.Return(run) - return _c -} - -// Lease provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Lease(ctx context.Context, in *v1beta4.QueryLeaseRequest, opts ...grpc.CallOption) (*v1beta4.QueryLeaseResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Lease") - } - - var r0 *v1beta4.QueryLeaseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryLeaseRequest, ...grpc.CallOption) (*v1beta4.QueryLeaseResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryLeaseRequest, ...grpc.CallOption) *v1beta4.QueryLeaseResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryLeaseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryLeaseRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Lease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lease' -type QueryClient_Lease_Call struct { - *mock.Call -} - -// Lease is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryLeaseRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Lease(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Lease_Call { - return &QueryClient_Lease_Call{Call: _e.mock.On("Lease", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Lease_Call) Run(run func(ctx context.Context, in *v1beta4.QueryLeaseRequest, opts ...grpc.CallOption)) *QueryClient_Lease_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryLeaseRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Lease_Call) Return(_a0 *v1beta4.QueryLeaseResponse, _a1 error) *QueryClient_Lease_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Lease_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryLeaseRequest, ...grpc.CallOption) (*v1beta4.QueryLeaseResponse, error)) *QueryClient_Lease_Call { - _c.Call.Return(run) - return _c -} - -// Leases provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Leases(ctx context.Context, in *v1beta4.QueryLeasesRequest, opts ...grpc.CallOption) (*v1beta4.QueryLeasesResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Leases") - } - - var r0 *v1beta4.QueryLeasesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryLeasesRequest, ...grpc.CallOption) (*v1beta4.QueryLeasesResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryLeasesRequest, ...grpc.CallOption) *v1beta4.QueryLeasesResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryLeasesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryLeasesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Leases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Leases' -type QueryClient_Leases_Call struct { - *mock.Call -} - -// Leases is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryLeasesRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Leases(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Leases_Call { - return &QueryClient_Leases_Call{Call: _e.mock.On("Leases", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Leases_Call) Run(run func(ctx context.Context, in *v1beta4.QueryLeasesRequest, opts ...grpc.CallOption)) *QueryClient_Leases_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryLeasesRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Leases_Call) Return(_a0 *v1beta4.QueryLeasesResponse, _a1 error) *QueryClient_Leases_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Leases_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryLeasesRequest, ...grpc.CallOption) (*v1beta4.QueryLeasesResponse, error)) *QueryClient_Leases_Call { - _c.Call.Return(run) - return _c -} - -// Mint provides a mock function with given fields: -func (_m *QueryClient) Mint() minttypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Mint") - } - - var r0 minttypes.QueryClient - if rf, ok := ret.Get(0).(func() minttypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(minttypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Mint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mint' -type QueryClient_Mint_Call struct { - *mock.Call -} - -// Mint is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Mint() *QueryClient_Mint_Call { - return &QueryClient_Mint_Call{Call: _e.mock.On("Mint")} -} - -func (_c *QueryClient_Mint_Call) Run(run func()) *QueryClient_Mint_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Mint_Call) Return(_a0 minttypes.QueryClient) *QueryClient_Mint_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Mint_Call) RunAndReturn(run func() minttypes.QueryClient) *QueryClient_Mint_Call { - _c.Call.Return(run) - return _c -} - -// Order provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Order(ctx context.Context, in *v1beta4.QueryOrderRequest, opts ...grpc.CallOption) (*v1beta4.QueryOrderResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Order") - } - - var r0 *v1beta4.QueryOrderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryOrderRequest, ...grpc.CallOption) (*v1beta4.QueryOrderResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryOrderRequest, ...grpc.CallOption) *v1beta4.QueryOrderResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryOrderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryOrderRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Order_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Order' -type QueryClient_Order_Call struct { - *mock.Call -} - -// Order is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryOrderRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Order(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Order_Call { - return &QueryClient_Order_Call{Call: _e.mock.On("Order", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Order_Call) Run(run func(ctx context.Context, in *v1beta4.QueryOrderRequest, opts ...grpc.CallOption)) *QueryClient_Order_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryOrderRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Order_Call) Return(_a0 *v1beta4.QueryOrderResponse, _a1 error) *QueryClient_Order_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Order_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryOrderRequest, ...grpc.CallOption) (*v1beta4.QueryOrderResponse, error)) *QueryClient_Order_Call { - _c.Call.Return(run) - return _c -} - -// Orders provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Orders(ctx context.Context, in *v1beta4.QueryOrdersRequest, opts ...grpc.CallOption) (*v1beta4.QueryOrdersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Orders") - } - - var r0 *v1beta4.QueryOrdersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryOrdersRequest, ...grpc.CallOption) (*v1beta4.QueryOrdersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryOrdersRequest, ...grpc.CallOption) *v1beta4.QueryOrdersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryOrdersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryOrdersRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Orders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Orders' -type QueryClient_Orders_Call struct { - *mock.Call -} - -// Orders is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta4.QueryOrdersRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Orders(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Orders_Call { - return &QueryClient_Orders_Call{Call: _e.mock.On("Orders", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Orders_Call) Run(run func(ctx context.Context, in *v1beta4.QueryOrdersRequest, opts ...grpc.CallOption)) *QueryClient_Orders_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta4.QueryOrdersRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Orders_Call) Return(_a0 *v1beta4.QueryOrdersResponse, _a1 error) *QueryClient_Orders_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Orders_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryOrdersRequest, ...grpc.CallOption) (*v1beta4.QueryOrdersResponse, error)) *QueryClient_Orders_Call { - _c.Call.Return(run) - return _c -} - -// Params provides a mock function with given fields: -func (_m *QueryClient) Params() proposal.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Params") - } - - var r0 proposal.QueryClient - if rf, ok := ret.Get(0).(func() proposal.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(proposal.QueryClient) - } - } - - return r0 -} - -// QueryClient_Params_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Params' -type QueryClient_Params_Call struct { - *mock.Call -} - -// Params is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Params() *QueryClient_Params_Call { - return &QueryClient_Params_Call{Call: _e.mock.On("Params")} -} - -func (_c *QueryClient_Params_Call) Run(run func()) *QueryClient_Params_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Params_Call) Return(_a0 proposal.QueryClient) *QueryClient_Params_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Params_Call) RunAndReturn(run func() proposal.QueryClient) *QueryClient_Params_Call { - _c.Call.Return(run) - return _c -} - -// Provider provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Provider(ctx context.Context, in *providerv1beta3.QueryProviderRequest, opts ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Provider") - } - - var r0 *providerv1beta3.QueryProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) *providerv1beta3.QueryProviderResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*providerv1beta3.QueryProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Provider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Provider' -type QueryClient_Provider_Call struct { - *mock.Call -} - -// Provider is a helper method to define mock.On call -// - ctx context.Context -// - in *providerv1beta3.QueryProviderRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Provider(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Provider_Call { - return &QueryClient_Provider_Call{Call: _e.mock.On("Provider", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Provider_Call) Run(run func(ctx context.Context, in *providerv1beta3.QueryProviderRequest, opts ...grpc.CallOption)) *QueryClient_Provider_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*providerv1beta3.QueryProviderRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Provider_Call) Return(_a0 *providerv1beta3.QueryProviderResponse, _a1 error) *QueryClient_Provider_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Provider_Call) RunAndReturn(run func(context.Context, *providerv1beta3.QueryProviderRequest, ...grpc.CallOption) (*providerv1beta3.QueryProviderResponse, error)) *QueryClient_Provider_Call { - _c.Call.Return(run) - return _c -} - -// ProviderAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) ProviderAttributes(ctx context.Context, in *v1beta3.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ProviderAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_ProviderAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderAttributes' -type QueryClient_ProviderAttributes_Call struct { - *mock.Call -} - -// ProviderAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryProviderAttributesRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) ProviderAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_ProviderAttributes_Call { - return &QueryClient_ProviderAttributes_Call{Call: _e.mock.On("ProviderAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_ProviderAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryProviderAttributesRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryProviderAttributesRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_ProviderAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_ProviderAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *QueryClient_ProviderAttributes_Call { - _c.Call.Return(run) - return _c -} - -// ProviderAuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) ProviderAuditorAttributes(ctx context.Context, in *v1beta3.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ProviderAuditorAttributes") - } - - var r0 *v1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) *v1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_ProviderAuditorAttributes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderAuditorAttributes' -type QueryClient_ProviderAuditorAttributes_Call struct { - *mock.Call -} - -// ProviderAuditorAttributes is a helper method to define mock.On call -// - ctx context.Context -// - in *v1beta3.QueryProviderAuditorRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) ProviderAuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_ProviderAuditorAttributes_Call { - return &QueryClient_ProviderAuditorAttributes_Call{Call: _e.mock.On("ProviderAuditorAttributes", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_ProviderAuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta3.QueryProviderAuditorRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAuditorAttributes_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*v1beta3.QueryProviderAuditorRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_ProviderAuditorAttributes_Call) Return(_a0 *v1beta3.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAuditorAttributes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_ProviderAuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta3.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta3.QueryProvidersResponse, error)) *QueryClient_ProviderAuditorAttributes_Call { - _c.Call.Return(run) - return _c -} - -// Providers provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Providers(ctx context.Context, in *providerv1beta3.QueryProvidersRequest, opts ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Providers") - } - - var r0 *providerv1beta3.QueryProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) *providerv1beta3.QueryProvidersResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*providerv1beta3.QueryProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// QueryClient_Providers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Providers' -type QueryClient_Providers_Call struct { - *mock.Call -} - -// Providers is a helper method to define mock.On call -// - ctx context.Context -// - in *providerv1beta3.QueryProvidersRequest -// - opts ...grpc.CallOption -func (_e *QueryClient_Expecter) Providers(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Providers_Call { - return &QueryClient_Providers_Call{Call: _e.mock.On("Providers", - append([]interface{}{ctx, in}, opts...)...)} -} - -func (_c *QueryClient_Providers_Call) Run(run func(ctx context.Context, in *providerv1beta3.QueryProvidersRequest, opts ...grpc.CallOption)) *QueryClient_Providers_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } - } - run(args[0].(context.Context), args[1].(*providerv1beta3.QueryProvidersRequest), variadicArgs...) - }) - return _c -} - -func (_c *QueryClient_Providers_Call) Return(_a0 *providerv1beta3.QueryProvidersResponse, _a1 error) *QueryClient_Providers_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *QueryClient_Providers_Call) RunAndReturn(run func(context.Context, *providerv1beta3.QueryProvidersRequest, ...grpc.CallOption) (*providerv1beta3.QueryProvidersResponse, error)) *QueryClient_Providers_Call { - _c.Call.Return(run) - return _c -} - -// Slashing provides a mock function with given fields: -func (_m *QueryClient) Slashing() slashingtypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Slashing") - } - - var r0 slashingtypes.QueryClient - if rf, ok := ret.Get(0).(func() slashingtypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(slashingtypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Slashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Slashing' -type QueryClient_Slashing_Call struct { - *mock.Call -} - -// Slashing is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Slashing() *QueryClient_Slashing_Call { - return &QueryClient_Slashing_Call{Call: _e.mock.On("Slashing")} -} - -func (_c *QueryClient_Slashing_Call) Run(run func()) *QueryClient_Slashing_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Slashing_Call) Return(_a0 slashingtypes.QueryClient) *QueryClient_Slashing_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Slashing_Call) RunAndReturn(run func() slashingtypes.QueryClient) *QueryClient_Slashing_Call { - _c.Call.Return(run) - return _c -} - -// Staking provides a mock function with given fields: -func (_m *QueryClient) Staking() stakingtypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Staking") - } - - var r0 stakingtypes.QueryClient - if rf, ok := ret.Get(0).(func() stakingtypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(stakingtypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Staking_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Staking' -type QueryClient_Staking_Call struct { - *mock.Call -} - -// Staking is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Staking() *QueryClient_Staking_Call { - return &QueryClient_Staking_Call{Call: _e.mock.On("Staking")} -} - -func (_c *QueryClient_Staking_Call) Run(run func()) *QueryClient_Staking_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Staking_Call) Return(_a0 stakingtypes.QueryClient) *QueryClient_Staking_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Staking_Call) RunAndReturn(run func() stakingtypes.QueryClient) *QueryClient_Staking_Call { - _c.Call.Return(run) - return _c -} - -// Upgrade provides a mock function with given fields: -func (_m *QueryClient) Upgrade() upgradetypes.QueryClient { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Upgrade") - } - - var r0 upgradetypes.QueryClient - if rf, ok := ret.Get(0).(func() upgradetypes.QueryClient); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(upgradetypes.QueryClient) - } - } - - return r0 -} - -// QueryClient_Upgrade_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upgrade' -type QueryClient_Upgrade_Call struct { - *mock.Call -} - -// Upgrade is a helper method to define mock.On call -func (_e *QueryClient_Expecter) Upgrade() *QueryClient_Upgrade_Call { - return &QueryClient_Upgrade_Call{Call: _e.mock.On("Upgrade")} -} - -func (_c *QueryClient_Upgrade_Call) Run(run func()) *QueryClient_Upgrade_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *QueryClient_Upgrade_Call) Return(_a0 upgradetypes.QueryClient) *QueryClient_Upgrade_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *QueryClient_Upgrade_Call) RunAndReturn(run func() upgradetypes.QueryClient) *QueryClient_Upgrade_Call { - _c.Call.Return(run) - return _c -} - -// NewQueryClient creates a new instance of QueryClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewQueryClient(t interface { - mock.TestingT - Cleanup(func()) -}) *QueryClient { - mock := &QueryClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta2/mocks/tx_client.go b/go/node/client/v1beta2/mocks/tx_client.go deleted file mode 100644 index f0402d63..00000000 --- a/go/node/client/v1beta2/mocks/tx_client.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by mockery v2.42.0. DO NOT EDIT. - -package mocks - -import ( - context "context" - - types "github.com/cosmos/cosmos-sdk/types" - mock "github.com/stretchr/testify/mock" - - v1beta2 "github.com/akash-network/akash-api/go/node/client/v1beta2" -) - -// TxClient is an autogenerated mock type for the TxClient type -type TxClient struct { - mock.Mock -} - -type TxClient_Expecter struct { - mock *mock.Mock -} - -func (_m *TxClient) EXPECT() *TxClient_Expecter { - return &TxClient_Expecter{mock: &_m.Mock} -} - -// Broadcast provides a mock function with given fields: _a0, _a1, _a2 -func (_m *TxClient) Broadcast(_a0 context.Context, _a1 []types.Msg, _a2 ...v1beta2.BroadcastOption) (interface{}, error) { - _va := make([]interface{}, len(_a2)) - for _i := range _a2 { - _va[_i] = _a2[_i] - } - var _ca []interface{} - _ca = append(_ca, _a0, _a1) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Broadcast") - } - - var r0 interface{} - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []types.Msg, ...v1beta2.BroadcastOption) (interface{}, error)); ok { - return rf(_a0, _a1, _a2...) - } - if rf, ok := ret.Get(0).(func(context.Context, []types.Msg, ...v1beta2.BroadcastOption) interface{}); ok { - r0 = rf(_a0, _a1, _a2...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, []types.Msg, ...v1beta2.BroadcastOption) error); ok { - r1 = rf(_a0, _a1, _a2...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TxClient_Broadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Broadcast' -type TxClient_Broadcast_Call struct { - *mock.Call -} - -// Broadcast is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 []types.Msg -// - _a2 ...v1beta2.BroadcastOption -func (_e *TxClient_Expecter) Broadcast(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *TxClient_Broadcast_Call { - return &TxClient_Broadcast_Call{Call: _e.mock.On("Broadcast", - append([]interface{}{_a0, _a1}, _a2...)...)} -} - -func (_c *TxClient_Broadcast_Call) Run(run func(_a0 context.Context, _a1 []types.Msg, _a2 ...v1beta2.BroadcastOption)) *TxClient_Broadcast_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]v1beta2.BroadcastOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(v1beta2.BroadcastOption) - } - } - run(args[0].(context.Context), args[1].([]types.Msg), variadicArgs...) - }) - return _c -} - -func (_c *TxClient_Broadcast_Call) Return(_a0 interface{}, _a1 error) *TxClient_Broadcast_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *TxClient_Broadcast_Call) RunAndReturn(run func(context.Context, []types.Msg, ...v1beta2.BroadcastOption) (interface{}, error)) *TxClient_Broadcast_Call { - _c.Call.Return(run) - return _c -} - -// NewTxClient creates a new instance of TxClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTxClient(t interface { - mock.TestingT - Cleanup(func()) -}) *TxClient { - mock := &TxClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go/node/client/v1beta2/node.go b/go/node/client/v1beta2/node.go deleted file mode 100644 index 0f764c91..00000000 --- a/go/node/client/v1beta2/node.go +++ /dev/null @@ -1,34 +0,0 @@ -package v1beta2 - -import ( - "context" - - sdkclient "github.com/cosmos/cosmos-sdk/client" - rpcclient "github.com/tendermint/tendermint/rpc/client" - tmrpc "github.com/tendermint/tendermint/rpc/core/types" -) - -var _ NodeClient = (*node)(nil) - -type node struct { - rpc rpcclient.Client -} - -func newNode(cctx sdkclient.Context) *node { - nd := &node{ - rpc: cctx.Client, - } - - return nd -} - -func (nd *node) SyncInfo(ctx context.Context) (*tmrpc.SyncInfo, error) { - status, err := nd.rpc.Status(ctx) - if err != nil { - return nil, err - } - - info := status.SyncInfo - - return &info, nil -} diff --git a/go/node/client/v1beta2/options.go b/go/node/client/v1beta2/options.go deleted file mode 100644 index 3cf1802f..00000000 --- a/go/node/client/v1beta2/options.go +++ /dev/null @@ -1,7 +0,0 @@ -package v1beta2 - -type ClientOptions struct { - tclient TxClient // nolint: unused -} - -type ClientOption func(*ClientOptions) *ClientOptions diff --git a/go/node/client/v1beta2/query.go b/go/node/client/v1beta2/query.go deleted file mode 100644 index 47937dc4..00000000 --- a/go/node/client/v1beta2/query.go +++ /dev/null @@ -1,277 +0,0 @@ -package v1beta2 - -import ( - "context" - - "google.golang.org/grpc" - - sdkclient "github.com/cosmos/cosmos-sdk/client" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/authz" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evdtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - slashtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - staketypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta4" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" -) - -var _ QueryClient = (*queryClient)(nil) - -type sdkQueryClient struct { - auth authtypes.QueryClient - authz authz.QueryClient - bank banktypes.QueryClient - distr disttypes.QueryClient - evidence evdtypes.QueryClient - feegrant feegranttypes.QueryClient - gov govtypes.QueryClient - mint minttypes.QueryClient - params paramtypes.QueryClient - slashing slashtypes.QueryClient - staking staketypes.QueryClient - upgrade upgradetypes.QueryClient -} - -type queryClient struct { - dclient dtypes.QueryClient - mclient mtypes.QueryClient - pclient ptypes.QueryClient - aclient atypes.QueryClient - cclient ctypes.QueryClient - sdk sdkQueryClient - cctx sdkclient.Context -} - -// NewQueryClient creates new query client instance based on a Cosmos SDK client context. -func NewQueryClient(cctx sdkclient.Context) QueryClient { - return newQueryClient(cctx) -} - -func newQueryClient(cctx sdkclient.Context) *queryClient { - return &queryClient{ - dclient: dtypes.NewQueryClient(cctx), - mclient: mtypes.NewQueryClient(cctx), - pclient: ptypes.NewQueryClient(cctx), - aclient: atypes.NewQueryClient(cctx), - cclient: ctypes.NewQueryClient(cctx), - sdk: sdkQueryClient{ - auth: authtypes.NewQueryClient(cctx), - authz: authz.NewQueryClient(cctx), - bank: banktypes.NewQueryClient(cctx), - distr: disttypes.NewQueryClient(cctx), - evidence: evdtypes.NewQueryClient(cctx), - feegrant: feegranttypes.NewQueryClient(cctx), - gov: govtypes.NewQueryClient(cctx), - mint: minttypes.NewQueryClient(cctx), - params: paramtypes.NewQueryClient(cctx), - slashing: slashtypes.NewQueryClient(cctx), - staking: staketypes.NewQueryClient(cctx), - upgrade: upgradetypes.NewQueryClient(cctx), - }, - cctx: cctx, - } -} - -// ClientContext returns the client's Cosmos SDK client context. -func (c *queryClient) ClientContext() sdkclient.Context { - return c.cctx -} - -// Deployments queries deployments. -func (c *queryClient) Deployments(ctx context.Context, in *dtypes.QueryDeploymentsRequest, opts ...grpc.CallOption) (*dtypes.QueryDeploymentsResponse, error) { - if c.dclient == nil { - return &dtypes.QueryDeploymentsResponse{}, ErrClientNotFound - } - return c.dclient.Deployments(ctx, in, opts...) -} - -// Deployment queries a deployment. -func (c *queryClient) Deployment(ctx context.Context, in *dtypes.QueryDeploymentRequest, opts ...grpc.CallOption) (*dtypes.QueryDeploymentResponse, error) { - if c.dclient == nil { - return &dtypes.QueryDeploymentResponse{}, ErrClientNotFound - } - return c.dclient.Deployment(ctx, in, opts...) -} - -// Group queries a group. -func (c *queryClient) Group(ctx context.Context, in *dtypes.QueryGroupRequest, opts ...grpc.CallOption) (*dtypes.QueryGroupResponse, error) { - if c.dclient == nil { - return &dtypes.QueryGroupResponse{}, ErrClientNotFound - } - return c.dclient.Group(ctx, in, opts...) -} - -// Orders queries orders. -func (c *queryClient) Orders(ctx context.Context, in *mtypes.QueryOrdersRequest, opts ...grpc.CallOption) (*mtypes.QueryOrdersResponse, error) { - if c.mclient == nil { - return &mtypes.QueryOrdersResponse{}, ErrClientNotFound - } - return c.mclient.Orders(ctx, in, opts...) -} - -// Order queries an order. -func (c *queryClient) Order(ctx context.Context, in *mtypes.QueryOrderRequest, opts ...grpc.CallOption) (*mtypes.QueryOrderResponse, error) { - if c.mclient == nil { - return &mtypes.QueryOrderResponse{}, ErrClientNotFound - } - return c.mclient.Order(ctx, in, opts...) -} - -// Bids queries bids. -func (c *queryClient) Bids(ctx context.Context, in *mtypes.QueryBidsRequest, opts ...grpc.CallOption) (*mtypes.QueryBidsResponse, error) { - if c.mclient == nil { - return &mtypes.QueryBidsResponse{}, ErrClientNotFound - } - return c.mclient.Bids(ctx, in, opts...) -} - -// Bid queries a specific bid. -func (c *queryClient) Bid(ctx context.Context, in *mtypes.QueryBidRequest, opts ...grpc.CallOption) (*mtypes.QueryBidResponse, error) { - if c.mclient == nil { - return &mtypes.QueryBidResponse{}, ErrClientNotFound - } - return c.mclient.Bid(ctx, in, opts...) -} - -// Leases queries leases. -func (c *queryClient) Leases(ctx context.Context, in *mtypes.QueryLeasesRequest, opts ...grpc.CallOption) (*mtypes.QueryLeasesResponse, error) { - if c.mclient == nil { - return &mtypes.QueryLeasesResponse{}, ErrClientNotFound - } - return c.mclient.Leases(ctx, in, opts...) -} - -// Lease queries a lease. -func (c *queryClient) Lease(ctx context.Context, in *mtypes.QueryLeaseRequest, opts ...grpc.CallOption) (*mtypes.QueryLeaseResponse, error) { - if c.mclient == nil { - return &mtypes.QueryLeaseResponse{}, ErrClientNotFound - } - return c.mclient.Lease(ctx, in, opts...) -} - -// Providers queries providers. -func (c *queryClient) Providers(ctx context.Context, in *ptypes.QueryProvidersRequest, opts ...grpc.CallOption) (*ptypes.QueryProvidersResponse, error) { - if c.pclient == nil { - return &ptypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.pclient.Providers(ctx, in, opts...) -} - -// Provider queries a provider. -func (c *queryClient) Provider(ctx context.Context, in *ptypes.QueryProviderRequest, opts ...grpc.CallOption) (*ptypes.QueryProviderResponse, error) { - if c.pclient == nil { - return &ptypes.QueryProviderResponse{}, ErrClientNotFound - } - return c.pclient.Provider(ctx, in, opts...) -} - -// AllProvidersAttributes queries all providers. -func (c *queryClient) AllProvidersAttributes(ctx context.Context, in *atypes.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.pclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.AllProvidersAttributes(ctx, in, opts...) -} - -// ProviderAttributes queries all provider signed attributes. -func (c *queryClient) ProviderAttributes(ctx context.Context, in *atypes.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.pclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.ProviderAttributes(ctx, in, opts...) -} - -// ProviderAuditorAttributes queries provider signed attributes by specific validator. -func (c *queryClient) ProviderAuditorAttributes(ctx context.Context, in *atypes.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.pclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.ProviderAuditorAttributes(ctx, in, opts...) -} - -// AuditorAttributes queries all providers signed by this validator. -func (c *queryClient) AuditorAttributes(ctx context.Context, in *atypes.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*atypes.QueryProvidersResponse, error) { - if c.aclient == nil { - return &atypes.QueryProvidersResponse{}, ErrClientNotFound - } - return c.aclient.AuditorAttributes(ctx, in, opts...) -} - -// Certificates queries certificates. -func (c *queryClient) Certificates(ctx context.Context, in *ctypes.QueryCertificatesRequest, opts ...grpc.CallOption) (*ctypes.QueryCertificatesResponse, error) { - if c.cclient == nil { - return &ctypes.QueryCertificatesResponse{}, ErrClientNotFound - } - return c.cclient.Certificates(ctx, in, opts...) -} - -// Auth implements QueryClient by returning the auth Cosmos SDK query client. -func (c *queryClient) Auth() authtypes.QueryClient { - return c.sdk.auth -} - -// Authz implements QueryClient by returning the authz Cosmos SDK query client. -func (c *queryClient) Authz() authz.QueryClient { - return c.sdk.authz -} - -// Bank implements QueryClient by returning the bank Cosmos SDK query client. -func (c *queryClient) Bank() banktypes.QueryClient { - return c.sdk.bank -} - -// Distribution implements QueryClient by returning the distribution Cosmos SDK query client. -func (c *queryClient) Distribution() disttypes.QueryClient { - return c.sdk.distr -} - -// Evidence implements QueryClient by returning the evidence Cosmos SDK query client. -func (c *queryClient) Evidence() evdtypes.QueryClient { - return c.sdk.evidence -} - -// Feegrant implements QueryClient by returning the feegrant Cosmos SDK query client. -func (c *queryClient) Feegrant() feegranttypes.QueryClient { - return c.sdk.feegrant -} - -// Gov implements QueryClient by returning the governance Cosmos SDK query client. -func (c *queryClient) Gov() govtypes.QueryClient { - return c.sdk.gov -} - -// Mint implements QueryClient by returning the mint Cosmos SDK query client. -func (c *queryClient) Mint() minttypes.QueryClient { - return c.sdk.mint -} - -// Params implements QueryClient by returning the params Cosmos SDK query client. -func (c *queryClient) Params() paramtypes.QueryClient { - return c.sdk.params -} - -// Slashing implements QueryClient by returning the slashing Cosmos SDK query client. -func (c *queryClient) Slashing() slashtypes.QueryClient { - return c.sdk.slashing -} - -// Staking implements QueryClient by returning the staking Cosmos SDK query client. -func (c *queryClient) Staking() staketypes.QueryClient { - return c.sdk.staking -} - -// Upgrade implements QueryClient by returning the upgrade Cosmos SDK query client. -func (c *queryClient) Upgrade() upgradetypes.QueryClient { - return c.sdk.upgrade -} diff --git a/go/node/client/v1beta2/tx.go b/go/node/client/v1beta2/tx.go deleted file mode 100644 index a0301d94..00000000 --- a/go/node/client/v1beta2/tx.go +++ /dev/null @@ -1,649 +0,0 @@ -package v1beta2 - -import ( - "bufio" - "context" - "encoding/hex" - "errors" - "fmt" - "os" - "strings" - "time" - "unsafe" - - "github.com/boz/go-lifecycle" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/input" - "github.com/edwingeng/deque/v2" - "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/libs/log" - ttypes "github.com/tendermint/tendermint/types" - - sdkclient "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - - cltypes "github.com/akash-network/akash-api/go/node/client/types" - "github.com/akash-network/akash-api/go/util/ctxlog" -) - -var ( - ErrNotRunning = errors.New("tx client: not running") - ErrSyncTimedOut = errors.New("tx client: timed-out waiting for sequence sync") - ErrNodeCatchingUp = errors.New("tx client: cannot sync from catching up node") - ErrSimulateOffline = errors.New("tx client: cannot simulate tx in offline mode") - ErrBroadcastOffline = errors.New("tx client: cannot broadcast tx in offline mode") - ErrTxCanceledByUser = errors.New("tx client: transaction declined by user input") -) - -const ( - BroadcastDefaultTimeout = 30 * time.Second - BroadcastBlockRetryTimeout = 300 * time.Second - broadcastBlockRetryPeriod = time.Second - sequenceSyncTimeout = 30 * time.Second - - // sadface. - - // Only way to detect the timeout error. - // https://github.com/tendermint/tendermint/blob/46e06c97320bc61c4d98d3018f59d47ec69863c9/rpc/core/mempool.go#L124 - timeoutErrorMessage = "timed out waiting for tx to be included in a block" - - // Only way to check for tx not found error. - // https://github.com/tendermint/tendermint/blob/46e06c97320bc61c4d98d3018f59d47ec69863c9/rpc/core/tx.go#L31-L33 - notFoundErrorMessageSuffix = ") not found" -) - -var _ TxClient = (*serialBroadcaster)(nil) - -type ConfirmFn func(string) (bool, error) - -// BroadcastOptions defines the options allowed to configure a transaction broadcast. -type BroadcastOptions struct { - timeoutHeight *uint64 - gasAdjustment *float64 - gas *flags.GasSetting - gasPrices *string - fees *string - note *string - broadcastTimeout *time.Duration - resultAsError bool - skipConfirm *bool - confirmFn ConfirmFn -} - -// BroadcastOption is a function that takes as first argument a pointer to BroadcastOptions and returns an error -// if the option cannot be configured. A number of BroadcastOption functions are available in this package. -type BroadcastOption func(*BroadcastOptions) error - -// WithGasAdjustment returns a BroadcastOption that sets the gas adjustment configuration for the transaction. -func WithGasAdjustment(val float64) BroadcastOption { - return func(options *BroadcastOptions) error { - options.gasAdjustment = new(float64) - *options.gasAdjustment = val - return nil - } -} - -// WithNote returns a BroadcastOption that sets the note configuration for the transaction. -func WithNote(val string) BroadcastOption { - return func(options *BroadcastOptions) error { - options.note = new(string) - *options.note = val - return nil - } -} - -// WithGas returns a BroadcastOption that sets the gas setting configuration for the transaction. -func WithGas(val flags.GasSetting) BroadcastOption { - return func(options *BroadcastOptions) error { - options.gas = new(flags.GasSetting) - *options.gas = val - return nil - } -} - -// WithGasPrices returns a BroadcastOption that sets the gas price configuration for the transaction. -// Gas price is a string of the amount. E.g. "0.25uakt". -func WithGasPrices(val string) BroadcastOption { - return func(options *BroadcastOptions) error { - options.gasPrices = new(string) - *options.gasPrices = val - return nil - } -} - -// WithFees returns a BroadcastOption that sets the fees configuration for the transaction. -func WithFees(val string) BroadcastOption { - return func(options *BroadcastOptions) error { - options.fees = new(string) - *options.fees = val - return nil - } -} - -// WithTimeoutHeight returns a BroadcastOption that sets the timeout height configuration for the transaction. -func WithTimeoutHeight(val uint64) BroadcastOption { - return func(options *BroadcastOptions) error { - options.timeoutHeight = new(uint64) - *options.timeoutHeight = val - return nil - } -} - -// WithResultCodeAsError returns a BroadcastOption that enables the result code as error configuration for the transaction. -func WithResultCodeAsError() BroadcastOption { - return func(opts *BroadcastOptions) error { - opts.resultAsError = true - return nil - } -} - -// WithSkipConfirm returns a BroadcastOption that sets whether to skip or not the confirmation for the transaction. -func WithSkipConfirm(val bool) BroadcastOption { - return func(opts *BroadcastOptions) error { - opts.skipConfirm = new(bool) - *opts.skipConfirm = val - return nil - } -} - -// WithConfirmFn returns a BroadcastOption that sets the ConfirmFn function configuration for the transaction. -func WithConfirmFn(val ConfirmFn) BroadcastOption { - return func(opts *BroadcastOptions) error { - opts.confirmFn = val - return nil - } -} - -type broadcastResp struct { - resp interface{} - err error -} - -type broadcastReq struct { - id uintptr - responsech chan<- broadcastResp - msgs []sdk.Msg - opts *BroadcastOptions -} -type broadcastTxs struct { - msgs []sdk.Msg - opts *BroadcastOptions -} - -type seqResp struct { - seq uint64 - err error -} - -type seqReq struct { - curr uint64 - ch chan<- seqResp -} - -type broadcast struct { - donech chan<- error - respch chan<- broadcastResp - msgs []sdk.Msg - opts *BroadcastOptions -} - -type serialBroadcaster struct { - ctx context.Context - cctx sdkclient.Context - info keyring.Info - reqch chan broadcastReq - broadcastch chan broadcast - seqreqch chan seqReq - lc lifecycle.Lifecycle - nd *node - log log.Logger -} - -func newSerialTx(ctx context.Context, cctx sdkclient.Context, nd *node, opts ...cltypes.ClientOption) (*serialBroadcaster, error) { - txf, err := cltypes.NewTxFactory(cctx, opts...) - if err != nil { - return nil, err - } - - keyname := cctx.GetFromName() - info, err := txf.Keybase().Key(keyname) - if err != nil { - info, err = txf.Keybase().KeyByAddress(cctx.GetFromAddress()) - } - - if err != nil { - return nil, err - } - - client := &serialBroadcaster{ - ctx: ctx, - cctx: cctx, - info: info, - lc: lifecycle.New(), - reqch: make(chan broadcastReq, 1), - broadcastch: make(chan broadcast, 1), - seqreqch: make(chan seqReq), - nd: nd, - log: ctxlog.Logger(ctx).With("cmp", "client/broadcaster"), - } - - go client.lc.WatchContext(ctx) - go client.run() - go client.broadcaster(txf) - - if !client.cctx.Offline { - go client.sequenceSync() - } - - return client, nil -} - -// Broadcast broadcasts a transaction. A transaction is composed of 1 or many messages. This allows several -// operations to be performed in a single transaction. -// A transaction broadcast can be configured with an arbitrary number of BroadcastOption. -// This method returns the response as an interface{} instance. If an error occurs when preparing the transaction -// an error is returned. -// A transaction can fail with a given "transaction code" which will not be passed to the error value. -// This needs to be checked by the caller and handled accordingly. -func (c *serialBroadcaster) Broadcast(ctx context.Context, msgs []sdk.Msg, opts ...BroadcastOption) (interface{}, error) { - bOpts := &BroadcastOptions{ - confirmFn: defaultTxConfirm, - } - - for _, opt := range opts { - if err := opt(bOpts); err != nil { - return nil, err - } - } - - if bOpts.broadcastTimeout == nil { - bOpts.broadcastTimeout = new(time.Duration) - *bOpts.broadcastTimeout = BroadcastDefaultTimeout - } - - responsech := make(chan broadcastResp, 1) - request := broadcastReq{ - responsech: responsech, - msgs: msgs, - opts: bOpts, - } - - request.id = uintptr(unsafe.Pointer(&request)) - - select { - case c.reqch <- request: - case <-ctx.Done(): - return nil, ctx.Err() - case <-c.lc.ShuttingDown(): - return nil, ErrNotRunning - } - - select { - case resp := <-responsech: - // if returned error is sdk error, it is likely to be wrapped response so discard it - // as clients supposed to check Tx code, unless resp is nil, which is error during Tx preparation - if !errors.As(resp.err, &sdkerrors.Error{}) || resp.resp == nil || bOpts.resultAsError { - return resp.resp, resp.err - } - return resp.resp, nil - case <-ctx.Done(): - return nil, ctx.Err() - case <-c.lc.ShuttingDown(): - return nil, ErrNotRunning - } -} - -func (c *serialBroadcaster) run() { - defer c.lc.ShutdownCompleted() - - pending := deque.NewDeque[broadcastReq]() - broadcastCh := c.broadcastch - broadcastDoneCh := make(chan error, 1) - - tryBroadcast := func() { - if pending.Len() == 0 { - return - } - - req := pending.Peek(0) - - select { - case broadcastCh <- broadcast{ - donech: broadcastDoneCh, - respch: req.responsech, - msgs: req.msgs, - opts: req.opts, - }: - broadcastCh = nil - _ = pending.PopFront() - default: - } - } - -loop: - for { - select { - case err := <-c.lc.ShutdownRequest(): - c.lc.ShutdownInitiated(err) - break loop - case req := <-c.reqch: - pending.PushBack(req) - - tryBroadcast() - case err := <-broadcastDoneCh: - broadcastCh = c.broadcastch - - if err != nil { - c.log.Error("unable to broadcast messages", "error", err) - } - tryBroadcast() - } - } -} - -func deriveTxfFromOptions(txf tx.Factory, opts *BroadcastOptions) tx.Factory { - if opt := opts.note; opt != nil { - txf = txf.WithMemo(*opt) - } - - if opt := opts.gas; opt != nil { - txf = txf.WithGas(opt.Gas).WithSimulateAndExecute(opt.Simulate) - } - - if opt := opts.fees; opt != nil { - txf = txf.WithFees(*opt) - } - - if opt := opts.gasPrices; opt != nil { - txf = txf.WithGasPrices(*opt) - } - - if opt := opts.timeoutHeight; opt != nil { - txf = txf.WithTimeoutHeight(*opt) - } - - if opt := opts.gasAdjustment; opt != nil { - txf = txf.WithGasAdjustment(*opt) - } - - return txf -} - -func (c *serialBroadcaster) broadcaster(ptxf tx.Factory) { - syncSequence := func(f tx.Factory, rErr error) (uint64, bool) { - if rErr != nil { - if sdkerrors.ErrWrongSequence.Is(rErr) { - // attempt to sync account sequence - if rSeq, err := c.syncAccountSequence(f.Sequence()); err == nil { - return rSeq, true - } - - return f.Sequence(), true - } - } - - return f.Sequence(), false - } - - for { - select { - case <-c.lc.ShuttingDown(): - return - case req := <-c.broadcastch: - var err error - var resp interface{} - - done: - for i := 0; i < 2; i++ { - txf := deriveTxfFromOptions(ptxf, req.opts) - if c.cctx.GenerateOnly { - resp, err = c.generateTxs(txf, req.msgs...) - break done - } - - var rseq uint64 - txs := broadcastTxs{ - msgs: req.msgs, - opts: req.opts, - } - - resp, rseq, err = c.broadcastTxs(txf, txs) - ptxf = ptxf.WithSequence(rseq) - - rSeq, synced := syncSequence(ptxf, err) - ptxf = ptxf.WithSequence(rSeq) - - if !synced { - break done - } - } - - req.respch <- broadcastResp{ - resp: resp, - err: err, - } - - terr := &sdkerrors.Error{} - if !c.cctx.GenerateOnly && errors.Is(err, terr) { - rSeq, _ := syncSequence(ptxf, err) - ptxf = ptxf.WithSequence(rSeq) - } - - select { - case <-c.lc.ShuttingDown(): - return - case req.donech <- err: - } - } - } -} - -func (c *serialBroadcaster) sequenceSync() { - for { - select { - case <-c.lc.ShuttingDown(): - return - case req := <-c.seqreqch: - // reply back with current value if any error to occur - seq := seqResp{ - seq: req.curr, - } - - ndStatus, err := c.nd.SyncInfo(c.ctx) - if err != nil { - c.log.Error("cannot obtain node status to sync account sequence", "err", err) - seq.err = err - } - - if err == nil && ndStatus.CatchingUp { - c.log.Error("cannot sync account sequence from node that is catching up") - err = ErrNodeCatchingUp - } - - if err == nil { - // query sequence number - if _, seq.seq, err = c.cctx.AccountRetriever.GetAccountNumberSequence(c.cctx, c.info.GetAddress()); err != nil { - c.log.Error("error requesting account", "err", err) - seq.err = err - } - } - - select { - case req.ch <- seq: - case <-c.lc.ShuttingDown(): - } - } - } -} - -func (c *serialBroadcaster) generateTxs(txf tx.Factory, msgs ...sdk.Msg) ([]byte, error) { - if txf.SimulateAndExecute() { - if c.cctx.Offline { - return nil, ErrSimulateOffline - } - - _, adjusted, err := tx.CalculateGas(c.cctx, txf, msgs...) - if err != nil { - return nil, err - } - - txf = txf.WithGas(adjusted) - } - - utx, err := tx.BuildUnsignedTx(txf, msgs...) - if err != nil { - return nil, err - } - - data, err := c.cctx.TxConfig.TxJSONEncoder()(utx.GetTx()) - if err != nil { - return nil, err - } - - return data, nil -} - -func defaultTxConfirm(txn string) (bool, error) { - _, _ = fmt.Printf("%s\n\n", txn) - - buf := bufio.NewReader(os.Stdin) - - return input.GetConfirmation("confirm transaction before signing and broadcasting", buf, os.Stdin) -} - -func (c *serialBroadcaster) broadcastTxs(txf tx.Factory, txs broadcastTxs) (interface{}, uint64, error) { - var err error - var resp proto.Message - - if txf.SimulateAndExecute() || c.cctx.Simulate { - var adjusted uint64 - resp, adjusted, err = tx.CalculateGas(c.cctx, txf, txs.msgs...) - if err != nil { - return nil, txf.Sequence(), err - } - - txf = txf.WithGas(adjusted) - } - - if c.cctx.Simulate { - return resp, txf.Sequence(), nil - } - - txn, err := tx.BuildUnsignedTx(txf, txs.msgs...) - if err != nil { - return nil, txf.Sequence(), err - } - - if c.cctx.Offline { - return nil, txf.Sequence(), ErrBroadcastOffline - } - - if !c.cctx.SkipConfirm { - out, err := c.cctx.TxConfig.TxJSONEncoder()(txn.GetTx()) - if err != nil { - return nil, txf.Sequence(), err - } - - isYes, err := txs.opts.confirmFn(string(out)) - if err != nil { - return nil, txf.Sequence(), err - } - - if !isYes { - return nil, txf.Sequence(), ErrTxCanceledByUser - } - } - - txn.SetFeeGranter(c.cctx.GetFeeGranterAddress()) - - err = tx.Sign(txf, c.info.GetName(), txn, true) - if err != nil { - return nil, txf.Sequence(), err - } - - bytes, err := c.cctx.TxConfig.TxEncoder()(txn.GetTx()) - if err != nil { - return nil, txf.Sequence(), err - } - - response, err := c.doBroadcast(c.cctx, bytes, *txs.opts.broadcastTimeout) - if err != nil { - return response, txf.Sequence(), err - } - - txf = txf.WithSequence(txf.Sequence() + 1) - - if response.Code != 0 { - return response, txf.Sequence(), sdkerrors.ABCIError(response.Codespace, response.Code, response.RawLog) - } - - return response, txf.Sequence(), nil -} - -func (c *serialBroadcaster) syncAccountSequence(lSeq uint64) (uint64, error) { - ch := make(chan seqResp, 1) - - c.seqreqch <- seqReq{ - curr: lSeq, - ch: ch, - } - - ctx, cancel := context.WithTimeout(c.ctx, sequenceSyncTimeout) - defer cancel() - - select { - case rSeq := <-ch: - return rSeq.seq, rSeq.err - case <-ctx.Done(): - return lSeq, ErrSyncTimedOut - case <-c.lc.ShuttingDown(): - return lSeq, ErrNotRunning - } -} - -func (c *serialBroadcaster) doBroadcast(cctx sdkclient.Context, data []byte, timeout time.Duration) (*sdk.TxResponse, error) { - txb := ttypes.Tx(data) - hash := hex.EncodeToString(txb.Hash()) - - // broadcast-mode=block - // submit with mode commit/block - cres, err := cctx.BroadcastTxCommit(txb) - if err == nil { - // good job - return cres, nil - } else if !strings.HasSuffix(err.Error(), timeoutErrorMessage) { - return cres, err - } - - // timeout error, continue on to retry - // loop - lctx, cancel := context.WithTimeout(c.ctx, timeout) - defer cancel() - - for lctx.Err() == nil { - // wait up to one second - select { - case <-lctx.Done(): - return cres, err - case <-time.After(broadcastBlockRetryPeriod): - } - - // check transaction - // https://github.com/cosmos/cosmos-sdk/pull/8734 - res, err := authtx.QueryTx(cctx, hash) - if err == nil { - return res, nil - } - - // if it's not a "not found" error, return - if !strings.HasSuffix(err.Error(), notFoundErrorMessageSuffix) { - return res, err - } - } - - return cres, lctx.Err() -} diff --git a/go/node/client/v1beta3/client.go b/go/node/client/v1beta3/client.go index ab533512..87464733 100644 --- a/go/node/client/v1beta3/client.go +++ b/go/node/client/v1beta3/client.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/gogo/protobuf/proto" + "github.com/cosmos/gogoproto/proto" - tmrpc "github.com/tendermint/tendermint/rpc/core/types" + tmrpc "github.com/cometbft/cometbft/rpc/core/types" sdkclient "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,19 +16,20 @@ import ( disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evdtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" slashtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" staketypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" - cltypes "github.com/akash-network/akash-api/go/node/client/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta5" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta4" + atypes "pkg.akt.io/go/node/audit/v1" + ctypes "pkg.akt.io/go/node/cert/v1" + + cltypes "pkg.akt.io/go/node/client/types" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + mtypes "pkg.akt.io/go/node/market/v1beta5" + ptypes "pkg.akt.io/go/node/provider/v1beta4" ) // QueryClient is the interface that exposes query modules. @@ -71,36 +72,50 @@ type NodeClient interface { SyncInfo(ctx context.Context) (*tmrpc.SyncInfo, error) } -// Client is the umbrella interface that exposes every other client's modules. +// LightClient is the umbrella interface that exposes every other client's modules. // -//go:generate mockery --name Client --output ./mocks -type Client interface { +//go:generate mockery --name LightClient --output ./mocks +type LightClient interface { Query() QueryClient - Tx() TxClient Node() NodeClient ClientContext() sdkclient.Context PrintMessage(interface{}) error } -type client struct { +// Client is the umbrella interface that exposes every other client's modules. +// +//go:generate mockery --name Client --output ./mocks +type Client interface { + LightClient + Tx() TxClient +} + +type lightClient struct { qclient *queryClient + node *node +} + +type client struct { + lightClient tx TxClient - node *node } -var _ Client = (*client)(nil) +var ( + _ Client = (*client)(nil) + _ LightClient = (*lightClient)(nil) +) // NewClient creates a new client. func NewClient(ctx context.Context, cctx sdkclient.Context, opts ...cltypes.ClientOption) (Client, error) { - nd := newNode(cctx) - cl := &client{ - qclient: newQueryClient(cctx), - node: nd, + lightClient: lightClient{ + qclient: newQueryClient(cctx), + node: newNode(cctx), + }, } var err error - cl.tx, err = newSerialTx(ctx, cctx, nd, opts...) + cl.tx, err = newSerialTx(ctx, cctx, cl.node, opts...) if err != nil { return nil, err } @@ -108,9 +123,14 @@ func NewClient(ctx context.Context, cctx sdkclient.Context, opts ...cltypes.Clie return cl, nil } -// Query implements Client by returning the QueryClient instance of the client. -func (cl *client) Query() QueryClient { - return cl.qclient +// NewLightClient creates a new client. +func NewLightClient(cctx sdkclient.Context) (LightClient, error) { + cl := &lightClient{ + qclient: newQueryClient(cctx), + node: newNode(cctx), + } + + return cl, nil } // Tx implements Client by returning the TxClient instance of the client. @@ -118,18 +138,23 @@ func (cl *client) Tx() TxClient { return cl.tx } +// Query implements Client by returning the QueryClient instance of the client. +func (cl *lightClient) Query() QueryClient { + return cl.qclient +} + // Node implements Client by returning the NodeClient instance of the client. -func (cl *client) Node() NodeClient { +func (cl *lightClient) Node() NodeClient { return cl.node } // ClientContext implements Client by returning the Cosmos SDK client context instance of the client. -func (cl *client) ClientContext() sdkclient.Context { +func (cl *lightClient) ClientContext() sdkclient.Context { return cl.qclient.cctx } // PrintMessage implements Client by printing the raw message passed as parameter. -func (cl *client) PrintMessage(msg interface{}) error { +func (cl *lightClient) PrintMessage(msg interface{}) error { var err error switch m := msg.(type) { diff --git a/go/node/client/v1beta3/mocks/client.go b/go/node/client/v1beta3/mocks/client.go index 59c1ebc4..1b703e27 100644 --- a/go/node/client/v1beta3/mocks/client.go +++ b/go/node/client/v1beta3/mocks/client.go @@ -6,7 +6,7 @@ import ( client "github.com/cosmos/cosmos-sdk/client" mock "github.com/stretchr/testify/mock" - v1beta3 "github.com/akash-network/akash-api/go/node/client/v1beta3" + v1beta3 "pkg.akt.io/go/node/client/v1beta3" ) // Client is an autogenerated mock type for the Client type diff --git a/go/node/client/v1beta3/mocks/node_client.go b/go/node/client/v1beta3/mocks/node_client.go index e567347b..ed918313 100644 --- a/go/node/client/v1beta3/mocks/node_client.go +++ b/go/node/client/v1beta3/mocks/node_client.go @@ -5,8 +5,8 @@ package mocks import ( context "context" + coretypes "github.com/cometbft/cometbft/rpc/core/types" mock "github.com/stretchr/testify/mock" - coretypes "github.com/tendermint/tendermint/rpc/core/types" ) // NodeClient is an autogenerated mock type for the NodeClient type diff --git a/go/node/client/v1beta3/mocks/query_client.go b/go/node/client/v1beta3/mocks/query_client.go index ca8bec86..91da2cff 100644 --- a/go/node/client/v1beta3/mocks/query_client.go +++ b/go/node/client/v1beta3/mocks/query_client.go @@ -6,22 +6,18 @@ import ( authz "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - certv1beta3 "github.com/akash-network/akash-api/go/node/cert/v1beta3" + certv1 "pkg.akt.io/go/node/cert/v1" client "github.com/cosmos/cosmos-sdk/client" context "context" - deploymentv1beta4 "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" feegrant "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - grpc "google.golang.org/grpc" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -30,7 +26,7 @@ import ( proposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - providerv1beta4 "github.com/akash-network/akash-api/go/node/provider/v1beta4" + providerv1beta4 "pkg.akt.io/go/node/provider/v1beta4" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -40,9 +36,13 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - v1beta4 "github.com/akash-network/akash-api/go/node/audit/v1beta4" + v1 "pkg.akt.io/go/node/audit/v1" + + v1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + + v1beta4 "pkg.akt.io/go/node/deployment/v1beta4" - v1beta5 "github.com/akash-network/akash-api/go/node/market/v1beta5" + v1beta5 "pkg.akt.io/go/node/market/v1beta5" ) // QueryClient is an autogenerated mock type for the QueryClient type @@ -59,7 +59,7 @@ func (_m *QueryClient) EXPECT() *QueryClient_Expecter { } // AllProvidersAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) AllProvidersAttributes(ctx context.Context, in *v1beta4.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error) { +func (_m *QueryClient) AllProvidersAttributes(ctx context.Context, in *v1.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption) (*v1.QueryProvidersResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -73,20 +73,20 @@ func (_m *QueryClient) AllProvidersAttributes(ctx context.Context, in *v1beta4.Q panic("no return value specified for AllProvidersAttributes") } - var r0 *v1beta4.QueryProvidersResponse + var r0 *v1.QueryProvidersResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryAllProvidersAttributesRequest, ...grpc.CallOption) *v1beta4.QueryProvidersResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryAllProvidersAttributesRequest, ...grpc.CallOption) *v1.QueryProvidersResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryProvidersResponse) + r0 = ret.Get(0).(*v1.QueryProvidersResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryAllProvidersAttributesRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1.QueryAllProvidersAttributesRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -102,14 +102,14 @@ type QueryClient_AllProvidersAttributes_Call struct { // AllProvidersAttributes is a helper method to define mock.On call // - ctx context.Context -// - in *v1beta4.QueryAllProvidersAttributesRequest +// - in *v1.QueryAllProvidersAttributesRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) AllProvidersAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_AllProvidersAttributes_Call { return &QueryClient_AllProvidersAttributes_Call{Call: _e.mock.On("AllProvidersAttributes", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_AllProvidersAttributes_Call) Run(run func(ctx context.Context, in *v1beta4.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AllProvidersAttributes_Call { +func (_c *QueryClient_AllProvidersAttributes_Call) Run(run func(ctx context.Context, in *v1.QueryAllProvidersAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AllProvidersAttributes_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -117,23 +117,23 @@ func (_c *QueryClient_AllProvidersAttributes_Call) Run(run func(ctx context.Cont variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*v1beta4.QueryAllProvidersAttributesRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1.QueryAllProvidersAttributesRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_AllProvidersAttributes_Call) Return(_a0 *v1beta4.QueryProvidersResponse, _a1 error) *QueryClient_AllProvidersAttributes_Call { +func (_c *QueryClient_AllProvidersAttributes_Call) Return(_a0 *v1.QueryProvidersResponse, _a1 error) *QueryClient_AllProvidersAttributes_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_AllProvidersAttributes_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)) *QueryClient_AllProvidersAttributes_Call { +func (_c *QueryClient_AllProvidersAttributes_Call) RunAndReturn(run func(context.Context, *v1.QueryAllProvidersAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)) *QueryClient_AllProvidersAttributes_Call { _c.Call.Return(run) return _c } // AuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) AuditorAttributes(ctx context.Context, in *v1beta4.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error) { +func (_m *QueryClient) AuditorAttributes(ctx context.Context, in *v1.QueryAuditorAttributesRequest, opts ...grpc.CallOption) (*v1.QueryProvidersResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -147,20 +147,20 @@ func (_m *QueryClient) AuditorAttributes(ctx context.Context, in *v1beta4.QueryA panic("no return value specified for AuditorAttributes") } - var r0 *v1beta4.QueryProvidersResponse + var r0 *v1.QueryProvidersResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryAuditorAttributesRequest, ...grpc.CallOption) *v1beta4.QueryProvidersResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryAuditorAttributesRequest, ...grpc.CallOption) *v1.QueryProvidersResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryProvidersResponse) + r0 = ret.Get(0).(*v1.QueryProvidersResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryAuditorAttributesRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1.QueryAuditorAttributesRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -176,14 +176,14 @@ type QueryClient_AuditorAttributes_Call struct { // AuditorAttributes is a helper method to define mock.On call // - ctx context.Context -// - in *v1beta4.QueryAuditorAttributesRequest +// - in *v1.QueryAuditorAttributesRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) AuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_AuditorAttributes_Call { return &QueryClient_AuditorAttributes_Call{Call: _e.mock.On("AuditorAttributes", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_AuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta4.QueryAuditorAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AuditorAttributes_Call { +func (_c *QueryClient_AuditorAttributes_Call) Run(run func(ctx context.Context, in *v1.QueryAuditorAttributesRequest, opts ...grpc.CallOption)) *QueryClient_AuditorAttributes_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -191,17 +191,17 @@ func (_c *QueryClient_AuditorAttributes_Call) Run(run func(ctx context.Context, variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*v1beta4.QueryAuditorAttributesRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1.QueryAuditorAttributesRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_AuditorAttributes_Call) Return(_a0 *v1beta4.QueryProvidersResponse, _a1 error) *QueryClient_AuditorAttributes_Call { +func (_c *QueryClient_AuditorAttributes_Call) Return(_a0 *v1.QueryProvidersResponse, _a1 error) *QueryClient_AuditorAttributes_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_AuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)) *QueryClient_AuditorAttributes_Call { +func (_c *QueryClient_AuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1.QueryAuditorAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)) *QueryClient_AuditorAttributes_Call { _c.Call.Return(run) return _c } @@ -496,7 +496,7 @@ func (_c *QueryClient_Bids_Call) RunAndReturn(run func(context.Context, *v1beta5 } // Certificates provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Certificates(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error) { +func (_m *QueryClient) Certificates(ctx context.Context, in *certv1.QueryCertificatesRequest, opts ...grpc.CallOption) (*certv1.QueryCertificatesResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -510,20 +510,20 @@ func (_m *QueryClient) Certificates(ctx context.Context, in *certv1beta3.QueryCe panic("no return value specified for Certificates") } - var r0 *certv1beta3.QueryCertificatesResponse + var r0 *certv1.QueryCertificatesResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *certv1.QueryCertificatesRequest, ...grpc.CallOption) (*certv1.QueryCertificatesResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) *certv1beta3.QueryCertificatesResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *certv1.QueryCertificatesRequest, ...grpc.CallOption) *certv1.QueryCertificatesResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*certv1beta3.QueryCertificatesResponse) + r0 = ret.Get(0).(*certv1.QueryCertificatesResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *certv1.QueryCertificatesRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -539,14 +539,14 @@ type QueryClient_Certificates_Call struct { // Certificates is a helper method to define mock.On call // - ctx context.Context -// - in *certv1beta3.QueryCertificatesRequest +// - in *certv1.QueryCertificatesRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) Certificates(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Certificates_Call { return &QueryClient_Certificates_Call{Call: _e.mock.On("Certificates", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_Certificates_Call) Run(run func(ctx context.Context, in *certv1beta3.QueryCertificatesRequest, opts ...grpc.CallOption)) *QueryClient_Certificates_Call { +func (_c *QueryClient_Certificates_Call) Run(run func(ctx context.Context, in *certv1.QueryCertificatesRequest, opts ...grpc.CallOption)) *QueryClient_Certificates_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -554,17 +554,17 @@ func (_c *QueryClient_Certificates_Call) Run(run func(ctx context.Context, in *c variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*certv1beta3.QueryCertificatesRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*certv1.QueryCertificatesRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_Certificates_Call) Return(_a0 *certv1beta3.QueryCertificatesResponse, _a1 error) *QueryClient_Certificates_Call { +func (_c *QueryClient_Certificates_Call) Return(_a0 *certv1.QueryCertificatesResponse, _a1 error) *QueryClient_Certificates_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_Certificates_Call) RunAndReturn(run func(context.Context, *certv1beta3.QueryCertificatesRequest, ...grpc.CallOption) (*certv1beta3.QueryCertificatesResponse, error)) *QueryClient_Certificates_Call { +func (_c *QueryClient_Certificates_Call) RunAndReturn(run func(context.Context, *certv1.QueryCertificatesRequest, ...grpc.CallOption) (*certv1.QueryCertificatesResponse, error)) *QueryClient_Certificates_Call { _c.Call.Return(run) return _c } @@ -615,7 +615,7 @@ func (_c *QueryClient_ClientContext_Call) RunAndReturn(run func() client.Context } // Deployment provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Deployment(ctx context.Context, in *deploymentv1beta4.QueryDeploymentRequest, opts ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentResponse, error) { +func (_m *QueryClient) Deployment(ctx context.Context, in *v1beta4.QueryDeploymentRequest, opts ...grpc.CallOption) (*v1beta4.QueryDeploymentResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -629,20 +629,20 @@ func (_m *QueryClient) Deployment(ctx context.Context, in *deploymentv1beta4.Que panic("no return value specified for Deployment") } - var r0 *deploymentv1beta4.QueryDeploymentResponse + var r0 *v1beta4.QueryDeploymentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryDeploymentRequest, ...grpc.CallOption) (*v1beta4.QueryDeploymentResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryDeploymentRequest, ...grpc.CallOption) *deploymentv1beta4.QueryDeploymentResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryDeploymentRequest, ...grpc.CallOption) *v1beta4.QueryDeploymentResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta4.QueryDeploymentResponse) + r0 = ret.Get(0).(*v1beta4.QueryDeploymentResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta4.QueryDeploymentRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryDeploymentRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -658,14 +658,14 @@ type QueryClient_Deployment_Call struct { // Deployment is a helper method to define mock.On call // - ctx context.Context -// - in *deploymentv1beta4.QueryDeploymentRequest +// - in *v1beta4.QueryDeploymentRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) Deployment(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Deployment_Call { return &QueryClient_Deployment_Call{Call: _e.mock.On("Deployment", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_Deployment_Call) Run(run func(ctx context.Context, in *deploymentv1beta4.QueryDeploymentRequest, opts ...grpc.CallOption)) *QueryClient_Deployment_Call { +func (_c *QueryClient_Deployment_Call) Run(run func(ctx context.Context, in *v1beta4.QueryDeploymentRequest, opts ...grpc.CallOption)) *QueryClient_Deployment_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -673,23 +673,23 @@ func (_c *QueryClient_Deployment_Call) Run(run func(ctx context.Context, in *dep variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*deploymentv1beta4.QueryDeploymentRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1beta4.QueryDeploymentRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_Deployment_Call) Return(_a0 *deploymentv1beta4.QueryDeploymentResponse, _a1 error) *QueryClient_Deployment_Call { +func (_c *QueryClient_Deployment_Call) Return(_a0 *v1beta4.QueryDeploymentResponse, _a1 error) *QueryClient_Deployment_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_Deployment_Call) RunAndReturn(run func(context.Context, *deploymentv1beta4.QueryDeploymentRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentResponse, error)) *QueryClient_Deployment_Call { +func (_c *QueryClient_Deployment_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryDeploymentRequest, ...grpc.CallOption) (*v1beta4.QueryDeploymentResponse, error)) *QueryClient_Deployment_Call { _c.Call.Return(run) return _c } // Deployments provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Deployments(ctx context.Context, in *deploymentv1beta4.QueryDeploymentsRequest, opts ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentsResponse, error) { +func (_m *QueryClient) Deployments(ctx context.Context, in *v1beta4.QueryDeploymentsRequest, opts ...grpc.CallOption) (*v1beta4.QueryDeploymentsResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -703,20 +703,20 @@ func (_m *QueryClient) Deployments(ctx context.Context, in *deploymentv1beta4.Qu panic("no return value specified for Deployments") } - var r0 *deploymentv1beta4.QueryDeploymentsResponse + var r0 *v1beta4.QueryDeploymentsResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentsResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryDeploymentsRequest, ...grpc.CallOption) (*v1beta4.QueryDeploymentsResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryDeploymentsRequest, ...grpc.CallOption) *deploymentv1beta4.QueryDeploymentsResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryDeploymentsRequest, ...grpc.CallOption) *v1beta4.QueryDeploymentsResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta4.QueryDeploymentsResponse) + r0 = ret.Get(0).(*v1beta4.QueryDeploymentsResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta4.QueryDeploymentsRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryDeploymentsRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -732,14 +732,14 @@ type QueryClient_Deployments_Call struct { // Deployments is a helper method to define mock.On call // - ctx context.Context -// - in *deploymentv1beta4.QueryDeploymentsRequest +// - in *v1beta4.QueryDeploymentsRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) Deployments(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Deployments_Call { return &QueryClient_Deployments_Call{Call: _e.mock.On("Deployments", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_Deployments_Call) Run(run func(ctx context.Context, in *deploymentv1beta4.QueryDeploymentsRequest, opts ...grpc.CallOption)) *QueryClient_Deployments_Call { +func (_c *QueryClient_Deployments_Call) Run(run func(ctx context.Context, in *v1beta4.QueryDeploymentsRequest, opts ...grpc.CallOption)) *QueryClient_Deployments_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -747,17 +747,17 @@ func (_c *QueryClient_Deployments_Call) Run(run func(ctx context.Context, in *de variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*deploymentv1beta4.QueryDeploymentsRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1beta4.QueryDeploymentsRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_Deployments_Call) Return(_a0 *deploymentv1beta4.QueryDeploymentsResponse, _a1 error) *QueryClient_Deployments_Call { +func (_c *QueryClient_Deployments_Call) Return(_a0 *v1beta4.QueryDeploymentsResponse, _a1 error) *QueryClient_Deployments_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_Deployments_Call) RunAndReturn(run func(context.Context, *deploymentv1beta4.QueryDeploymentsRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryDeploymentsResponse, error)) *QueryClient_Deployments_Call { +func (_c *QueryClient_Deployments_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryDeploymentsRequest, ...grpc.CallOption) (*v1beta4.QueryDeploymentsResponse, error)) *QueryClient_Deployments_Call { _c.Call.Return(run) return _c } @@ -904,19 +904,19 @@ func (_c *QueryClient_Feegrant_Call) RunAndReturn(run func() feegrant.QueryClien } // Gov provides a mock function with given fields: -func (_m *QueryClient) Gov() govtypes.QueryClient { +func (_m *QueryClient) Gov() v1beta1.QueryClient { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Gov") } - var r0 govtypes.QueryClient - if rf, ok := ret.Get(0).(func() govtypes.QueryClient); ok { + var r0 v1beta1.QueryClient + if rf, ok := ret.Get(0).(func() v1beta1.QueryClient); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(govtypes.QueryClient) + r0 = ret.Get(0).(v1beta1.QueryClient) } } @@ -940,18 +940,18 @@ func (_c *QueryClient_Gov_Call) Run(run func()) *QueryClient_Gov_Call { return _c } -func (_c *QueryClient_Gov_Call) Return(_a0 govtypes.QueryClient) *QueryClient_Gov_Call { +func (_c *QueryClient_Gov_Call) Return(_a0 v1beta1.QueryClient) *QueryClient_Gov_Call { _c.Call.Return(_a0) return _c } -func (_c *QueryClient_Gov_Call) RunAndReturn(run func() govtypes.QueryClient) *QueryClient_Gov_Call { +func (_c *QueryClient_Gov_Call) RunAndReturn(run func() v1beta1.QueryClient) *QueryClient_Gov_Call { _c.Call.Return(run) return _c } // Group provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) Group(ctx context.Context, in *deploymentv1beta4.QueryGroupRequest, opts ...grpc.CallOption) (*deploymentv1beta4.QueryGroupResponse, error) { +func (_m *QueryClient) Group(ctx context.Context, in *v1beta4.QueryGroupRequest, opts ...grpc.CallOption) (*v1beta4.QueryGroupResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -965,20 +965,20 @@ func (_m *QueryClient) Group(ctx context.Context, in *deploymentv1beta4.QueryGro panic("no return value specified for Group") } - var r0 *deploymentv1beta4.QueryGroupResponse + var r0 *v1beta4.QueryGroupResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryGroupResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryGroupRequest, ...grpc.CallOption) (*v1beta4.QueryGroupResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *deploymentv1beta4.QueryGroupRequest, ...grpc.CallOption) *deploymentv1beta4.QueryGroupResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryGroupRequest, ...grpc.CallOption) *v1beta4.QueryGroupResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*deploymentv1beta4.QueryGroupResponse) + r0 = ret.Get(0).(*v1beta4.QueryGroupResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *deploymentv1beta4.QueryGroupRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryGroupRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -994,14 +994,14 @@ type QueryClient_Group_Call struct { // Group is a helper method to define mock.On call // - ctx context.Context -// - in *deploymentv1beta4.QueryGroupRequest +// - in *v1beta4.QueryGroupRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) Group(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_Group_Call { return &QueryClient_Group_Call{Call: _e.mock.On("Group", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_Group_Call) Run(run func(ctx context.Context, in *deploymentv1beta4.QueryGroupRequest, opts ...grpc.CallOption)) *QueryClient_Group_Call { +func (_c *QueryClient_Group_Call) Run(run func(ctx context.Context, in *v1beta4.QueryGroupRequest, opts ...grpc.CallOption)) *QueryClient_Group_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -1009,17 +1009,17 @@ func (_c *QueryClient_Group_Call) Run(run func(ctx context.Context, in *deployme variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*deploymentv1beta4.QueryGroupRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1beta4.QueryGroupRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_Group_Call) Return(_a0 *deploymentv1beta4.QueryGroupResponse, _a1 error) *QueryClient_Group_Call { +func (_c *QueryClient_Group_Call) Return(_a0 *v1beta4.QueryGroupResponse, _a1 error) *QueryClient_Group_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_Group_Call) RunAndReturn(run func(context.Context, *deploymentv1beta4.QueryGroupRequest, ...grpc.CallOption) (*deploymentv1beta4.QueryGroupResponse, error)) *QueryClient_Group_Call { +func (_c *QueryClient_Group_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryGroupRequest, ...grpc.CallOption) (*v1beta4.QueryGroupResponse, error)) *QueryClient_Group_Call { _c.Call.Return(run) return _c } @@ -1489,7 +1489,7 @@ func (_c *QueryClient_Provider_Call) RunAndReturn(run func(context.Context, *pro } // ProviderAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) ProviderAttributes(ctx context.Context, in *v1beta4.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error) { +func (_m *QueryClient) ProviderAttributes(ctx context.Context, in *v1.QueryProviderAttributesRequest, opts ...grpc.CallOption) (*v1.QueryProvidersResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1503,20 +1503,20 @@ func (_m *QueryClient) ProviderAttributes(ctx context.Context, in *v1beta4.Query panic("no return value specified for ProviderAttributes") } - var r0 *v1beta4.QueryProvidersResponse + var r0 *v1.QueryProvidersResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryProviderAttributesRequest, ...grpc.CallOption) *v1beta4.QueryProvidersResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryProviderAttributesRequest, ...grpc.CallOption) *v1.QueryProvidersResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryProvidersResponse) + r0 = ret.Get(0).(*v1.QueryProvidersResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryProviderAttributesRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1.QueryProviderAttributesRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -1532,14 +1532,14 @@ type QueryClient_ProviderAttributes_Call struct { // ProviderAttributes is a helper method to define mock.On call // - ctx context.Context -// - in *v1beta4.QueryProviderAttributesRequest +// - in *v1.QueryProviderAttributesRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) ProviderAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_ProviderAttributes_Call { return &QueryClient_ProviderAttributes_Call{Call: _e.mock.On("ProviderAttributes", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_ProviderAttributes_Call) Run(run func(ctx context.Context, in *v1beta4.QueryProviderAttributesRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAttributes_Call { +func (_c *QueryClient_ProviderAttributes_Call) Run(run func(ctx context.Context, in *v1.QueryProviderAttributesRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAttributes_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -1547,23 +1547,23 @@ func (_c *QueryClient_ProviderAttributes_Call) Run(run func(ctx context.Context, variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*v1beta4.QueryProviderAttributesRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1.QueryProviderAttributesRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_ProviderAttributes_Call) Return(_a0 *v1beta4.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAttributes_Call { +func (_c *QueryClient_ProviderAttributes_Call) Return(_a0 *v1.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAttributes_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_ProviderAttributes_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)) *QueryClient_ProviderAttributes_Call { +func (_c *QueryClient_ProviderAttributes_Call) RunAndReturn(run func(context.Context, *v1.QueryProviderAttributesRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)) *QueryClient_ProviderAttributes_Call { _c.Call.Return(run) return _c } // ProviderAuditorAttributes provides a mock function with given fields: ctx, in, opts -func (_m *QueryClient) ProviderAuditorAttributes(ctx context.Context, in *v1beta4.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error) { +func (_m *QueryClient) ProviderAuditorAttributes(ctx context.Context, in *v1.QueryProviderAuditorRequest, opts ...grpc.CallOption) (*v1.QueryProvidersResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1577,20 +1577,20 @@ func (_m *QueryClient) ProviderAuditorAttributes(ctx context.Context, in *v1beta panic("no return value specified for ProviderAuditorAttributes") } - var r0 *v1beta4.QueryProvidersResponse + var r0 *v1.QueryProvidersResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)); ok { return rf(ctx, in, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, *v1beta4.QueryProviderAuditorRequest, ...grpc.CallOption) *v1beta4.QueryProvidersResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, *v1.QueryProviderAuditorRequest, ...grpc.CallOption) *v1.QueryProvidersResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1beta4.QueryProvidersResponse) + r0 = ret.Get(0).(*v1.QueryProvidersResponse) } } - if rf, ok := ret.Get(1).(func(context.Context, *v1beta4.QueryProviderAuditorRequest, ...grpc.CallOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, *v1.QueryProviderAuditorRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) @@ -1606,14 +1606,14 @@ type QueryClient_ProviderAuditorAttributes_Call struct { // ProviderAuditorAttributes is a helper method to define mock.On call // - ctx context.Context -// - in *v1beta4.QueryProviderAuditorRequest +// - in *v1.QueryProviderAuditorRequest // - opts ...grpc.CallOption func (_e *QueryClient_Expecter) ProviderAuditorAttributes(ctx interface{}, in interface{}, opts ...interface{}) *QueryClient_ProviderAuditorAttributes_Call { return &QueryClient_ProviderAuditorAttributes_Call{Call: _e.mock.On("ProviderAuditorAttributes", append([]interface{}{ctx, in}, opts...)...)} } -func (_c *QueryClient_ProviderAuditorAttributes_Call) Run(run func(ctx context.Context, in *v1beta4.QueryProviderAuditorRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAuditorAttributes_Call { +func (_c *QueryClient_ProviderAuditorAttributes_Call) Run(run func(ctx context.Context, in *v1.QueryProviderAuditorRequest, opts ...grpc.CallOption)) *QueryClient_ProviderAuditorAttributes_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]grpc.CallOption, len(args)-2) for i, a := range args[2:] { @@ -1621,17 +1621,17 @@ func (_c *QueryClient_ProviderAuditorAttributes_Call) Run(run func(ctx context.C variadicArgs[i] = a.(grpc.CallOption) } } - run(args[0].(context.Context), args[1].(*v1beta4.QueryProviderAuditorRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(*v1.QueryProviderAuditorRequest), variadicArgs...) }) return _c } -func (_c *QueryClient_ProviderAuditorAttributes_Call) Return(_a0 *v1beta4.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAuditorAttributes_Call { +func (_c *QueryClient_ProviderAuditorAttributes_Call) Return(_a0 *v1.QueryProvidersResponse, _a1 error) *QueryClient_ProviderAuditorAttributes_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *QueryClient_ProviderAuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1beta4.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1beta4.QueryProvidersResponse, error)) *QueryClient_ProviderAuditorAttributes_Call { +func (_c *QueryClient_ProviderAuditorAttributes_Call) RunAndReturn(run func(context.Context, *v1.QueryProviderAuditorRequest, ...grpc.CallOption) (*v1.QueryProvidersResponse, error)) *QueryClient_ProviderAuditorAttributes_Call { _c.Call.Return(run) return _c } diff --git a/go/node/client/v1beta3/mocks/tx_client.go b/go/node/client/v1beta3/mocks/tx_client.go index 3cef0ce3..4bbc739a 100644 --- a/go/node/client/v1beta3/mocks/tx_client.go +++ b/go/node/client/v1beta3/mocks/tx_client.go @@ -8,7 +8,7 @@ import ( types "github.com/cosmos/cosmos-sdk/types" mock "github.com/stretchr/testify/mock" - v1beta3 "github.com/akash-network/akash-api/go/node/client/v1beta3" + v1beta3 "pkg.akt.io/go/node/client/v1beta3" ) // TxClient is an autogenerated mock type for the TxClient type diff --git a/go/node/client/v1beta3/node.go b/go/node/client/v1beta3/node.go index a0461993..934c9522 100644 --- a/go/node/client/v1beta3/node.go +++ b/go/node/client/v1beta3/node.go @@ -3,15 +3,15 @@ package v1beta3 import ( "context" + tmrpc "github.com/cometbft/cometbft/rpc/core/types" + sdkclient "github.com/cosmos/cosmos-sdk/client" - rpcclient "github.com/tendermint/tendermint/rpc/client" - tmrpc "github.com/tendermint/tendermint/rpc/core/types" ) var _ NodeClient = (*node)(nil) type node struct { - rpc rpcclient.Client + rpc sdkclient.TendermintRPC } func newNode(cctx sdkclient.Context) *node { diff --git a/go/node/client/v1beta3/query.go b/go/node/client/v1beta3/query.go index ca90bf5a..d6d0821c 100644 --- a/go/node/client/v1beta3/query.go +++ b/go/node/client/v1beta3/query.go @@ -12,18 +12,18 @@ import ( disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evdtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" slashtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" staketypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta5" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta4" + atypes "pkg.akt.io/go/node/audit/v1" + ctypes "pkg.akt.io/go/node/cert/v1" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + mtypes "pkg.akt.io/go/node/market/v1beta5" + ptypes "pkg.akt.io/go/node/provider/v1beta4" ) var _ QueryClient = (*queryClient)(nil) diff --git a/go/node/client/v1beta3/tx.go b/go/node/client/v1beta3/tx.go index b5c06d77..dbd31b6b 100644 --- a/go/node/client/v1beta3/tx.go +++ b/go/node/client/v1beta3/tx.go @@ -12,23 +12,25 @@ import ( "unsafe" "github.com/boz/go-lifecycle" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/input" "github.com/edwingeng/deque/v2" "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/libs/log" - ttypes "github.com/tendermint/tendermint/types" + "github.com/cometbft/cometbft/libs/log" + ttypes "github.com/cometbft/cometbft/types" + cerrors "cosmossdk.io/errors" sdkclient "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - cltypes "github.com/akash-network/akash-api/go/node/client/types" - "github.com/akash-network/akash-api/go/util/ctxlog" + "pkg.akt.io/go/util/ctxlog" + + cltypes "pkg.akt.io/go/node/client/types" ) var ( @@ -195,7 +197,7 @@ type broadcast struct { type serialBroadcaster struct { ctx context.Context cctx sdkclient.Context - info keyring.Info + info *keyring.Record reqch chan broadcastReq broadcastch chan broadcast seqreqch chan seqReq @@ -287,7 +289,7 @@ func (c *serialBroadcaster) Broadcast(ctx context.Context, msgs []sdk.Msg, opts case resp := <-responsech: // if returned error is sdk error, it is likely to be wrapped response so discard it // as clients supposed to check Tx code, unless resp is nil, which is error during Tx preparation - if !errors.As(resp.err, &sdkerrors.Error{}) || resp.resp == nil || bOpts.resultAsError { + if !errors.As(resp.err, &cerrors.Error{}) || resp.resp == nil || bOpts.resultAsError { return resp.resp, resp.err } return resp.resp, nil @@ -428,7 +430,7 @@ func (c *serialBroadcaster) broadcaster(ptxf tx.Factory) { err: err, } - terr := &sdkerrors.Error{} + terr := &cerrors.Error{} if !c.cctx.GenerateOnly && errors.Is(err, terr) { rSeq, _ := syncSequence(ptxf, err) ptxf = ptxf.WithSequence(rSeq) @@ -466,8 +468,9 @@ func (c *serialBroadcaster) sequenceSync() { } if err == nil { + addr, _ := c.info.GetAddress() // query sequence number - if _, seq.seq, err = c.cctx.AccountRetriever.GetAccountNumberSequence(c.cctx, c.info.GetAddress()); err != nil { + if _, seq.seq, err = c.cctx.AccountRetriever.GetAccountNumberSequence(c.cctx, addr); err != nil { c.log.Error("error requesting account", "err", err) seq.err = err } @@ -495,7 +498,7 @@ func (c *serialBroadcaster) generateTxs(txf tx.Factory, msgs ...sdk.Msg) ([]byte txf = txf.WithGas(adjusted) } - utx, err := tx.BuildUnsignedTx(txf, msgs...) + utx, err := txf.BuildUnsignedTx(msgs...) if err != nil { return nil, err } @@ -534,7 +537,7 @@ func (c *serialBroadcaster) broadcastTxs(txf tx.Factory, txs broadcastTxs) (inte return resp, txf.Sequence(), nil } - txn, err := tx.BuildUnsignedTx(txf, txs.msgs...) + txn, err := txf.BuildUnsignedTx(txs.msgs...) if err != nil { return nil, txf.Sequence(), err } @@ -561,7 +564,7 @@ func (c *serialBroadcaster) broadcastTxs(txf tx.Factory, txs broadcastTxs) (inte txn.SetFeeGranter(c.cctx.GetFeeGranterAddress()) - err = tx.Sign(txf, c.info.GetName(), txn, true) + err = tx.Sign(txf, c.info.Name, txn, true) if err != nil { return nil, txf.Sequence(), err } @@ -579,7 +582,7 @@ func (c *serialBroadcaster) broadcastTxs(txf tx.Factory, txs broadcastTxs) (inte txf = txf.WithSequence(txf.Sequence() + 1) if response.Code != 0 { - return response, txf.Sequence(), sdkerrors.ABCIError(response.Codespace, response.Code, response.RawLog) + return response, txf.Sequence(), cerrors.ABCIError(response.Codespace, response.Code, response.RawLog) } return response, txf.Sequence(), nil @@ -612,7 +615,7 @@ func (c *serialBroadcaster) doBroadcast(cctx sdkclient.Context, data []byte, tim // broadcast-mode=block // submit with mode commit/block - cres, err := cctx.BroadcastTxCommit(txb) + cres, err := cctx.BroadcastTx(txb) if err == nil { // good job return cres, nil diff --git a/go/node/deployment/v1/auth.go b/go/node/deployment/v1/auth.go new file mode 100644 index 00000000..60f3a1a4 --- /dev/null +++ b/go/node/deployment/v1/auth.go @@ -0,0 +1,97 @@ +package v1 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +const ( + MsgTypeDepositDeployment = "deposit-deployment" +) + +var ( + _ authz.Authorization = &DepositAuthorization{} +) + +// NewDepositAuthorization creates a new DepositAuthorization object. +func NewDepositAuthorization(spendLimit sdk.Coin) *DepositAuthorization { + return &DepositAuthorization{ + SpendLimit: spendLimit, + } +} + +// MsgTypeURL implements Authorization.MsgTypeURL. +func (m DepositAuthorization) MsgTypeURL() string { + return sdk.MsgTypeURL(&MsgDepositDeployment{}) +} + +// Accept implements Authorization.Accept. +func (m DepositAuthorization) 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) + + return authz.AcceptResponse{Accept: true, Delete: false, Updated: &DepositAuthorization{SpendLimit: limitLeft}}, nil +} + +// ValidateBasic implements Authorization.ValidateBasic. +func (m DepositAuthorization) ValidateBasic() error { + if !m.SpendLimit.IsPositive() { + return sdkerrors.ErrInvalidCoins.Wrapf("spend limit cannot be negative") + } + 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.ErrInvalidAddress.Wrap("MsgDepositDeployment: Invalid Depositor Address") + } + + return nil +} diff --git a/go/node/deployment/v1beta1/authz.pb.go b/go/node/deployment/v1/authz.pb.go similarity index 59% rename from go/node/deployment/v1beta1/authz.pb.go rename to go/node/deployment/v1/authz.pb.go index 4753440d..025f4c81 100644 --- a/go/node/deployment/v1beta1/authz.pb.go +++ b/go/node/deployment/v1/authz.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta1/authz.proto +// source: akash/deployment/v1/authz.proto -package v1beta1 +package v1 import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -27,24 +27,24 @@ 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 { +type DepositAuthorization 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 *DepositAuthorization) Reset() { *m = DepositAuthorization{} } +func (m *DepositAuthorization) String() string { return proto.CompactTextString(m) } +func (*DepositAuthorization) ProtoMessage() {} +func (*DepositAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_c0c17e4c56f70008, []int{0} } -func (m *DepositDeploymentAuthorization) XXX_Unmarshal(b []byte) error { +func (m *DepositAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DepositDeploymentAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DepositAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DepositDeploymentAuthorization.Marshal(b, m, deterministic) + return xxx_messageInfo_DepositAuthorization.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -54,19 +54,19 @@ func (m *DepositDeploymentAuthorization) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *DepositDeploymentAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositDeploymentAuthorization.Merge(m, src) +func (m *DepositAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositAuthorization.Merge(m, src) } -func (m *DepositDeploymentAuthorization) XXX_Size() int { +func (m *DepositAuthorization) XXX_Size() int { return m.Size() } -func (m *DepositDeploymentAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_DepositDeploymentAuthorization.DiscardUnknown(m) +func (m *DepositAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_DepositAuthorization.DiscardUnknown(m) } -var xxx_messageInfo_DepositDeploymentAuthorization proto.InternalMessageInfo +var xxx_messageInfo_DepositAuthorization proto.InternalMessageInfo -func (m *DepositDeploymentAuthorization) GetSpendLimit() types.Coin { +func (m *DepositAuthorization) GetSpendLimit() types.Coin { if m != nil { return m.SpendLimit } @@ -74,36 +74,33 @@ func (m *DepositDeploymentAuthorization) GetSpendLimit() types.Coin { } func init() { - proto.RegisterType((*DepositDeploymentAuthorization)(nil), "akash.deployment.v1beta1.DepositDeploymentAuthorization") + proto.RegisterType((*DepositAuthorization)(nil), "akash.deployment.v1.DepositAuthorization") } -func init() { - proto.RegisterFile("akash/deployment/v1beta1/authz.proto", fileDescriptor_a27e07d58aa17308) -} +func init() { proto.RegisterFile("akash/deployment/v1/authz.proto", fileDescriptor_c0c17e4c56f70008) } -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, +var fileDescriptor_c0c17e4c56f70008 = []byte{ + // 257 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0xd4, + 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0x2b, 0xd0, + 0x43, 0x28, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, + 0x10, 0xa5, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x10, 0x09, 0x08, 0x07, 0x2a, + 0x25, 0x07, 0xe1, 0xe9, 0x27, 0x25, 0x16, 0xa7, 0xea, 0x97, 0x19, 0x26, 0xa5, 0x96, 0x24, 0x1a, + 0xea, 0x27, 0xe7, 0x67, 0xe6, 0x41, 0xe4, 0x95, 0xaa, 0xb8, 0x44, 0x5c, 0x52, 0x0b, 0xf2, 0x8b, + 0x33, 0x4b, 0x1c, 0x4b, 0x4b, 0x32, 0xf2, 0x8b, 0x32, 0xab, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x84, + 0xfc, 0xb9, 0xb8, 0x8b, 0x0b, 0x52, 0xf3, 0x52, 0xe2, 0x73, 0x32, 0x73, 0x33, 0x4b, 0x24, 0x18, + 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x24, 0xf5, 0xa0, 0x66, 0x83, 0x4c, 0xd3, 0x83, 0x9a, 0xa6, 0xe7, + 0x9c, 0x9f, 0x99, 0xe7, 0x24, 0x7c, 0xe2, 0x9e, 0x3c, 0xc3, 0xab, 0x7b, 0xf2, 0xc8, 0xba, 0x82, + 0xb8, 0xc0, 0x1c, 0x1f, 0x10, 0xdb, 0x4a, 0xf0, 0xd4, 0x16, 0x5d, 0x5e, 0x14, 0x3b, 0x9c, 0xac, + 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, 0x4a, 0xa1, 0x20, 0x3b, 0x5d, 0x2f, + 0x31, 0xbb, 0x44, 0x2f, 0x13, 0xe4, 0x4f, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0xd4, 0x90, 0x4a, 0x62, + 0x03, 0x3b, 0xdf, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x6b, 0x4d, 0xab, 0x47, 0x01, 0x00, + 0x00, } -func (m *DepositDeploymentAuthorization) Marshal() (dAtA []byte, err error) { +func (m *DepositAuthorization) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -113,12 +110,12 @@ func (m *DepositDeploymentAuthorization) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DepositDeploymentAuthorization) MarshalTo(dAtA []byte) (int, error) { +func (m *DepositAuthorization) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DepositDeploymentAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DepositAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -147,7 +144,7 @@ func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *DepositDeploymentAuthorization) Size() (n int) { +func (m *DepositAuthorization) Size() (n int) { if m == nil { return 0 } @@ -164,7 +161,7 @@ func sovAuthz(x uint64) (n int) { func sozAuthz(x uint64) (n int) { return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *DepositDeploymentAuthorization) Unmarshal(dAtA []byte) error { +func (m *DepositAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -187,10 +184,10 @@ func (m *DepositDeploymentAuthorization) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DepositDeploymentAuthorization: wiretype end group for non-group") + return fmt.Errorf("proto: DepositAuthorization: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DepositDeploymentAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DepositAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/go/node/deployment/v1beta3/id.go b/go/node/deployment/v1/deployment.go similarity index 50% rename from go/node/deployment/v1beta3/id.go rename to go/node/deployment/v1/deployment.go index ab6b1ddb..fdba8029 100644 --- a/go/node/deployment/v1beta3/id.go +++ b/go/node/deployment/v1/deployment.go @@ -1,12 +1,17 @@ -package v1beta3 +package v1 import ( "fmt" "strconv" "strings" + sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + dsdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + HashLength = 32 ) // Equals method compares specific deployment with provided deployment @@ -19,9 +24,9 @@ func (id DeploymentID) Validate() error { _, err := sdk.AccAddressFromBech32(id.Owner) switch { case err != nil: - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "DeploymentID: Invalid Owner Address") + return sdkerrors.Wrap(dsdkerrors.ErrInvalidAddress, "DeploymentID: Invalid Owner Address") case id.DSeq == 0: - return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "DeploymentID: Invalid Deployment Sequence") + return sdkerrors.Wrap(dsdkerrors.ErrInvalidSequence, "DeploymentID: Invalid Deployment Sequence") } return nil } @@ -62,42 +67,3 @@ func ParseDeploymentPath(parts []string) (DeploymentID, error) { 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/deployment.pb.go b/go/node/deployment/v1/deployment.pb.go similarity index 52% rename from go/node/deployment/v1beta3/deployment.pb.go rename to go/node/deployment/v1/deployment.pb.go index 6f5d4c96..31acfadb 100644 --- a/go/node/deployment/v1beta3/deployment.pb.go +++ b/go/node/deployment/v1/deployment.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/deployment.proto +// source: akash/deployment/v1/deployment.proto -package v1beta3 +package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -23,36 +24,36 @@ var _ = math.Inf // 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 +// DeploymentState is an enum which refers to state of deployment +type DeploymentState int32 const ( // Prefix should start with 0 in enum. So declaring dummy state - DeploymentStateInvalid Deployment_State = 0 + DeploymentStateInvalid DeploymentState = 0 // DeploymentActive denotes state for deployment active - DeploymentActive Deployment_State = 1 + DeploymentActive DeploymentState = 1 // DeploymentClosed denotes state for deployment closed - DeploymentClosed Deployment_State = 2 + DeploymentClosed DeploymentState = 2 ) -var Deployment_State_name = map[int32]string{ +var DeploymentState_name = map[int32]string{ 0: "invalid", 1: "active", 2: "closed", } -var Deployment_State_value = map[string]int32{ +var DeploymentState_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 (x DeploymentState) String() string { + return proto.EnumName(DeploymentState_name, int32(x)) } -func (Deployment_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_16b7a55888f623cc, []int{1, 0} +func (DeploymentState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_289f09354ec3dad5, []int{0} } // DeploymentID stores owner and sequence number @@ -64,7 +65,7 @@ type DeploymentID struct { func (m *DeploymentID) Reset() { *m = DeploymentID{} } func (*DeploymentID) ProtoMessage() {} func (*DeploymentID) Descriptor() ([]byte, []int) { - return fileDescriptor_16b7a55888f623cc, []int{0} + return fileDescriptor_289f09354ec3dad5, []int{0} } func (m *DeploymentID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -109,17 +110,17 @@ func (m *DeploymentID) GetDSeq() uint64 { // 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"` + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + State DeploymentState `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1.DeploymentState" json:"state" yaml:"state"` + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash" yaml:"hash"` + 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} + return fileDescriptor_289f09354ec3dad5, []int{1} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -148,23 +149,23 @@ func (m *Deployment) XXX_DiscardUnknown() { var xxx_messageInfo_Deployment proto.InternalMessageInfo -func (m *Deployment) GetDeploymentID() DeploymentID { +func (m *Deployment) GetID() DeploymentID { if m != nil { - return m.DeploymentID + return m.ID } return DeploymentID{} } -func (m *Deployment) GetState() Deployment_State { +func (m *Deployment) GetState() DeploymentState { if m != nil { return m.State } return DeploymentStateInvalid } -func (m *Deployment) GetVersion() []byte { +func (m *Deployment) GetHash() []byte { if m != nil { - return m.Version + return m.Hash } return nil } @@ -176,112 +177,48 @@ func (m *Deployment) GetCreatedAt() int64 { 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") + proto.RegisterEnum("akash.deployment.v1.DeploymentState", DeploymentState_name, DeploymentState_value) + proto.RegisterType((*DeploymentID)(nil), "akash.deployment.v1.DeploymentID") + proto.RegisterType((*Deployment)(nil), "akash.deployment.v1.Deployment") } 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, + proto.RegisterFile("akash/deployment/v1/deployment.proto", fileDescriptor_289f09354ec3dad5) +} + +var fileDescriptor_289f09354ec3dad5 = []byte{ + // 477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0x77, 0xb6, 0xdb, 0x6a, 0xa6, 0x41, 0xc3, 0x1a, 0x34, 0x5d, 0xe8, 0xce, 0xba, 0x14, + 0x0c, 0x8a, 0x1b, 0xd2, 0xde, 0x72, 0xcb, 0x1a, 0x90, 0xdc, 0x64, 0x83, 0x17, 0x2f, 0x65, 0xcc, + 0x0c, 0xc9, 0x90, 0x3f, 0x93, 0xee, 0x0c, 0x91, 0xde, 0x05, 0xa5, 0x27, 0x4f, 0xe2, 0xa5, 0x50, + 0xf0, 0x2b, 0xf8, 0x21, 0x7a, 0x2c, 0x9e, 0x3c, 0x0d, 0xb2, 0xb9, 0x48, 0x8e, 0xf9, 0x04, 0x32, + 0x33, 0xc5, 0xc4, 0x20, 0x78, 0xdb, 0xe7, 0xf7, 0x3e, 0xfb, 0xce, 0xfb, 0xbc, 0xbc, 0xf0, 0x08, + 0x8f, 0xb0, 0x18, 0x36, 0x08, 0x9d, 0x8d, 0xf9, 0xf9, 0x84, 0x4e, 0x65, 0x63, 0xde, 0xdc, 0x50, + 0xc9, 0x2c, 0xe7, 0x92, 0xfb, 0x0f, 0x8c, 0x2b, 0xd9, 0xe0, 0xf3, 0x66, 0x50, 0x1d, 0xf0, 0x01, + 0x37, 0xf5, 0x86, 0xfe, 0xb2, 0xd6, 0xe0, 0xa0, 0xcf, 0xc5, 0x84, 0x8b, 0x53, 0x5b, 0xb0, 0xc2, + 0x96, 0xe2, 0xcf, 0x00, 0x96, 0x3b, 0x7f, 0x5a, 0x74, 0x3b, 0xfe, 0x4b, 0xb8, 0xcb, 0xdf, 0x4d, + 0x69, 0x5e, 0x03, 0x11, 0xa8, 0x97, 0xd2, 0xe6, 0x52, 0x21, 0x0b, 0x56, 0x0a, 0x95, 0xcf, 0xf1, + 0x64, 0xdc, 0x8a, 0x8d, 0x8c, 0xbf, 0x7f, 0x7b, 0x5e, 0xbd, 0x6d, 0xd5, 0x26, 0x24, 0xa7, 0x42, + 0xf4, 0x64, 0xce, 0xa6, 0x83, 0xcc, 0xda, 0xfd, 0x13, 0xe8, 0x11, 0x41, 0xcf, 0x6a, 0x6e, 0x04, + 0xea, 0x5e, 0x8a, 0x0a, 0x85, 0xbc, 0x4e, 0x8f, 0x9e, 0x2d, 0x15, 0x32, 0x7c, 0xa5, 0xd0, 0xbe, + 0x6d, 0xa7, 0x55, 0x9c, 0x19, 0xd8, 0xba, 0xfb, 0xe5, 0x0a, 0x39, 0xbf, 0xae, 0x90, 0x13, 0x7f, + 0x70, 0x21, 0x5c, 0x0f, 0xe6, 0xbf, 0x82, 0x2e, 0x23, 0x66, 0xa6, 0xfd, 0xe3, 0xc7, 0xc9, 0x3f, + 0xa2, 0x27, 0x9b, 0x29, 0xd2, 0xc3, 0x6b, 0x85, 0x9c, 0x42, 0x21, 0xb7, 0xdb, 0x59, 0x2a, 0xe4, + 0x32, 0xb2, 0x52, 0xa8, 0x64, 0x9f, 0x63, 0x24, 0xce, 0x5c, 0x46, 0xfc, 0xd7, 0x70, 0x57, 0x48, + 0x2c, 0xa9, 0x19, 0xf0, 0xde, 0xf1, 0xd1, 0x7f, 0x9a, 0xf6, 0xb4, 0x37, 0x3d, 0xd0, 0xeb, 0x30, + 0xbf, 0xad, 0xd7, 0x61, 0x64, 0x9c, 0x59, 0xec, 0x3f, 0x83, 0xde, 0x10, 0x8b, 0x61, 0x6d, 0x27, + 0x02, 0xf5, 0x72, 0xfa, 0x48, 0xc7, 0xd5, 0x7a, 0x1d, 0x57, 0xab, 0x38, 0x33, 0xd0, 0x3f, 0x84, + 0xb0, 0x9f, 0x53, 0x2c, 0x29, 0x39, 0xc5, 0xb2, 0xe6, 0x45, 0xa0, 0xbe, 0x93, 0x95, 0x6e, 0x49, + 0x5b, 0xb6, 0x3c, 0xbd, 0x89, 0xa7, 0xef, 0x01, 0xbc, 0xbf, 0x35, 0x87, 0xff, 0x04, 0xde, 0x61, + 0xd3, 0x39, 0x1e, 0x33, 0x52, 0x71, 0x82, 0xe0, 0xe2, 0x32, 0x7a, 0xb8, 0xe5, 0xe8, 0xda, 0xaa, + 0x1f, 0xc1, 0x3d, 0xdc, 0x97, 0x6c, 0x4e, 0x2b, 0x20, 0xa8, 0x5e, 0x5c, 0x46, 0x95, 0xb5, 0xaf, + 0x6d, 0xb8, 0x76, 0xf4, 0xc7, 0x5c, 0x50, 0x52, 0x71, 0xb7, 0x1d, 0x2f, 0x0c, 0x0f, 0xbc, 0x8f, + 0x5f, 0x43, 0x27, 0x6d, 0x5d, 0x17, 0x21, 0xb8, 0x29, 0x42, 0xf0, 0xb3, 0x08, 0xc1, 0xa7, 0x45, + 0xe8, 0xdc, 0x2c, 0x42, 0xe7, 0xc7, 0x22, 0x74, 0xde, 0x44, 0xb3, 0xd1, 0x20, 0xc1, 0x23, 0x99, + 0x30, 0x7d, 0x75, 0x8d, 0x29, 0x27, 0xf4, 0xef, 0xe3, 0x7d, 0xbb, 0x67, 0x8e, 0xed, 0xe4, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x01, 0x4c, 0x04, 0xda, 0x02, 0x00, 0x00, } func (m *DeploymentID) Marshal() (dAtA []byte, err error) { @@ -344,10 +281,10 @@ func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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))) + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintDeployment(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x1a } @@ -357,7 +294,7 @@ func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x10 } { - size, err := m.DeploymentID.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -369,48 +306,6 @@ func (m *Deployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 @@ -444,12 +339,12 @@ func (m *Deployment) Size() (n int) { } var l int _ = l - l = m.DeploymentID.Size() + l = m.ID.Size() n += 1 + l + sovDeployment(uint64(l)) if m.State != 0 { n += 1 + sovDeployment(uint64(m.State)) } - l = len(m.Version) + l = len(m.Hash) if l > 0 { n += 1 + l + sovDeployment(uint64(l)) } @@ -459,26 +354,6 @@ func (m *Deployment) Size() (n int) { 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 } @@ -617,7 +492,7 @@ func (m *Deployment) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeploymentID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -644,7 +519,7 @@ func (m *Deployment) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DeploymentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -662,14 +537,14 @@ func (m *Deployment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= Deployment_State(b&0x7F) << shift + m.State |= DeploymentState(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -696,9 +571,9 @@ func (m *Deployment) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) - if m.Version == nil { - m.Version = []byte{} + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} } iNdEx = postIndex case 4: @@ -741,139 +616,6 @@ func (m *Deployment) Unmarshal(dAtA []byte) error { } 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 diff --git a/go/node/deployment/v1/errors.go b/go/node/deployment/v1/errors.go new file mode 100644 index 00000000..ff33ad39 --- /dev/null +++ b/go/node/deployment/v1/errors.go @@ -0,0 +1,80 @@ +package v1 + +import ( + cerrors "cosmossdk.io/errors" +) + +const ( + errNameDoesNotExist uint32 = iota + 1 + errInvalidRequest + errDeploymentExists + errDeploymentNotFound + errDeploymentClosed + errOwnerAcctMissing + errInvalidGroups + errInvalidDeploymentID + errEmptyHash + errInvalidHash + errInternal + errInvalidDeployment + errInvalidGroupID + errGroupNotFound + errGroupClosed + errGroupOpen + errGroupPaused + errGroupNotOpen + errGroupSpec + errInvalidDeposit + errInvalidIDPath + errInvalidParam + errInvalidDeploymentDepositor +) + +var ( + // ErrNameDoesNotExist is the error when name does not exist + ErrNameDoesNotExist = cerrors.Register(ModuleName, errNameDoesNotExist, "Name does not exist") + // ErrInvalidRequest is the error for invalid request + ErrInvalidRequest = cerrors.Register(ModuleName, errInvalidRequest, "Invalid request") + // ErrDeploymentExists is the error when already deployment exists + ErrDeploymentExists = cerrors.Register(ModuleName, errDeploymentExists, "Deployment exists") + // ErrDeploymentNotFound is the error when deployment not found + ErrDeploymentNotFound = cerrors.Register(ModuleName, errDeploymentNotFound, "Deployment not found") + // ErrDeploymentClosed is the error when deployment is closed + ErrDeploymentClosed = cerrors.Register(ModuleName, errDeploymentClosed, "Deployment closed") + // ErrOwnerAcctMissing is the error for owner account missing + ErrOwnerAcctMissing = cerrors.Register(ModuleName, errOwnerAcctMissing, "Owner account missing") + // ErrInvalidGroups is the error when groups are empty + ErrInvalidGroups = cerrors.Register(ModuleName, errInvalidGroups, "Invalid groups") + // ErrInvalidDeploymentID is the error for invalid deployment id + ErrInvalidDeploymentID = cerrors.Register(ModuleName, errInvalidDeploymentID, "Invalid: deployment id") + // ErrEmptyHash is the error when version is empty + ErrEmptyHash = cerrors.Register(ModuleName, errEmptyHash, "Invalid: empty hash") + // ErrInvalidHash is the error when version is invalid + ErrInvalidHash = cerrors.Register(ModuleName, errInvalidHash, "Invalid: deployment hash") + // ErrInternal is the error for internal error + ErrInternal = cerrors.Register(ModuleName, errInternal, "internal error") + // ErrInvalidDeployment = is the error when deployment does not pass validation + ErrInvalidDeployment = cerrors.Register(ModuleName, errInvalidDeployment, "Invalid deployment") + // ErrInvalidGroupID is the error when already deployment exists + ErrInvalidGroupID = cerrors.Register(ModuleName, errInvalidGroupID, "Deployment exists") + // ErrGroupNotFound is the keeper's error for not finding a group + ErrGroupNotFound = cerrors.Register(ModuleName, errGroupNotFound, "Group not found") + // ErrGroupClosed is the error when deployment is closed + ErrGroupClosed = cerrors.Register(ModuleName, errGroupClosed, "Group already closed") + // ErrGroupOpen is the error when deployment is closed + ErrGroupOpen = cerrors.Register(ModuleName, errGroupOpen, "Group open") + // ErrGroupPaused is the error when deployment is closed + ErrGroupPaused = cerrors.Register(ModuleName, errGroupPaused, "Group paused") + // ErrGroupNotOpen indicates the Group state has progressed beyond initial Open. + ErrGroupNotOpen = cerrors.Register(ModuleName, errGroupNotOpen, "Group not open") + // ErrGroupSpecInvalid indicates a GroupSpec has invalid configuration + ErrGroupSpecInvalid = cerrors.Register(ModuleName, errGroupSpec, "GroupSpec invalid") + // ErrInvalidDeposit indicates an invalid deposit + ErrInvalidDeposit = cerrors.Register(ModuleName, errInvalidDeposit, "Deposit invalid") + // ErrInvalidIDPath indicates an invalid ID path + ErrInvalidIDPath = cerrors.Register(ModuleName, errInvalidIDPath, "ID path invalid") + // ErrInvalidParam indicates an invalid chain parameter + ErrInvalidParam = cerrors.Register(ModuleName, errInvalidParam, "parameter invalid") + // ErrInvalidDeploymentDepositor indicates an invalid chain parameter + ErrInvalidDeploymentDepositor = cerrors.Register(ModuleName, errInvalidDeploymentDepositor, "invalid deployment depositor") +) diff --git a/go/node/deployment/v1/event.pb.go b/go/node/deployment/v1/event.pb.go new file mode 100644 index 00000000..9876caf0 --- /dev/null +++ b/go/node/deployment/v1/event.pb.go @@ -0,0 +1,1299 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1/event.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventDeploymentCreated struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash" yaml:"hash"` +} + +func (m *EventDeploymentCreated) Reset() { *m = EventDeploymentCreated{} } +func (m *EventDeploymentCreated) String() string { return proto.CompactTextString(m) } +func (*EventDeploymentCreated) ProtoMessage() {} +func (*EventDeploymentCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{0} +} +func (m *EventDeploymentCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDeploymentCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDeploymentCreated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDeploymentCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDeploymentCreated.Merge(m, src) +} +func (m *EventDeploymentCreated) XXX_Size() int { + return m.Size() +} +func (m *EventDeploymentCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventDeploymentCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDeploymentCreated proto.InternalMessageInfo + +func (m *EventDeploymentCreated) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *EventDeploymentCreated) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +type EventDeploymentUpdated struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash" yaml:"hash"` +} + +func (m *EventDeploymentUpdated) Reset() { *m = EventDeploymentUpdated{} } +func (m *EventDeploymentUpdated) String() string { return proto.CompactTextString(m) } +func (*EventDeploymentUpdated) ProtoMessage() {} +func (*EventDeploymentUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{1} +} +func (m *EventDeploymentUpdated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDeploymentUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDeploymentUpdated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDeploymentUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDeploymentUpdated.Merge(m, src) +} +func (m *EventDeploymentUpdated) XXX_Size() int { + return m.Size() +} +func (m *EventDeploymentUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_EventDeploymentUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDeploymentUpdated proto.InternalMessageInfo + +func (m *EventDeploymentUpdated) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +func (m *EventDeploymentUpdated) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +type EventDeploymentClosed struct { + ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventDeploymentClosed) Reset() { *m = EventDeploymentClosed{} } +func (m *EventDeploymentClosed) String() string { return proto.CompactTextString(m) } +func (*EventDeploymentClosed) ProtoMessage() {} +func (*EventDeploymentClosed) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{2} +} +func (m *EventDeploymentClosed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventDeploymentClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventDeploymentClosed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventDeploymentClosed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDeploymentClosed.Merge(m, src) +} +func (m *EventDeploymentClosed) XXX_Size() int { + return m.Size() +} +func (m *EventDeploymentClosed) XXX_DiscardUnknown() { + xxx_messageInfo_EventDeploymentClosed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDeploymentClosed proto.InternalMessageInfo + +func (m *EventDeploymentClosed) GetID() DeploymentID { + if m != nil { + return m.ID + } + return DeploymentID{} +} + +type EventGroupStarted struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventGroupStarted) Reset() { *m = EventGroupStarted{} } +func (m *EventGroupStarted) String() string { return proto.CompactTextString(m) } +func (*EventGroupStarted) ProtoMessage() {} +func (*EventGroupStarted) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{3} +} +func (m *EventGroupStarted) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGroupStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGroupStarted.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventGroupStarted) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGroupStarted.Merge(m, src) +} +func (m *EventGroupStarted) XXX_Size() int { + return m.Size() +} +func (m *EventGroupStarted) XXX_DiscardUnknown() { + xxx_messageInfo_EventGroupStarted.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGroupStarted proto.InternalMessageInfo + +func (m *EventGroupStarted) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +type EventGroupPaused struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventGroupPaused) Reset() { *m = EventGroupPaused{} } +func (m *EventGroupPaused) String() string { return proto.CompactTextString(m) } +func (*EventGroupPaused) ProtoMessage() {} +func (*EventGroupPaused) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{4} +} +func (m *EventGroupPaused) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGroupPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGroupPaused.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventGroupPaused) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGroupPaused.Merge(m, src) +} +func (m *EventGroupPaused) XXX_Size() int { + return m.Size() +} +func (m *EventGroupPaused) XXX_DiscardUnknown() { + xxx_messageInfo_EventGroupPaused.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGroupPaused proto.InternalMessageInfo + +func (m *EventGroupPaused) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +type EventGroupClosed struct { + ID GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventGroupClosed) Reset() { *m = EventGroupClosed{} } +func (m *EventGroupClosed) String() string { return proto.CompactTextString(m) } +func (*EventGroupClosed) ProtoMessage() {} +func (*EventGroupClosed) Descriptor() ([]byte, []int) { + return fileDescriptor_8af18b536d600791, []int{5} +} +func (m *EventGroupClosed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventGroupClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventGroupClosed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventGroupClosed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventGroupClosed.Merge(m, src) +} +func (m *EventGroupClosed) XXX_Size() int { + return m.Size() +} +func (m *EventGroupClosed) XXX_DiscardUnknown() { + xxx_messageInfo_EventGroupClosed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventGroupClosed proto.InternalMessageInfo + +func (m *EventGroupClosed) GetID() GroupID { + if m != nil { + return m.ID + } + return GroupID{} +} + +func init() { + proto.RegisterType((*EventDeploymentCreated)(nil), "akash.deployment.v1.EventDeploymentCreated") + proto.RegisterType((*EventDeploymentUpdated)(nil), "akash.deployment.v1.EventDeploymentUpdated") + proto.RegisterType((*EventDeploymentClosed)(nil), "akash.deployment.v1.EventDeploymentClosed") + proto.RegisterType((*EventGroupStarted)(nil), "akash.deployment.v1.EventGroupStarted") + proto.RegisterType((*EventGroupPaused)(nil), "akash.deployment.v1.EventGroupPaused") + proto.RegisterType((*EventGroupClosed)(nil), "akash.deployment.v1.EventGroupClosed") +} + +func init() { proto.RegisterFile("akash/deployment/v1/event.proto", fileDescriptor_8af18b536d600791) } + +var fileDescriptor_8af18b536d600791 = []byte{ + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0xd4, + 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0x2b, 0xd0, + 0x43, 0x28, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, + 0x10, 0xa5, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x10, 0x09, 0x08, 0x07, 0x2a, + 0x25, 0x07, 0xe1, 0xe9, 0x27, 0x25, 0x16, 0xa7, 0xea, 0x97, 0x19, 0x26, 0xa5, 0x96, 0x24, 0x1a, + 0xea, 0x27, 0xe7, 0x67, 0xe6, 0x41, 0xe5, 0x55, 0xb0, 0x39, 0x03, 0xc9, 0x4e, 0x88, 0x2a, 0xac, + 0x8e, 0x4d, 0x2f, 0xca, 0x2f, 0x2d, 0x80, 0x28, 0x50, 0x9a, 0xcb, 0xc8, 0x25, 0xe6, 0x0a, 0x72, + 0xbc, 0x0b, 0x5c, 0x89, 0x73, 0x51, 0x6a, 0x62, 0x49, 0x6a, 0x8a, 0x50, 0x00, 0x17, 0x53, 0x66, + 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa2, 0x1e, 0x16, 0x4f, 0xe9, 0x21, 0xf4, 0x78, + 0xba, 0x38, 0xc9, 0x9e, 0xb8, 0x27, 0xcf, 0xf0, 0xe8, 0x9e, 0x3c, 0x93, 0xa7, 0xcb, 0xab, 0x7b, + 0xf2, 0x4c, 0x99, 0x29, 0x9f, 0xee, 0xc9, 0x73, 0x56, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x65, 0xa6, + 0x28, 0x05, 0x31, 0x65, 0xa6, 0x08, 0x69, 0x73, 0xb1, 0x64, 0x24, 0x16, 0x67, 0x48, 0x30, 0x29, + 0x30, 0x6a, 0xf0, 0x38, 0x89, 0xbf, 0xba, 0x27, 0x0f, 0xe6, 0x7f, 0xba, 0x27, 0xcf, 0x0d, 0x51, + 0x08, 0xe2, 0x29, 0x05, 0x81, 0x05, 0xad, 0x58, 0x5e, 0x2c, 0x90, 0x67, 0xc0, 0xe6, 0xbe, 0xd0, + 0x82, 0x94, 0xc1, 0xe3, 0xbe, 0x7c, 0x2e, 0x51, 0xf4, 0xe0, 0xcb, 0xc9, 0x2f, 0xa6, 0x85, 0xeb, + 0xa0, 0x16, 0xa6, 0x71, 0x09, 0x82, 0x2d, 0x74, 0x07, 0x45, 0x62, 0x70, 0x49, 0x62, 0x11, 0x28, + 0x28, 0xbc, 0x91, 0x2c, 0x93, 0xc1, 0x6a, 0x19, 0x58, 0x39, 0x29, 0xf6, 0xa4, 0x72, 0x09, 0x20, + 0xec, 0x09, 0x48, 0x2c, 0x2d, 0xa6, 0x83, 0x35, 0xd0, 0xa0, 0xa3, 0xbe, 0x35, 0x4e, 0x56, 0x27, + 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, + 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x50, 0x90, 0x9d, 0xae, 0x97, 0x98, + 0x5d, 0xa2, 0x97, 0x09, 0xca, 0x99, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xa8, 0xd9, 0x25, 0x89, 0x0d, + 0x9c, 0x53, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x35, 0x71, 0x6c, 0xe3, 0xf9, 0x03, 0x00, + 0x00, +} + +func (m *EventDeploymentCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDeploymentCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDeploymentCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventDeploymentUpdated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDeploymentUpdated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDeploymentUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventDeploymentClosed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventDeploymentClosed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventDeploymentClosed) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventGroupStarted) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGroupStarted) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGroupStarted) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventGroupPaused) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGroupPaused) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGroupPaused) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventGroupClosed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventGroupClosed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventGroupClosed) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventDeploymentCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventDeploymentUpdated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func (m *EventDeploymentClosed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventGroupStarted) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventGroupPaused) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventGroupClosed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventDeploymentCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDeploymentCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDeploymentCreated: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDeploymentUpdated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDeploymentUpdated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDeploymentUpdated: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventDeploymentClosed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventDeploymentClosed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventDeploymentClosed: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGroupStarted) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGroupStarted: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGroupStarted: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGroupPaused) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGroupPaused: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGroupPaused: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventGroupClosed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventGroupClosed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventGroupClosed: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1/group.go b/go/node/deployment/v1/group.go new file mode 100644 index 00000000..b7562379 --- /dev/null +++ b/go/node/deployment/v1/group.go @@ -0,0 +1,47 @@ +package v1 + +import ( + "fmt" + + sdkerrors "cosmossdk.io/errors" + dsdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// 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(dsdkerrors.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/v1beta4/groupid.pb.go b/go/node/deployment/v1/group.pb.go similarity index 66% rename from go/node/deployment/v1beta4/groupid.pb.go rename to go/node/deployment/v1/group.pb.go index a0b836c6..c37806a3 100644 --- a/go/node/deployment/v1beta4/groupid.pb.go +++ b/go/node/deployment/v1/group.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta4/groupid.proto +// source: akash/deployment/v1/group.proto -package v1beta4 +package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -33,7 +34,7 @@ type GroupID struct { func (m *GroupID) Reset() { *m = GroupID{} } func (*GroupID) ProtoMessage() {} func (*GroupID) Descriptor() ([]byte, []int) { - return fileDescriptor_97119ab13846b441, []int{0} + return fileDescriptor_68e5d2321fa62ce8, []int{0} } func (m *GroupID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -84,33 +85,32 @@ func (m *GroupID) GetGSeq() uint32 { } func init() { - proto.RegisterType((*GroupID)(nil), "akash.deployment.v1beta4.GroupID") + proto.RegisterType((*GroupID)(nil), "akash.deployment.v1.GroupID") } -func init() { - proto.RegisterFile("akash/deployment/v1beta4/groupid.proto", fileDescriptor_97119ab13846b441) -} +func init() { proto.RegisterFile("akash/deployment/v1/group.proto", fileDescriptor_68e5d2321fa62ce8) } -var fileDescriptor_97119ab13846b441 = []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, 0xd1, 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, 0x24, 0x00, 0xce, 0x72, 0x6a, 0x01, 0x00, 0x00, +var fileDescriptor_68e5d2321fa62ce8 = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x49, 0x2d, 0xc8, 0xc9, 0xaf, 0xcc, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x33, 0xd4, + 0x4f, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0x2b, 0xd0, + 0x43, 0x28, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, + 0x10, 0xa5, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x10, 0x09, 0x08, 0x07, 0x22, + 0xa5, 0x74, 0x8c, 0x91, 0x8b, 0xdd, 0x1d, 0x64, 0xaa, 0xa7, 0x8b, 0x90, 0x3b, 0x17, 0x6b, 0x7e, + 0x79, 0x5e, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xe1, 0xab, 0x7b, 0xf2, 0x10, + 0x81, 0x4f, 0xf7, 0xe4, 0x79, 0x2a, 0x13, 0x73, 0x73, 0xac, 0x94, 0xc0, 0x5c, 0xa5, 0x4b, 0x5b, + 0x74, 0x45, 0xa0, 0xa6, 0x38, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, + 0xa5, 0x07, 0x41, 0x94, 0x0b, 0x19, 0x73, 0xb1, 0xa4, 0x14, 0xa7, 0x16, 0x4a, 0x30, 0x29, 0x30, + 0x6a, 0xb0, 0x38, 0xc9, 0x3f, 0xba, 0x27, 0xcf, 0xe2, 0x12, 0x9c, 0x5a, 0xf8, 0xea, 0x9e, 0x3c, + 0x58, 0xfc, 0xd3, 0x3d, 0x79, 0x6e, 0x88, 0x71, 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, 0x27, + 0xab, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, + 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x28, 0xc8, 0x4e, 0xd7, + 0x4b, 0xcc, 0x2e, 0xd1, 0xcb, 0x04, 0x05, 0x8a, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x6a, 0xb0, 0x26, + 0xb1, 0x81, 0xc3, 0xc2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xc4, 0xe6, 0xd5, 0x74, 0x01, + 0x00, 0x00, } func (m *GroupID) Marshal() (dAtA []byte, err error) { @@ -134,27 +134,27 @@ func (m *GroupID) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.GSeq != 0 { - i = encodeVarintGroupid(dAtA, i, uint64(m.GSeq)) + i = encodeVarintGroup(dAtA, i, uint64(m.GSeq)) i-- dAtA[i] = 0x18 } if m.DSeq != 0 { - i = encodeVarintGroupid(dAtA, i, uint64(m.DSeq)) + 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 = encodeVarintGroupid(dAtA, i, uint64(len(m.Owner))) + i = encodeVarintGroup(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) +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -172,22 +172,22 @@ func (m *GroupID) Size() (n int) { _ = l l = len(m.Owner) if l > 0 { - n += 1 + l + sovGroupid(uint64(l)) + n += 1 + l + sovGroup(uint64(l)) } if m.DSeq != 0 { - n += 1 + sovGroupid(uint64(m.DSeq)) + n += 1 + sovGroup(uint64(m.DSeq)) } if m.GSeq != 0 { - n += 1 + sovGroupid(uint64(m.GSeq)) + n += 1 + sovGroup(uint64(m.GSeq)) } return n } -func sovGroupid(x uint64) (n int) { +func sovGroup(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 sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *GroupID) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -197,7 +197,7 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowGroupid + return ErrIntOverflowGroup } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -225,7 +225,7 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowGroupid + return ErrIntOverflowGroup } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -239,11 +239,11 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthGroupid + return ErrInvalidLengthGroup } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthGroupid + return ErrInvalidLengthGroup } if postIndex > l { return io.ErrUnexpectedEOF @@ -257,7 +257,7 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { m.DSeq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowGroupid + return ErrIntOverflowGroup } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -276,7 +276,7 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { m.GSeq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowGroupid + return ErrIntOverflowGroup } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -290,12 +290,12 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipGroupid(dAtA[iNdEx:]) + skippy, err := skipGroup(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGroupid + return ErrInvalidLengthGroup } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -309,7 +309,7 @@ func (m *GroupID) Unmarshal(dAtA []byte) error { } return nil } -func skipGroupid(dAtA []byte) (n int, err error) { +func skipGroup(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -317,7 +317,7 @@ func skipGroupid(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowGroupid + return 0, ErrIntOverflowGroup } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -334,7 +334,7 @@ func skipGroupid(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowGroupid + return 0, ErrIntOverflowGroup } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -350,7 +350,7 @@ func skipGroupid(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowGroupid + return 0, ErrIntOverflowGroup } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -363,14 +363,14 @@ func skipGroupid(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthGroupid + return 0, ErrInvalidLengthGroup } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGroupid + return 0, ErrUnexpectedEndOfGroupGroup } depth-- case 5: @@ -379,7 +379,7 @@ func skipGroupid(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthGroupid + return 0, ErrInvalidLengthGroup } if depth == 0 { return iNdEx, nil @@ -389,7 +389,7 @@ func skipGroupid(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthGroupid = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGroupid = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGroupid = fmt.Errorf("proto: unexpected end of group") + 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/key.go b/go/node/deployment/v1/key.go similarity index 95% rename from go/node/deployment/v1beta1/key.go rename to go/node/deployment/v1/key.go index 507c2654..7061ec71 100644 --- a/go/node/deployment/v1beta1/key.go +++ b/go/node/deployment/v1/key.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 const ( // ModuleName is the module name constant used in many places diff --git a/go/node/deployment/v1/migrate/v1beta3.go b/go/node/deployment/v1/migrate/v1beta3.go new file mode 100644 index 00000000..a735b57f --- /dev/null +++ b/go/node/deployment/v1/migrate/v1beta3.go @@ -0,0 +1,31 @@ +package migrate + +import ( + "github.com/akash-network/akash-api/go/node/deployment/v1beta3" + + v1 "pkg.akt.io/go/node/deployment/v1" +) + +func DeploymentIDFromV1Beta3(from v1beta3.DeploymentID) v1.DeploymentID { + return v1.DeploymentID{ + Owner: from.Owner, + DSeq: from.DSeq, + } +} + +func GroupIDFromV1Beta3(from v1beta3.GroupID) v1.GroupID { + return v1.GroupID{ + Owner: from.Owner, + DSeq: from.DSeq, + GSeq: from.GSeq, + } +} + +func DeploymentFromV1beta3(from v1beta3.Deployment) v1.Deployment { + return v1.Deployment{ + ID: DeploymentIDFromV1Beta3(from.DeploymentID), + State: v1.DeploymentState(from.State), + Hash: from.Version, + CreatedAt: from.CreatedAt, + } +} diff --git a/go/node/deployment/v1/msg.pb.go b/go/node/deployment/v1/msg.pb.go new file mode 100644 index 00000000..708e23ce --- /dev/null +++ b/go/node/deployment/v1/msg.pb.go @@ -0,0 +1,559 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1/msg.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// 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_d5db5b4dd1de0f0c, []int{0} +} +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_d5db5b4dd1de0f0c, []int{1} +} +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 + +func init() { + proto.RegisterType((*MsgDepositDeployment)(nil), "akash.deployment.v1.MsgDepositDeployment") + proto.RegisterType((*MsgDepositDeploymentResponse)(nil), "akash.deployment.v1.MsgDepositDeploymentResponse") +} + +func init() { proto.RegisterFile("akash/deployment/v1/msg.proto", fileDescriptor_d5db5b4dd1de0f0c) } + +var fileDescriptor_d5db5b4dd1de0f0c = []byte{ + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3f, 0x4b, 0xf3, 0x40, + 0x1c, 0xc7, 0x93, 0x3c, 0x0f, 0x85, 0xe6, 0xe1, 0x01, 0x89, 0x1d, 0xda, 0x62, 0xef, 0x6a, 0x70, + 0xe8, 0xe2, 0x1d, 0xd1, 0xc9, 0x6e, 0xc6, 0x2c, 0x1d, 0x04, 0x89, 0x83, 0xe0, 0x22, 0x69, 0xef, + 0x88, 0x47, 0x9b, 0x5c, 0xc8, 0xc5, 0x42, 0xdf, 0x85, 0xbb, 0x8b, 0x2f, 0xc2, 0x17, 0xd1, 0xb1, + 0x38, 0x39, 0x1d, 0x92, 0x2e, 0xd2, 0xb1, 0xaf, 0x40, 0x92, 0x0b, 0x8d, 0x42, 0xb7, 0xfb, 0xfd, + 0x3e, 0xbf, 0x7f, 0xdf, 0xfb, 0x9a, 0xbd, 0x60, 0x1a, 0x88, 0x47, 0x4c, 0x68, 0x32, 0xe3, 0x8b, + 0x88, 0xc6, 0x19, 0x9e, 0x3b, 0x38, 0x12, 0x21, 0x4a, 0x52, 0x9e, 0x71, 0xeb, 0xb0, 0xc4, 0xa8, + 0xc6, 0x68, 0xee, 0x74, 0x5b, 0x21, 0x0f, 0x79, 0xc9, 0x71, 0xf1, 0x52, 0xa5, 0xdd, 0xce, 0x84, + 0x8b, 0x88, 0x8b, 0x07, 0x05, 0x54, 0x50, 0x21, 0xa0, 0x22, 0x3c, 0x0e, 0x04, 0xc5, 0x73, 0x67, + 0x4c, 0xb3, 0xc0, 0xc1, 0x13, 0xce, 0xe2, 0x8a, 0x9f, 0xec, 0x3b, 0xe2, 0xc7, 0xce, 0xb2, 0xca, + 0x7e, 0x31, 0xcc, 0xd6, 0xb5, 0x08, 0x3d, 0x9a, 0x70, 0xc1, 0x32, 0x6f, 0x87, 0xad, 0x1b, 0xd3, + 0x60, 0xa4, 0xad, 0xf7, 0xf5, 0xc1, 0xbf, 0xb3, 0x63, 0xb4, 0xe7, 0x62, 0x54, 0x17, 0x8f, 0x3c, + 0xb7, 0xb7, 0x94, 0x50, 0xcb, 0x25, 0x34, 0x46, 0xde, 0x46, 0x42, 0x83, 0x91, 0xad, 0x84, 0xcd, + 0x45, 0x10, 0xcd, 0x86, 0x36, 0x23, 0xb6, 0x6f, 0x30, 0x62, 0xf9, 0x66, 0x23, 0x88, 0xf8, 0x53, + 0x9c, 0xb5, 0x8d, 0x72, 0x6a, 0x07, 0x55, 0x7a, 0x0a, 0x05, 0xa8, 0x52, 0x80, 0xae, 0x38, 0x8b, + 0x5d, 0x58, 0x4c, 0xdb, 0x48, 0x58, 0x35, 0x6c, 0x25, 0xfc, 0xaf, 0x66, 0xa9, 0xd8, 0xf6, 0x2b, + 0x60, 0xdd, 0x99, 0x4d, 0xa2, 0x4e, 0xe7, 0x69, 0xfb, 0x4f, 0x5f, 0x1f, 0x34, 0xdd, 0x8b, 0x8d, + 0x84, 0x75, 0x72, 0x2b, 0xe1, 0x81, 0x6a, 0xdd, 0xa5, 0xec, 0xf7, 0xb7, 0xd3, 0x56, 0xb5, 0xfa, + 0x92, 0x90, 0x94, 0x0a, 0x71, 0x9b, 0xa5, 0x2c, 0x0e, 0xfd, 0xba, 0x6d, 0xf8, 0xf7, 0xeb, 0x15, + 0x6a, 0x36, 0x30, 0x8f, 0xf6, 0x7d, 0x8e, 0x4f, 0x45, 0xc2, 0x63, 0x41, 0xdd, 0xe1, 0x32, 0x07, + 0xfa, 0x2a, 0x07, 0xfa, 0x67, 0x0e, 0xf4, 0xe7, 0x35, 0xd0, 0x56, 0x6b, 0xa0, 0x7d, 0xac, 0x81, + 0x76, 0xdf, 0x4f, 0xa6, 0x21, 0x0a, 0xa6, 0x19, 0x62, 0x85, 0x9f, 0x38, 0xe6, 0x84, 0xfe, 0xb6, + 0x62, 0xdc, 0x28, 0x0d, 0x38, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x00, 0x55, 0x39, 0x80, 0x2d, + 0x02, 0x00, 0x00, +} + +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 = encodeVarintMsg(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 = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(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 encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgDepositDeployment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovMsg(uint64(l)) + l = m.Amount.Size() + n += 1 + l + sovMsg(uint64(l)) + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgDepositDeploymentResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta1/codec.go b/go/node/deployment/v1beta1/codec.go deleted file mode 100644 index 7b5f7b99..00000000 --- a/go/node/deployment/v1beta1/codec.go +++ /dev/null @@ -1,58 +0,0 @@ -package v1beta1 - -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/v1beta1/deployment.pb.go b/go/node/deployment/v1beta1/deployment.pb.go deleted file mode 100644 index e6d49e57..00000000 --- a/go/node/deployment/v1beta1/deployment.pb.go +++ /dev/null @@ -1,2806 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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/deployment_validation_test.go b/go/node/deployment/v1beta1/deployment_validation_test.go deleted file mode 100644 index 359e3872..00000000 --- a/go/node/deployment/v1beta1/deployment_validation_test.go +++ /dev/null @@ -1,185 +0,0 @@ -package v1beta1_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - - types "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta1" - tutil "github.com/akash-network/akash-api/go/testutil" - testutil "github.com/akash-network/akash-api/go/testutil/v1beta1" -) - -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.Storage{ - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(types.GetValidationConfig().MinUnitStorage), - }, - Attributes: nil, - }, - Endpoints: nil, - }, - Count: 1, - Price: sdk.Coin{ - Denom: tutil.CoinDenom, - Amount: sdk.NewInt(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.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.Coin{} - 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.NewInt(-1) - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, "^.*invalid price object.*$", err) -} diff --git a/go/node/deployment/v1beta1/deposit_deployment_authorization.go b/go/node/deployment/v1beta1/deposit_deployment_authorization.go deleted file mode 100644 index 812c0863..00000000 --- a/go/node/deployment/v1beta1/deposit_deployment_authorization.go +++ /dev/null @@ -1,48 +0,0 @@ -package v1beta1 - -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") - } - limitLeft := m.SpendLimit.Sub(mDepositDeployment.Amount) - if limitLeft.IsNegative() { - return authz.AcceptResponse{}, sdkerrors.ErrInsufficientFunds.Wrapf("requested amount is more than spend limit") - } - 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/v1beta1/errors.go b/go/node/deployment/v1beta1/errors.go deleted file mode 100644 index d574e6cb..00000000 --- a/go/node/deployment/v1beta1/errors.go +++ /dev/null @@ -1,35 +0,0 @@ -package v1beta1 - -import ( - "errors" -) - -var ( - - // ErrInvalidGroups is the error when groups are empty - ErrInvalidGroups = errors.New("Invalid groups") - // ErrInvalidDeploymentID is the error for 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 - - // ErrInvalidDeployment = is the error when deployment does not pass validation - ErrInvalidDeployment = errors.New("Invalid deployment") - - // 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") - - // 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/v1beta1/escrow.go b/go/node/deployment/v1beta1/escrow.go deleted file mode 100644 index 3a73ec00..00000000 --- a/go/node/deployment/v1beta1/escrow.go +++ /dev/null @@ -1,25 +0,0 @@ -package v1beta1 - -import ( - etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta1" -) - -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/v1beta1/event.go b/go/node/deployment/v1beta1/event.go deleted file mode 100644 index 859fa22d..00000000 --- a/go/node/deployment/v1beta1/event.go +++ /dev/null @@ -1,309 +0,0 @@ -package v1beta1 - -import ( - "encoding/hex" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta1/genesis.pb.go b/go/node/deployment/v1beta1/genesis.pb.go deleted file mode 100644 index f3873b88..00000000 --- a/go/node/deployment/v1beta1/genesis.pb.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta1/genesis.proto - -package v1beta1 - -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 - -// 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 deleted file mode 100644 index eac07231..00000000 --- a/go/node/deployment/v1beta1/group.pb.go +++ /dev/null @@ -1,2176 +0,0 @@ -// 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" - _ "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 - -// 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/group_pricing_validation.go b/go/node/deployment/v1beta1/group_pricing_validation.go deleted file mode 100644 index 4d3ecbb2..00000000 --- a/go/node/deployment/v1beta1/group_pricing_validation.go +++ /dev/null @@ -1,66 +0,0 @@ -package v1beta1 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" -) - -func validateGroupPricing(gspec GroupSpec) error { - var price sdk.Coin - - mem := sdk.NewInt(0) - denom := "" - - for idx, resource := range gspec.Resources { - if err := validateUnitPricing(resource); err != nil { - return fmt.Errorf("group %v: %w", gspec.GetName(), err) - } - - // all must be same denomination - if denom == "" { - denom = resource.FullPrice().Denom - } else if resource.FullPrice().Denom != denom { - return fmt.Errorf("%w: denomination must be %q", ErrInvalidDeployment, denom) - } - - 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.NewIntFromUint64(validationConfig.MaxUnitPrice)) { - return errors.Errorf("error: invalid unit price (%v > %v fails)", validationConfig.MaxUnitPrice, rg.Price) - } - - if rg.Price.Amount.LT(sdk.NewIntFromUint64(validationConfig.MinUnitPrice)) { - return errors.Errorf("error: invalid unit price (%v < %v fails)", validationConfig.MinUnitPrice, rg.Price) - } - return nil -} - -func validateOrderBidDuration(_ GroupSpec) error { - return nil -} diff --git a/go/node/deployment/v1beta1/group_validation.go b/go/node/deployment/v1beta1/group_validation.go deleted file mode 100644 index e97f12aa..00000000 --- a/go/node/deployment/v1beta1/group_validation.go +++ /dev/null @@ -1,35 +0,0 @@ -package v1beta1 - -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/v1beta1/id.go b/go/node/deployment/v1beta1/id.go deleted file mode 100644 index a9876bd2..00000000 --- a/go/node/deployment/v1beta1/id.go +++ /dev/null @@ -1,103 +0,0 @@ -package v1beta1 - -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/v1beta1/msgs.go b/go/node/deployment/v1beta1/msgs.go deleted file mode 100644 index 632e2b1c..00000000 --- a/go/node/deployment/v1beta1/msgs.go +++ /dev/null @@ -1,311 +0,0 @@ -package v1beta1 - -import ( - 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, _ sdk.AccAddress) *MsgCreateDeployment { - return &MsgCreateDeployment{ - ID: id, - Groups: groups, - Version: version, - Deposit: deposit, - } -} - -// 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 - } - } - - return nil -} - -// NewMsgDepositDeployment creates a new MsgDepositDeployment instance -func NewMsgDepositDeployment(id DeploymentID, amount sdk.Coin, _ string) *MsgDepositDeployment { - return &MsgDepositDeployment{ - ID: id, - Amount: amount, - } -} - -// 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 - } - - return nil -} - -// NewMsgUpdateDeployment creates a new MsgUpdateDeployment instance -func NewMsgUpdateDeployment(id DeploymentID, groups []GroupSpec, version []byte) *MsgUpdateDeployment { - return &MsgUpdateDeployment{ - ID: id, - Groups: groups, - 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/v1beta1/msgs_test.go b/go/node/deployment/v1beta1/msgs_test.go deleted file mode 100644 index c695a574..00000000 --- a/go/node/deployment/v1beta1/msgs_test.go +++ /dev/null @@ -1 +0,0 @@ -package v1beta1_test diff --git a/go/node/deployment/v1beta1/params.go b/go/node/deployment/v1beta1/params.go deleted file mode 100644 index 58a66c7a..00000000 --- a/go/node/deployment/v1beta1/params.go +++ /dev/null @@ -1,50 +0,0 @@ -package v1beta1 - -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/v1beta1/params.pb.go b/go/node/deployment/v1beta1/params.pb.go deleted file mode 100644 index a1c5b02a..00000000 --- a/go/node/deployment/v1beta1/params.pb.go +++ /dev/null @@ -1,328 +0,0 @@ -// 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" - _ "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 { - 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 deleted file mode 100644 index 72817db1..00000000 --- a/go/node/deployment/v1beta1/query.pb.go +++ /dev/null @@ -1,1627 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 68399167..00000000 --- a/go/node/deployment/v1beta1/query.pb.gw.go +++ /dev/null @@ -1,337 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) -) - -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/v1beta1/resource_list_validation.go b/go/node/deployment/v1beta1/resource_list_validation.go deleted file mode 100644 index f07b9198..00000000 --- a/go/node/deployment/v1beta1/resource_list_validation.go +++ /dev/null @@ -1,157 +0,0 @@ -package v1beta1 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" - - types "github.com/akash-network/akash-api/go/node/types/v1beta1" -) - -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) - } - - if limits.storage.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupStorage)) || limits.storage.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) - - val, err = validateStorage(units.Storage) - if err != nil { - return resourceLimits{}, err - } - limits.storage = limits.storage.Add(val) - - 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() > uint64(validationConfig.MaxUnitMemory)) || (u.Quantity.Value() < uint64(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.Storage) (sdk.Int, error) { - if u == nil { - return sdk.Int{}, errors.Errorf("error: invalid unit storage, cannot be nil") - } - if (u.Quantity.Value() > uint64(validationConfig.MaxUnitStorage)) || (u.Quantity.Value() < uint64(validationConfig.MinUnitStorage)) { - return sdk.Int{}, errors.Errorf("error: invalid unit storage (%v > %v > %v fails)", - validationConfig.MaxUnitStorage, u.Quantity.Value(), validationConfig.MinUnitStorage) - } - - return u.Quantity.Val, nil -} - -type resourceLimits struct { - cpu sdk.Int - memory sdk.Int - storage sdk.Int -} - -func newLimits() resourceLimits { - return resourceLimits{ - cpu: sdk.ZeroInt(), - memory: sdk.ZeroInt(), - storage: 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)) - u.storage = u.storage.MulRaw(int64(count)) -} diff --git a/go/node/deployment/v1beta1/types.go b/go/node/deployment/v1beta1/types.go deleted file mode 100644 index 401e20e3..00000000 --- a/go/node/deployment/v1beta1/types.go +++ /dev/null @@ -1,211 +0,0 @@ -package v1beta1 - -import ( - "bytes" - - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta1" - types "github.com/akash-network/akash-api/go/node/types/v1beta1" -) - -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 -} - -// 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.Coin { - var price sdk.Coin - for idx, resource := range g.Resources { - if idx == 0 { - price = resource.FullPrice() - continue - } - price = price.Add(resource.FullPrice()) - } - return price -} - -// 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) -} - -// 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.Coin { - return sdk.NewCoin(r.Price.Denom, r.Price.Amount.MulRaw(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/v1beta1/types_test.go b/go/node/deployment/v1beta1/types_test.go deleted file mode 100644 index c695a574..00000000 --- a/go/node/deployment/v1beta1/types_test.go +++ /dev/null @@ -1 +0,0 @@ -package v1beta1_test diff --git a/go/node/deployment/v1beta1/validation_config.go b/go/node/deployment/v1beta1/validation_config.go deleted file mode 100644 index 6e73ee8d..00000000 --- a/go/node/deployment/v1beta1/validation_config.go +++ /dev/null @@ -1,66 +0,0 @@ -package v1beta1 - -import ( - "github.com/akash-network/akash-api/go/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 - MinUnitPrice uint64 - - // 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: 10 * 1000, // 10 CPUs - MaxUnitMemory: 16 * unit.Gi, // 16 Gi - MaxUnitStorage: unit.Ti, // 1 Ti - MaxUnitCount: 50, - MaxUnitPrice: 10000000, // 10akt - - MinUnitCPU: 10, - MinUnitMemory: unit.Mi, - MinUnitStorage: 5 * unit.Mi, - MinUnitCount: 1, - MinUnitPrice: 1, - - MaxGroupCount: 20, - MaxGroupUnits: 20, - - MaxGroupCPU: 20 * 1000, - MaxGroupMemory: 32 * unit.Gi, - MaxGroupStorage: unit.Ti, -} - -func GetValidationConfig() ValidationConfig { - return validationConfig -} diff --git a/go/node/deployment/v1beta2/authz.pb.go b/go/node/deployment/v1beta2/authz.pb.go deleted file mode 100644 index cde3c179..00000000 --- a/go/node/deployment/v1beta2/authz.pb.go +++ /dev/null @@ -1,333 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index cd1e21d3..00000000 --- a/go/node/deployment/v1beta2/codec.go +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index 2116025c..00000000 --- a/go/node/deployment/v1beta2/deployment.pb.go +++ /dev/null @@ -1,960 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta2/deployment.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 - -// 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 deleted file mode 100644 index 571c3f61..00000000 --- a/go/node/deployment/v1beta2/deploymentmsg.pb.go +++ /dev/null @@ -1,1722 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 53399448..00000000 --- a/go/node/deployment/v1beta2/deposit_deployment_authorization.go +++ /dev/null @@ -1,48 +0,0 @@ -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 deleted file mode 100644 index a6865e9b..00000000 --- a/go/node/deployment/v1beta2/errors.go +++ /dev/null @@ -1,53 +0,0 @@ -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 deleted file mode 100644 index 4ef8261f..00000000 --- a/go/node/deployment/v1beta2/escrow.go +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 0d5805a4..00000000 --- a/go/node/deployment/v1beta2/event.go +++ /dev/null @@ -1,309 +0,0 @@ -package v1beta2 - -import ( - "encoding/hex" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta2/events_test.go b/go/node/deployment/v1beta2/events_test.go deleted file mode 100644 index 69ac0c15..00000000 --- a/go/node/deployment/v1beta2/events_test.go +++ /dev/null @@ -1,335 +0,0 @@ -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/akash-api/go/sdkutil" -) - -var ( - 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 deleted file mode 100644 index b4cd2837..00000000 --- a/go/node/deployment/v1beta2/genesis.pb.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/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 - -// 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 deleted file mode 100644 index 401e10b3..00000000 --- a/go/node/deployment/v1beta2/group.pb.go +++ /dev/null @@ -1,505 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta2/group.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 - -// 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 deleted file mode 100644 index a8fb3178..00000000 --- a/go/node/deployment/v1beta2/group_pricing_validation.go +++ /dev/null @@ -1,63 +0,0 @@ -package v1beta2 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func validateGroupPricing(gspec GroupSpec) error { - var price sdk.DecCoin - - mem := sdk.NewInt(0) - denom := "" - - for idx, resource := range gspec.Resources { - - if err := validateUnitPricing(resource); err != nil { - return fmt.Errorf("group %v: %w", gspec.GetName(), err) - } - - // all must be same denomination - if denom == "" { - denom = resource.FullPrice().Denom - } else if resource.FullPrice().Denom != denom { - return fmt.Errorf("%w: denomination must be %q", ErrInvalidDeployment, denom) - } - - if idx == 0 { - price = resource.FullPrice() - } else { - rprice := resource.FullPrice() - if rprice.Denom != price.Denom { - return fmt.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 fmt.Errorf("error: invalid price object") - } - - if rg.Price.Amount.GT(sdk.NewDecFromInt(sdk.NewIntFromUint64(validationConfig.MaxUnitPrice))) { - return fmt.Errorf("error: invalid unit price (%v > %v fails)", validationConfig.MaxUnitPrice, rg.Price) - } - - return nil -} - -func validateOrderBidDuration(_ GroupSpec) error { - return nil -} diff --git a/go/node/deployment/v1beta2/group_validation.go b/go/node/deployment/v1beta2/group_validation.go deleted file mode 100644 index 58a87877..00000000 --- a/go/node/deployment/v1beta2/group_validation.go +++ /dev/null @@ -1,37 +0,0 @@ -package v1beta2 - -import ( - "fmt" -) - -// 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 fmt.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 deleted file mode 100644 index 60ed5aa5..00000000 --- a/go/node/deployment/v1beta2/groupid.pb.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta2/groupid.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 - -// 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 deleted file mode 100644 index 8b8ca98f..00000000 --- a/go/node/deployment/v1beta2/groupmsg.pb.go +++ /dev/null @@ -1,1034 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta2/groupmsg.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 - -// 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 deleted file mode 100644 index 7640afa0..00000000 --- a/go/node/deployment/v1beta2/groupspec.go +++ /dev/null @@ -1,107 +0,0 @@ -package v1beta2 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta2" - types "github.com/akash-network/akash-api/go/node/types/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 deleted file mode 100644 index d909c6b3..00000000 --- a/go/node/deployment/v1beta2/groupspec.pb.go +++ /dev/null @@ -1,426 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index b499d914..00000000 --- a/go/node/deployment/v1beta2/id.go +++ /dev/null @@ -1,103 +0,0 @@ -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 deleted file mode 100644 index c1b3e036..00000000 --- a/go/node/deployment/v1beta2/key.go +++ /dev/null @@ -1,20 +0,0 @@ -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/migrate/v1beta1.go b/go/node/deployment/v1beta2/migrate/v1beta1.go deleted file mode 100644 index d1dbe463..00000000 --- a/go/node/deployment/v1beta2/migrate/v1beta1.go +++ /dev/null @@ -1,52 +0,0 @@ -package migrate - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - amigrate "github.com/akash-network/akash-api/go/node/types/v1beta2/migrate" -) - -func ResourceFromV1Beta1(from v1beta1.Resource) v1beta2.Resource { - return v1beta2.Resource{ - Resources: amigrate.ResourceUnitsFromV1Beta1(from.Resources), - Count: from.Count, - Price: sdk.NewDecCoinFromCoin(from.Price), - } -} - -func ResourcesFromV1Beta1(from []v1beta1.Resource) []v1beta2.Resource { - res := make([]v1beta2.Resource, 0, len(from)) - - for _, oval := range from { - res = append(res, ResourceFromV1Beta1(oval)) - } - - return res -} - -func GroupIDFromV1Beta1(from v1beta1.GroupID) v1beta2.GroupID { - return v1beta2.GroupID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - } -} - -func GroupSpecFromV1Beta1(from v1beta1.GroupSpec) v1beta2.GroupSpec { - return v1beta2.GroupSpec{ - Name: from.Name, - Requirements: amigrate.PlacementRequirementsFromV1Beta1(from.Requirements), - Resources: ResourcesFromV1Beta1(from.Resources), - } -} - -func GroupFromV1Beta1(from v1beta1.Group) v1beta2.Group { - return v1beta2.Group{ - GroupID: GroupIDFromV1Beta1(from.GroupID), - State: v1beta2.Group_State(from.State), - GroupSpec: GroupSpecFromV1Beta1(from.GroupSpec), - CreatedAt: from.CreatedAt, - } -} diff --git a/go/node/deployment/v1beta2/msgs.go b/go/node/deployment/v1beta2/msgs.go deleted file mode 100644 index d2ebf78c..00000000 --- a/go/node/deployment/v1beta2/msgs.go +++ /dev/null @@ -1,323 +0,0 @@ -package v1beta2 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -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 deleted file mode 100644 index 0144c7fa..00000000 --- a/go/node/deployment/v1beta2/params.go +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index 01291348..00000000 --- a/go/node/deployment/v1beta2/params.pb.go +++ /dev/null @@ -1,329 +0,0 @@ -// 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" - _ "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 { - 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 deleted file mode 100644 index 50421246..00000000 --- a/go/node/deployment/v1beta2/query.pb.go +++ /dev/null @@ -1,1628 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 415ad7d6..00000000 --- a/go/node/deployment/v1beta2/query.pb.gw.go +++ /dev/null @@ -1,337 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index f9cbe05a..00000000 --- a/go/node/deployment/v1beta2/resource.pb.go +++ /dev/null @@ -1,422 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index ed1c13d9..00000000 --- a/go/node/deployment/v1beta2/resource_list_validation.go +++ /dev/null @@ -1,172 +0,0 @@ -package v1beta2 - -import ( - "errors" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - - types "github.com/akash-network/akash-api/go/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 fmt.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 fmt.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 fmt.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 fmt.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{}, fmt.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{}, fmt.Errorf("error: invalid unit CPU, cannot be nil") - } - if (u.Units.Value() > uint64(validationConfig.MaxUnitCPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitCPU)) { - return sdk.Int{}, fmt.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{}, fmt.Errorf("error: invalid unit memory, cannot be nil") - } - if (u.Quantity.Value() > validationConfig.MaxUnitMemory) || (u.Quantity.Value() < validationConfig.MinUnitMemory) { - return sdk.Int{}, fmt.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, fmt.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, fmt.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 deleted file mode 100644 index 2334cab6..00000000 --- a/go/node/deployment/v1beta2/service.pb.go +++ /dev/null @@ -1,365 +0,0 @@ -// 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/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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 deleted file mode 100644 index e24872b9..00000000 --- a/go/node/deployment/v1beta2/types.go +++ /dev/null @@ -1,129 +0,0 @@ -package v1beta2 - -import ( - "bytes" - - sdk "github.com/cosmos/cosmos-sdk/types" - - types "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index f7d01703..00000000 --- a/go/node/deployment/v1beta2/validation_config.go +++ /dev/null @@ -1,62 +0,0 @@ -package v1beta2 - -import "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 7ed92ff0..00000000 --- a/go/node/deployment/v1beta3/authz.pb.go +++ /dev/null @@ -1,333 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 49f4a680..00000000 --- a/go/node/deployment/v1beta3/codec.go +++ /dev/null @@ -1,58 +0,0 @@ -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_validation_test.go b/go/node/deployment/v1beta3/deployment_validation_test.go deleted file mode 100644 index 30d35a91..00000000 --- a/go/node/deployment/v1beta3/deployment_validation_test.go +++ /dev/null @@ -1,202 +0,0 @@ -package v1beta3_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/stretchr/testify/require" - - types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" - tutil "github.com/akash-network/akash-api/go/testutil" - testutil "github.com/akash-network/akash-api/go/testutil/v1beta3" -) - -const ( - regexInvalidUnitBoundaries = `^.*invalid unit count|CPU|GPU|memory|storage \(\d+ > 0 > \d+ fails\)$` -) - -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.ResourceUnits, 1) - resources[0] = types.ResourceUnit{ - Resources: akashtypes.Resources{ - ID: 1, - CPU: &akashtypes.CPU{ - Units: akashtypes.ResourceValue{ - Val: sdk.NewInt(10), - }, - Attributes: nil, - }, - GPU: &akashtypes.GPU{ - Units: akashtypes.ResourceValue{ - Val: sdk.NewInt(0), - }, - Attributes: nil, - }, - Memory: &akashtypes.Memory{ - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(types.GetValidationConfig().Unit.Min.Memory), - }, - Attributes: nil, - }, - Storage: akashtypes.Volumes{ - akashtypes.Storage{ - Quantity: akashtypes.ResourceValue{ - Val: sdk.NewIntFromUint64(types.GetValidationConfig().Unit.Min.Storage), - }, - Attributes: nil, - }, - }, - Endpoints: akashtypes.Endpoints{}, - }, - Count: 1, - Price: sdk.NewInt64DecCoin(tutil.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, regexInvalidUnitBoundaries, err) -} - -func TestGroupWithZeroCPU(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].CPU.Units.Val = sdk.NewInt(0) - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, regexInvalidUnitBoundaries, err) -} - -func TestGroupWithZeroMemory(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].Memory.Quantity.Val = sdk.NewInt(0) - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, regexInvalidUnitBoundaries, err) -} - -func TestGroupWithZeroStorage(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].Storage[0].Quantity.Val = sdk.NewInt(0) - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, regexInvalidUnitBoundaries, err) -} - -func TestGroupWithNilCPU(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].CPU = nil - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, "^.*invalid unit CPU.*$", err) -} - -func TestGroupWithNilGPU(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].GPU = nil - err := group.ValidateBasic() - require.Error(t, err) - require.Regexp(t, "^.*invalid unit GPU.*$", err) -} - -func TestGroupWithNilMemory(t *testing.T) { - group := validSimpleGroupSpec() - group.Resources[0].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].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) -} diff --git a/go/node/deployment/v1beta3/deploymentmsg.pb.go b/go/node/deployment/v1beta3/deploymentmsg.pb.go deleted file mode 100644 index 5ec7259d..00000000 --- a/go/node/deployment/v1beta3/deploymentmsg.pb.go +++ /dev/null @@ -1,1722 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index c8ff0de3..00000000 --- a/go/node/deployment/v1beta3/deposit_deployment_authorization.go +++ /dev/null @@ -1,45 +0,0 @@ -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) - - 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 deleted file mode 100644 index cd6956ca..00000000 --- a/go/node/deployment/v1beta3/errors.go +++ /dev/null @@ -1,55 +0,0 @@ -package v1beta3 - -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") - // ErrInvalidDeploymentDepositor indicates an invalid chain parameter - ErrInvalidDeploymentDepositor = errors.New("invalid deployment depositor") -) diff --git a/go/node/deployment/v1beta3/escrow.go b/go/node/deployment/v1beta3/escrow.go deleted file mode 100644 index bda33845..00000000 --- a/go/node/deployment/v1beta3/escrow.go +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index a7e015fc..00000000 --- a/go/node/deployment/v1beta3/event.go +++ /dev/null @@ -1,309 +0,0 @@ -package v1beta3 - -import ( - "encoding/hex" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index cafd3f39..00000000 --- a/go/node/deployment/v1beta3/events_test.go +++ /dev/null @@ -1,335 +0,0 @@ -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/akash-api/go/sdkutil" -) - -var ( - 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 deleted file mode 100644 index e035c7f0..00000000 --- a/go/node/deployment/v1beta3/genesis.pb.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/genesis.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index 85f657b1..00000000 --- a/go/node/deployment/v1beta3/group.pb.go +++ /dev/null @@ -1,505 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/group.proto - -package v1beta3 - -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 - -// 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_validation.go b/go/node/deployment/v1beta3/group_validation.go deleted file mode 100644 index 370dbd2e..00000000 --- a/go/node/deployment/v1beta3/group_validation.go +++ /dev/null @@ -1,35 +0,0 @@ -package v1beta3 - -import ( - "fmt" -) - -// 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 - denom := "" - for idx, group := range gspecs { - // all must be same denomination - if idx == 0 { - denom = group.Price().Denom - } else if group.Price().Denom != denom { - return fmt.Errorf("inconsistent denomination: %v != %v", denom, group.Price().Denom) - } - - if err := group.ValidateBasic(); err != nil { - return err - } - - if _, exists := names[group.GetName()]; exists { - return fmt.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 deleted file mode 100644 index bf83a2c1..00000000 --- a/go/node/deployment/v1beta3/groupid.pb.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/groupid.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index cc238f88..00000000 --- a/go/node/deployment/v1beta3/groupmsg.pb.go +++ /dev/null @@ -1,1034 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/groupmsg.proto - -package v1beta3 - -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 - -// 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.go b/go/node/deployment/v1beta3/groupspec.go deleted file mode 100644 index 05b357e4..00000000 --- a/go/node/deployment/v1beta3/groupspec.go +++ /dev/null @@ -1,196 +0,0 @@ -package v1beta3 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" -) - -type ResourceGroup interface { - GetName() string - GetResourceUnits() ResourceUnits -} - -var _ ResourceGroup = (*GroupSpec)(nil) - -type GroupSpecs []*GroupSpec - -func (gspecs GroupSpecs) Dup() GroupSpecs { - res := make(GroupSpecs, 0, len(gspecs)) - - for _, gspec := range gspecs { - gs := gspec.Dup() - res = append(res, &gs) - } - return res -} - -func (g GroupSpec) Dup() GroupSpec { - res := GroupSpec{ - Name: g.Name, - Requirements: g.Requirements.Dup(), - Resources: g.Resources, - } - - return res -} - -// ValidateBasic asserts non-zero values -func (g GroupSpec) ValidateBasic() error { - return g.validate() -} - -// GetResourceUnits method returns resources list in group -func (g GroupSpec) GetResourceUnits() ResourceUnits { - resources := make(ResourceUnits, 0, len(g.Resources)) - - for _, r := range g.Resources { - resources = append(resources, r) - } - - 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.GetResourceUnits() { - pgroup := pattr.GetCapabilitiesGroup("storage") - for _, storage := range rgroup.Storage { - if len(storage.Attributes) == 0 { - continue - } - - if !storage.Attributes.IN(pgroup) { - return false - } - } - if gpu := rgroup.GPU; gpu.Units.Val.Uint64() > 0 { - attr := gpu.Attributes - if len(attr) == 0 { - continue - } - - pgroup = pattr.GetCapabilitiesMap("gpu") - - if !gpu.Attributes.AnyIN(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) -} - -// validate does validation for provided deployment group -func (g *GroupSpec) validate() error { - if g.Name == "" { - return fmt.Errorf("empty group spec name denomination") - } - - if err := g.GetResourceUnits().Validate(); err != nil { - return err - } - - if err := g.validatePricing(); err != nil { - return err - } - - return nil -} - -func (g *GroupSpec) validatePricing() error { - var price sdk.DecCoin - - mem := sdk.NewInt(0) - - for idx, resource := range g.Resources { - if err := resource.validatePricing(); err != nil { - return fmt.Errorf("group %v: %w", g.GetName(), err) - } - - // all must be same denomination - if idx == 0 { - price = resource.FullPrice() - } else { - rprice := resource.FullPrice() - if rprice.Denom != price.Denom { - return fmt.Errorf("multi-denonimation group: (%v == %v fails)", rprice.Denom, price.Denom) - } - price = price.Add(rprice) - } - - memCount := sdk.NewInt(0) - if u := resource.Memory; u != nil { - memCount.Add(sdk.NewIntFromUint64(u.Quantity.Value())) - } - - mem = mem.Add(memCount.Mul(sdk.NewIntFromUint64(uint64(resource.Count)))) - } - - return nil -} diff --git a/go/node/deployment/v1beta3/groupspec.pb.go b/go/node/deployment/v1beta3/groupspec.pb.go deleted file mode 100644 index 5614eb05..00000000 --- a/go/node/deployment/v1beta3/groupspec.pb.go +++ /dev/null @@ -1,427 +0,0 @@ -// 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" - _ "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 - -// 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 ResourceUnits `protobuf:"bytes,3,rep,name=resources,proto3,castrepeated=ResourceUnits" 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{ - // 376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x48, 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, 0x28, 0x2e, 0x48, 0x4d, 0xd6, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x00, 0xab, 0xd4, 0x43, 0xa8, 0xd4, 0x83, 0xaa, 0x94, 0x12, - 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0x94, 0x20, 0x26, 0x27, - 0x25, 0x16, 0xa7, 0xc2, 0xcd, 0x4c, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x85, 0xaa, - 0xd1, 0xc6, 0x69, 0x7b, 0x51, 0x6a, 0x71, 0x7e, 0x69, 0x51, 0x72, 0x6a, 0x69, 0x5e, 0x66, 0x09, - 0x44, 0xb1, 0xd2, 0x1e, 0x26, 0x2e, 0x4e, 0x77, 0x90, 0xa3, 0x82, 0x0b, 0x52, 0x93, 0x85, 0xb4, - 0xb9, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0xc4, 0x5f, 0xdd, - 0x93, 0x07, 0xf3, 0x3f, 0xdd, 0x93, 0xe7, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x02, 0xf1, 0x94, - 0x82, 0xc0, 0x82, 0x42, 0x55, 0x5c, 0x3c, 0x45, 0xa9, 0x85, 0xa5, 0x99, 0x45, 0xa9, 0x20, 0x4b, - 0x8a, 0x25, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x34, 0xf5, 0x20, 0x5e, 0x02, 0x39, 0x11, 0xe6, - 0x19, 0xbd, 0x80, 0x9c, 0xc4, 0x64, 0xb0, 0xaa, 0x20, 0x24, 0x0d, 0x4e, 0xda, 0x27, 0xee, 0xc9, - 0x33, 0xbc, 0xba, 0x27, 0x8f, 0x62, 0xcc, 0xa7, 0x7b, 0xf2, 0xc2, 0x10, 0xbb, 0x90, 0x45, 0x95, - 0x82, 0x50, 0x14, 0x09, 0xd5, 0x70, 0x71, 0xc2, 0x3c, 0x53, 0x2c, 0xc1, 0xac, 0xc0, 0xac, 0xc1, - 0x6d, 0xa4, 0xa6, 0x87, 0x2b, 0x2c, 0xf5, 0x82, 0xa0, 0x4a, 0x43, 0xf3, 0x32, 0x4b, 0x9c, 0xcc, - 0xa0, 0xb6, 0x22, 0x0c, 0xf8, 0x74, 0x4f, 0x5e, 0x00, 0x66, 0x25, 0x54, 0x48, 0x69, 0xd5, 0x7d, - 0x79, 0x5e, 0x64, 0x6d, 0xc5, 0x41, 0x08, 0xf5, 0x56, 0x1c, 0x1d, 0x0b, 0xe4, 0x19, 0x5e, 0x2c, - 0x90, 0x67, 0x70, 0x0a, 0x3f, 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, 0xdb, - 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0xc3, 0x74, 0xf3, 0x52, - 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0xa1, 0xbc, 0xc4, 0x82, 0x4c, 0xfd, 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, - 0x94, 0x54, 0x2c, 0x51, 0x95, 0xc4, 0x06, 0x8e, 0x1e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x1f, 0xe1, 0xdf, 0xbc, 0x4b, 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, ResourceUnit{}) - 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/key.go b/go/node/deployment/v1beta3/key.go deleted file mode 100644 index 400c355e..00000000 --- a/go/node/deployment/v1beta3/key.go +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index 1b503689..00000000 --- a/go/node/deployment/v1beta3/migrate/v1beta2.go +++ /dev/null @@ -1,50 +0,0 @@ -package migrate - -import ( - "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - amigrate "github.com/akash-network/akash-api/go/node/types/v1beta3/migrate" -) - -func ResourceUnitFromV1Beta2(id uint32, from v1beta2.Resource) v1beta3.ResourceUnit { - return v1beta3.ResourceUnit{ - Resources: amigrate.ResourcesFromV1Beta2(id, from.Resources), - Count: from.Count, - Price: from.Price, - } -} - -func ResourcesUnitsFromV1Beta2(from []v1beta2.Resource) v1beta3.ResourceUnits { - res := make(v1beta3.ResourceUnits, 0, len(from)) - - for i, oval := range from { - res = append(res, ResourceUnitFromV1Beta2(uint32(i+1), 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: ResourcesUnitsFromV1Beta2(from.Resources), - } -} - -func GroupFromV1Beta2(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 deleted file mode 100644 index 23603a38..00000000 --- a/go/node/deployment/v1beta3/msgs.go +++ /dev/null @@ -1,334 +0,0 @@ -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 err := msg.Deposit.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 - } - - // deposit must be same denom as price - if !msg.Deposit.IsZero() { - if gdenom := gs.Price().Denom; gdenom != msg.Deposit.Denom { - return sdkerrors.Wrapf(ErrInvalidDeposit, "Mismatched denominations (%v != %v)", msg.Deposit.Denom, gdenom) - } - } - } - - _, 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 deleted file mode 100644 index 15b606af..00000000 --- a/go/node/deployment/v1beta3/msgs_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package v1beta3_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - sdktestutil "github.com/akash-network/akash-api/go/testutil" - testutil "github.com/akash-network/akash-api/go/testutil/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(), - Deposit: sdktestutil.AkashCoin(t, 0), - }, - err: nil, - }, - { - msg: &types.MsgCreateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte(""), - Groups: []types.GroupSpec{ - testutil.GroupSpec(t), - }, - Depositor: testutil.AccAddress(t).String(), - Deposit: sdktestutil.AkashCoin(t, 0), - }, - err: types.ErrEmptyVersion, - }, - { - msg: &types.MsgCreateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte("invalidversion"), - Groups: []types.GroupSpec{ - testutil.GroupSpec(t), - }, - Depositor: testutil.AccAddress(t).String(), - Deposit: sdktestutil.AkashCoin(t, 0), - }, - 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 deleted file mode 100644 index 6847892e..00000000 --- a/go/node/deployment/v1beta3/params.go +++ /dev/null @@ -1,92 +0,0 @@ -package v1beta3 - -import ( - "fmt" - "math" - - 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 ( - keyMinDeposits = "MinDeposits" -) - -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair([]byte(keyMinDeposits), &p.MinDeposits, validateMinDeposits), - } -} - -func DefaultParams() Params { - return Params{ - MinDeposits: sdk.Coins{ - sdk.NewCoin("uakt", sdk.NewInt(500000)), - }, - } -} - -func (p Params) Validate() error { - if err := validateMinDeposits(p.MinDeposits); err != nil { - return err - } - return nil -} - -func (p Params) ValidateDeposit(amt sdk.Coin) error { - min, err := p.MinDepositFor(amt.Denom) - - if err != nil { - return err - } - - if amt.IsGTE(min) { - return nil - } - - return errors.Wrapf(ErrInvalidDeposit, "Deposit too low - %v < %v", amt.Amount, min) -} - -func (p Params) MinDepositFor(denom string) (sdk.Coin, error) { - for _, minDeposit := range p.MinDeposits { - if minDeposit.Denom == denom { - return sdk.NewCoin(minDeposit.Denom, minDeposit.Amount), nil - } - } - - return sdk.NewInt64Coin(denom, math.MaxInt64), errors.Wrapf(ErrInvalidDeposit, "Invalid deposit denomination %v", denom) -} - -func validateMinDeposits(i interface{}) error { - vals, ok := i.(sdk.Coins) - if !ok { - return errors.Wrapf(ErrInvalidParam, "Min Deposits - invalid type: %T", i) - } - - check := make(map[string]bool) - - for _, minDeposit := range vals { - if _, exists := check[minDeposit.Denom]; exists { - return fmt.Errorf("duplicate Min Deposit for denom (%#v)", minDeposit) - } - - check[minDeposit.Denom] = true - - if minDeposit.Amount.Uint64() >= math.MaxInt32 { - return errors.Wrapf(ErrInvalidParam, "Min Deposit (%v) - too large: %v", minDeposit.Denom, minDeposit.Amount.Uint64()) - } - } - - if _, exists := check["uakt"]; !exists { - return errors.Wrapf(ErrInvalidParam, "Min Deposits - uakt not given: %#v", vals) - } - - return nil -} diff --git a/go/node/deployment/v1beta3/params.pb.go b/go/node/deployment/v1beta3/params.pb.go deleted file mode 100644 index 087b5ab5..00000000 --- a/go/node/deployment/v1beta3/params.pb.go +++ /dev/null @@ -1,340 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/params.proto - -package v1beta3 - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - 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 { - MinDeposits github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposits,json=minDeposits,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposits" yaml:"min_deposits"` -} - -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) GetMinDeposits() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.MinDeposits - } - return nil -} - -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{ - // 292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xbf, 0x4a, 0x03, 0x31, - 0x1c, 0xc7, 0x2f, 0x08, 0x1d, 0x5a, 0xa7, 0xea, 0x50, 0x3b, 0xe4, 0xe4, 0x40, 0xe8, 0xd2, 0x84, - 0xb3, 0x9b, 0xe0, 0x52, 0x5d, 0x05, 0x71, 0x11, 0x5c, 0x24, 0x77, 0x17, 0xaf, 0xe1, 0x9a, 0xfc, - 0xc2, 0x25, 0x2a, 0xf7, 0x16, 0x3e, 0x84, 0x93, 0x8b, 0xaf, 0xd1, 0xb1, 0xa3, 0xd3, 0x29, 0x77, - 0x9b, 0xa3, 0x4f, 0x20, 0xcd, 0x05, 0x5a, 0xc1, 0x29, 0xff, 0x3e, 0xf9, 0x7c, 0x7f, 0x7c, 0xfb, - 0x27, 0xac, 0x60, 0x66, 0x41, 0x33, 0xae, 0x97, 0x50, 0x49, 0xae, 0x2c, 0x7d, 0x8a, 0x13, 0x6e, - 0xd9, 0x8c, 0x6a, 0x56, 0x32, 0x69, 0x88, 0x2e, 0xc1, 0xc2, 0x70, 0xe4, 0x30, 0xb2, 0xc5, 0x88, - 0xc7, 0xc6, 0x87, 0x39, 0xe4, 0xe0, 0x20, 0xba, 0xd9, 0x75, 0xfc, 0x18, 0xa7, 0x60, 0x24, 0x18, - 0x9a, 0x30, 0xc3, 0xbd, 0x31, 0xa6, 0x29, 0x08, 0xd5, 0xbd, 0x47, 0xef, 0xa8, 0xdf, 0xbb, 0x76, - 0x01, 0xc3, 0x57, 0xd4, 0xdf, 0x97, 0x42, 0xdd, 0x67, 0x5c, 0x83, 0x11, 0xd6, 0x8c, 0xd0, 0xf1, - 0xde, 0x64, 0x70, 0x7a, 0x44, 0x3a, 0x05, 0xd9, 0x28, 0x7c, 0x5a, 0x4c, 0x2e, 0x40, 0xa8, 0xf9, - 0xc3, 0xaa, 0x0e, 0x83, 0xa6, 0x0e, 0x07, 0x57, 0x42, 0x5d, 0xfa, 0x5f, 0xdf, 0x75, 0xf8, 0xc7, - 0xf2, 0x53, 0x87, 0x07, 0x15, 0x93, 0xcb, 0xb3, 0x68, 0xf7, 0x36, 0x7a, 0xfb, 0x0c, 0x27, 0xb9, - 0xb0, 0x8b, 0xc7, 0x84, 0xa4, 0x20, 0xa9, 0x9f, 0xb2, 0x5b, 0xa6, 0x26, 0x2b, 0xa8, 0xad, 0x34, - 0x37, 0x2e, 0xc6, 0xdc, 0x0c, 0xe4, 0xd6, 0x3f, 0xbf, 0x5d, 0x35, 0x18, 0xad, 0x1b, 0x8c, 0xbe, - 0x1a, 0x8c, 0x5e, 0x5a, 0x1c, 0xac, 0x5b, 0x1c, 0x7c, 0xb4, 0x38, 0xb8, 0x3b, 0xdf, 0x11, 0xba, - 0x9a, 0xa6, 0x8a, 0xdb, 0x67, 0x28, 0x0b, 0x7f, 0x62, 0x5a, 0xd0, 0x1c, 0xa8, 0x82, 0x8c, 0xff, - 0xd3, 0x73, 0xd2, 0x73, 0x8d, 0xcc, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xd3, 0xdf, 0x39, - 0x8a, 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 len(m.MinDeposits) > 0 { - for iNdEx := len(m.MinDeposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MinDeposits[iNdEx].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 - if len(m.MinDeposits) > 0 { - for _, e := range m.MinDeposits { - l = e.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 MinDeposits", 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 - } - m.MinDeposits = append(m.MinDeposits, types.Coin{}) - if err := m.MinDeposits[len(m.MinDeposits)-1].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 deleted file mode 100644 index 9a17b4c6..00000000 --- a/go/node/deployment/v1beta3/query.pb.go +++ /dev/null @@ -1,1628 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 40020037..00000000 --- a/go/node/deployment/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,337 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) -) - -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_list_validation.go b/go/node/deployment/v1beta3/resource_list_validation.go deleted file mode 100644 index 5dced741..00000000 --- a/go/node/deployment/v1beta3/resource_list_validation.go +++ /dev/null @@ -1,187 +0,0 @@ -package v1beta3 - -import ( - "errors" -) - -var ( - ErrNoGroupsPresent = errors.New("validation: no groups present") - ErrGroupEmptyName = errors.New("validation: group has empty name") -) - -// func ValidateResourceList(rlist GSpec) error { -// if rlist.GetName() == "" { -// return ErrGroupEmptyName -// } -// -// units := rlist.GetResources() -// -// if count := len(units); count > validationConfig.MaxGroupUnits { -// return fmt.Errorf("group %v: too many units (%v > %v)", rlist.GetName(), count, validationConfig.MaxGroupUnits) -// } -// -// if err := units.Validate(); err != nil { -// return fmt.Errorf("group %v: %w", rlist.GetName(), err) -// } -// -// limits := newLimits() -// -// for _, resource := range units { -// gLimits, err := validateGroupResource(resource) -// if err != nil { -// return fmt.Errorf("group %v: %w", rlist.GetName(), err) -// } -// -// limits.add(gLimits) -// } -// -// if limits.cpu.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupCPU)) || limits.cpu.LTE(sdk.ZeroInt()) { -// return fmt.Errorf("group %v: invalid total CPU (%v > %v > %v fails)", -// rlist.GetName(), validationConfig.MaxGroupCPU, limits.cpu, 0) -// } -// -// if !limits.gpu.IsZero() && (limits.gpu.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupGPU)) || limits.gpu.LTE(sdk.ZeroInt())) { -// return fmt.Errorf("group %v: invalid total GPU (%v > %v > %v fails)", -// rlist.GetName(), validationConfig.MaxGroupGPU, limits.gpu, 0) -// } -// -// if limits.memory.GT(sdk.NewIntFromUint64(validationConfig.MaxGroupMemory)) || limits.memory.LTE(sdk.ZeroInt()) { -// return fmt.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 fmt.Errorf("group %v: invalid total storage (%v > %v > %v fails)", -// rlist.GetName(), validationConfig.MaxGroupStorage, limits.storage, 0) -// } -// } -// -// return nil -// } - -// func validateGroupResource(rg GroupResource) (resourceLimits, error) { -// limits, err := validateResourceUnits(rg.Resource.Units) -// if err != nil { -// return resourceLimits{}, err -// } -// -// if rg.Count > uint32(validationConfig.MaxUnitCount) || rg.Count < uint32(validationConfig.MinUnitCount) { -// return resourceLimits{}, fmt.Errorf("error: invalid unit count (%v > %v > %v fails)", -// validationConfig.MaxUnitCount, rg.Count, validationConfig.MinUnitCount) -// } -// -// limits.mul(rg.Count) -// -// return limits, nil -// } - -// func validateResourceUnits(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{}, fmt.Errorf("error: invalid unit CPU, cannot be nil") -// } -// if (u.Units.Value() > uint64(validationConfig.MaxUnitCPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitCPU)) { -// return sdk.Int{}, fmt.Errorf("error: invalid unit CPU (%v > %v > %v fails)", -// validationConfig.MaxUnitCPU, u.Units.Value(), validationConfig.MinUnitCPU) -// } -// -// if err := u.Attributes.Validate(); err != nil { -// return sdk.Int{}, fmt.Errorf("error: invalid CPU attributes: %w", err) -// } -// -// return u.Units.Val, nil -// } -// -// func validateGPU(u *types.GPU) (sdk.Int, error) { -// if u == nil { -// return sdk.Int{}, fmt.Errorf("error: invalid unit GPU, cannot be nil") -// } -// -// if (u.Units.Value() > uint64(validationConfig.MaxUnitGPU)) || (u.Units.Value() < uint64(validationConfig.MinUnitGPU)) { -// return sdk.Int{}, fmt.Errorf("error: invalid unit GPU (%v > %v > %v fails)", -// validationConfig.MaxUnitGPU, u.Units.Value(), validationConfig.MinUnitGPU) -// } -// -// if u.Units.Value() == 0 && len(u.Attributes) > 0 { -// return sdk.Int{}, fmt.Errorf("error: invalid GPU state. attributes cannot be present if units == 0") -// } -// -// if err := u.Attributes.Validate(); err != nil { -// return sdk.Int{}, fmt.Errorf("error: invalid GPU attributes: %w", err) -// } -// -// return u.Units.Val, nil -// } -// -// func validateMemory(u *types.Memory) (sdk.Int, error) { -// if u == nil { -// return sdk.Int{}, fmt.Errorf("error: invalid unit memory, cannot be nil") -// } -// if (u.Quantity.Value() > validationConfig.MaxUnitMemory) || (u.Quantity.Value() < validationConfig.MinUnitMemory) { -// return sdk.Int{}, fmt.Errorf("error: invalid unit memory (%v > %v > %v fails)", -// validationConfig.MaxUnitMemory, u.Quantity.Value(), validationConfig.MinUnitMemory) -// } -// -// if err := u.Attributes.Validate(); err != nil { -// return sdk.Int{}, fmt.Errorf("error: invalid Memory attributes: %w", err) -// } -// -// return u.Quantity.Val, nil -// } -// -// func validateStorage(u types.Volumes) ([]sdk.Int, error) { -// if u == nil { -// return nil, fmt.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, fmt.Errorf("error: invalid unit storage (%v > %v > %v fails)", -// validationConfig.MaxUnitStorage, u[i].Quantity.Value(), validationConfig.MinUnitStorage) -// } -// -// if err := u[i].Attributes.Validate(); err != nil { -// return []sdk.Int{}, fmt.Errorf("error: invalid Storage attributes: %w", err) -// } -// -// storage = append(storage, u[i].Quantity.Val) -// } -// -// return storage, nil -// } diff --git a/go/node/deployment/v1beta3/resource_list_validation_test.go b/go/node/deployment/v1beta3/resource_list_validation_test.go deleted file mode 100644 index df40e749..00000000 --- a/go/node/deployment/v1beta3/resource_list_validation_test.go +++ /dev/null @@ -1,280 +0,0 @@ -package v1beta3 - -// func TestValidateCPUNil(t *testing.T) { -// _, err := validateCPU(nil) -// require.Error(t, err) -// } -// -// func TestValidateGPUNil(t *testing.T) { -// _, err := validateGPU(nil) -// require.Error(t, err) -// } -// -// func TestValidateMemoryNil(t *testing.T) { -// _, err := validateMemory(nil) -// require.Error(t, err) -// } -// -// func TestValidateStorageNil(t *testing.T) { -// _, err := validateStorage(nil) -// require.Error(t, err) -// } -// -// func TestValidateCPULimits(t *testing.T) { -// _, err := validateCPU(&types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MinUnitCPU - 1))}) -// require.Error(t, err) -// -// _, err = validateCPU(&types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitCPU + 1))}) -// require.Error(t, err) -// -// _, err = validateCPU(&types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MinUnitCPU))}) -// require.NoError(t, err) -// -// _, err = validateCPU(&types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitCPU))}) -// require.NoError(t, err) -// } -// -// func TestValidateGPULimits(t *testing.T) { -// _, err := validateGPU(&types.GPU{Units: types.NewResourceValue(uint64(validationConfig.MinUnitGPU - 1))}) -// require.Error(t, err) -// -// _, err = validateGPU(&types.GPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitGPU + 1))}) -// require.Error(t, err) -// -// _, err = validateGPU(&types.GPU{Units: types.NewResourceValue(uint64(validationConfig.MinUnitGPU))}) -// require.NoError(t, err) -// -// _, err = validateGPU(&types.GPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitGPU))}) -// require.NoError(t, err) -// } -// -// func TestValidateMemoryLimits(t *testing.T) { -// _, err := validateMemory(&types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory - 1)}) -// require.Error(t, err) -// -// _, err = validateMemory(&types.Memory{Quantity: types.NewResourceValue(validationConfig.MaxUnitMemory + 1)}) -// require.Error(t, err) -// -// _, err = validateMemory(&types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory)}) -// require.NoError(t, err) -// -// _, err = validateMemory(&types.Memory{Quantity: types.NewResourceValue(validationConfig.MaxUnitMemory)}) -// require.NoError(t, err) -// } -// -// func TestValidateStorageLimits(t *testing.T) { -// _, err := validateStorage(types.Volumes{{Quantity: types.NewResourceValue(validationConfig.MinUnitStorage - 1)}}) -// require.Error(t, err) -// -// _, err = validateStorage(types.Volumes{{Quantity: types.NewResourceValue(validationConfig.MaxUnitStorage + 1)}}) -// require.Error(t, err) -// -// _, err = validateStorage(types.Volumes{{Quantity: types.NewResourceValue(validationConfig.MinUnitStorage)}}) -// require.NoError(t, err) -// -// _, err = validateStorage(types.Volumes{{Quantity: types.NewResourceValue(validationConfig.MaxUnitStorage)}}) -// require.NoError(t, err) -// } -// -// type resourceListTest struct { -// rlist types.ResourceGroup -// shouldPass bool -// expErr error -// expErrString string -// } -// -// func dummyResources(count int) GroupResources { -// return make(GroupResources, count) -// } -// -// func TestValidateResourceList(t *testing.T) { -// tests := []resourceListTest{ -// { -// rlist: GroupSpec{}, -// shouldPass: false, -// expErr: ErrGroupEmptyName, -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: dummyResources(validationConfig.MaxGroupUnits + 1), -// }, -// shouldPass: false, -// expErrString: "group test: too many units", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{}, -// Count: 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "error: invalid unit CPU", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(1000)}, -// }, -// Count: 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "error: invalid unit GPU", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(1000)}, -// GPU: &types.GPU{Units: types.NewResourceValue(0)}, -// }, -// Count: 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "error: invalid unit memory", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(1000)}, -// GPU: &types.GPU{Units: types.NewResourceValue(0)}, -// Memory: &types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory)}, -// }, -// Count: 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "error: invalid unit storage", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(1000)}, -// GPU: &types.GPU{Units: types.NewResourceValue(0)}, -// Memory: &types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory)}, -// Storage: types.Volumes{}, -// }, -// Count: 1, -// }, -// }, -// }, -// }, -// shouldPass: true, -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitCPU))}, -// GPU: &types.GPU{Units: types.NewResourceValue(0)}, -// Memory: &types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory)}, -// Storage: types.Volumes{}, -// }, -// Count: uint32(validationConfig.MaxGroupCPU/uint64(validationConfig.MaxUnitCPU)) + 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "invalid total CPU", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(1000)}, -// GPU: &types.GPU{Units: types.NewResourceValue(uint64(validationConfig.MaxUnitGPU))}, -// Memory: &types.Memory{Quantity: types.NewResourceValue(validationConfig.MinUnitMemory)}, -// Storage: types.Volumes{}, -// }, -// Count: uint32(validationConfig.MaxGroupGPU/uint64(validationConfig.MaxUnitGPU)) + 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "invalid total GPU", -// }, -// { -// rlist: GroupSpec{ -// Name: "test", -// Resources: GroupResources{ -// { -// Resource: types.Resource{ -// ID: 1, -// Units: types.ResourceUnits{ -// CPU: &types.CPU{Units: types.NewResourceValue(uint64(validationConfig.MinUnitCPU))}, -// GPU: &types.GPU{Units: types.NewResourceValue(0)}, -// Memory: &types.Memory{Quantity: types.NewResourceValue(validationConfig.MaxUnitMemory)}, -// Storage: types.Volumes{}, -// }, -// Count: uint32(validationConfig.MaxGroupMemory/validationConfig.MaxUnitMemory) + 1, -// }, -// }, -// }, -// }, -// shouldPass: false, -// expErrString: "invalid total memory", -// }, -// } -// -// for _, test := range tests { -// err := ValidateResourceList(test.rlist) -// if test.shouldPass { -// require.NoError(t, err) -// } else { -// require.Error(t, err) -// if test.expErr != nil { -// require.EqualError(t, err, test.expErr.Error()) -// } else if test.expErrString != "" { -// require.True(t, -// strings.Contains(err.Error(), test.expErrString), -// fmt.Sprintf("invalid error message: expected to contain (%s) != actual(%s)", test.expErrString, err.Error())) -// } else { -// require.Error(t, err) -// } -// } -// } -// } diff --git a/go/node/deployment/v1beta3/resourcelimits.go b/go/node/deployment/v1beta3/resourcelimits.go deleted file mode 100644 index e4f52418..00000000 --- a/go/node/deployment/v1beta3/resourcelimits.go +++ /dev/null @@ -1,38 +0,0 @@ -package v1beta3 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type resourceLimits struct { - cpu sdk.Int - gpu sdk.Int - memory sdk.Int - storage []sdk.Int -} - -func newLimits() resourceLimits { - return resourceLimits{ - cpu: sdk.ZeroInt(), - gpu: 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/resourceunit.go b/go/node/deployment/v1beta3/resourceunit.go deleted file mode 100644 index 620deee9..00000000 --- a/go/node/deployment/v1beta3/resourceunit.go +++ /dev/null @@ -1,166 +0,0 @@ -package v1beta3 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - - types "github.com/akash-network/akash-api/go/node/types/v1beta3" -) - -// FullPrice method returns full price of resource -func (r *ResourceUnit) FullPrice() sdk.DecCoin { - return sdk.NewDecCoinFromDec(r.Price.Denom, r.Price.Amount.MulInt64(int64(r.Count))) -} - -func (r *ResourceUnit) Dup() ResourceUnit { - return ResourceUnit{ - Resources: r.Resources.Dup(), - Count: r.Count, - Price: r.GetPrice(), - } -} - -func (r *ResourceUnit) validate() error { - // if r.Count > uint32(validationConfig.MaxUnitCount) || r.Count < uint32(validationConfig.MinUnitCount) { - // return fmt.Errorf("error: invalid unit count (%v > %v > %v fails)", - // validationConfig.MaxUnitCount, r.Count, validationConfig.MinUnitCount) - // } - - if err := validateResources(r.Resources); err != nil { - return err - } - - return nil -} - -func (r *ResourceUnit) totalResources() resourceLimits { - limits := newLimits() - - limits.cpu = limits.cpu.Add(r.CPU.Units.Val) - limits.gpu = limits.gpu.Add(r.GPU.Units.Val) - limits.memory = limits.memory.Add(r.Memory.Quantity.Val) - - storage := make([]sdk.Int, 0, len(r.Storage)) - - for _, vol := range r.Storage { - storage = append(storage, vol.Quantity.Val) - } - - // fixme this is not actually sum for storage usecase. - // do we really need sum here? - limits.storage = storage - - limits.mul(r.Count) - - return limits -} - -func (r *ResourceUnit) validatePricing() error { - if !r.GetPrice().IsValid() { - return fmt.Errorf("error: invalid price object") - } - - if r.Price.Amount.GT(sdk.NewDecFromInt(sdk.NewIntFromUint64(validationConfig.Unit.Max.Price))) { - return fmt.Errorf("error: invalid unit price (%v > %v fails)", validationConfig.Unit.Max.Price, r.Price) - } - - return nil -} - -func validateResources(units types.Resources) error { - if units.ID == 0 { - return fmt.Errorf("error: invalid resources ID (> 0 fails)") - } - - if err := validateCPU(units.CPU); err != nil { - return err - } - - if err := validateGPU(units.GPU); err != nil { - return err - } - - if err := validateMemory(units.Memory); err != nil { - return err - } - - if err := validateStorage(units.Storage); err != nil { - return err - } - - return nil -} - -func validateCPU(u *types.CPU) error { - if u == nil { - return fmt.Errorf("error: invalid unit CPU, cannot be nil") - } - - if (u.Units.Value() > uint64(validationConfig.Unit.Max.CPU)) || (u.Units.Value() < uint64(validationConfig.Unit.Min.CPU)) { - return fmt.Errorf("error: invalid unit CPU (%v > %v > %v fails)", - validationConfig.Unit.Max.CPU, u.Units.Value(), validationConfig.Unit.Max.CPU) - } - - if err := u.Attributes.Validate(); err != nil { - return fmt.Errorf("error: invalid CPU attributes: %w", err) - } - - return nil -} - -func validateGPU(u *types.GPU) error { - if u == nil { - return fmt.Errorf("error: invalid unit GPU, cannot be nil") - } - - if (u.Units.Value() > uint64(validationConfig.Unit.Max.GPU)) || (u.Units.Value() < uint64(validationConfig.Unit.Min.GPU)) { - return fmt.Errorf("error: invalid unit GPU (%v > %v > %v fails)", - validationConfig.Unit.Max.GPU, u.Units.Value(), validationConfig.Unit.Max.GPU) - } - - if u.Units.Value() == 0 && len(u.Attributes) > 0 { - return fmt.Errorf("error: invalid GPU state. attributes cannot be present if units == 0") - } - - if err := u.Attributes.Validate(); err != nil { - return fmt.Errorf("error: invalid GPU attributes: %w", err) - } - - return nil -} - -func validateMemory(u *types.Memory) error { - if u == nil { - return fmt.Errorf("error: invalid unit memory, cannot be nil") - } - if (u.Quantity.Value() > validationConfig.Unit.Max.Memory) || (u.Quantity.Value() < validationConfig.Unit.Min.Memory) { - return fmt.Errorf("error: invalid unit memory (%v > %v > %v fails)", - validationConfig.Unit.Max.Memory, u.Quantity.Value(), validationConfig.Unit.Max.Memory) - } - - if err := u.Attributes.Validate(); err != nil { - return fmt.Errorf("error: invalid Memory attributes: %w", err) - } - - return nil -} - -func validateStorage(u types.Volumes) error { - if u == nil { - return fmt.Errorf("error: invalid unit storage, cannot be nil") - } - - for i := range u { - if (u[i].Quantity.Value() > validationConfig.Unit.Max.Storage) || (u[i].Quantity.Value() < validationConfig.Unit.Min.Storage) { - return fmt.Errorf("error: invalid unit storage (%v > %v > %v fails)", - validationConfig.Unit.Max.Storage, u[i].Quantity.Value(), validationConfig.Unit.Min.Storage) - } - - if err := u[i].Attributes.Validate(); err != nil { - return fmt.Errorf("error: invalid Storage attributes: %w", err) - } - } - - return nil -} diff --git a/go/node/deployment/v1beta3/resourceunit.pb.go b/go/node/deployment/v1beta3/resourceunit.pb.go deleted file mode 100644 index 39c5cdbc..00000000 --- a/go/node/deployment/v1beta3/resourceunit.pb.go +++ /dev/null @@ -1,445 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta3/resourceunit.proto - -package v1beta3 - -import ( - fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" - 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 - -// ResourceUnit extends Resources and adds Count along with the Price -type ResourceUnit struct { - v1beta3.Resources `protobuf:"bytes,1,opt,name=resource,proto3,embedded=resource" json:"resource" yaml:"resource"` - 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 *ResourceUnit) Reset() { *m = ResourceUnit{} } -func (m *ResourceUnit) String() string { return proto.CompactTextString(m) } -func (*ResourceUnit) ProtoMessage() {} -func (*ResourceUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_fb431767d5aa2e0f, []int{0} -} -func (m *ResourceUnit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceUnit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceUnit) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceUnit.Merge(m, src) -} -func (m *ResourceUnit) XXX_Size() int { - return m.Size() -} -func (m *ResourceUnit) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceUnit.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceUnit proto.InternalMessageInfo - -func (m *ResourceUnit) GetCount() uint32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *ResourceUnit) GetPrice() types.DecCoin { - if m != nil { - return m.Price - } - return types.DecCoin{} -} - -func init() { - proto.RegisterType((*ResourceUnit)(nil), "akash.deployment.v1beta3.ResourceUnit") -} - -func init() { - proto.RegisterFile("akash/deployment/v1beta3/resourceunit.proto", fileDescriptor_fb431767d5aa2e0f) -} - -var fileDescriptor_fb431767d5aa2e0f = []byte{ - // 344 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x33, 0xf7, 0xde, 0x5e, 0x2e, 0xb9, 0x15, 0x21, 0xb8, 0x88, 0xc5, 0x26, 0x25, 0x1b, - 0x0b, 0xe2, 0x0c, 0xb5, 0xbb, 0x82, 0x9b, 0xe8, 0x0b, 0x18, 0x10, 0xc1, 0x5d, 0x92, 0x0e, 0xe9, - 0xd0, 0x66, 0x4e, 0xc8, 0x4c, 0x94, 0xbe, 0x85, 0x8f, 0xe0, 0xe3, 0x74, 0xd9, 0xa5, 0xab, 0x20, - 0xed, 0x46, 0xba, 0xec, 0xda, 0x85, 0x64, 0x26, 0x69, 0x0b, 0xba, 0xcb, 0xf9, 0xcf, 0xf7, 0xff, - 0xfc, 0x27, 0x63, 0x5e, 0x84, 0xd3, 0x50, 0x4c, 0xc8, 0x98, 0x66, 0x33, 0x98, 0xa7, 0x94, 0x4b, - 0xf2, 0x34, 0x88, 0xa8, 0x0c, 0x87, 0x24, 0xa7, 0x02, 0x8a, 0x3c, 0xa6, 0x05, 0x67, 0x12, 0x67, - 0x39, 0x48, 0xb0, 0x6c, 0x05, 0xe3, 0x3d, 0x8c, 0x6b, 0xb8, 0x73, 0x92, 0x40, 0x02, 0x0a, 0x22, - 0xd5, 0x97, 0xe6, 0x3b, 0x9e, 0x0e, 0x8f, 0x42, 0x41, 0xbf, 0xc5, 0x8a, 0x9a, 0x71, 0x62, 0x10, - 0x29, 0x88, 0x43, 0x68, 0x40, 0x62, 0x60, 0x5c, 0xef, 0xbd, 0x4f, 0x64, 0xb6, 0x83, 0xda, 0x73, - 0xcf, 0x99, 0xb4, 0x22, 0xf3, 0x5f, 0x93, 0x61, 0xa3, 0x1e, 0xea, 0xff, 0xbf, 0xea, 0x62, 0xdd, - 0xab, 0x8a, 0x68, 0x1a, 0xe1, 0xc6, 0x23, 0xfc, 0xf3, 0x45, 0xe9, 0x1a, 0xcb, 0xd2, 0x45, 0x9b, - 0xd2, 0xdd, 0x59, 0xb7, 0xa5, 0x7b, 0x3c, 0x0f, 0xd3, 0xd9, 0xc8, 0x6b, 0x14, 0x2f, 0xd8, 0x2d, - 0x2d, 0x62, 0xb6, 0x62, 0x28, 0xb8, 0xb4, 0x7f, 0xf5, 0x50, 0xff, 0xc8, 0x3f, 0xdd, 0x94, 0xae, - 0x16, 0xb6, 0xa5, 0xdb, 0xd6, 0x36, 0x35, 0x7a, 0x81, 0x96, 0xad, 0x3b, 0xb3, 0x95, 0xe5, 0x2c, - 0xa6, 0xf6, 0x6f, 0xd5, 0xe8, 0x0c, 0xeb, 0xab, 0x0e, 0x2b, 0x0d, 0xf0, 0x2d, 0x8d, 0x6f, 0x80, - 0x71, 0xbf, 0x5b, 0x15, 0xaa, 0x22, 0x95, 0x65, 0x1f, 0xa9, 0x46, 0x2f, 0xd0, 0xf2, 0xe8, 0xcf, - 0xc7, 0xab, 0x8b, 0xfc, 0x87, 0xc5, 0xca, 0x41, 0xcb, 0x95, 0x83, 0xde, 0x57, 0x0e, 0x7a, 0x59, - 0x3b, 0xc6, 0x72, 0xed, 0x18, 0x6f, 0x6b, 0xc7, 0x78, 0xbc, 0x4e, 0x98, 0x9c, 0x14, 0x11, 0x8e, - 0x21, 0x25, 0xea, 0xfe, 0x4b, 0x4e, 0xe5, 0x33, 0xe4, 0xd3, 0x7a, 0x0a, 0x33, 0x46, 0x12, 0x20, - 0x1c, 0xc6, 0xf4, 0x87, 0xe7, 0x8d, 0xfe, 0xaa, 0xdf, 0x3b, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, - 0xaf, 0x0a, 0x29, 0xb9, 0x01, 0x02, 0x00, 0x00, -} - -func (this *ResourceUnit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceUnit) - if !ok { - that2, ok := that.(ResourceUnit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Resources.Equal(&that1.Resources) { - return false - } - if this.Count != that1.Count { - return false - } - if !this.Price.Equal(&that1.Price) { - return false - } - return true -} -func (m *ResourceUnit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceUnit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceUnit) 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 = encodeVarintResourceunit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Count != 0 { - i = encodeVarintResourceunit(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 = encodeVarintResourceunit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintResourceunit(dAtA []byte, offset int, v uint64) int { - offset -= sovResourceunit(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ResourceUnit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resources.Size() - n += 1 + l + sovResourceunit(uint64(l)) - if m.Count != 0 { - n += 1 + sovResourceunit(uint64(m.Count)) - } - l = m.Price.Size() - n += 1 + l + sovResourceunit(uint64(l)) - return n -} - -func sovResourceunit(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResourceunit(x uint64) (n int) { - return sovResourceunit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResourceUnit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResourceunit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceUnit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceUnit: 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 ErrIntOverflowResourceunit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResourceunit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResourceunit - } - 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 ErrIntOverflowResourceunit - } - 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 ErrIntOverflowResourceunit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResourceunit - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResourceunit - } - 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 := skipResourceunit(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResourceunit - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResourceunit(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, ErrIntOverflowResourceunit - } - 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, ErrIntOverflowResourceunit - } - 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, ErrIntOverflowResourceunit - } - 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, ErrInvalidLengthResourceunit - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResourceunit - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResourceunit - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResourceunit = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResourceunit = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResourceunit = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go/node/deployment/v1beta3/resourceunits.go b/go/node/deployment/v1beta3/resourceunits.go deleted file mode 100644 index 4c24b923..00000000 --- a/go/node/deployment/v1beta3/resourceunits.go +++ /dev/null @@ -1,82 +0,0 @@ -package v1beta3 - -import ( - "fmt" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type ResourceUnits []ResourceUnit - -var _ sort.Interface = (*ResourceUnits)(nil) - -func (s ResourceUnits) Len() int { - return len(s) -} - -func (s ResourceUnits) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s ResourceUnits) Less(i, j int) bool { - return s[i].ID < s[j].ID -} - -func (s ResourceUnits) Dup() ResourceUnits { - res := make(ResourceUnits, 0, len(s)) - - for _, ru := range s { - res = append(res, ru.Dup()) - } - - return res -} - -func (s ResourceUnits) Validate() error { - // if count := len(s); count > validationConfig.MaxGroupUnits { - // return fmt.Errorf("too many units (%v > %v)", count, validationConfig.MaxGroupUnits) - // } - - ids := make(map[uint32]bool) - for _, res := range s { - if err := res.validate(); err != nil { - return err - } - if res.ID == 0 { - return fmt.Errorf("resources ID must be > 0") - } - - if _, exists := ids[res.ID]; exists { - return fmt.Errorf("duplicate resources ID (%d) within group", res.ID) - } - - ids[res.ID] = true - } - - limits := newLimits() - - for idx := range s { - limits.add(s[idx].totalResources()) - } - - if limits.cpu.GT(sdk.NewIntFromUint64(uint64(validationConfig.Group.Max.CPU))) || limits.cpu.LTE(sdk.ZeroInt()) { - return fmt.Errorf("invalid total CPU (%v > %v > %v fails)", validationConfig.Group.Max.CPU, limits.cpu, 0) - } - - if !limits.gpu.IsZero() && (limits.gpu.GT(sdk.NewIntFromUint64(uint64(validationConfig.Group.Max.GPU))) || limits.gpu.LTE(sdk.ZeroInt())) { - return fmt.Errorf("invalid total GPU (%v > %v > %v fails)", validationConfig.Group.Max.GPU, limits.gpu, 0) - } - - if limits.memory.GT(sdk.NewIntFromUint64(validationConfig.Group.Max.Memory)) || limits.memory.LTE(sdk.ZeroInt()) { - return fmt.Errorf("invalid total memory (%v > %v > %v fails)", validationConfig.Group.Max.Memory, limits.memory, 0) - } - - for i := range limits.storage { - if limits.storage[i].GT(sdk.NewIntFromUint64(validationConfig.Group.Max.Storage)) || limits.storage[i].LTE(sdk.ZeroInt()) { - return fmt.Errorf("invalid total storage (%v > %v > %v fails)", validationConfig.Group.Max.Storage, limits.storage, 0) - } - } - - return nil -} diff --git a/go/node/deployment/v1beta3/service.pb.go b/go/node/deployment/v1beta3/service.pb.go deleted file mode 100644 index e4722681..00000000 --- a/go/node/deployment/v1beta3/service.pb.go +++ /dev/null @@ -1,365 +0,0 @@ -// 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/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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 deleted file mode 100644 index bd761149..00000000 --- a/go/node/deployment/v1beta3/types.go +++ /dev/null @@ -1,122 +0,0 @@ -package v1beta3 - -import ( - "bytes" - - 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 -} - -// GetResourceUnits method returns resources list in group -func (g Group) GetResourceUnits() ResourceUnits { - return g.GroupSpec.Resources -} - -// 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 deleted file mode 100644 index b996c87e..00000000 --- a/go/node/deployment/v1beta3/types_test.go +++ /dev/null @@ -1,461 +0,0 @@ -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" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" - types "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3" - "github.com/akash-network/akash-api/go/sdkutil" - tutil "github.com/akash-network/akash-api/go/testutil" - "github.com/akash-network/akash-api/go/testutil/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.ResourcesList(t, 1), - }, - expErr: types.ErrInvalidGroups, - }, - { - desc: "groupspec valid", - gspec: types.GroupSpec{ - Name: "hihi", - Requirements: testutil.PlacementRequirements(t), - Resources: testutil.ResourcesList(t, 1), - }, - 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.ResourcesList(t, 1), - } - - 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.ResourcesList(t, 1), - } - - 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.ResourcesList(t, 1), - } - - 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.ResourcesList(t, 1), - } - - 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.ResourcesList(t, 1), - } - - group.Resources[0].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", - }, - } - - match := group.MatchResourcesRequirements(provAttributes) - require.True(t, match) - match = group.MatchResourcesRequirements(prov2Attributes) - require.False(t, match) - match = group.MatchResourcesRequirements(prov3Attributes) - require.False(t, match) -} - -func TestGroupSpec_MatchGPUAttributes(t *testing.T) { - group := types.GroupSpec{ - Name: "spec", - Requirements: testutil.PlacementRequirements(t), - Resources: testutil.ResourcesList(t, 1), - } - - group.Resources[0].GPU.Attributes = akashtypes.Attributes{ - { - Key: "vendor/nvidia/model/a100", - Value: "true", - }, - } - - provAttributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "default", - }, - { - Key: "capabilities/storage/1/persistent", - Value: "true", - }, - { - Key: "capabilities/gpu/vendor/nvidia/model/a100", - Value: "true", - }, - } - - prov2Attributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "default", - }, - } - - prov3Attributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "beta2", - }, - } - - match := group.MatchResourcesRequirements(provAttributes) - require.True(t, match) - match = group.MatchResourcesRequirements(prov2Attributes) - require.False(t, match) - match = group.MatchResourcesRequirements(prov3Attributes) - require.False(t, match) -} - -func TestGroupSpec_MatchGPUAttributesWildcard(t *testing.T) { - group := types.GroupSpec{ - Name: "spec", - Requirements: testutil.PlacementRequirements(t), - Resources: testutil.ResourcesList(t, 1), - } - - group.Resources[0].GPU.Attributes = akashtypes.Attributes{ - { - Key: "vendor/nvidia/model/*", - Value: "true", - }, - } - - provAttributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "default", - }, - { - Key: "capabilities/storage/1/persistent", - Value: "true", - }, - { - Key: "capabilities/gpu/vendor/nvidia/model/a100", - Value: "true", - }, - } - - prov2Attributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "default", - }, - } - - prov3Attributes := akashtypes.Attributes{ - { - Key: "capabilities/storage/1/class", - Value: "beta2", - }, - } - - match := group.MatchResourcesRequirements(provAttributes) - require.True(t, match) - match = group.MatchResourcesRequirements(prov2Attributes) - require.False(t, match) - match = group.MatchResourcesRequirements(prov3Attributes) - require.False(t, match) -} - -func TestDepositDeploymentAuthorization_Accept(t *testing.T) { - limit := sdk.NewInt64Coin(tutil.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(tutil.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(tutil.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 not to be deleted - msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), sdk.NewInt64Coin(tutil.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) -} diff --git a/go/node/deployment/v1beta3/validation_config.go b/go/node/deployment/v1beta3/validation_config.go deleted file mode 100644 index 9c661f68..00000000 --- a/go/node/deployment/v1beta3/validation_config.go +++ /dev/null @@ -1,118 +0,0 @@ -package v1beta3 - -import ( - "github.com/akash-network/akash-api/go/node/types/unit" -) - -const ( - maxUnitCPU = 384 * 1000 // max amount of CPU units single replicate of service can request - maxUnitGPU = 24 - maxUnitMemory = 2 * unit.Ti - maxUnitStorage = 32 * unit.Ti - maxUnitCount = 50 // max amount of service replicas allowed - maxUnitPrice = 10000000 // 10akt - maxGroupCount = 20 // max amount of - maxGroupUnits = 20 -) - -// 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 Limits struct { - Memory uint64 - Storage uint64 - Price uint64 - CPU uint - GPU uint - Count uint -} - -type UnitLimits struct { - Max Limits - Min Limits -} - -type GroupLimit struct { - Limits - Units uint32 -} - -type GroupLimits struct { - Max GroupLimit -} - -type ValidationConfig struct { - Unit UnitLimits - Group GroupLimits - - // // MaxUnitCPU is the maximum number of milli (1/1000) cpu units a single instance may take - // 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{ - Unit: UnitLimits{ - Max: Limits{ - Memory: maxUnitMemory, - Storage: maxUnitStorage, - CPU: maxUnitCPU, - GPU: maxUnitGPU, - Count: maxUnitCount, - Price: maxUnitPrice, - }, - Min: Limits{ - Memory: unit.Mi, - Storage: 5 * unit.Mi, - CPU: 10, - GPU: 0, - Count: 1, - Price: 0, - }, - }, - Group: GroupLimits{ - Max: GroupLimit{ - Limits: Limits{ - Memory: maxUnitMemory * maxUnitCount, - Storage: maxUnitStorage * maxUnitCount, - CPU: maxUnitCPU * maxUnitCount, - GPU: maxUnitGPU * maxUnitCount, - Count: maxGroupCount, - Price: 0, - }, - Units: maxGroupUnits, - }, - }, -} - -func GetValidationConfig() ValidationConfig { - return validationConfig -} diff --git a/go/node/deployment/v1beta4/authz.pb.go b/go/node/deployment/v1beta4/authz.pb.go deleted file mode 100644 index 554458f5..00000000 --- a/go/node/deployment/v1beta4/authz.pb.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta4/authz.proto - -package v1beta4 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "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_37efa6d6cd05f40d, []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.v1beta4.DepositDeploymentAuthorization") -} - -func init() { - proto.RegisterFile("akash/deployment/v1beta4/authz.proto", fileDescriptor_37efa6d6cd05f40d) -} - -var fileDescriptor_37efa6d6cd05f40d = []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, 0xd1, 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, - 0x13, 0x8f, 0x91, 0x8d, 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/v1beta4/codec.go b/go/node/deployment/v1beta4/codec.go index 02f81694..49b8e0ee 100644 --- a/go/node/deployment/v1beta4/codec.go +++ b/go/node/deployment/v1beta4/codec.go @@ -3,55 +3,50 @@ package v1beta4 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()) + v1 "pkg.akt.io/go/node/deployment/v1" ) -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} +// var ( +// // 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()) +// ) // 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) + cdc.RegisterConcrete(&MsgCreateDeployment{}, v1.ModuleName+"/"+MsgTypeCreateDeployment, nil) + cdc.RegisterConcrete(&MsgUpdateDeployment{}, v1.ModuleName+"/"+MsgTypeUpdateDeployment, nil) + cdc.RegisterConcrete(&MsgCloseDeployment{}, v1.ModuleName+"/"+MsgTypeCloseDeployment, nil) + cdc.RegisterConcrete(&MsgStartGroup{}, v1.ModuleName+"/"+MsgTypeStartGroup, nil) + cdc.RegisterConcrete(&MsgPauseGroup{}, v1.ModuleName+"/"+MsgTypePauseGroup, nil) + cdc.RegisterConcrete(&MsgCloseGroup{}, v1.ModuleName+"/"+MsgTypeCloseGroup, nil) + + cdc.RegisterConcrete(&v1.MsgDepositDeployment{}, v1.ModuleName+"/"+v1.MsgTypeDepositDeployment, nil) + } // RegisterInterfaces registers the x/deployment interfaces types with the interface registry func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), + &v1.MsgDepositDeployment{}, &MsgCreateDeployment{}, &MsgUpdateDeployment{}, - &MsgDepositDeployment{}, &MsgCloseDeployment{}, - &MsgCloseGroup{}, - &MsgPauseGroup{}, &MsgStartGroup{}, + &MsgPauseGroup{}, + &MsgCloseGroup{}, ) registry.RegisterImplementations( (*authz.Authorization)(nil), - &DepositDeploymentAuthorization{}, + &v1.DepositAuthorization{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/go/node/deployment/v1beta4/deployment.pb.go b/go/node/deployment/v1beta4/deployment.pb.go deleted file mode 100644 index fafcc760..00000000 --- a/go/node/deployment/v1beta4/deployment.pb.go +++ /dev/null @@ -1,960 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/deployment/v1beta4/deployment.proto - -package v1beta4 - -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 - -// 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_51e4b47f720c56d8, []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_51e4b47f720c56d8, []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.v1beta4.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_51e4b47f720c56d8, []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_51e4b47f720c56d8, []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.v1beta4.Deployment_State", Deployment_State_name, Deployment_State_value) - proto.RegisterType((*DeploymentID)(nil), "akash.deployment.v1beta4.DeploymentID") - proto.RegisterType((*Deployment)(nil), "akash.deployment.v1beta4.Deployment") - proto.RegisterType((*DeploymentFilters)(nil), "akash.deployment.v1beta4.DeploymentFilters") -} - -func init() { - proto.RegisterFile("akash/deployment/v1beta4/deployment.proto", fileDescriptor_51e4b47f720c56d8) -} - -var fileDescriptor_51e4b47f720c56d8 = []byte{ - // 508 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xb1, 0x6f, 0xd3, 0x4e, - 0x14, 0xc7, 0x7d, 0x89, 0xd3, 0xfe, 0x72, 0xcd, 0xaf, 0x0a, 0x56, 0x85, 0x8c, 0xa5, 0xfa, 0x2c, - 0x0f, 0x34, 0x20, 0x61, 0x8b, 0x16, 0x09, 0x29, 0x12, 0x43, 0x4d, 0x84, 0x94, 0xd5, 0x1d, 0x90, - 0x60, 0xa8, 0x2e, 0xb9, 0x53, 0x7a, 0xaa, 0xe3, 0x4b, 0xed, 0x23, 0x55, 0x19, 0x98, 0x51, 0x27, - 0x46, 0x96, 0x4a, 0x95, 0xf8, 0x07, 0x58, 0xf9, 0x0f, 0x3a, 0x76, 0x64, 0x3a, 0x21, 0x67, 0x41, - 0x19, 0xf3, 0x17, 0x20, 0xdf, 0xa5, 0x38, 0x20, 0x40, 0x4c, 0x6c, 0x7e, 0x9f, 0xfb, 0x3e, 0xbf, - 0xef, 0xbb, 0x77, 0x0f, 0xde, 0xc3, 0xc7, 0x38, 0x3f, 0x0a, 0x09, 0x9d, 0x24, 0xfc, 0x6c, 0x4c, - 0x53, 0x11, 0x4e, 0x1f, 0x0e, 0xa8, 0xc0, 0x8f, 0x56, 0x50, 0x30, 0xc9, 0xb8, 0xe0, 0x96, 0xad, - 0xa4, 0xc1, 0x0a, 0x5f, 0x4a, 0x9d, 0xad, 0x11, 0x1f, 0x71, 0x25, 0x0a, 0xcb, 0x2f, 0xad, 0xf7, - 0xdf, 0xc0, 0x56, 0xef, 0xbb, 0xb6, 0xdf, 0xb3, 0x42, 0xd8, 0xe0, 0xa7, 0x29, 0xcd, 0x6c, 0xe0, - 0x81, 0x4e, 0x33, 0xba, 0x33, 0x97, 0x48, 0x83, 0x85, 0x44, 0xad, 0x33, 0x3c, 0x4e, 0xba, 0xbe, - 0x0a, 0xfd, 0x58, 0x63, 0x6b, 0x0f, 0x9a, 0x24, 0xa7, 0x27, 0x76, 0xcd, 0x03, 0x1d, 0x33, 0x42, - 0x85, 0x44, 0x66, 0xef, 0x80, 0x9e, 0xcc, 0x25, 0x52, 0x7c, 0x21, 0xd1, 0x86, 0x4e, 0x2b, 0x23, - 0x3f, 0x56, 0xb0, 0xfb, 0xdf, 0xfb, 0x4b, 0x64, 0x7c, 0xbd, 0x44, 0x86, 0xff, 0xa9, 0x0e, 0x61, - 0x65, 0xc0, 0x12, 0xf0, 0xff, 0xca, 0xfa, 0x21, 0x23, 0xca, 0xc6, 0xc6, 0xee, 0xdd, 0xe0, 0x77, - 0x6d, 0x05, 0xab, 0xee, 0xa3, 0x9d, 0x2b, 0x89, 0x8c, 0x42, 0xa2, 0x1f, 0x7a, 0x9a, 0x4b, 0x54, - 0x63, 0x64, 0x21, 0x51, 0x53, 0x1b, 0x61, 0xc4, 0x8f, 0x5b, 0xd5, 0x9f, 0xfa, 0xc4, 0x7a, 0x09, - 0x1b, 0xb9, 0xc0, 0x82, 0xaa, 0x26, 0x36, 0x77, 0xef, 0xff, 0x4d, 0xb5, 0xe0, 0xa0, 0xcc, 0xd0, - 0x17, 0xa4, 0x92, 0xab, 0x0b, 0x52, 0xa1, 0x1f, 0x6b, 0x6c, 0x3d, 0x86, 0xeb, 0x53, 0x9a, 0xe5, - 0x8c, 0xa7, 0x76, 0xdd, 0x03, 0x9d, 0x56, 0xb4, 0x3d, 0x97, 0xe8, 0x06, 0x2d, 0x24, 0xda, 0xd4, - 0x49, 0x4b, 0xe0, 0xc7, 0x37, 0x47, 0xd6, 0x36, 0x84, 0xc3, 0x8c, 0x62, 0x41, 0xc9, 0x21, 0x16, - 0xb6, 0xe9, 0x81, 0x4e, 0x3d, 0x6e, 0x2e, 0xc9, 0xbe, 0xf0, 0x5f, 0xc3, 0x86, 0xb2, 0x60, 0xed, - 0xc0, 0x75, 0x96, 0x4e, 0x71, 0xc2, 0x48, 0xdb, 0x70, 0x9c, 0xf3, 0x0b, 0xef, 0x76, 0xe5, 0x52, - 0x29, 0xfa, 0xfa, 0xd4, 0xf2, 0xe0, 0x1a, 0x1e, 0x0a, 0x36, 0xa5, 0x6d, 0xe0, 0x6c, 0x9d, 0x5f, - 0x78, 0xed, 0x4a, 0xb7, 0xaf, 0x78, 0xa9, 0x18, 0x26, 0x3c, 0xa7, 0xa4, 0x5d, 0xfb, 0x59, 0xf1, - 0x54, 0x71, 0xc7, 0x7c, 0xfb, 0xc1, 0x35, 0xba, 0xa6, 0x9a, 0xdd, 0x47, 0x00, 0x6f, 0x55, 0x82, - 0x67, 0x2c, 0x11, 0x34, 0xcb, 0xff, 0xcd, 0x0b, 0x2a, 0xab, 0xe8, 0x91, 0xd5, 0xab, 0x2a, 0x7f, - 0x1a, 0x83, 0xb6, 0x1c, 0x3d, 0xbf, 0x2a, 0x5c, 0x70, 0x5d, 0xb8, 0xe0, 0x4b, 0xe1, 0x82, 0x77, - 0x33, 0xd7, 0xb8, 0x9e, 0xb9, 0xc6, 0xe7, 0x99, 0x6b, 0xbc, 0x78, 0x32, 0x62, 0xe2, 0xe8, 0xd5, - 0x20, 0x18, 0xf2, 0x71, 0xa8, 0xc6, 0xff, 0x20, 0xa5, 0xe2, 0x94, 0x67, 0xc7, 0xcb, 0x08, 0x4f, - 0x58, 0x38, 0xe2, 0x61, 0xca, 0x09, 0xfd, 0xc5, 0x22, 0x0e, 0xd6, 0xd4, 0x3a, 0xed, 0x7d, 0x0b, - 0x00, 0x00, 0xff, 0xff, 0xdf, 0x81, 0x89, 0xdc, 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/v1beta4/deployment_validation_test.go b/go/node/deployment/v1beta4/deployment_validation_test.go index b263cf55..b637efcd 100644 --- a/go/node/deployment/v1beta4/deployment_validation_test.go +++ b/go/node/deployment/v1beta4/deployment_validation_test.go @@ -7,10 +7,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - testutil "github.com/akash-network/akash-api/go/node/client/testutil/v1beta3" - types "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - akashtypes "github.com/akash-network/akash-api/go/node/types/resources/v1" - tutil "github.com/akash-network/akash-api/go/testutil" + v1 "pkg.akt.io/go/node/deployment/v1" + types "pkg.akt.io/go/node/deployment/v1beta4" + attr "pkg.akt.io/go/node/types/attributes/v1" + akashtypes "pkg.akt.io/go/node/types/resources/v1beta4" + tutil "pkg.akt.io/go/testutil" ) const ( @@ -18,9 +19,9 @@ const ( ) func TestZeroValueGroupSpec(t *testing.T) { - did := testutil.DeploymentID(t) + did := tutil.DeploymentID(t) - dgroup := testutil.DeploymentGroup(t, did, uint32(6)) + dgroup := tutil.DeploymentGroup(t, did, uint32(6)) gspec := dgroup.GroupSpec t.Run("assert nominal test success", func(t *testing.T) { @@ -30,8 +31,8 @@ func TestZeroValueGroupSpec(t *testing.T) { } func TestZeroValueGroupSpecs(t *testing.T) { - did := testutil.DeploymentID(t) - dgroups := testutil.DeploymentGroups(t, did, uint32(6)) + did := tutil.DeploymentID(t) + dgroups := tutil.DeploymentGroups(t, did, uint32(6)) gspecs := make([]types.GroupSpec, 0) for _, d := range dgroups { gspecs = append(gspecs, d.GroupSpec) @@ -52,7 +53,7 @@ func TestZeroValueGroupSpecs(t *testing.T) { func TestEmptyGroupSpecIsInvalid(t *testing.T) { err := types.ValidateDeploymentGroups(make([]types.GroupSpec, 0)) - require.Equal(t, types.ErrInvalidGroups, err) + require.Equal(t, v1.ErrInvalidGroups, err) } func validSimpleGroupSpec() types.GroupSpec { @@ -93,7 +94,7 @@ func validSimpleGroupSpec() types.GroupSpec { } return types.GroupSpec{ Name: "testGroup", - Requirements: akashtypes.PlacementRequirements{}, + Requirements: attr.PlacementRequirements{}, Resources: resources, } } diff --git a/go/node/deployment/v1beta4/deploymentmsg.pb.go b/go/node/deployment/v1beta4/deploymentmsg.pb.go index e9b57862..1a33b9ed 100644 --- a/go/node/deployment/v1beta4/deploymentmsg.pb.go +++ b/go/node/deployment/v1beta4/deploymentmsg.pb.go @@ -5,12 +5,15 @@ package v1beta4 import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/deployment/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,10 +29,10 @@ 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"` + ID v1.DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Groups GroupSpecs `protobuf:"bytes,2,rep,name=groups,proto3,castrepeated=GroupSpecs" json:"groups" yaml:"groups"` + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash" yaml:"hash"` + 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"` } @@ -67,23 +70,23 @@ func (m *MsgCreateDeployment) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateDeployment proto.InternalMessageInfo -func (m *MsgCreateDeployment) GetID() DeploymentID { +func (m *MsgCreateDeployment) GetID() v1.DeploymentID { if m != nil { return m.ID } - return DeploymentID{} + return v1.DeploymentID{} } -func (m *MsgCreateDeployment) GetGroups() []GroupSpec { +func (m *MsgCreateDeployment) GetGroups() GroupSpecs { if m != nil { return m.Groups } return nil } -func (m *MsgCreateDeployment) GetVersion() []byte { +func (m *MsgCreateDeployment) GetHash() []byte { if m != nil { - return m.Version + return m.Hash } return nil } @@ -139,116 +142,17 @@ func (m *MsgCreateDeploymentResponse) XXX_DiscardUnknown() { 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_9b10e8e78e405ddf, []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_9b10e8e78e405ddf, []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"` + ID v1.DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash" yaml:"hash"` } 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_9b10e8e78e405ddf, []int{4} + return fileDescriptor_9b10e8e78e405ddf, []int{2} } func (m *MsgUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -277,16 +181,16 @@ func (m *MsgUpdateDeployment) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDeployment proto.InternalMessageInfo -func (m *MsgUpdateDeployment) GetID() DeploymentID { +func (m *MsgUpdateDeployment) GetID() v1.DeploymentID { if m != nil { return m.ID } - return DeploymentID{} + return v1.DeploymentID{} } -func (m *MsgUpdateDeployment) GetVersion() []byte { +func (m *MsgUpdateDeployment) GetHash() []byte { if m != nil { - return m.Version + return m.Hash } return nil } @@ -299,7 +203,7 @@ func (m *MsgUpdateDeploymentResponse) Reset() { *m = MsgUpdateDeployment func (m *MsgUpdateDeploymentResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateDeploymentResponse) ProtoMessage() {} func (*MsgUpdateDeploymentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b10e8e78e405ddf, []int{5} + return fileDescriptor_9b10e8e78e405ddf, []int{3} } func (m *MsgUpdateDeploymentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,14 +234,14 @@ 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"` + ID v1.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_9b10e8e78e405ddf, []int{6} + return fileDescriptor_9b10e8e78e405ddf, []int{4} } func (m *MsgCloseDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -366,11 +270,11 @@ func (m *MsgCloseDeployment) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCloseDeployment proto.InternalMessageInfo -func (m *MsgCloseDeployment) GetID() DeploymentID { +func (m *MsgCloseDeployment) GetID() v1.DeploymentID { if m != nil { return m.ID } - return DeploymentID{} + return v1.DeploymentID{} } // MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. @@ -381,7 +285,7 @@ func (m *MsgCloseDeploymentResponse) Reset() { *m = MsgCloseDeploymentRe func (m *MsgCloseDeploymentResponse) String() string { return proto.CompactTextString(m) } func (*MsgCloseDeploymentResponse) ProtoMessage() {} func (*MsgCloseDeploymentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b10e8e78e405ddf, []int{7} + return fileDescriptor_9b10e8e78e405ddf, []int{5} } func (m *MsgCloseDeploymentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,8 +317,6 @@ var xxx_messageInfo_MsgCloseDeploymentResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateDeployment)(nil), "akash.deployment.v1beta4.MsgCreateDeployment") proto.RegisterType((*MsgCreateDeploymentResponse)(nil), "akash.deployment.v1beta4.MsgCreateDeploymentResponse") - proto.RegisterType((*MsgDepositDeployment)(nil), "akash.deployment.v1beta4.MsgDepositDeployment") - proto.RegisterType((*MsgDepositDeploymentResponse)(nil), "akash.deployment.v1beta4.MsgDepositDeploymentResponse") proto.RegisterType((*MsgUpdateDeployment)(nil), "akash.deployment.v1beta4.MsgUpdateDeployment") proto.RegisterType((*MsgUpdateDeploymentResponse)(nil), "akash.deployment.v1beta4.MsgUpdateDeploymentResponse") proto.RegisterType((*MsgCloseDeployment)(nil), "akash.deployment.v1beta4.MsgCloseDeployment") @@ -426,41 +328,41 @@ func init() { } var fileDescriptor_9b10e8e78e405ddf = []byte{ - // 535 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x41, 0x8b, 0xd3, 0x4c, - 0x18, 0x6e, 0xd2, 0xfd, 0xba, 0x74, 0xf6, 0x53, 0x24, 0xee, 0x21, 0xd6, 0x6d, 0xa6, 0x3b, 0x82, - 0x54, 0xd0, 0x84, 0xae, 0x82, 0xb0, 0x20, 0x42, 0xb6, 0x20, 0x7b, 0xd8, 0x4b, 0x64, 0x15, 0xc4, - 0x4b, 0xda, 0x0c, 0xd9, 0x61, 0x9b, 0xbc, 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, 0xe7, 0x79, 0xde, 0x3c, 0xf3, 0xbc, 0x2f, 0x83, - 0x1e, 0xfa, 0xa7, 0x3e, 0x3f, 0x71, 0x02, 0x9a, 0x8c, 0xe0, 0x3c, 0xa2, 0x71, 0xe6, 0x9c, 0xf5, - 0x06, 0x34, 0xf3, 0x9f, 0xfc, 0x54, 0x8a, 0x78, 0x68, 0x27, 0x29, 0x64, 0x60, 0x98, 0x05, 0xdb, - 0xae, 0x20, 0x5b, 0xb1, 0x5b, 0xdb, 0x21, 0x84, 0x50, 0x90, 0x9c, 0xfc, 0x4b, 0xf2, 0x5b, 0x0f, - 0xfe, 0xa2, 0xbb, 0xa2, 0x76, 0xd7, 0x52, 0xc3, 0x14, 0xc6, 0x09, 0x4f, 0xe8, 0x50, 0x31, 0xad, - 0x21, 0xf0, 0x08, 0xb8, 0x33, 0xf0, 0x39, 0x55, 0xa4, 0x9e, 0x33, 0x04, 0x16, 0x4b, 0x9c, 0x7c, - 0xae, 0xa3, 0xdb, 0x47, 0x3c, 0x3c, 0x48, 0xa9, 0x9f, 0xd1, 0xfe, 0xa2, 0x9f, 0x71, 0x8c, 0x74, - 0x16, 0x98, 0x5a, 0x47, 0xeb, 0x6e, 0xed, 0xdd, 0xb7, 0xd7, 0xdd, 0xc4, 0xae, 0x14, 0x87, 0x7d, - 0xb7, 0x7d, 0x21, 0x70, 0x6d, 0x22, 0xb0, 0x7e, 0xd8, 0x9f, 0x09, 0xac, 0xb3, 0x60, 0x2e, 0x70, - 0xf3, 0xdc, 0x8f, 0x46, 0xfb, 0x84, 0x05, 0xc4, 0xd3, 0x59, 0x60, 0xbc, 0x45, 0x0d, 0xe9, 0xd0, - 0xd4, 0x3b, 0xf5, 0xee, 0xd6, 0xde, 0xbd, 0xf5, 0xad, 0x5f, 0xe4, 0xbc, 0x97, 0x09, 0x1d, 0xba, - 0x38, 0xef, 0x3b, 0x13, 0x58, 0x49, 0xe7, 0x02, 0xdf, 0x90, 0x5d, 0xe5, 0x99, 0x78, 0x0a, 0x30, - 0x9e, 0xa2, 0xcd, 0x33, 0x9a, 0x72, 0x06, 0xb1, 0x59, 0xef, 0x68, 0xdd, 0xff, 0xdd, 0xf6, 0x4c, - 0xe0, 0xb2, 0x34, 0x17, 0xf8, 0xa6, 0x94, 0xa9, 0x02, 0xf1, 0x4a, 0xc8, 0x78, 0x85, 0x36, 0x03, - 0x9a, 0x00, 0x67, 0x99, 0xb9, 0x51, 0x5c, 0xf9, 0x8e, 0x2d, 0x73, 0xb3, 0xf3, 0xdc, 0x94, 0xa5, - 0x9e, 0x7d, 0x00, 0x2c, 0x76, 0x77, 0x95, 0x9b, 0x52, 0x51, 0xf5, 0x55, 0x05, 0xe2, 0x95, 0x90, - 0xf1, 0x1c, 0x35, 0xd5, 0x27, 0xa4, 0xe6, 0x7f, 0x1d, 0xad, 0xdb, 0x74, 0x77, 0x67, 0x02, 0x57, - 0xc5, 0xb9, 0xc0, 0xb7, 0x96, 0xc4, 0x90, 0x12, 0xaf, 0x82, 0xf7, 0x37, 0xbe, 0x7f, 0xc2, 0x35, - 0xd2, 0x46, 0x77, 0x57, 0xcc, 0xc8, 0xa3, 0x3c, 0x81, 0x98, 0x53, 0xf2, 0x41, 0x47, 0xdb, 0x47, - 0x3c, 0xec, 0x4b, 0xd5, 0xf5, 0x0f, 0xd1, 0x43, 0x0d, 0x3f, 0x82, 0x71, 0x9c, 0x99, 0xfa, 0x9f, - 0xc2, 0x5a, 0x8c, 0x4e, 0x0a, 0xaa, 0xd1, 0xc9, 0x33, 0xf1, 0x14, 0xb0, 0x9c, 0x54, 0xfd, 0xca, - 0x49, 0x59, 0x68, 0x67, 0x55, 0x12, 0x8b, 0xa8, 0xbe, 0x68, 0xc5, 0xba, 0x1f, 0x27, 0xc1, 0x3f, - 0x59, 0xf7, 0xab, 0x2e, 0xe4, 0xd2, 0xdc, 0x7f, 0x35, 0xbb, 0xb8, 0xcc, 0x3b, 0x64, 0xe4, 0x6b, - 0x31, 0x02, 0x7e, 0xfd, 0x57, 0x51, 0x8e, 0x76, 0x50, 0xeb, 0xf7, 0x5f, 0x96, 0x86, 0xdc, 0xd7, - 0x17, 0x13, 0x4b, 0xbb, 0x9c, 0x58, 0xda, 0xb7, 0x89, 0xa5, 0x7d, 0x9c, 0x5a, 0xb5, 0xcb, 0xa9, - 0x55, 0xfb, 0x3a, 0xb5, 0x6a, 0x6f, 0x9e, 0x85, 0x2c, 0x3b, 0x19, 0x0f, 0xec, 0x21, 0x44, 0x4e, - 0x61, 0xe9, 0x51, 0x4c, 0xb3, 0xf7, 0x90, 0x9e, 0xaa, 0x93, 0x9f, 0x30, 0x27, 0x04, 0x27, 0x86, - 0x80, 0xae, 0x78, 0xd5, 0x06, 0x8d, 0xe2, 0xb1, 0x7a, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x61, - 0xa3, 0x48, 0x7e, 0x81, 0x05, 0x00, 0x00, + // 536 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0x9d, 0x50, 0xc8, 0x05, 0x10, 0x98, 0x4a, 0x75, 0x03, 0xf5, 0xa5, 0x06, 0x24, 0x0b, + 0xe8, 0x59, 0x29, 0x2c, 0x64, 0x41, 0xb8, 0x91, 0x50, 0x07, 0x24, 0xe4, 0x0a, 0x90, 0x58, 0x90, + 0x93, 0x3b, 0x39, 0x47, 0x62, 0x9f, 0xe5, 0x33, 0x45, 0x5d, 0xf9, 0x05, 0xcc, 0x4c, 0xcc, 0x4c, + 0x0c, 0xfc, 0x04, 0x86, 0x8e, 0x15, 0x13, 0xd3, 0x81, 0x92, 0x01, 0x94, 0xd1, 0xbf, 0x00, 0xd9, + 0x77, 0x49, 0x0a, 0xa4, 0x03, 0x43, 0xb7, 0xfb, 0xde, 0xf7, 0xbd, 0xf7, 0xbe, 0x77, 0x4f, 0x77, + 0xe0, 0x4e, 0x30, 0x0c, 0xf8, 0xc0, 0xc5, 0x24, 0x19, 0xb1, 0x83, 0x88, 0xc4, 0x99, 0xbb, 0xdf, + 0xee, 0x91, 0x2c, 0xb8, 0x77, 0x2c, 0x14, 0xf1, 0x10, 0x25, 0x29, 0xcb, 0x98, 0x61, 0x96, 0x6a, + 0xb4, 0xa0, 0x90, 0x52, 0x37, 0x57, 0x43, 0x16, 0xb2, 0x52, 0xe4, 0x16, 0x27, 0xa9, 0x6f, 0xae, + 0xf7, 0x19, 0x8f, 0x18, 0x7f, 0x29, 0x09, 0x09, 0x14, 0xb5, 0x26, 0x91, 0x1b, 0xf1, 0xd0, 0xdd, + 0x6f, 0xbb, 0xf3, 0x1e, 0x4d, 0x4b, 0x11, 0xbd, 0x80, 0x13, 0x65, 0xa6, 0xed, 0xf6, 0x19, 0x8d, + 0x15, 0x7f, 0x63, 0x89, 0xe3, 0x63, 0x48, 0xa9, 0x9c, 0x13, 0xe7, 0x0a, 0x53, 0xf6, 0x3a, 0xe1, + 0x09, 0xe9, 0x4b, 0xa5, 0xfd, 0xa5, 0x0a, 0xae, 0x3c, 0xe6, 0xe1, 0x4e, 0x4a, 0x82, 0x8c, 0x74, + 0xe7, 0x7a, 0xe3, 0x09, 0xd0, 0x29, 0x36, 0xb5, 0x96, 0xe6, 0x34, 0xb6, 0x37, 0xd1, 0x92, 0xc1, + 0xd1, 0x42, 0xbc, 0xdb, 0xf5, 0x36, 0x0e, 0x05, 0xac, 0x8c, 0x05, 0xd4, 0x77, 0xbb, 0x53, 0x01, + 0x75, 0x8a, 0x73, 0x01, 0xeb, 0x07, 0x41, 0x34, 0xea, 0xd8, 0x14, 0xdb, 0xbe, 0x4e, 0xb1, 0xf1, + 0x0a, 0xac, 0xc8, 0xe6, 0xa6, 0xde, 0xaa, 0x3a, 0x8d, 0xed, 0xeb, 0xe8, 0xa4, 0xeb, 0x44, 0x8f, + 0x0a, 0xdd, 0x5e, 0x42, 0xfa, 0xde, 0x56, 0x51, 0x77, 0x2a, 0xa0, 0x4a, 0xcd, 0x05, 0xbc, 0x20, + 0xab, 0x4a, 0x6c, 0x7f, 0xfc, 0x0e, 0xc1, 0x5c, 0xcd, 0x7d, 0x25, 0x33, 0x6e, 0x83, 0xda, 0x20, + 0xe0, 0x03, 0xb3, 0xda, 0xd2, 0x9c, 0xf3, 0xde, 0xda, 0x54, 0xc0, 0x12, 0xe7, 0x02, 0x36, 0x64, + 0x7a, 0x81, 0x6c, 0xbf, 0x0c, 0x1a, 0xcf, 0xc0, 0x59, 0x4c, 0x12, 0xc6, 0x69, 0x66, 0xd6, 0xca, + 0x79, 0xd7, 0x91, 0xda, 0x55, 0xb1, 0x04, 0x65, 0xaa, 0x8d, 0x76, 0x18, 0x8d, 0xbd, 0x4d, 0xe5, + 0x67, 0x96, 0x91, 0x0b, 0x78, 0x51, 0x56, 0x54, 0x01, 0xdb, 0x9f, 0x51, 0xc6, 0x73, 0x50, 0x57, + 0x47, 0x96, 0x9a, 0x67, 0x5a, 0x9a, 0x53, 0xf7, 0xee, 0x4f, 0x05, 0x5c, 0x04, 0x73, 0x01, 0x2f, + 0xfd, 0x91, 0xcc, 0x52, 0xfb, 0xeb, 0xe7, 0xad, 0x55, 0xd5, 0xfd, 0x21, 0xc6, 0x29, 0xe1, 0x7c, + 0x2f, 0x4b, 0x69, 0x1c, 0xfa, 0x8b, 0xb4, 0xce, 0xe5, 0x5f, 0x1f, 0x60, 0xe5, 0xed, 0xcf, 0x4f, + 0xb7, 0xce, 0x51, 0x8c, 0xd8, 0x9b, 0x98, 0xa4, 0xf6, 0x06, 0xb8, 0xba, 0x64, 0x8b, 0x3e, 0xe1, + 0x09, 0x8b, 0x39, 0xb1, 0xdf, 0x6b, 0xe5, 0x96, 0x9f, 0x26, 0xf8, 0xb4, 0xb7, 0xfc, 0x3f, 0x37, + 0xdf, 0xa9, 0x15, 0x83, 0x28, 0xef, 0x7f, 0x7b, 0x9b, 0x7b, 0x1f, 0x01, 0xa3, 0x18, 0x6d, 0xc4, + 0xf8, 0xa9, 0x3a, 0x57, 0x66, 0xae, 0x81, 0xe6, 0xbf, 0xdd, 0x66, 0x5e, 0xbc, 0x07, 0x87, 0x63, + 0x4b, 0x3b, 0x1a, 0x5b, 0xda, 0x8f, 0xb1, 0xa5, 0xbd, 0x9b, 0x58, 0x95, 0xa3, 0x89, 0x55, 0xf9, + 0x36, 0xb1, 0x2a, 0x2f, 0x6e, 0x26, 0xc3, 0x10, 0x05, 0xc3, 0x0c, 0xd1, 0xe2, 0x0b, 0x70, 0x63, + 0x86, 0xc9, 0x92, 0xe7, 0xd7, 0x5b, 0x29, 0x5f, 0xdd, 0xdd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xb3, 0xc0, 0x76, 0x68, 0x79, 0x04, 0x00, 0x00, } func (m *MsgCreateDeployment) Marshal() (dAtA []byte, err error) { @@ -500,10 +402,10 @@ func (m *MsgCreateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { } 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))) + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x1a } @@ -557,79 +459,6 @@ func (m *MsgCreateDeploymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, er 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) @@ -650,10 +479,10 @@ func (m *MsgUpdateDeployment) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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))) + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintDeploymentmsg(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x1a } @@ -774,7 +603,7 @@ func (m *MsgCreateDeployment) Size() (n int) { n += 1 + l + sovDeploymentmsg(uint64(l)) } } - l = len(m.Version) + l = len(m.Hash) if l > 0 { n += 1 + l + sovDeploymentmsg(uint64(l)) } @@ -796,32 +625,6 @@ func (m *MsgCreateDeploymentResponse) Size() (n int) { 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 @@ -830,7 +633,7 @@ func (m *MsgUpdateDeployment) Size() (n int) { _ = l l = m.ID.Size() n += 1 + l + sovDeploymentmsg(uint64(l)) - l = len(m.Version) + l = len(m.Hash) if l > 0 { n += 1 + l + sovDeploymentmsg(uint64(l)) } @@ -970,7 +773,7 @@ func (m *MsgCreateDeployment) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -997,9 +800,9 @@ func (m *MsgCreateDeployment) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) - if m.Version == nil { - m.Version = []byte{} + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} } iNdEx = postIndex case 4: @@ -1138,204 +941,6 @@ func (m *MsgCreateDeploymentResponse) Unmarshal(dAtA []byte) error { } 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 @@ -1400,7 +1005,7 @@ func (m *MsgUpdateDeployment) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -1427,9 +1032,9 @@ func (m *MsgUpdateDeployment) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = append(m.Version[:0], dAtA[iNdEx:postIndex]...) - if m.Version == nil { - m.Version = []byte{} + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} } iNdEx = postIndex default: diff --git a/go/node/deployment/v1beta4/deposit_deployment_authorization.go b/go/node/deployment/v1beta4/deposit_deployment_authorization.go deleted file mode 100644 index cf68a228..00000000 --- a/go/node/deployment/v1beta4/deposit_deployment_authorization.go +++ /dev/null @@ -1,45 +0,0 @@ -package v1beta4 - -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) - - 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/v1beta4/errors.go b/go/node/deployment/v1beta4/errors.go deleted file mode 100644 index a7a30837..00000000 --- a/go/node/deployment/v1beta4/errors.go +++ /dev/null @@ -1,81 +0,0 @@ -package v1beta4 - -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 - errInvalidDeploymentDepositor -) - -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") - // ErrInvalidDeploymentDepositor indicates an invalid chain parameter - ErrInvalidDeploymentDepositor = sdkerrors.Register(ModuleName, errInvalidDeploymentDepositor, "invalid deployment depositor") -) diff --git a/go/node/deployment/v1beta4/escrow.go b/go/node/deployment/v1beta4/escrow.go index 59368fd5..9f7425fb 100644 --- a/go/node/deployment/v1beta4/escrow.go +++ b/go/node/deployment/v1beta4/escrow.go @@ -1,25 +1,27 @@ package v1beta4 import ( - etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" + v1 "pkg.akt.io/go/node/deployment/v1" + etypes "pkg.akt.io/go/node/escrow/v1" ) const ( EscrowScope = "deployment" ) -func EscrowAccountForDeployment(id DeploymentID) etypes.AccountID { +func EscrowAccountForDeployment(id v1.DeploymentID) etypes.AccountID { return etypes.AccountID{ Scope: EscrowScope, XID: id.String(), } } -func DeploymentIDFromEscrowAccount(id etypes.AccountID) (DeploymentID, bool) { +func DeploymentIDFromEscrowAccount(id etypes.AccountID) (v1.DeploymentID, bool) { if id.Scope != EscrowScope { - return DeploymentID{}, false + return v1.DeploymentID{}, false } - did, err := ParseDeploymentID(id.XID) + did, err := v1.ParseDeploymentID(id.XID) + return did, err == nil } diff --git a/go/node/deployment/v1beta4/event.go b/go/node/deployment/v1beta4/event.go index aa103397..e54a2a62 100644 --- a/go/node/deployment/v1beta4/event.go +++ b/go/node/deployment/v1beta4/event.go @@ -6,7 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/akash-network/akash-api/go/sdkutil" + v1 "pkg.akt.io/go/node/deployment/v1" + "pkg.akt.io/go/sdkutil" ) const ( @@ -26,15 +27,15 @@ const ( // EventDeploymentCreated struct type EventDeploymentCreated struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID DeploymentID `json:"id"` + ID v1.DeploymentID `json:"id"` Version []byte `json:"version"` } // NewEventDeploymentCreated initializes creation event. -func NewEventDeploymentCreated(id DeploymentID, version []byte) EventDeploymentCreated { +func NewEventDeploymentCreated(id v1.DeploymentID, version []byte) EventDeploymentCreated { return EventDeploymentCreated{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentCreated, }, ID: id, @@ -47,7 +48,7 @@ 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.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentCreated), sdk.NewAttribute(evVersionKey, string(version)), }, DeploymentIDEVAttributes(ev.ID)...)..., @@ -57,15 +58,15 @@ func (ev EventDeploymentCreated) ToSDKEvent() sdk.Event { // EventDeploymentUpdated struct type EventDeploymentUpdated struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID DeploymentID `json:"id"` + ID v1.DeploymentID `json:"id"` Version []byte `json:"version"` } // NewEventDeploymentUpdated initializes SDK type -func NewEventDeploymentUpdated(id DeploymentID, version []byte) EventDeploymentUpdated { +func NewEventDeploymentUpdated(id v1.DeploymentID, version []byte) EventDeploymentUpdated { return EventDeploymentUpdated{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentUpdated, }, ID: id, @@ -78,7 +79,7 @@ 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.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentUpdated), sdk.NewAttribute(evVersionKey, string(version)), }, DeploymentIDEVAttributes(ev.ID)...)..., @@ -88,13 +89,13 @@ func (ev EventDeploymentUpdated) ToSDKEvent() sdk.Event { // EventDeploymentClosed struct type EventDeploymentClosed struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID DeploymentID `json:"id"` + ID v1.DeploymentID `json:"id"` } -func NewEventDeploymentClosed(id DeploymentID) EventDeploymentClosed { +func NewEventDeploymentClosed(id v1.DeploymentID) EventDeploymentClosed { return EventDeploymentClosed{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentClosed, }, ID: id, @@ -105,14 +106,14 @@ func NewEventDeploymentClosed(id DeploymentID) EventDeploymentClosed { func (ev EventDeploymentClosed) ToSDKEvent() sdk.Event { return sdk.NewEvent(sdkutil.EventTypeMessage, append([]sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionDeploymentClosed), }, DeploymentIDEVAttributes(ev.ID)...)..., ) } // DeploymentIDEVAttributes returns event attribues for given DeploymentID -func DeploymentIDEVAttributes(id DeploymentID) []sdk.Attribute { +func DeploymentIDEVAttributes(id v1.DeploymentID) []sdk.Attribute { return []sdk.Attribute{ sdk.NewAttribute(evOwnerKey, id.Owner), sdk.NewAttribute(evDSeqKey, strconv.FormatUint(id.DSeq, 10)), @@ -120,24 +121,24 @@ func DeploymentIDEVAttributes(id DeploymentID) []sdk.Attribute { } // ParseEVDeploymentID returns deploymentID details for given event attributes -func ParseEVDeploymentID(attrs []sdk.Attribute) (DeploymentID, error) { +func ParseEVDeploymentID(attrs []sdk.Attribute) (v1.DeploymentID, error) { owner, err := sdkutil.GetAccAddress(attrs, evOwnerKey) if err != nil { - return DeploymentID{}, err + return v1.DeploymentID{}, err } dseq, err := sdkutil.GetUint64(attrs, evDSeqKey) if err != nil { - return DeploymentID{}, err + return v1.DeploymentID{}, err } - return DeploymentID{ + return v1.DeploymentID{ Owner: owner.String(), DSeq: dseq, }, nil } -// ParseEVDeploymentVersion returns the Deployment's SDL sha256 sum -func ParseEVDeploymentVersion(attrs []sdk.Attribute) ([]byte, error) { +// ParseEVDeploymentHash returns the Deployment's SDL sha256 sum +func ParseEVDeploymentHash(attrs []sdk.Attribute) ([]byte, error) { v, err := sdkutil.GetString(attrs, evVersionKey) if err != nil { return nil, err @@ -162,13 +163,13 @@ func decodeHex(src []byte) ([]byte, error) { // EventGroupClosed provides SDK event to signal group termination type EventGroupClosed struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID GroupID `json:"id"` + ID v1.GroupID `json:"id"` } -func NewEventGroupClosed(id GroupID) EventGroupClosed { +func NewEventGroupClosed(id v1.GroupID) EventGroupClosed { return EventGroupClosed{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupClosed, }, ID: id, @@ -179,7 +180,7 @@ func NewEventGroupClosed(id GroupID) EventGroupClosed { func (ev EventGroupClosed) ToSDKEvent() sdk.Event { return sdk.NewEvent(sdkutil.EventTypeMessage, append([]sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupClosed), }, GroupIDEVAttributes(ev.ID)...)..., ) @@ -188,13 +189,13 @@ func (ev EventGroupClosed) ToSDKEvent() sdk.Event { // EventGroupPaused provides SDK event to signal group termination type EventGroupPaused struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID GroupID `json:"id"` + ID v1.GroupID `json:"id"` } -func NewEventGroupPaused(id GroupID) EventGroupPaused { +func NewEventGroupPaused(id v1.GroupID) EventGroupPaused { return EventGroupPaused{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupPaused, }, ID: id, @@ -205,7 +206,7 @@ func NewEventGroupPaused(id GroupID) EventGroupPaused { func (ev EventGroupPaused) ToSDKEvent() sdk.Event { return sdk.NewEvent(sdkutil.EventTypeMessage, append([]sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupPaused), }, GroupIDEVAttributes(ev.ID)...)..., ) @@ -214,13 +215,13 @@ func (ev EventGroupPaused) ToSDKEvent() sdk.Event { // EventGroupStarted provides SDK event to signal group termination type EventGroupStarted struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID GroupID `json:"id"` + ID v1.GroupID `json:"id"` } -func NewEventGroupStarted(id GroupID) EventGroupStarted { +func NewEventGroupStarted(id v1.GroupID) EventGroupStarted { return EventGroupStarted{ Context: sdkutil.BaseModuleEvent{ - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupStarted, }, ID: id, @@ -231,31 +232,31 @@ func NewEventGroupStarted(id GroupID) EventGroupStarted { func (ev EventGroupStarted) ToSDKEvent() sdk.Event { return sdk.NewEvent(sdkutil.EventTypeMessage, append([]sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeyModule, v1.ModuleName), sdk.NewAttribute(sdk.AttributeKeyAction, evActionGroupStarted), }, GroupIDEVAttributes(ev.ID)...)..., ) } // GroupIDEVAttributes returns event attribues for given GroupID -func GroupIDEVAttributes(id GroupID) []sdk.Attribute { +func GroupIDEVAttributes(id v1.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) { +func ParseEVGroupID(attrs []sdk.Attribute) (v1.GroupID, error) { did, err := ParseEVDeploymentID(attrs) if err != nil { - return GroupID{}, err + return v1.GroupID{}, err } gseq, err := sdkutil.GetUint64(attrs, evGSeqKey) if err != nil { - return GroupID{}, err + return v1.GroupID{}, err } - return GroupID{ + return v1.GroupID{ Owner: did.Owner, DSeq: did.DSeq, GSeq: uint32(gseq), @@ -267,7 +268,7 @@ func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { if ev.Type != sdkutil.EventTypeMessage { return nil, sdkutil.ErrUnknownType } - if ev.Module != ModuleName { + if ev.Module != v1.ModuleName { return nil, sdkutil.ErrUnknownModule } switch ev.Action { @@ -276,7 +277,7 @@ func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { if err != nil { return nil, err } - ver, err := ParseEVDeploymentVersion(ev.Attributes) + ver, err := ParseEVDeploymentHash(ev.Attributes) if err != nil { return nil, err } @@ -286,7 +287,7 @@ func ParseEvent(ev sdkutil.Event) (sdkutil.ModuleEvent, error) { if err != nil { return nil, err } - ver, err := ParseEVDeploymentVersion(ev.Attributes) + ver, err := ParseEVDeploymentHash(ev.Attributes) if err != nil { return nil, err } diff --git a/go/node/deployment/v1beta4/events_test.go b/go/node/deployment/v1beta4/events_test.go index 9c09d071..8dd3b799 100644 --- a/go/node/deployment/v1beta4/events_test.go +++ b/go/node/deployment/v1beta4/events_test.go @@ -11,7 +11,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/akash-network/akash-api/go/sdkutil" + v1 "pkg.akt.io/go/node/deployment/v1" + "pkg.akt.io/go/sdkutil" ) var ( @@ -55,7 +56,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, }, expErr: sdkutil.ErrUnknownAction, }, @@ -70,7 +71,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: "nil", }, expErr: sdkutil.ErrUnknownAction, @@ -79,7 +80,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentCreated, Attributes: []sdk.Attribute{ { @@ -101,7 +102,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentCreated, Attributes: []sdk.Attribute{ { @@ -119,7 +120,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentCreated, Attributes: []sdk.Attribute{ { @@ -133,7 +134,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentCreated, Attributes: []sdk.Attribute{ { @@ -152,7 +153,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentUpdated, Attributes: []sdk.Attribute{ { @@ -174,7 +175,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentUpdated, Attributes: []sdk.Attribute{ { @@ -192,7 +193,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupClosed, Attributes: []sdk.Attribute{ { @@ -214,7 +215,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentClosed, Attributes: []sdk.Attribute{ { @@ -232,7 +233,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentClosed, Attributes: []sdk.Attribute{ { @@ -250,7 +251,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupClosed, Attributes: []sdk.Attribute{ { @@ -268,7 +269,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionGroupClosed, Attributes: []sdk.Attribute{ { @@ -286,7 +287,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentUpdated, Attributes: []sdk.Attribute{ { @@ -308,7 +309,7 @@ var TEPS = []testEventParsing{ { msg: sdkutil.Event{ Type: sdkutil.EventTypeMessage, - Module: ModuleName, + Module: v1.ModuleName, Action: evActionDeploymentUpdated, Attributes: []sdk.Attribute{ { diff --git a/go/node/deployment/v1beta4/filters.pb.go b/go/node/deployment/v1beta4/filters.pb.go new file mode 100644 index 00000000..606e7461 --- /dev/null +++ b/go/node/deployment/v1beta4/filters.pb.go @@ -0,0 +1,416 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/deployment/v1beta4/filters.proto + +package v1beta4 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + _ "pkg.akt.io/go/node/deployment/v1" +) + +// 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 + +// 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_fb62db02ae97591f, []int{0} +} +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.RegisterType((*DeploymentFilters)(nil), "akash.deployment.v1beta4.DeploymentFilters") +} + +func init() { + proto.RegisterFile("akash/deployment/v1beta4/filters.proto", fileDescriptor_fb62db02ae97591f) +} + +var fileDescriptor_fb62db02ae97591f = []byte{ + // 305 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, 0xd1, 0x4f, 0xcb, 0xcc, 0x29, 0x49, 0x2d, 0x2a, 0xd6, 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, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, + 0x8b, 0xe3, 0x21, 0x12, 0x10, 0x0e, 0x54, 0x4a, 0x05, 0x8b, 0x95, 0x48, 0x3c, 0x88, 0x2a, 0xa5, + 0x13, 0x8c, 0x5c, 0x82, 0x2e, 0x70, 0x41, 0x37, 0x88, 0x63, 0x84, 0xdc, 0xb9, 0x58, 0xf3, 0xcb, + 0xf3, 0x52, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x0c, 0x5f, 0xdd, 0x93, 0x87, 0x08, + 0x7c, 0xba, 0x27, 0xcf, 0x53, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x04, 0xe6, 0x2a, 0x5d, 0xda, 0xa2, + 0x2b, 0x02, 0xb5, 0xd5, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x38, 0xb8, 0xa4, 0x28, 0x33, 0x2f, + 0x3d, 0x08, 0xa2, 0x5c, 0xc8, 0x98, 0x8b, 0x25, 0xa5, 0x38, 0xb5, 0x50, 0x82, 0x49, 0x81, 0x51, + 0x83, 0xc5, 0x49, 0xfe, 0xd1, 0x3d, 0x79, 0x16, 0x97, 0xe0, 0xd4, 0xc2, 0x57, 0xf7, 0xe4, 0xc1, + 0xe2, 0x9f, 0xee, 0xc9, 0x73, 0x43, 0x8c, 0x03, 0xf1, 0x94, 0x82, 0xc0, 0x82, 0x42, 0xfa, 0x5c, + 0xac, 0xc5, 0x25, 0x89, 0x25, 0xa9, 0x12, 0xcc, 0x60, 0xdb, 0x25, 0x41, 0xb6, 0x83, 0x05, 0x10, + 0xb6, 0x83, 0xb9, 0x4a, 0x41, 0x10, 0x61, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9c, 0xec, 0x4f, + 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, + 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0xb5, 0x20, 0x3b, 0x5d, 0x2f, 0x31, + 0xbb, 0x44, 0x2f, 0x13, 0x14, 0x78, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0x58, 0xa2, 0x22, 0x89, 0x0d, + 0x1c, 0x24, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0xce, 0x44, 0xd5, 0xad, 0x01, 0x00, + 0x00, +} + +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 = encodeVarintFilters(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x1a + } + if m.DSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintFilters(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFilters(dAtA []byte, offset int, v uint64) int { + offset -= sovFilters(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovFilters(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovFilters(uint64(m.DSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + return n +} + +func sovFilters(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFilters(x uint64) (n int) { + return sovFilters(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowFilters + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFilters(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFilters + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFilters(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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrInvalidLengthFilters + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFilters + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFilters + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFilters = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFilters = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFilters = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/deployment/v1beta4/genesis.pb.go b/go/node/deployment/v1beta4/genesis.pb.go index da183f48..c7d361e7 100644 --- a/go/node/deployment/v1beta4/genesis.pb.go +++ b/go/node/deployment/v1beta4/genesis.pb.go @@ -5,11 +5,12 @@ package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/deployment/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,8 +26,8 @@ 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"` + Deployment v1.Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups Groups `protobuf:"bytes,2,rep,name=groups,proto3,castrepeated=Groups" json:"groups" yaml:"groups"` } func (m *GenesisDeployment) Reset() { *m = GenesisDeployment{} } @@ -62,14 +63,14 @@ func (m *GenesisDeployment) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisDeployment proto.InternalMessageInfo -func (m *GenesisDeployment) GetDeployment() Deployment { +func (m *GenesisDeployment) GetDeployment() v1.Deployment { if m != nil { return m.Deployment } - return Deployment{} + return v1.Deployment{} } -func (m *GenesisDeployment) GetGroups() []Group { +func (m *GenesisDeployment) GetGroups() Groups { if m != nil { return m.Groups } @@ -139,30 +140,29 @@ func init() { } var fileDescriptor_a4941a99faf6028f = []byte{ - // 358 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, 0x0a, 0x13, 0x12, 0x4b, 0x84, 0xd4, 0x15, 0x85, 0x81, 0x3f, 0x9b, 0x4b, 0xad, 0xb4, - 0x6a, 0x13, 0x47, 0x89, 0x0b, 0xf4, 0x2d, 0x78, 0xac, 0x8e, 0x1d, 0x19, 0x50, 0x84, 0x9a, 0x8d, - 0xb1, 0x4f, 0x80, 0x6a, 0x5b, 0x38, 0xaa, 0x08, 0x5b, 0x2e, 0xfe, 0x7d, 0xf7, 0xdd, 0x77, 0x3a, - 0x78, 0x4c, 0xa7, 0x34, 0x1b, 0x93, 0x11, 0x4b, 0x66, 0x7c, 0x11, 0xb1, 0x58, 0x90, 0x97, 0xf3, - 0x21, 0x13, 0xf4, 0x92, 0x84, 0x2c, 0x66, 0xd9, 0x24, 0xf3, 0x92, 0x94, 0x0b, 0x6e, 0x3b, 0x92, - 0xf3, 0x0c, 0xe7, 0x69, 0xae, 0x75, 0x18, 0xf2, 0x90, 0x4b, 0x88, 0x6c, 0xbf, 0x14, 0xdf, 0xea, - 0x55, 0xf6, 0x2d, 0xb5, 0x50, 0x68, 0xa7, 0x7a, 0x84, 0x94, 0xcf, 0x13, 0x4d, 0x1d, 0x55, 0x52, - 0x09, 0x4d, 0x69, 0xa4, 0xe7, 0xc4, 0x9f, 0x00, 0x36, 0x07, 0x6a, 0xf2, 0x9b, 0x5f, 0xd4, 0x8e, - 0x20, 0x34, 0x42, 0x07, 0xb4, 0x41, 0xb7, 0xd1, 0xef, 0x78, 0x55, 0x91, 0x3c, 0xa3, 0xf4, 0x4f, - 0x96, 0x39, 0xb2, 0xbe, 0x73, 0x54, 0xd2, 0x6f, 0x72, 0xd4, 0x5c, 0xd0, 0x68, 0x76, 0x85, 0xcd, - 0x3f, 0x1c, 0x94, 0x00, 0xfb, 0x01, 0xd6, 0xe5, 0xe8, 0x99, 0x53, 0x6b, 0xef, 0x75, 0x1b, 0x7d, - 0x54, 0x6d, 0x35, 0xd8, 0x72, 0x3e, 0xd2, 0x2e, 0x5a, 0xb6, 0xc9, 0xd1, 0x81, 0x72, 0x50, 0x35, - 0x0e, 0xf4, 0x03, 0x2e, 0x00, 0xdc, 0xd7, 0xf1, 0xee, 0x04, 0x15, 0xcc, 0x7e, 0x83, 0x0d, 0xd3, - 0x35, 0x73, 0x80, 0xf4, 0x3b, 0xfd, 0xc7, 0x6f, 0x77, 0x37, 0x7e, 0x4f, 0x7b, 0x97, 0xfb, 0x6c, - 0x72, 0x64, 0xef, 0x46, 0xcc, 0x70, 0x50, 0x46, 0xec, 0x47, 0x58, 0x57, 0x9b, 0x77, 0x6a, 0x72, - 0x9f, 0xed, 0x6a, 0xd3, 0x5b, 0xc9, 0x99, 0x94, 0x4a, 0x67, 0x52, 0xaa, 0x1a, 0x07, 0xfa, 0xc1, - 0xbf, 0x5f, 0xae, 0x5d, 0xb0, 0x5a, 0xbb, 0xe0, 0x6b, 0xed, 0x82, 0xf7, 0xc2, 0xb5, 0x56, 0x85, - 0x6b, 0x7d, 0x14, 0xae, 0xf5, 0x74, 0x1d, 0x4e, 0xc4, 0x78, 0x3e, 0xf4, 0x9e, 0x79, 0x44, 0xa4, - 0xdd, 0x59, 0xcc, 0xc4, 0x2b, 0x4f, 0xa7, 0xba, 0xa2, 0xc9, 0x84, 0x84, 0x9c, 0xc4, 0x7c, 0xc4, - 0xfe, 0x38, 0x95, 0x61, 0x5d, 0x1e, 0xc9, 0xc5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0xa4, - 0xb1, 0x57, 0xf6, 0x02, 0x00, 0x00, + // 350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbb, 0x4e, 0xfb, 0x30, + 0x14, 0xc6, 0xe3, 0xfe, 0xa5, 0x0c, 0xee, 0x9f, 0xa1, 0x11, 0x43, 0xd4, 0xc1, 0xae, 0x2c, 0xca, + 0x45, 0x48, 0x8e, 0xb8, 0x4c, 0x2c, 0x48, 0x11, 0x52, 0x57, 0x14, 0x26, 0xd8, 0x5c, 0xd5, 0x4a, + 0xab, 0x5e, 0x1c, 0xd5, 0x06, 0xd1, 0xb7, 0xe0, 0x39, 0x78, 0x92, 0x8e, 0x1d, 0x99, 0x02, 0x34, + 0x1b, 0x63, 0x9f, 0x00, 0xd5, 0x36, 0x75, 0x54, 0x35, 0xdd, 0x72, 0xe2, 0xdf, 0x39, 0xdf, 0xf7, + 0x1d, 0x1d, 0x78, 0xcc, 0x86, 0x4c, 0xf6, 0xa3, 0x1e, 0xcf, 0x46, 0x62, 0x36, 0xe6, 0x13, 0x15, + 0xbd, 0x5c, 0x74, 0xb9, 0x62, 0xd7, 0x51, 0xca, 0x27, 0x5c, 0x0e, 0x24, 0xcd, 0xa6, 0x42, 0x89, + 0x20, 0xd4, 0x1c, 0x75, 0x1c, 0xb5, 0x5c, 0xf3, 0x30, 0x15, 0xa9, 0xd0, 0x50, 0xb4, 0xfe, 0x32, + 0x7c, 0xf3, 0x68, 0xc7, 0xdc, 0x52, 0xb5, 0x87, 0xb2, 0xea, 0x53, 0xf1, 0x9c, 0x59, 0xaa, 0x5d, + 0x49, 0x65, 0x6c, 0xca, 0xc6, 0xd6, 0x22, 0xf9, 0x06, 0xb0, 0xd1, 0x31, 0xa6, 0xef, 0x36, 0x68, + 0xd0, 0x87, 0xd0, 0x35, 0x86, 0xa0, 0x05, 0x4e, 0xeb, 0x97, 0x98, 0xee, 0x48, 0x43, 0x5d, 0x53, + 0x7c, 0x32, 0xcf, 0xb1, 0xf7, 0x93, 0xe3, 0x52, 0xeb, 0x2a, 0xc7, 0x8d, 0x19, 0x1b, 0x8f, 0x6e, + 0x88, 0xfb, 0x47, 0x92, 0x12, 0x10, 0x74, 0xa1, 0xaf, 0x5d, 0xcb, 0xb0, 0xd6, 0xfa, 0x57, 0xa5, + 0xa2, 0x7d, 0xd3, 0xce, 0x9a, 0x8b, 0xcf, 0xac, 0x8a, 0x6d, 0x5b, 0xe5, 0xf8, 0xc0, 0x28, 0x98, + 0x9a, 0xbc, 0x7f, 0x62, 0x5f, 0x93, 0x32, 0xb1, 0x08, 0x29, 0x00, 0xfc, 0x6f, 0x33, 0x3e, 0x28, + 0xa6, 0x78, 0xf0, 0x0a, 0xeb, 0x6e, 0xbe, 0x0c, 0x81, 0x56, 0x3e, 0xdf, 0xa3, 0xbc, 0xbd, 0xa0, + 0x8d, 0x8b, 0xf2, 0x9c, 0x55, 0x8e, 0x83, 0xed, 0xb0, 0x92, 0x24, 0x65, 0x24, 0x78, 0x84, 0xbe, + 0x59, 0x7f, 0x58, 0xd3, 0x4b, 0x6d, 0x55, 0x8b, 0xde, 0x6b, 0x2e, 0xc6, 0x7f, 0x79, 0x4d, 0x9f, + 0xcb, 0x6b, 0x6a, 0x92, 0xd8, 0x87, 0xf8, 0x76, 0xbe, 0x44, 0x60, 0xb1, 0x44, 0xe0, 0x6b, 0x89, + 0xc0, 0x5b, 0x81, 0xbc, 0x45, 0x81, 0xbc, 0x8f, 0x02, 0x79, 0x4f, 0xed, 0x6c, 0x98, 0x52, 0x36, + 0x54, 0x74, 0xb0, 0xbe, 0xb6, 0x68, 0x22, 0x7a, 0x7c, 0xc7, 0x5d, 0x74, 0x7d, 0x7d, 0x11, 0x57, + 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0xef, 0xe6, 0xee, 0xde, 0x02, 0x00, 0x00, } func (m *GenesisDeployment) Marshal() (dAtA []byte, err error) { diff --git a/go/node/deployment/v1beta4/group.go b/go/node/deployment/v1beta4/group.go new file mode 100644 index 00000000..f411da27 --- /dev/null +++ b/go/node/deployment/v1beta4/group.go @@ -0,0 +1,3 @@ +package v1beta4 + +type Groups []Group diff --git a/go/node/deployment/v1beta4/group.pb.go b/go/node/deployment/v1beta4/group.pb.go index 2a8dbf5c..eff30561 100644 --- a/go/node/deployment/v1beta4/group.pb.go +++ b/go/node/deployment/v1beta4/group.pb.go @@ -5,11 +5,12 @@ package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/deployment/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,23 +24,23 @@ var _ = math.Inf // 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 +// GroupState is an enum which refers to state of group +type GroupState int32 const ( // Prefix should start with 0 in enum. So declaring dummy state - GroupStateInvalid Group_State = 0 + GroupStateInvalid GroupState = 0 // GroupOpen denotes state for group open - GroupOpen Group_State = 1 + GroupOpen GroupState = 1 // GroupOrdered denotes state for group ordered - GroupPaused Group_State = 2 + GroupPaused GroupState = 2 // GroupInsufficientFunds denotes state for group insufficient_funds - GroupInsufficientFunds Group_State = 3 + GroupInsufficientFunds GroupState = 3 // GroupClosed denotes state for group closed - GroupClosed Group_State = 4 + GroupClosed GroupState = 4 ) -var Group_State_name = map[int32]string{ +var GroupState_name = map[int32]string{ 0: "invalid", 1: "open", 2: "paused", @@ -47,7 +48,7 @@ var Group_State_name = map[int32]string{ 4: "closed", } -var Group_State_value = map[string]int32{ +var GroupState_value = map[string]int32{ "invalid": 0, "open": 1, "paused": 2, @@ -55,20 +56,20 @@ var Group_State_value = map[string]int32{ "closed": 4, } -func (x Group_State) String() string { - return proto.EnumName(Group_State_name, int32(x)) +func (x GroupState) String() string { + return proto.EnumName(GroupState_name, int32(x)) } -func (Group_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a45c04780ffee23e, []int{0, 0} +func (GroupState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a45c04780ffee23e, []int{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.v1beta4.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"` + ID v1.GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + State GroupState `protobuf:"varint,2,opt,name=state,proto3,enum=akash.deployment.v1beta4.GroupState" json:"state" yaml:"state"` + GroupSpec GroupSpec `protobuf:"bytes,3,opt,name=group_spec,json=groupSpec,proto3,castrepeated=GroupSpecs" 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{} } @@ -104,14 +105,14 @@ func (m *Group) XXX_DiscardUnknown() { var xxx_messageInfo_Group proto.InternalMessageInfo -func (m *Group) GetGroupID() GroupID { +func (m *Group) GetID() v1.GroupID { if m != nil { - return m.GroupID + return m.ID } - return GroupID{} + return v1.GroupID{} } -func (m *Group) GetState() Group_State { +func (m *Group) GetState() GroupState { if m != nil { return m.State } @@ -133,7 +134,7 @@ func (m *Group) GetCreatedAt() int64 { } func init() { - proto.RegisterEnum("akash.deployment.v1beta4.Group_State", Group_State_name, Group_State_value) + proto.RegisterEnum("akash.deployment.v1beta4.GroupState", GroupState_name, GroupState_value) proto.RegisterType((*Group)(nil), "akash.deployment.v1beta4.Group") } @@ -142,38 +143,37 @@ func init() { } var fileDescriptor_a45c04780ffee23e = []byte{ - // 487 bytes of a gzipped FileDescriptorProto + // 475 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, 0xc2, 0x74, 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, 0x3d, 0x74, - 0x80, 0xf2, 0xfd, 0x04, 0x13, 0x31, 0xe1, 0x47, 0x53, 0xc2, 0x64, 0x72, 0xf8, 0x68, 0x44, 0x24, - 0x7a, 0x92, 0x64, 0x33, 0x5e, 0x88, 0x58, 0xcc, 0xb8, 0xe4, 0xd0, 0xd5, 0x54, 0xfc, 0x97, 0x8a, - 0x2b, 0xca, 0xbb, 0x96, 0xf1, 0x8c, 0x6b, 0x28, 0x51, 0x5f, 0x86, 0xf7, 0x1e, 0x9c, 0x9d, 0x4a, - 0x71, 0xc5, 0x75, 0xce, 0xe6, 0x72, 0x41, 0x52, 0x43, 0x46, 0x9f, 0x1c, 0x50, 0x7f, 0xa5, 0x34, - 0xf8, 0x01, 0x5c, 0xd0, 0xe6, 0x90, 0x62, 0xd7, 0x0e, 0xed, 0x4e, 0xab, 0x7b, 0x27, 0xfe, 0x5f, - 0xbd, 0x58, 0x8f, 0xf4, 0x5f, 0xf4, 0xa2, 0xe3, 0x32, 0xb0, 0x96, 0x65, 0xd0, 0xa8, 0x84, 0x75, - 0x19, 0x6c, 0x51, 0xbc, 0x29, 0x83, 0xe6, 0x11, 0x9a, 0x4e, 0x76, 0x23, 0x8a, 0xa3, 0x41, 0x43, - 0xc7, 0xf6, 0x31, 0x7c, 0x0b, 0xea, 0xb9, 0x44, 0x92, 0xb8, 0x5b, 0xa1, 0xdd, 0xb9, 0xdc, 0xbd, - 0x7f, 0x4e, 0x7c, 0xbc, 0xa7, 0xe0, 0xde, 0xad, 0x75, 0x19, 0x98, 0xb9, 0x4d, 0x19, 0x5c, 0x34, - 0xb1, 0xfa, 0x18, 0x0d, 0x8c, 0x0c, 0x87, 0x00, 0x98, 0xe6, 0xea, 0x5e, 0x6e, 0x4d, 0x77, 0xbf, - 0x7b, 0x4e, 0xf8, 0x9e, 0x20, 0x69, 0x6f, 0x47, 0xb5, 0x5f, 0x97, 0x81, 0xa3, 0x06, 0x37, 0x65, - 0xd0, 0xaa, 0xd2, 0x05, 0x49, 0xa3, 0x41, 0x33, 0xfb, 0xc3, 0xc1, 0xdb, 0x00, 0xa4, 0x33, 0x82, - 0x24, 0xc1, 0x43, 0x24, 0x5d, 0x27, 0xb4, 0x3b, 0xb5, 0x41, 0xb3, 0x52, 0x9e, 0xc9, 0xe8, 0xbb, - 0x0d, 0xea, 0xba, 0x2b, 0x8c, 0x40, 0x83, 0xb2, 0x43, 0x34, 0xa1, 0xb8, 0x6d, 0x79, 0xd7, 0xe7, - 0x8b, 0xf0, 0xaa, 0xf9, 0x99, 0x32, 0xfb, 0xc6, 0x80, 0x37, 0x81, 0xc3, 0x05, 0x61, 0x6d, 0xdb, - 0xbb, 0x34, 0x5f, 0x84, 0x4d, 0x0d, 0xbc, 0x16, 0x84, 0xc1, 0x1d, 0xb0, 0x2d, 0x50, 0x91, 0x13, - 0xdc, 0xde, 0xf2, 0xae, 0xcc, 0x17, 0x61, 0x4b, 0x5b, 0x6f, 0xb4, 0x04, 0xbb, 0x00, 0x52, 0x96, - 0x17, 0xe3, 0x31, 0x4d, 0x29, 0x61, 0x72, 0x38, 0x2e, 0x18, 0xce, 0xdb, 0x35, 0xcf, 0x9b, 0x2f, - 0xc2, 0x1b, 0xe6, 0xf1, 0x4f, 0xd9, 0x2f, 0x95, 0xab, 0x02, 0xd3, 0x09, 0x57, 0x81, 0xce, 0xa9, - 0xc0, 0xe7, 0x5a, 0xf2, 0x9c, 0xcf, 0xdf, 0x7c, 0x6b, 0xd7, 0xf9, 0xf5, 0x35, 0xb0, 0x7a, 0xef, - 0x8e, 0x97, 0xbe, 0x7d, 0xb2, 0xf4, 0xed, 0x9f, 0x4b, 0xdf, 0xfe, 0xb2, 0xf2, 0xad, 0x93, 0x95, - 0x6f, 0xfd, 0x58, 0xf9, 0xd6, 0xfb, 0xa7, 0x19, 0x95, 0xfb, 0xc5, 0x28, 0x4e, 0xf9, 0x34, 0xd1, - 0x0f, 0xfa, 0x90, 0x11, 0xf9, 0x91, 0xcf, 0x0e, 0xaa, 0x13, 0x12, 0x34, 0xc9, 0x78, 0xc2, 0x38, - 0x26, 0xff, 0xd8, 0xb6, 0xd1, 0xb6, 0x5e, 0xb2, 0xc7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x77, - 0x1c, 0x32, 0xc6, 0x0e, 0x03, 0x00, 0x00, + 0x18, 0xc7, 0x93, 0x34, 0x77, 0xa8, 0x2e, 0x2f, 0xc5, 0xe2, 0x25, 0x18, 0x2e, 0x8e, 0xc2, 0x21, + 0x15, 0x86, 0x44, 0x14, 0xa6, 0x5b, 0x10, 0xe5, 0x04, 0xaa, 0x18, 0x40, 0x45, 0x2c, 0x2c, 0x95, + 0x2f, 0x76, 0x83, 0xd5, 0x36, 0xb6, 0x1a, 0xf7, 0xa4, 0xfb, 0x06, 0xa8, 0x13, 0x5f, 0xa0, 0x12, + 0x12, 0x1b, 0xdf, 0x01, 0xb1, 0xde, 0x78, 0x23, 0x53, 0x40, 0xed, 0x82, 0x3a, 0xf6, 0x13, 0x20, + 0x3b, 0x85, 0x76, 0x28, 0xdc, 0xe6, 0x3c, 0xff, 0x9f, 0x7f, 0x79, 0x1e, 0xf9, 0x01, 0xfb, 0xa4, + 0x4f, 0xf2, 0xf7, 0x31, 0x65, 0x72, 0x20, 0x4e, 0x86, 0x2c, 0x53, 0xf1, 0xf1, 0xc3, 0x23, 0xa6, + 0xc8, 0xe3, 0x38, 0x1d, 0x89, 0xb1, 0x8c, 0xe4, 0x48, 0x28, 0x01, 0x3d, 0x43, 0x45, 0x6b, 0x2a, + 0x5a, 0x51, 0xe8, 0x5a, 0x2a, 0x52, 0x61, 0xa0, 0x58, 0x9f, 0x4a, 0x1e, 0xe1, 0x2d, 0xd6, 0x4d, + 0x21, 0x6a, 0xfc, 0xff, 0xb7, 0xb9, 0x64, 0x49, 0x49, 0x86, 0xdf, 0x1c, 0xb0, 0xf3, 0x42, 0xd7, + 0xe0, 0x4b, 0xe0, 0x70, 0xea, 0xd9, 0x81, 0xdd, 0xa8, 0x35, 0xef, 0x44, 0x5b, 0x3a, 0x8a, 0x0c, + 0xd7, 0x3e, 0x6c, 0xed, 0x9d, 0x16, 0xd8, 0x9a, 0x15, 0xd8, 0x69, 0x1f, 0x2e, 0x0a, 0xec, 0x70, + 0xba, 0x2c, 0x70, 0xf5, 0x84, 0x0c, 0x07, 0x07, 0x21, 0xa7, 0x61, 0xc7, 0xe1, 0x14, 0xbe, 0x05, + 0x3b, 0xb9, 0x22, 0x8a, 0x79, 0x4e, 0x60, 0x37, 0x2e, 0x37, 0xf7, 0xa3, 0x7f, 0x4d, 0x58, 0x4a, + 0xdf, 0x68, 0xb6, 0x75, 0x6b, 0x51, 0xe0, 0xf2, 0xda, 0xb2, 0xc0, 0x17, 0x4b, 0xa1, 0xf9, 0x0c, + 0x3b, 0x65, 0x19, 0x0e, 0x01, 0x30, 0x03, 0x74, 0xf5, 0x04, 0x5e, 0xc5, 0xf4, 0x7a, 0xf7, 0x3c, + 0xb7, 0x64, 0x49, 0xeb, 0xbe, 0x6e, 0x79, 0x51, 0x60, 0x57, 0x5f, 0x5c, 0x16, 0xb8, 0xb6, 0xb2, + 0x4b, 0x96, 0x84, 0x5f, 0x7e, 0x60, 0xf0, 0x97, 0xcc, 0x3b, 0xd5, 0xf4, 0xcf, 0x19, 0xee, 0x01, + 0x90, 0x8c, 0x18, 0x51, 0x8c, 0x76, 0x89, 0xf2, 0xdc, 0xc0, 0x6e, 0x54, 0x3a, 0xd5, 0x55, 0xe5, + 0xa9, 0x3a, 0x70, 0x7f, 0x7d, 0xc2, 0xd6, 0x83, 0xaf, 0x36, 0x00, 0xeb, 0x21, 0x60, 0x08, 0x2e, + 0xf0, 0xec, 0x98, 0x0c, 0x38, 0xad, 0x5b, 0xe8, 0xfa, 0x64, 0x1a, 0x5c, 0x5d, 0x87, 0xed, 0x32, + 0x80, 0x37, 0x81, 0x2b, 0x24, 0xcb, 0xea, 0x36, 0xba, 0x34, 0x99, 0x06, 0x55, 0x03, 0xbc, 0x92, + 0x2c, 0x83, 0xb7, 0xc1, 0xae, 0x24, 0xe3, 0x9c, 0xd1, 0xba, 0x83, 0xae, 0x4c, 0xa6, 0x41, 0xcd, + 0x44, 0xaf, 0x4d, 0x09, 0x36, 0x01, 0xe4, 0x59, 0x3e, 0xee, 0xf5, 0x78, 0xc2, 0x59, 0xa6, 0xba, + 0xbd, 0x71, 0x46, 0xf3, 0x7a, 0x05, 0xa1, 0xc9, 0x34, 0xb8, 0x51, 0xbe, 0xcd, 0x46, 0xfc, 0x5c, + 0xa7, 0x5a, 0x98, 0x0c, 0x84, 0x16, 0xba, 0x1b, 0xc2, 0x67, 0xa6, 0x84, 0xdc, 0x0f, 0x9f, 0x7d, + 0xab, 0xf5, 0xe4, 0x74, 0xe6, 0xdb, 0x67, 0x33, 0xdf, 0xfe, 0x39, 0xf3, 0xed, 0x8f, 0x73, 0xdf, + 0x3a, 0x9b, 0xfb, 0xd6, 0xf7, 0xb9, 0x6f, 0xbd, 0xbb, 0x27, 0xfb, 0x69, 0x44, 0xfa, 0x2a, 0xe2, + 0x7a, 0xfb, 0xe2, 0x4c, 0x50, 0xb6, 0x65, 0xa5, 0x8e, 0x76, 0xcd, 0x26, 0x3d, 0xfa, 0x1d, 0x00, + 0x00, 0xff, 0xff, 0x95, 0x4d, 0x34, 0x78, 0xec, 0x02, 0x00, 0x00, } func (m *Group) Marshal() (dAtA []byte, err error) { @@ -217,7 +217,7 @@ func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x10 } { - size, err := m.GroupID.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -246,7 +246,7 @@ func (m *Group) Size() (n int) { } var l int _ = l - l = m.GroupID.Size() + l = m.ID.Size() n += 1 + l + sovGroup(uint64(l)) if m.State != 0 { n += 1 + sovGroup(uint64(m.State)) @@ -296,7 +296,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -323,7 +323,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.GroupID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -341,7 +341,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= Group_State(b&0x7F) << shift + m.State |= GroupState(b&0x7F) << shift if b < 0x80 { break } diff --git a/go/node/deployment/v1beta4/group_validation.go b/go/node/deployment/v1beta4/group_validation.go index 61c1d668..aa961127 100644 --- a/go/node/deployment/v1beta4/group_validation.go +++ b/go/node/deployment/v1beta4/group_validation.go @@ -2,12 +2,14 @@ package v1beta4 import ( "fmt" + + v1 "pkg.akt.io/go/node/deployment/v1" ) // ValidateDeploymentGroups does validation for all deployment groups func ValidateDeploymentGroups(gspecs []GroupSpec) error { if len(gspecs) == 0 { - return ErrInvalidGroups + return v1.ErrInvalidGroups } names := make(map[string]int, len(gspecs)) // Used as set diff --git a/go/node/deployment/v1beta4/groupmsg.pb.go b/go/node/deployment/v1beta4/groupmsg.pb.go index 5570e7d5..e1d9af54 100644 --- a/go/node/deployment/v1beta4/groupmsg.pb.go +++ b/go/node/deployment/v1beta4/groupmsg.pb.go @@ -5,11 +5,12 @@ package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/deployment/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +26,7 @@ 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"` + ID v1.GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` } func (m *MsgCloseGroup) Reset() { *m = MsgCloseGroup{} } @@ -61,11 +62,11 @@ func (m *MsgCloseGroup) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCloseGroup proto.InternalMessageInfo -func (m *MsgCloseGroup) GetID() GroupID { +func (m *MsgCloseGroup) GetID() v1.GroupID { if m != nil { return m.ID } - return GroupID{} + return v1.GroupID{} } // MsgCloseGroupResponse defines the Msg/CloseGroup response type. @@ -107,7 +108,7 @@ 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"` + ID v1.GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` } func (m *MsgPauseGroup) Reset() { *m = MsgPauseGroup{} } @@ -143,11 +144,11 @@ func (m *MsgPauseGroup) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPauseGroup proto.InternalMessageInfo -func (m *MsgPauseGroup) GetID() GroupID { +func (m *MsgPauseGroup) GetID() v1.GroupID { if m != nil { return m.ID } - return GroupID{} + return v1.GroupID{} } // MsgPauseGroupResponse defines the Msg/PauseGroup response type. @@ -189,7 +190,7 @@ 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"` + ID v1.GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` } func (m *MsgStartGroup) Reset() { *m = MsgStartGroup{} } @@ -225,11 +226,11 @@ func (m *MsgStartGroup) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStartGroup proto.InternalMessageInfo -func (m *MsgStartGroup) GetID() GroupID { +func (m *MsgStartGroup) GetID() v1.GroupID { if m != nil { return m.ID } - return GroupID{} + return v1.GroupID{} } // MsgStartGroupResponse defines the Msg/StartGroup response type. @@ -283,25 +284,24 @@ func init() { } var fileDescriptor_ec2e655b03e10552 = []byte{ - // 286 bytes of a gzipped FileDescriptorProto + // 268 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, 0xd1, 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, 0xa1, 0xc9, 0x81, 0x55, 0x68, 0x02, 0x00, 0x00, + 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd2, 0x07, 0xb1, 0x20, 0xea, 0xa5, 0xe4, 0xb1, 0x18, 0x0c, 0x31, + 0x13, 0xa2, 0x40, 0x29, 0x89, 0x8b, 0xd7, 0xb7, 0x38, 0xdd, 0x39, 0x27, 0xbf, 0x38, 0xd5, 0x1d, + 0x24, 0x2c, 0xe4, 0xcd, 0xc5, 0x94, 0x99, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa3, + 0x87, 0xc5, 0x3a, 0x3d, 0xb0, 0x3a, 0x4f, 0x17, 0x27, 0xd9, 0x13, 0xf7, 0xe4, 0x19, 0x1e, 0xdd, + 0x93, 0x67, 0xf2, 0x74, 0x79, 0x75, 0x4f, 0x9e, 0x29, 0x33, 0xe5, 0xd3, 0x3d, 0x79, 0xce, 0xca, + 0xc4, 0xdc, 0x1c, 0x2b, 0xa5, 0xcc, 0x14, 0xa5, 0x20, 0xa6, 0xcc, 0x14, 0x2b, 0x96, 0x17, 0x0b, + 0xe4, 0x19, 0x94, 0xc4, 0xb9, 0x44, 0x51, 0xec, 0x08, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, + 0x85, 0x5a, 0x1e, 0x90, 0x58, 0x4a, 0x73, 0xcb, 0x11, 0x76, 0xa0, 0x59, 0x1e, 0x5c, 0x92, 0x58, + 0x54, 0x42, 0x63, 0xcb, 0x11, 0x76, 0xc0, 0x2c, 0x77, 0xb2, 0x3f, 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, 0xd5, 0x82, 0xec, 0x74, 0xbd, 0xc4, 0xec, 0x12, 0xbd, 0x4c, 0x50, + 0x44, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0x62, 0x49, 0x17, 0x49, 0x6c, 0xe0, 0xe8, 0x33, 0x06, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xf4, 0xec, 0x9c, 0xb7, 0x3a, 0x02, 0x00, 0x00, } func (m *MsgCloseGroup) Marshal() (dAtA []byte, err error) { diff --git a/go/node/deployment/v1beta4/groupspec.go b/go/node/deployment/v1beta4/groupspec.go index e0f63585..0b5b9714 100644 --- a/go/node/deployment/v1beta4/groupspec.go +++ b/go/node/deployment/v1beta4/groupspec.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - types "github.com/akash-network/akash-api/go/node/types/resources/v1" + atypes "pkg.akt.io/go/node/audit/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" ) type ResourceGroup interface { @@ -16,14 +16,14 @@ type ResourceGroup interface { var _ ResourceGroup = (*GroupSpec)(nil) -type GroupSpecs []*GroupSpec +type GroupSpecs []GroupSpec func (gspecs GroupSpecs) Dup() GroupSpecs { res := make(GroupSpecs, 0, len(gspecs)) for _, gspec := range gspecs { gs := gspec.Dup() - res = append(res, &gs) + res = append(res, gs) } return res } @@ -32,7 +32,7 @@ func (g GroupSpec) Dup() GroupSpec { res := GroupSpec{ Name: g.Name, Requirements: g.Requirements.Dup(), - Resources: g.Resources, + Resources: g.Resources.Dup(), } return res @@ -73,7 +73,7 @@ func (g GroupSpec) Price() sdk.DecCoin { } // MatchResourcesRequirements check if resources attributes match provider's capabilities -func (g GroupSpec) MatchResourcesRequirements(pattr types.Attributes) bool { +func (g GroupSpec) MatchResourcesRequirements(pattr attr.Attributes) bool { for _, rgroup := range g.GetResourceUnits() { pgroup := pattr.GetCapabilitiesGroup("storage") for _, storage := range rgroup.Storage { @@ -123,7 +123,7 @@ func (g GroupSpec) MatchRequirements(provider []atypes.Provider) bool { 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) { + !attr.AttributesSubsetOf(g.Requirements.Attributes, existingAttr) { return false } } @@ -132,7 +132,7 @@ func (g GroupSpec) MatchRequirements(provider []atypes.Provider) bool { 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) { + attr.AttributesSubsetOf(g.Requirements.Attributes, existingAttr) { return true } } @@ -143,7 +143,7 @@ func (g GroupSpec) MatchRequirements(provider []atypes.Provider) bool { return true } - return types.AttributesSubsetOf(g.Requirements.Attributes, provider[0].Attributes) + return attr.AttributesSubsetOf(g.Requirements.Attributes, provider[0].Attributes) } // validate does validation for provided deployment group diff --git a/go/node/deployment/v1beta4/groupspec.pb.go b/go/node/deployment/v1beta4/groupspec.pb.go index 52f99c84..68632d9b 100644 --- a/go/node/deployment/v1beta4/groupspec.pb.go +++ b/go/node/deployment/v1beta4/groupspec.pb.go @@ -5,12 +5,12 @@ package v1beta4 import ( fmt "fmt" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,7 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// GroupSpec stores group specifications +// Spec stores group specifications type GroupSpec struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` Requirements v1.PlacementRequirements `protobuf:"bytes,2,opt,name=requirements,proto3" json:"requirements" yaml:"requirements"` @@ -73,31 +73,30 @@ func init() { } var fileDescriptor_bd2049f4b23a57e8 = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x3f, 0x4b, 0xfb, 0x40, - 0x18, 0xc7, 0x93, 0xf6, 0xc7, 0x0f, 0x9b, 0x2a, 0x48, 0x14, 0x0c, 0x1d, 0x72, 0x25, 0x83, 0x04, - 0x8a, 0x77, 0xb4, 0x8a, 0x43, 0xc1, 0x25, 0x8b, 0xab, 0x44, 0x44, 0x70, 0xbb, 0xa4, 0x47, 0x1a, - 0xda, 0xe4, 0xe2, 0xdd, 0xa5, 0x52, 0x70, 0x70, 0x74, 0xf4, 0x25, 0x74, 0xf6, 0x6d, 0xb8, 0x74, - 0xec, 0xe8, 0x14, 0xa5, 0x5d, 0xa4, 0x63, 0x5f, 0x81, 0xe4, 0x4f, 0x49, 0x0b, 0x76, 0xbb, 0xef, - 0xc3, 0xe7, 0x79, 0xbe, 0xdf, 0xe7, 0x1e, 0xc5, 0xc4, 0x03, 0xcc, 0xfb, 0xa8, 0x47, 0xa2, 0x21, - 0x1d, 0x07, 0x24, 0x14, 0x68, 0xd4, 0x76, 0x88, 0xc0, 0x17, 0xc8, 0x63, 0x34, 0x8e, 0x78, 0x44, - 0x5c, 0x18, 0x31, 0x2a, 0xa8, 0xaa, 0x65, 0x24, 0x2c, 0x49, 0x58, 0x90, 0x8d, 0x63, 0x8f, 0x7a, - 0x34, 0x83, 0x50, 0xfa, 0xca, 0xf9, 0x46, 0x31, 0xd9, 0xc1, 0x9c, 0x20, 0x2c, 0x04, 0xf3, 0x9d, - 0x58, 0x10, 0x8e, 0x46, 0xed, 0x52, 0x15, 0x64, 0x6b, 0x67, 0x06, 0x46, 0x38, 0x8d, 0x99, 0x4b, - 0xe2, 0xd0, 0x17, 0x39, 0x6c, 0x7c, 0x54, 0x94, 0xda, 0x75, 0x1a, 0xed, 0x36, 0x22, 0xae, 0xda, - 0x52, 0xfe, 0x85, 0x38, 0x20, 0x9a, 0xdc, 0x94, 0xcd, 0x9a, 0x75, 0xb2, 0x4c, 0x40, 0xa6, 0x57, - 0x09, 0xa8, 0x8f, 0x71, 0x30, 0xec, 0x1a, 0xa9, 0x32, 0xec, 0xac, 0xa8, 0xbe, 0xc8, 0xca, 0x3e, - 0x23, 0x8f, 0xb1, 0xcf, 0x48, 0xea, 0xc2, 0xb5, 0x4a, 0x53, 0x36, 0xeb, 0x1d, 0x04, 0xf3, 0xcd, - 0xd2, 0xa4, 0xb0, 0x4c, 0x0a, 0x47, 0x6d, 0x78, 0x33, 0xc4, 0x6e, 0xc6, 0xda, 0x1b, 0x6d, 0x56, - 0x6b, 0x9a, 0x00, 0x69, 0x99, 0x80, 0xad, 0x61, 0xab, 0x04, 0x1c, 0xe5, 0x96, 0x9b, 0x55, 0xc3, - 0xde, 0x82, 0xd4, 0x67, 0xa5, 0xb6, 0xde, 0x89, 0x6b, 0xd5, 0x66, 0xd5, 0xac, 0x77, 0x4e, 0xe1, - 0xae, 0x8f, 0x85, 0x76, 0x81, 0xde, 0x85, 0xbe, 0xb0, 0x2e, 0x0b, 0xd7, 0x72, 0xc0, 0x2a, 0x01, - 0x87, 0x6b, 0xcb, 0xa2, 0x64, 0xbc, 0x7f, 0x81, 0x83, 0xcd, 0x36, 0x6e, 0x97, 0x7c, 0x77, 0xef, - 0x75, 0x02, 0xa4, 0x9f, 0x09, 0x90, 0xac, 0xfb, 0xe9, 0x5c, 0x97, 0x67, 0x73, 0x5d, 0xfe, 0x9e, - 0xeb, 0xf2, 0xdb, 0x42, 0x97, 0x66, 0x0b, 0x5d, 0xfa, 0x5c, 0xe8, 0xd2, 0xc3, 0x95, 0xe7, 0x8b, - 0x7e, 0xec, 0x40, 0x97, 0x06, 0x28, 0x0b, 0x76, 0x16, 0x12, 0xf1, 0x44, 0xd9, 0xa0, 0x50, 0x38, - 0xf2, 0x91, 0x47, 0x51, 0x48, 0x7b, 0xe4, 0x8f, 0x8b, 0x39, 0xff, 0xb3, 0x2b, 0x9d, 0xff, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x44, 0x7d, 0x8c, 0x34, 0x58, 0x02, 0x00, 0x00, + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x3f, 0x4b, 0xc3, 0x40, + 0x18, 0xc6, 0x73, 0xad, 0x88, 0x4d, 0x15, 0x24, 0x0a, 0x86, 0x0e, 0xb9, 0x12, 0x50, 0x02, 0x85, + 0x3b, 0x5a, 0xc5, 0xa1, 0x8b, 0x90, 0xc5, 0x55, 0x22, 0x2e, 0x6e, 0x97, 0xf4, 0x88, 0xa1, 0x6d, + 0x2e, 0xde, 0x5d, 0x0a, 0x05, 0x07, 0x47, 0x47, 0x3f, 0x42, 0x67, 0xbf, 0x86, 0x4b, 0xc7, 0x8e, + 0x4e, 0x51, 0xda, 0x45, 0x3a, 0xf6, 0x13, 0x48, 0xfe, 0x94, 0xb4, 0x60, 0xb7, 0x7b, 0x5f, 0x7e, + 0xef, 0xfb, 0x3c, 0xef, 0x3d, 0xaa, 0x45, 0xfa, 0x44, 0x3c, 0xe1, 0x1e, 0x8d, 0x06, 0x6c, 0x3c, + 0xa4, 0xa1, 0xc4, 0xa3, 0xb6, 0x4b, 0x25, 0xb9, 0xc2, 0x3e, 0x67, 0x71, 0x24, 0x22, 0xea, 0xa1, + 0x88, 0x33, 0xc9, 0x34, 0x3d, 0x23, 0x51, 0x49, 0xa2, 0x82, 0x6c, 0x9c, 0xfa, 0xcc, 0x67, 0x19, + 0x84, 0xd3, 0x57, 0xce, 0x37, 0x8a, 0xcd, 0x2e, 0x11, 0x14, 0x13, 0x29, 0x79, 0xe0, 0xc6, 0x92, + 0x0a, 0x3c, 0x6a, 0x97, 0x55, 0x41, 0xb6, 0x76, 0x7a, 0xe0, 0x54, 0xb0, 0x98, 0x7b, 0x34, 0x0e, + 0x03, 0x99, 0xc3, 0xe6, 0x67, 0x45, 0xad, 0xdd, 0xa6, 0xd6, 0xee, 0x23, 0xea, 0x69, 0x2d, 0x75, + 0x2f, 0x24, 0x43, 0xaa, 0x83, 0x26, 0xb0, 0x6a, 0xf6, 0xd9, 0x32, 0x81, 0x59, 0xbd, 0x4a, 0x60, + 0x7d, 0x4c, 0x86, 0x83, 0xae, 0x99, 0x56, 0xa6, 0x93, 0x35, 0xb5, 0x57, 0xa0, 0x1e, 0x72, 0xfa, + 0x1c, 0x07, 0x9c, 0xa6, 0x2a, 0x42, 0xaf, 0x34, 0x81, 0x55, 0xef, 0x60, 0x94, 0x5f, 0x96, 0x3a, + 0x45, 0xa5, 0x53, 0x34, 0x6a, 0xa3, 0xbb, 0x01, 0xf1, 0x32, 0xd6, 0xd9, 0x18, 0xb3, 0x5b, 0xd3, + 0x04, 0x2a, 0xcb, 0x04, 0x6e, 0x2d, 0x5b, 0x25, 0xf0, 0x24, 0x97, 0xdc, 0xec, 0x9a, 0xce, 0x16, + 0xa4, 0xbd, 0xa8, 0xb5, 0xf5, 0x4d, 0x42, 0xaf, 0x36, 0xab, 0x56, 0xbd, 0x73, 0x81, 0x76, 0x7d, + 0x2c, 0x72, 0x0a, 0xf4, 0x21, 0x0c, 0xa4, 0x7d, 0x5d, 0xa8, 0x96, 0x0b, 0x56, 0x09, 0x3c, 0x5e, + 0x4b, 0x16, 0x2d, 0xf3, 0xe3, 0x1b, 0x1e, 0x6d, 0x8e, 0x09, 0xa7, 0xe4, 0xbb, 0x07, 0x6f, 0x13, + 0xa8, 0xfc, 0x4e, 0xa0, 0x62, 0xdf, 0x4c, 0xe7, 0x06, 0x98, 0xcd, 0x0d, 0xf0, 0x33, 0x37, 0xc0, + 0xfb, 0xc2, 0x50, 0x66, 0x0b, 0x43, 0xf9, 0x5a, 0x18, 0xca, 0xe3, 0x79, 0xd4, 0xf7, 0x11, 0xe9, + 0x4b, 0x14, 0xa4, 0x69, 0xe2, 0x90, 0xf5, 0xe8, 0x3f, 0xc9, 0xb8, 0xfb, 0x59, 0x1a, 0x97, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x33, 0x7c, 0xf0, 0xc0, 0x40, 0x02, 0x00, 0x00, } func (m *GroupSpec) Marshal() (dAtA []byte, err error) { diff --git a/go/node/deployment/v1beta4/id.go b/go/node/deployment/v1beta4/id.go deleted file mode 100644 index 39b86b3c..00000000 --- a/go/node/deployment/v1beta4/id.go +++ /dev/null @@ -1,103 +0,0 @@ -package v1beta4 - -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/v1beta4/key.go b/go/node/deployment/v1beta4/key.go deleted file mode 100644 index 23c29325..00000000 --- a/go/node/deployment/v1beta4/key.go +++ /dev/null @@ -1,20 +0,0 @@ -package v1beta4 - -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/v1beta4/migrate/v1beta3.go b/go/node/deployment/v1beta4/migrate/v1beta3.go index 5c04ff61..1b241596 100644 --- a/go/node/deployment/v1beta4/migrate/v1beta3.go +++ b/go/node/deployment/v1beta4/migrate/v1beta3.go @@ -2,9 +2,11 @@ package migrate import ( "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - amigrate "github.com/akash-network/akash-api/go/node/types/attributes/v1/migrate" - rmigrate "github.com/akash-network/akash-api/go/node/types/resources/v1/migrate" + + v1migrate "pkg.akt.io/go/node/deployment/v1/migrate" + "pkg.akt.io/go/node/deployment/v1beta4" + amigrate "pkg.akt.io/go/node/types/attributes/v1/migrate" + rmigrate "pkg.akt.io/go/node/types/resources/v1beta4/migrate" ) func ResourceUnitFromV1Beta3(id uint32, from v1beta3.ResourceUnit) v1beta4.ResourceUnit { @@ -25,14 +27,6 @@ func ResourcesUnitsFromV1Beta3(from []v1beta3.ResourceUnit) v1beta4.ResourceUnit return res } -func GroupIDFromV1Beta3(from v1beta3.GroupID) v1beta4.GroupID { - return v1beta4.GroupID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - } -} - func GroupSpecFromV1Beta3(from v1beta3.GroupSpec) v1beta4.GroupSpec { return v1beta4.GroupSpec{ Name: from.Name, @@ -43,8 +37,8 @@ func GroupSpecFromV1Beta3(from v1beta3.GroupSpec) v1beta4.GroupSpec { func GroupFromV1Beta3(from v1beta3.Group) v1beta4.Group { return v1beta4.Group{ - GroupID: GroupIDFromV1Beta3(from.GroupID), - State: v1beta4.Group_State(from.State), + ID: v1migrate.GroupIDFromV1Beta3(from.GroupID), + State: v1beta4.GroupState(from.State), GroupSpec: GroupSpecFromV1Beta3(from.GroupSpec), CreatedAt: from.CreatedAt, } diff --git a/go/node/deployment/v1beta4/msgs.go b/go/node/deployment/v1beta4/msgs.go index 0aceb9c8..14e629f9 100644 --- a/go/node/deployment/v1beta4/msgs.go +++ b/go/node/deployment/v1beta4/msgs.go @@ -1,18 +1,20 @@ package v1beta4 import ( + cerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + v1 "pkg.akt.io/go/node/deployment/v1" ) const ( - MsgTypeCreateDeployment = "create-deployment" - MsgTypeDepositDeployment = "deposit-deployment" - MsgTypeUpdateDeployment = "update-deployment" - MsgTypeCloseDeployment = "close-deployment" - MsgTypeCloseGroup = "close-group" - MsgTypePauseGroup = "pause-group" - MsgTypeStartGroup = "start-group" + MsgTypeCreateDeployment = "create-deployment" + MsgTypeUpdateDeployment = "update-deployment" + MsgTypeCloseDeployment = "close-deployment" + MsgTypeCloseGroup = "close-group" + MsgTypePauseGroup = "pause-group" + MsgTypeStartGroup = "start-group" ) var ( @@ -20,30 +22,30 @@ var ( ) // NewMsgCreateDeployment creates a new MsgCreateDeployment instance -func NewMsgCreateDeployment(id DeploymentID, groups []GroupSpec, version []byte, +func NewMsgCreateDeployment(id v1.DeploymentID, groups []GroupSpec, hash []byte, deposit sdk.Coin, depositor sdk.AccAddress) *MsgCreateDeployment { return &MsgCreateDeployment{ ID: id, Groups: groups, - Version: version, + Hash: hash, Deposit: deposit, Depositor: depositor.String(), } } // Route implements the sdk.Msg interface -func (msg MsgCreateDeployment) Route() string { return RouterKey } +func (msg *MsgCreateDeployment) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface -func (msg MsgCreateDeployment) Type() string { return MsgTypeCreateDeployment } +func (msg *MsgCreateDeployment) Type() string { return MsgTypeCreateDeployment } -// GetSignBytes encodes the message for signing -func (msg MsgCreateDeployment) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} +// // 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 { +func (msg *MsgCreateDeployment) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) @@ -53,7 +55,7 @@ func (msg MsgCreateDeployment) GetSigners() []sdk.AccAddress { } // ValidateBasic does basic validation like check owner and groups length -func (msg MsgCreateDeployment) ValidateBasic() error { +func (msg *MsgCreateDeployment) ValidateBasic() error { if err := msg.ID.Validate(); err != nil { return err } @@ -61,15 +63,15 @@ func (msg MsgCreateDeployment) ValidateBasic() error { return err } if len(msg.Groups) == 0 { - return ErrInvalidGroups + return v1.ErrInvalidGroups } - if len(msg.Version) == 0 { - return ErrEmptyVersion + if len(msg.Hash) == 0 { + return v1.ErrEmptyHash } - if len(msg.Version) != ManifestVersionLength { - return ErrInvalidVersion + if len(msg.Hash) != v1.HashLength { + return v1.ErrInvalidHash } for _, gs := range msg.Groups { @@ -81,105 +83,57 @@ func (msg MsgCreateDeployment) ValidateBasic() error { // deposit must be same denom as price if !msg.Deposit.IsZero() { if gdenom := gs.Price().Denom; gdenom != msg.Deposit.Denom { - return sdkerrors.Wrapf(ErrInvalidDeposit, "Mismatched denominations (%v != %v)", msg.Deposit.Denom, gdenom) + return cerrors.Wrapf(v1.ErrInvalidDeposit, "Mismatched denominations (%v != %v)", msg.Deposit.Denom, gdenom) } } } _, 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 cerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreateDeployment: Invalid Depositor Address") } return nil } // NewMsgUpdateDeployment creates a new MsgUpdateDeployment instance -func NewMsgUpdateDeployment(id DeploymentID, version []byte) *MsgUpdateDeployment { +func NewMsgUpdateDeployment(id v1.DeploymentID, version []byte) *MsgUpdateDeployment { return &MsgUpdateDeployment{ - ID: id, - Version: version, + ID: id, + Hash: version, } } // Route implements the sdk.Msg interface -func (msg MsgUpdateDeployment) Route() string { return RouterKey } +func (msg *MsgUpdateDeployment) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface -func (msg MsgUpdateDeployment) Type() string { return MsgTypeUpdateDeployment } +func (msg *MsgUpdateDeployment) Type() string { return MsgTypeUpdateDeployment } // ValidateBasic does basic validation -func (msg MsgUpdateDeployment) ValidateBasic() error { +func (msg *MsgUpdateDeployment) ValidateBasic() error { if err := msg.ID.Validate(); err != nil { return err } - if len(msg.Version) == 0 { - return ErrEmptyVersion + if len(msg.Hash) == 0 { + return v1.ErrEmptyHash } - if len(msg.Version) != ManifestVersionLength { - return ErrInvalidVersion + if len(msg.Hash) != v1.HashLength { + return v1.ErrInvalidHash } return nil } -// GetSignBytes encodes the message for signing -func (msg MsgUpdateDeployment) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} +// // 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 { +func (msg *MsgUpdateDeployment) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) @@ -189,33 +143,33 @@ func (msg MsgUpdateDeployment) GetSigners() []sdk.AccAddress { } // NewMsgCloseDeployment creates a new MsgCloseDeployment instance -func NewMsgCloseDeployment(id DeploymentID) *MsgCloseDeployment { +func NewMsgCloseDeployment(id v1.DeploymentID) *MsgCloseDeployment { return &MsgCloseDeployment{ ID: id, } } // Route implements the sdk.Msg interface -func (msg MsgCloseDeployment) Route() string { return RouterKey } +func (msg *MsgCloseDeployment) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface -func (msg MsgCloseDeployment) Type() string { return MsgTypeCloseDeployment } +func (msg *MsgCloseDeployment) Type() string { return MsgTypeCloseDeployment } // ValidateBasic does basic validation with deployment details -func (msg MsgCloseDeployment) ValidateBasic() error { +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)) -} +// // 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 { +func (msg *MsgCloseDeployment) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) @@ -225,33 +179,33 @@ func (msg MsgCloseDeployment) GetSigners() []sdk.AccAddress { } // NewMsgCloseGroup creates a new MsgCloseGroup instance -func NewMsgCloseGroup(id GroupID) *MsgCloseGroup { +func NewMsgCloseGroup(id v1.GroupID) *MsgCloseGroup { return &MsgCloseGroup{ ID: id, } } // Route implements the sdk.Msg interface for routing -func (msg MsgCloseGroup) Route() string { return RouterKey } +func (msg *MsgCloseGroup) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface exposing message type -func (msg MsgCloseGroup) Type() string { return MsgTypeCloseGroup } +func (msg *MsgCloseGroup) Type() string { return MsgTypeCloseGroup } // ValidateBasic calls underlying GroupID.Validate() check and returns result -func (msg MsgCloseGroup) ValidateBasic() error { +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)) -} +// // 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 { +func (msg *MsgCloseGroup) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) @@ -261,33 +215,33 @@ func (msg MsgCloseGroup) GetSigners() []sdk.AccAddress { } // NewMsgPauseGroup creates a new MsgPauseGroup instance -func NewMsgPauseGroup(id GroupID) *MsgPauseGroup { +func NewMsgPauseGroup(id v1.GroupID) *MsgPauseGroup { return &MsgPauseGroup{ ID: id, } } // Route implements the sdk.Msg interface for routing -func (msg MsgPauseGroup) Route() string { return RouterKey } +func (msg *MsgPauseGroup) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface exposing message type -func (msg MsgPauseGroup) Type() string { return MsgTypePauseGroup } +func (msg *MsgPauseGroup) Type() string { return MsgTypePauseGroup } // ValidateBasic calls underlying GroupID.Validate() check and returns result -func (msg MsgPauseGroup) ValidateBasic() error { +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)) -} +// // 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 { +func (msg *MsgPauseGroup) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) @@ -297,33 +251,33 @@ func (msg MsgPauseGroup) GetSigners() []sdk.AccAddress { } // NewMsgStartGroup creates a new MsgStartGroup instance -func NewMsgStartGroup(id GroupID) *MsgStartGroup { +func NewMsgStartGroup(id v1.GroupID) *MsgStartGroup { return &MsgStartGroup{ ID: id, } } // Route implements the sdk.Msg interface for routing -func (msg MsgStartGroup) Route() string { return RouterKey } +func (msg *MsgStartGroup) Route() string { return v1.RouterKey } // Type implements the sdk.Msg interface exposing message type -func (msg MsgStartGroup) Type() string { return MsgTypeStartGroup } +func (msg *MsgStartGroup) Type() string { return MsgTypeStartGroup } // ValidateBasic calls underlying GroupID.Validate() check and returns result -func (msg MsgStartGroup) ValidateBasic() error { +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)) -} +// // 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 { +func (msg *MsgStartGroup) GetSigners() []sdk.AccAddress { owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) diff --git a/go/node/deployment/v1beta4/msgs_test.go b/go/node/deployment/v1beta4/msgs_test.go index 6d4099a2..02b05a58 100644 --- a/go/node/deployment/v1beta4/msgs_test.go +++ b/go/node/deployment/v1beta4/msgs_test.go @@ -6,9 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - testutil "github.com/akash-network/akash-api/go/node/client/testutil/v1beta3" - types "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - sdktestutil "github.com/akash-network/akash-api/go/testutil" + v1 "pkg.akt.io/go/node/deployment/v1" + types "pkg.akt.io/go/node/deployment/v1beta4" + tutil "pkg.akt.io/go/testutil" + testutil "pkg.akt.io/go/testutil/v1beta3" ) type testMsg struct { @@ -20,60 +21,60 @@ func TestVersionValidation(t *testing.T) { tests := []testMsg{ { msg: &types.MsgCreateDeployment{ - ID: testutil.DeploymentID(t), - Version: testutil.DeploymentVersion(t), - Groups: []types.GroupSpec{ - testutil.GroupSpec(t), + ID: tutil.DeploymentID(t), + Hash: tutil.DeploymentVersion(t), + Groups: types.GroupSpecs{ + tutil.GroupSpec(t), }, - Depositor: testutil.AccAddress(t).String(), - Deposit: sdktestutil.AkashCoin(t, 0), + Depositor: tutil.AccAddress(t).String(), + Deposit: tutil.AkashCoin(t, 0), }, err: nil, }, { msg: &types.MsgCreateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte(""), + ID: testutil.DeploymentID(t), + Hash: []byte(""), Groups: []types.GroupSpec{ testutil.GroupSpec(t), }, - Depositor: testutil.AccAddress(t).String(), - Deposit: sdktestutil.AkashCoin(t, 0), + Depositor: tutil.AccAddress(t).String(), + Deposit: tutil.AkashCoin(t, 0), }, - err: types.ErrEmptyVersion, + err: v1.ErrEmptyHash, }, { msg: &types.MsgCreateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte("invalidversion"), + ID: testutil.DeploymentID(t), + Hash: []byte("invalidversion"), Groups: []types.GroupSpec{ testutil.GroupSpec(t), }, - Depositor: testutil.AccAddress(t).String(), - Deposit: sdktestutil.AkashCoin(t, 0), + Depositor: tutil.AccAddress(t).String(), + Deposit: tutil.AkashCoin(t, 0), }, - err: types.ErrInvalidVersion, + err: v1.ErrInvalidHash, }, { msg: &types.MsgUpdateDeployment{ - ID: testutil.DeploymentID(t), - Version: testutil.DeploymentVersion(t), + ID: testutil.DeploymentID(t), + Hash: testutil.DeploymentVersion(t), }, err: nil, }, { msg: &types.MsgUpdateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte(""), + ID: testutil.DeploymentID(t), + Hash: []byte(""), }, - err: types.ErrEmptyVersion, + err: v1.ErrEmptyHash, }, { msg: &types.MsgUpdateDeployment{ - ID: testutil.DeploymentID(t), - Version: []byte("invalidversion"), + ID: testutil.DeploymentID(t), + Hash: []byte("invalidversion"), }, - err: types.ErrInvalidVersion, + err: v1.ErrInvalidHash, }, } diff --git a/go/node/deployment/v1beta4/params.go b/go/node/deployment/v1beta4/params.go index cf485eed..43f2f46a 100644 --- a/go/node/deployment/v1beta4/params.go +++ b/go/node/deployment/v1beta4/params.go @@ -6,6 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + v1 "pkg.akt.io/go/node/deployment/v1" ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -50,7 +52,7 @@ func (p Params) ValidateDeposit(amt sdk.Coin) error { return nil } - return fmt.Errorf("%w: Deposit too low - %v < %v", ErrInvalidDeposit, amt.Amount, min) + return fmt.Errorf("%w: Deposit too low - %v < %v", v1.ErrInvalidDeposit, amt.Amount, min) } func (p Params) MinDepositFor(denom string) (sdk.Coin, error) { @@ -60,13 +62,13 @@ func (p Params) MinDepositFor(denom string) (sdk.Coin, error) { } } - return sdk.NewInt64Coin(denom, math.MaxInt64), fmt.Errorf("%w: Invalid deposit denomination %v", ErrInvalidDeposit, denom) + return sdk.NewInt64Coin(denom, math.MaxInt64), fmt.Errorf("%w: Invalid deposit denomination %v", v1.ErrInvalidDeposit, denom) } func validateMinDeposits(i interface{}) error { vals, ok := i.(sdk.Coins) if !ok { - return fmt.Errorf("%w: Min Deposits - invalid type: %T", ErrInvalidParam, i) + return fmt.Errorf("%w: Min Deposits - invalid type: %T", v1.ErrInvalidParam, i) } check := make(map[string]bool) @@ -79,12 +81,12 @@ func validateMinDeposits(i interface{}) error { check[minDeposit.Denom] = true if minDeposit.Amount.Uint64() >= math.MaxInt32 { - return fmt.Errorf("%w: Min Deposit (%v) - too large: %v", ErrInvalidParam, minDeposit.Denom, minDeposit.Amount.Uint64()) + return fmt.Errorf("%w: Min Deposit (%v) - too large: %v", v1.ErrInvalidParam, minDeposit.Denom, minDeposit.Amount.Uint64()) } } if _, exists := check["uakt"]; !exists { - return fmt.Errorf("%w: Min Deposits - uakt not given: %#v", ErrInvalidParam, vals) + return fmt.Errorf("%w: Min Deposits - uakt not given: %#v", v1.ErrInvalidParam, vals) } return nil diff --git a/go/node/deployment/v1beta4/params.pb.go b/go/node/deployment/v1beta4/params.pb.go index 54dc604b..a2a8eaba 100644 --- a/go/node/deployment/v1beta4/params.pb.go +++ b/go/node/deployment/v1beta4/params.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -79,7 +79,7 @@ func init() { } var fileDescriptor_31b8da9fdb2b2cf0 = []byte{ - // 292 bytes of a gzipped FileDescriptorProto + // 283 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, 0xd1, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, @@ -93,12 +93,11 @@ var fileDescriptor_31b8da9fdb2b2cf0 = []byte{ 0x75, 0x4f, 0x1e, 0xc5, 0x94, 0x4f, 0xf7, 0xe4, 0x85, 0x2b, 0x13, 0x73, 0x73, 0xac, 0x94, 0x90, 0x45, 0x95, 0x56, 0xdd, 0x97, 0xd7, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xba, 0x12, 0x42, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x83, - 0xad, 0x29, 0x0e, 0xe2, 0xce, 0x45, 0x98, 0xef, 0x14, 0x7e, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, + 0xad, 0x29, 0x0e, 0xe2, 0xce, 0x45, 0x98, 0xef, 0x64, 0x7f, 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, 0xb6, 0x48, 0x06, 0x82, 0x83, 0x49, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, - 0x28, 0x1b, 0xca, 0x4b, 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0xc5, 0x12, - 0xce, 0x49, 0x6c, 0xe0, 0x10, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x95, 0x27, 0x43, - 0x8a, 0x01, 0x00, 0x00, + 0xc7, 0x72, 0x0c, 0x51, 0xaa, 0x05, 0xd9, 0xe9, 0x7a, 0x89, 0xd9, 0x25, 0x7a, 0x99, 0xa0, 0x20, + 0xd0, 0xcf, 0xcb, 0x4f, 0x49, 0xc5, 0x12, 0x9e, 0x49, 0x6c, 0x60, 0x9f, 0x1b, 0x03, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xe1, 0x81, 0x04, 0x04, 0x72, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/go/node/deployment/v1beta4/query.pb.go b/go/node/deployment/v1beta4/query.pb.go index 597b8bca..6fdb46c4 100644 --- a/go/node/deployment/v1beta4/query.pb.go +++ b/go/node/deployment/v1beta4/query.pb.go @@ -6,11 +6,10 @@ package v1beta4 import ( context "context" fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/escrow/v1beta3" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -18,6 +17,8 @@ import ( io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/deployment/v1" + v11 "pkg.akt.io/go/node/escrow/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -139,7 +140,7 @@ func (m *QueryDeploymentsResponse) GetPagination() *query.PageResponse { // QueryDeploymentRequest is request type for the Query/Deployment RPC method type QueryDeploymentRequest struct { - ID DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` + ID v1.DeploymentID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` } func (m *QueryDeploymentRequest) Reset() { *m = QueryDeploymentRequest{} } @@ -175,18 +176,18 @@ func (m *QueryDeploymentRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDeploymentRequest proto.InternalMessageInfo -func (m *QueryDeploymentRequest) GetID() DeploymentID { +func (m *QueryDeploymentRequest) GetID() v1.DeploymentID { if m != nil { return m.ID } - return DeploymentID{} + return v1.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"` + Deployment v1.Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment" yaml:"deployment"` + Groups Groups `protobuf:"bytes,2,rep,name=groups,proto3,castrepeated=Groups" json:"groups" yaml:"groups"` + EscrowAccount v11.Account `protobuf:"bytes,3,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` } func (m *QueryDeploymentResponse) Reset() { *m = QueryDeploymentResponse{} } @@ -222,30 +223,30 @@ func (m *QueryDeploymentResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDeploymentResponse proto.InternalMessageInfo -func (m *QueryDeploymentResponse) GetDeployment() Deployment { +func (m *QueryDeploymentResponse) GetDeployment() v1.Deployment { if m != nil { return m.Deployment } - return Deployment{} + return v1.Deployment{} } -func (m *QueryDeploymentResponse) GetGroups() []Group { +func (m *QueryDeploymentResponse) GetGroups() Groups { if m != nil { return m.Groups } return nil } -func (m *QueryDeploymentResponse) GetEscrowAccount() v1beta3.Account { +func (m *QueryDeploymentResponse) GetEscrowAccount() v11.Account { if m != nil { return m.EscrowAccount } - return v1beta3.Account{} + return v11.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"` + ID v1.GroupID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` } func (m *QueryGroupRequest) Reset() { *m = QueryGroupRequest{} } @@ -281,11 +282,11 @@ func (m *QueryGroupRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGroupRequest proto.InternalMessageInfo -func (m *QueryGroupRequest) GetID() GroupID { +func (m *QueryGroupRequest) GetID() v1.GroupID { if m != nil { return m.ID } - return GroupID{} + return v1.GroupID{} } // QueryGroupResponse is response type for the Query/Group RPC method @@ -347,50 +348,50 @@ func init() { } var fileDescriptor_17bc7a7d7b435f28 = []byte{ - // 684 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, 0x49, - 0x4a, 0x7f, 0x3c, 0x24, 0x61, 0x55, 0xd4, 0x05, 0x56, 0xd4, 0xaa, 0xb0, 0xa1, 0xde, 0x80, 0x10, - 0x12, 0x72, 0x92, 0xa9, 0x6b, 0x35, 0xf1, 0xb8, 0x9e, 0x09, 0x55, 0xb6, 0x3c, 0x01, 0x88, 0x17, - 0x60, 0x83, 0x84, 0x58, 0xb0, 0xe2, 0x21, 0xba, 0xac, 0x84, 0x90, 0x58, 0x05, 0x94, 0xb0, 0x40, - 0x2c, 0x58, 0xf4, 0x09, 0x90, 0x67, 0x26, 0xb5, 0x21, 0x49, 0x93, 0xec, 0x12, 0xcf, 0xb9, 0xe7, - 0x9c, 0x7b, 0xcf, 0x1d, 0x1b, 0x2c, 0xbb, 0x87, 0x2e, 0x3d, 0x40, 0x75, 0x1c, 0x36, 0x48, 0xbb, - 0x89, 0x03, 0x86, 0x5e, 0x14, 0xab, 0x98, 0xb9, 0x77, 0xd1, 0x51, 0x0b, 0x47, 0x6d, 0x2b, 0x8c, - 0x08, 0x23, 0x50, 0xe3, 0x28, 0x2b, 0x41, 0x59, 0x12, 0x95, 0xbb, 0xec, 0x11, 0x8f, 0x70, 0x10, - 0x8a, 0x7f, 0x09, 0x7c, 0xee, 0xba, 0x47, 0x88, 0xd7, 0xc0, 0xc8, 0x0d, 0x7d, 0xe4, 0x06, 0x01, - 0x61, 0x2e, 0xf3, 0x49, 0x40, 0xe5, 0xe9, 0x6a, 0x8d, 0xd0, 0x26, 0xa1, 0xa8, 0xea, 0x52, 0x2c, - 0x64, 0xa4, 0x68, 0x11, 0x85, 0xae, 0xe7, 0x07, 0x1c, 0x2c, 0xb1, 0xb7, 0x47, 0xfa, 0x4b, 0x99, - 0x11, 0xd0, 0xd1, 0xad, 0x78, 0x11, 0x69, 0x85, 0x12, 0x95, 0xbf, 0x18, 0xe5, 0xd7, 0x25, 0x6e, - 0x49, 0xe0, 0x30, 0xad, 0x45, 0xe4, 0x58, 0x62, 0xca, 0x88, 0xb5, 0x43, 0x2c, 0xdb, 0x30, 0x3f, - 0x2a, 0xe0, 0xea, 0x5e, 0xec, 0xbe, 0x72, 0xce, 0x45, 0x1d, 0x7c, 0xd4, 0xc2, 0x94, 0xc1, 0x87, - 0xe0, 0xbf, 0x7d, 0xbf, 0xc1, 0x70, 0x44, 0x35, 0x65, 0x49, 0x59, 0xc9, 0x96, 0xd6, 0xac, 0x51, - 0x23, 0xb4, 0x92, 0xf2, 0x6d, 0x51, 0x62, 0xcf, 0x9e, 0x74, 0x8c, 0x8c, 0xd3, 0x67, 0x80, 0xdb, - 0x00, 0x24, 0x73, 0xd1, 0x54, 0xce, 0x97, 0xb7, 0xc4, 0x10, 0xad, 0x78, 0x88, 0x96, 0xc8, 0x4a, - 0x0e, 0xd1, 0x7a, 0xe4, 0x7a, 0x58, 0x1a, 0x71, 0x52, 0x95, 0xe6, 0x17, 0x05, 0x68, 0x83, 0x86, - 0x69, 0x48, 0x02, 0x8a, 0x61, 0x08, 0xb2, 0x89, 0xb7, 0xd8, 0xf5, 0xcc, 0x4a, 0xb6, 0x54, 0x1c, - 0xed, 0xfa, 0x1f, 0xa2, 0x3e, 0x8f, 0x7d, 0x2d, 0xf6, 0xfe, 0xe1, 0x9b, 0x71, 0x69, 0xf0, 0x8c, - 0x3a, 0x69, 0x09, 0xb8, 0x33, 0xa4, 0xad, 0xc2, 0xd8, 0xb6, 0x04, 0xd5, 0x5f, 0x7d, 0x3d, 0x03, - 0x57, 0x06, 0xdc, 0x88, 0x18, 0x6c, 0xa0, 0xfa, 0x75, 0x99, 0x40, 0x7e, 0x92, 0x04, 0x76, 0x2b, - 0x36, 0x88, 0x1b, 0xe8, 0x76, 0x0c, 0x75, 0xb7, 0xe2, 0xa8, 0x7e, 0xdd, 0xfc, 0xa4, 0x0e, 0xc4, - 0x7c, 0x3e, 0xb4, 0x26, 0x00, 0x09, 0x9d, 0xd4, 0x59, 0x9e, 0x44, 0xc7, 0x2e, 0xc4, 0x2a, 0xbf, - 0x3a, 0x46, 0xaa, 0xfe, 0xac, 0x63, 0x2c, 0xb6, 0xdd, 0x66, 0x63, 0xd3, 0x4c, 0x9e, 0x99, 0x4e, - 0x0a, 0x00, 0x9f, 0x80, 0x79, 0xbe, 0xa4, 0x54, 0x53, 0x79, 0x3c, 0xc6, 0x68, 0xa9, 0x9d, 0x18, - 0x67, 0x1b, 0x52, 0x45, 0x96, 0x9d, 0x75, 0x8c, 0x05, 0xa1, 0x20, 0xfe, 0x9b, 0x8e, 0x3c, 0x80, - 0x0f, 0xc0, 0xff, 0x62, 0xd3, 0x9f, 0xbb, 0xb5, 0x1a, 0x69, 0x05, 0x4c, 0x9b, 0xe1, 0xcd, 0xdc, - 0x90, 0x0a, 0xe2, 0x50, 0xb2, 0x97, 0xad, 0xfb, 0x02, 0x24, 0x17, 0x75, 0x41, 0x9c, 0xca, 0x87, - 0x9b, 0xb3, 0x3f, 0xdf, 0x1a, 0x19, 0xd3, 0x01, 0x8b, 0x7c, 0x6a, 0xdc, 0x48, 0x3f, 0x8f, 0xad, - 0x54, 0x1e, 0x37, 0xc7, 0x98, 0x1f, 0x12, 0xc5, 0x1e, 0x80, 0x69, 0x4e, 0x19, 0xc2, 0x3d, 0x30, - 0xc7, 0xbb, 0x90, 0xbc, 0x63, 0x87, 0x22, 0x4c, 0x8b, 0x9a, 0xd2, 0xef, 0x19, 0x30, 0xc7, 0x39, - 0xe1, 0x7b, 0x05, 0x64, 0x53, 0x17, 0x03, 0x4e, 0xbe, 0xfb, 0xfd, 0x5b, 0x9f, 0x2b, 0x4d, 0x53, - 0x22, 0xdc, 0x9b, 0xa5, 0x97, 0x9f, 0x7f, 0xbc, 0x51, 0xd7, 0xe1, 0x2a, 0x9a, 0xe0, 0x4d, 0x47, - 0x51, 0xc3, 0xa7, 0x0c, 0xbe, 0x53, 0x00, 0x48, 0xb8, 0xe0, 0x9d, 0x29, 0x6e, 0xa9, 0x30, 0x3a, - 0xfd, 0xbd, 0x9e, 0xd6, 0xa7, 0x1f, 0xec, 0x13, 0xf8, 0x5a, 0x01, 0x73, 0x7c, 0xe6, 0x70, 0x6d, - 0x8c, 0x60, 0x7a, 0x4b, 0x72, 0xeb, 0x93, 0x81, 0xa5, 0xb1, 0x0d, 0x6e, 0xac, 0x00, 0x6f, 0xa1, - 0x8b, 0xdf, 0xec, 0xc2, 0x93, 0xfd, 0xf8, 0xa4, 0xab, 0x2b, 0xa7, 0x5d, 0x5d, 0xf9, 0xde, 0xd5, - 0x95, 0x57, 0x3d, 0x3d, 0x73, 0xda, 0xd3, 0x33, 0x5f, 0x7b, 0x7a, 0xe6, 0xe9, 0x96, 0xe7, 0xb3, - 0x83, 0x56, 0xd5, 0xaa, 0x91, 0xa6, 0xa0, 0xda, 0x08, 0x30, 0x3b, 0x26, 0xd1, 0xa1, 0xfc, 0x17, - 0x7f, 0xcc, 0x3c, 0x82, 0x02, 0x52, 0xc7, 0x43, 0x44, 0xaa, 0xf3, 0xfc, 0xab, 0x50, 0xfe, 0x13, - 0x00, 0x00, 0xff, 0xff, 0x08, 0x86, 0xe1, 0x65, 0x52, 0x07, 0x00, 0x00, + // 680 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcf, 0x6b, 0x13, 0x41, + 0x18, 0xcd, 0x6e, 0x7f, 0x08, 0x13, 0x2a, 0x74, 0x14, 0x5d, 0xd2, 0xb2, 0x5b, 0x17, 0xfb, 0x43, + 0xab, 0x3b, 0x36, 0x7a, 0x90, 0x8a, 0x88, 0x4b, 0x6d, 0x29, 0x22, 0xd8, 0xbd, 0x08, 0x5e, 0x64, + 0x92, 0x4c, 0xb7, 0x4b, 0xd3, 0x9d, 0x6d, 0x66, 0xa3, 0xe4, 0xea, 0xd9, 0x83, 0xe0, 0x3f, 0x50, + 0xf0, 0xd6, 0x83, 0x27, 0xff, 0x88, 0x1e, 0x0b, 0x22, 0x78, 0x4a, 0x24, 0xf1, 0x20, 0x1e, 0xfb, + 0x17, 0xc8, 0xce, 0x4c, 0xba, 0xa3, 0xd9, 0x4d, 0x9a, 0x5b, 0xb2, 0xdf, 0xfb, 0xde, 0x7b, 0xdf, + 0xfb, 0x66, 0x76, 0xc1, 0x4d, 0xbc, 0x8f, 0xd9, 0x1e, 0xaa, 0x91, 0xa8, 0x4e, 0x5b, 0x07, 0x24, + 0x8c, 0xd1, 0xdb, 0xb5, 0x0a, 0x89, 0xf1, 0x03, 0x74, 0xd8, 0x24, 0x8d, 0x96, 0x13, 0x35, 0x68, + 0x4c, 0xa1, 0xc1, 0x51, 0x4e, 0x8a, 0x72, 0x24, 0xaa, 0x74, 0xd5, 0xa7, 0x3e, 0xe5, 0x20, 0x94, + 0xfc, 0x12, 0xf8, 0xd2, 0xbc, 0x4f, 0xa9, 0x5f, 0x27, 0x08, 0x47, 0x01, 0xc2, 0x61, 0x48, 0x63, + 0x1c, 0x07, 0x34, 0x64, 0xb2, 0x7a, 0xbb, 0x4a, 0xd9, 0x01, 0x65, 0xa8, 0x82, 0x19, 0x11, 0x32, + 0x52, 0x74, 0x0d, 0x45, 0xd8, 0x0f, 0x42, 0x0e, 0x96, 0xd8, 0xa5, 0x5c, 0x7f, 0xbb, 0x41, 0x3d, + 0x26, 0x8d, 0x3e, 0x67, 0xfe, 0x1c, 0x7e, 0x83, 0x36, 0xa3, 0x21, 0x28, 0xe5, 0x9f, 0x44, 0x59, + 0x59, 0x28, 0x95, 0x66, 0x4e, 0x00, 0x08, 0xab, 0x36, 0xe8, 0xbb, 0xa4, 0x18, 0xb7, 0x22, 0x22, + 0x9d, 0xd8, 0x5f, 0x34, 0x70, 0x7d, 0x27, 0x19, 0x6a, 0xe3, 0xbc, 0x9f, 0x79, 0xe4, 0xb0, 0x49, + 0x58, 0x0c, 0x9f, 0x83, 0x4b, 0xd2, 0xb6, 0xa1, 0x2d, 0x68, 0x2b, 0xc5, 0xf2, 0xaa, 0x93, 0x97, + 0xac, 0x93, 0xb6, 0x6f, 0x8a, 0x16, 0x77, 0xf2, 0xa4, 0x6d, 0x15, 0xbc, 0x3e, 0x03, 0xdc, 0x04, + 0x20, 0x8d, 0xcb, 0xd0, 0x39, 0xdf, 0x92, 0x23, 0xb2, 0x75, 0x92, 0x6c, 0x1d, 0xb1, 0x42, 0x99, + 0xad, 0xf3, 0x12, 0xfb, 0x44, 0x1a, 0xf1, 0x94, 0x4e, 0xfb, 0xbb, 0x06, 0x8c, 0x41, 0xc3, 0x2c, + 0xa2, 0x21, 0x23, 0x30, 0x02, 0xc5, 0xd4, 0x5b, 0xe2, 0x7a, 0x62, 0xa5, 0x58, 0x5e, 0xcb, 0x77, + 0xfd, 0x1f, 0x51, 0x9f, 0xc7, 0x9d, 0x4b, 0xbc, 0x1f, 0x77, 0xac, 0x2b, 0x83, 0x35, 0xe6, 0xa9, + 0x12, 0x70, 0x2b, 0x63, 0xac, 0xe5, 0x91, 0x63, 0x09, 0xaa, 0x7f, 0xe6, 0x7a, 0x05, 0xae, 0x0d, + 0xb8, 0x11, 0x6b, 0x78, 0x0c, 0xf4, 0xa0, 0x26, 0x37, 0x70, 0x23, 0x6b, 0x16, 0x25, 0xfc, 0xed, + 0x0d, 0x17, 0x24, 0xde, 0xbb, 0x6d, 0x4b, 0xdf, 0xde, 0xf0, 0xf4, 0xa0, 0x66, 0x7f, 0xd5, 0x07, + 0x36, 0x7c, 0x9e, 0xd7, 0x1e, 0x00, 0x29, 0x93, 0x94, 0xb0, 0x46, 0x48, 0xb8, 0xcb, 0x89, 0xc0, + 0x9f, 0xb6, 0xa5, 0xb4, 0x9e, 0xb5, 0xad, 0xd9, 0x16, 0x3e, 0xa8, 0xaf, 0xdb, 0xe9, 0x33, 0xdb, + 0x53, 0x00, 0xb0, 0x02, 0xa6, 0xf9, 0x99, 0x64, 0x86, 0xce, 0x97, 0x62, 0xe5, 0x2f, 0x65, 0x2b, + 0xc1, 0xb9, 0xb7, 0xa4, 0x8a, 0x6c, 0x3b, 0x6b, 0x5b, 0x33, 0x42, 0x41, 0xfc, 0xb7, 0x8f, 0x3b, + 0xd6, 0x34, 0x47, 0x32, 0x4f, 0x42, 0xe0, 0x33, 0x70, 0x59, 0x1c, 0xf2, 0x37, 0xb8, 0x5a, 0xa5, + 0xcd, 0x30, 0x36, 0x26, 0xf8, 0x44, 0x86, 0xd4, 0x12, 0xc5, 0x64, 0x9a, 0xa7, 0xa2, 0x2e, 0xcf, + 0xe8, 0x8c, 0x28, 0xc8, 0x87, 0xeb, 0x93, 0xbf, 0x8f, 0xac, 0x82, 0xfd, 0x02, 0xcc, 0xf2, 0xd4, + 0xb8, 0x46, 0x7f, 0x15, 0x0f, 0x95, 0x55, 0xcc, 0x67, 0xe6, 0xc4, 0xe1, 0x19, 0x5b, 0xd8, 0x01, + 0x50, 0xa5, 0x93, 0xf9, 0x3f, 0x02, 0x53, 0xdc, 0xfb, 0xb0, 0xe8, 0xd5, 0x50, 0x84, 0x5f, 0xd1, + 0x53, 0xee, 0x4c, 0x80, 0x29, 0xce, 0x09, 0x3f, 0x6b, 0xa0, 0xa8, 0x5c, 0x07, 0x78, 0xf1, 0x13, + 0xdf, 0xbf, 0xeb, 0xa5, 0xf2, 0x38, 0x2d, 0xc2, 0xbd, 0x7d, 0xf7, 0xfd, 0xb7, 0x5f, 0x9f, 0xf4, + 0x65, 0xb8, 0x88, 0x86, 0xbf, 0xa8, 0x18, 0xaa, 0x07, 0x2c, 0x86, 0x47, 0x1a, 0x00, 0x29, 0x0d, + 0xbc, 0x37, 0xc6, 0xb5, 0x14, 0x1e, 0xc7, 0xbf, 0xc8, 0x63, 0x58, 0x0c, 0xc2, 0x5d, 0x0a, 0x3f, + 0x68, 0x60, 0x8a, 0x27, 0x0d, 0x57, 0x47, 0x68, 0xa9, 0xc7, 0xa2, 0x74, 0xe7, 0x62, 0x60, 0xe9, + 0x69, 0x85, 0x7b, 0xb2, 0xe1, 0x02, 0xca, 0x7d, 0x73, 0x0b, 0x3b, 0xee, 0x93, 0x93, 0xae, 0xa9, + 0x9d, 0x76, 0x4d, 0xed, 0x67, 0xd7, 0xd4, 0x3e, 0xf6, 0xcc, 0xc2, 0x69, 0xcf, 0x2c, 0xfc, 0xe8, + 0x99, 0x85, 0xd7, 0x8b, 0xd1, 0xbe, 0xef, 0xe0, 0xfd, 0xd8, 0x09, 0x92, 0x2f, 0x19, 0x0a, 0x69, + 0x8d, 0x64, 0x7c, 0x4d, 0x2a, 0xd3, 0xfc, 0x25, 0x7f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x1c, 0x19, 0x49, 0x7a, 0x38, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/node/deployment/v1beta4/query.pb.gw.go b/go/node/deployment/v1beta4/query.pb.gw.go index 0a194700..1d0fcba6 100644 --- a/go/node/deployment/v1beta4/query.pb.gw.go +++ b/go/node/deployment/v1beta4/query.pb.gw.go @@ -321,11 +321,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta4", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1", "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", "v1beta4", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1", "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", "v1beta4", "groups", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1", "groups", "info"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/deployment/v1beta4/resourcelimits.go b/go/node/deployment/v1beta4/resourcelimits.go index 63b62926..a5258025 100644 --- a/go/node/deployment/v1beta4/resourcelimits.go +++ b/go/node/deployment/v1beta4/resourcelimits.go @@ -1,21 +1,21 @@ package v1beta4 import ( - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) type resourceLimits struct { - cpu sdk.Int - gpu sdk.Int - memory sdk.Int - storage []sdk.Int + cpu sdkmath.Int + gpu sdkmath.Int + memory sdkmath.Int + storage []sdkmath.Int } func newLimits() resourceLimits { return resourceLimits{ - cpu: sdk.ZeroInt(), - gpu: sdk.ZeroInt(), - memory: sdk.ZeroInt(), + cpu: sdkmath.ZeroInt(), + gpu: sdkmath.ZeroInt(), + memory: sdkmath.ZeroInt(), } } diff --git a/go/node/deployment/v1beta4/resourceunit.go b/go/node/deployment/v1beta4/resourceunit.go index ee383f60..e1969d3c 100644 --- a/go/node/deployment/v1beta4/resourceunit.go +++ b/go/node/deployment/v1beta4/resourceunit.go @@ -3,9 +3,10 @@ package v1beta4 import ( "fmt" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - types "github.com/akash-network/akash-api/go/node/types/resources/v1" + types "pkg.akt.io/go/node/types/resources/v1beta4" ) // FullPrice method returns full price of resource @@ -41,7 +42,7 @@ func (r *ResourceUnit) totalResources() resourceLimits { limits.gpu = limits.gpu.Add(r.GPU.Units.Val) limits.memory = limits.memory.Add(r.Memory.Quantity.Val) - storage := make([]sdk.Int, 0, len(r.Storage)) + storage := make([]sdkmath.Int, 0, len(r.Storage)) for _, vol := range r.Storage { storage = append(storage, vol.Quantity.Val) diff --git a/go/node/deployment/v1beta4/resourceunit.pb.go b/go/node/deployment/v1beta4/resourceunit.pb.go index 5ab54dc6..551e4170 100644 --- a/go/node/deployment/v1beta4/resourceunit.pb.go +++ b/go/node/deployment/v1beta4/resourceunit.pb.go @@ -5,13 +5,13 @@ package v1beta4 import ( fmt "fmt" - v1 "github.com/akash-network/akash-api/go/node/types/resources/v1" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1beta4 "pkg.akt.io/go/node/types/resources/v1beta4" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,9 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ResourceUnit extends Resources and adds Count along with the Price type ResourceUnit struct { - v1.Resources `protobuf:"bytes,1,opt,name=resource,proto3,embedded=resource" json:"resource" yaml:"resource"` - 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"` + v1beta4.Resources `protobuf:"bytes,1,opt,name=resource,proto3,embedded=resource" json:"resource" yaml:"resource"` + 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 *ResourceUnit) Reset() { *m = ResourceUnit{} } @@ -88,29 +88,29 @@ func init() { } var fileDescriptor_d48c54f3414ff9e1 = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4a, 0xc3, 0x40, - 0x1c, 0xc6, 0x73, 0xd5, 0x8a, 0xc4, 0x8a, 0x10, 0x1c, 0x62, 0xd1, 0xa4, 0x64, 0x69, 0x41, 0xbc, - 0x23, 0xea, 0x54, 0x70, 0x89, 0xbe, 0x80, 0x01, 0x11, 0xdc, 0x92, 0xf4, 0x48, 0x43, 0x9b, 0xfb, - 0x87, 0xdc, 0xa5, 0xd2, 0xd1, 0x37, 0xf0, 0x11, 0x7c, 0x9c, 0x8e, 0x1d, 0x9d, 0x82, 0xb4, 0x8b, - 0x74, 0xec, 0x13, 0x48, 0xee, 0xd2, 0x66, 0x71, 0xcb, 0xf7, 0xdd, 0xf7, 0xfd, 0xf8, 0xee, 0xa2, - 0x5f, 0x07, 0x93, 0x80, 0x8f, 0xc9, 0x88, 0x66, 0x53, 0x98, 0xa7, 0x94, 0x09, 0x32, 0x73, 0x43, - 0x2a, 0x82, 0x7b, 0x92, 0x53, 0x0e, 0x45, 0x1e, 0xd1, 0x82, 0x25, 0x02, 0x67, 0x39, 0x08, 0x30, - 0x4c, 0x19, 0xc6, 0x4d, 0x18, 0xd7, 0xe1, 0xee, 0x79, 0x0c, 0x31, 0xc8, 0x10, 0xa9, 0xbe, 0x54, - 0xbe, 0xdb, 0x57, 0xf0, 0x30, 0xe0, 0x74, 0x8f, 0xe3, 0x64, 0xe6, 0x36, 0xa2, 0x0e, 0x5a, 0x11, - 0xf0, 0x14, 0xb8, 0x4a, 0x2a, 0xa6, 0x4b, 0x22, 0x48, 0x98, 0x3a, 0x77, 0x3e, 0x5a, 0x7a, 0xc7, - 0xaf, 0x3b, 0x2f, 0x2c, 0x11, 0x46, 0xac, 0x1f, 0xef, 0x18, 0x26, 0xea, 0xa1, 0xc1, 0xc9, 0xad, - 0x83, 0xd5, 0xb8, 0x0a, 0x81, 0x1b, 0xfe, 0xcc, 0xc5, 0xbb, 0x22, 0xf7, 0xfa, 0x8b, 0xd2, 0xd6, - 0x96, 0xa5, 0x8d, 0x36, 0xa5, 0xbd, 0xef, 0x6f, 0x4b, 0xfb, 0x6c, 0x1e, 0xa4, 0xd3, 0xa1, 0xb3, - 0x73, 0x1c, 0x7f, 0x7f, 0x68, 0x10, 0xbd, 0x1d, 0x41, 0xc1, 0x84, 0xd9, 0xea, 0xa1, 0xc1, 0xa9, - 0x77, 0xb1, 0x29, 0x6d, 0x65, 0x6c, 0x4b, 0xbb, 0xa3, 0x6a, 0x52, 0x3a, 0xbe, 0xb2, 0x8d, 0x67, - 0xbd, 0x9d, 0xe5, 0x49, 0x44, 0xcd, 0x03, 0x39, 0xeb, 0x12, 0xab, 0xab, 0xa9, 0x5d, 0xf5, 0xd5, - 0xf0, 0x13, 0x8d, 0x1e, 0x21, 0x61, 0xde, 0x55, 0x35, 0xa8, 0x42, 0xca, 0x4a, 0x83, 0x94, 0xd2, - 0xf1, 0x95, 0x3d, 0x3c, 0xfc, 0xfd, 0xb2, 0x91, 0xf7, 0xba, 0x58, 0x59, 0x68, 0xb9, 0xb2, 0xd0, - 0xcf, 0xca, 0x42, 0x9f, 0x6b, 0x4b, 0x5b, 0xae, 0x2d, 0xed, 0x7b, 0x6d, 0x69, 0x6f, 0x0f, 0x71, - 0x22, 0xc6, 0x45, 0x88, 0x23, 0x48, 0x89, 0x7c, 0x84, 0x1b, 0x46, 0xc5, 0x3b, 0xe4, 0x93, 0x5a, - 0x05, 0x59, 0x42, 0x62, 0x20, 0x0c, 0x46, 0xf4, 0x9f, 0x1f, 0x1d, 0x1e, 0xc9, 0x37, 0xbe, 0xfb, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x67, 0x96, 0x3e, 0x5e, 0x0b, 0x02, 0x00, 0x00, + // 338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4a, 0xc3, 0x30, + 0x1c, 0xc6, 0x9b, 0xe9, 0x44, 0xea, 0x44, 0x28, 0x1e, 0xea, 0xd0, 0x64, 0x14, 0x64, 0x03, 0x25, + 0x61, 0xea, 0x69, 0x17, 0xa1, 0xfa, 0x02, 0x16, 0xbc, 0x78, 0xeb, 0xba, 0x30, 0xcb, 0xb6, 0xfc, + 0x4b, 0x93, 0x09, 0x7b, 0x01, 0xcf, 0x3e, 0x82, 0x8f, 0xb3, 0xe3, 0x8e, 0x9e, 0x8a, 0x6c, 0x17, + 0xd9, 0x71, 0x4f, 0x20, 0x4d, 0xd2, 0xed, 0xa0, 0xb7, 0xe4, 0xfb, 0xff, 0xbe, 0x2f, 0x1f, 0xff, + 0xb8, 0x57, 0xf1, 0x28, 0x96, 0xaf, 0x6c, 0xc0, 0xb3, 0x31, 0xcc, 0x26, 0x5c, 0x28, 0xf6, 0xd6, + 0xed, 0x73, 0x15, 0xdf, 0xb1, 0x9c, 0x4b, 0x98, 0xe6, 0x09, 0x9f, 0x8a, 0x54, 0xd1, 0x2c, 0x07, + 0x05, 0x9e, 0xaf, 0x61, 0xba, 0x83, 0xa9, 0x85, 0x9b, 0xa7, 0x43, 0x18, 0x82, 0x86, 0x58, 0x79, + 0x32, 0x7c, 0x13, 0x27, 0x20, 0x27, 0x20, 0x59, 0x3f, 0x96, 0xdc, 0xe6, 0x76, 0x59, 0x02, 0xa9, + 0xb0, 0xf3, 0x6b, 0xf3, 0xb8, 0x1e, 0x57, 0xcf, 0xc9, 0x3f, 0x05, 0xa4, 0xa1, 0x83, 0xf7, 0x9a, + 0xdb, 0x88, 0xac, 0xf6, 0x2c, 0x52, 0xe5, 0x8d, 0xdd, 0xc3, 0x8a, 0xf1, 0x51, 0x0b, 0x75, 0x8e, + 0x6e, 0xda, 0xd4, 0x34, 0x2c, 0x13, 0xe9, 0xce, 0x6f, 0x13, 0x69, 0xe5, 0x96, 0x61, 0x7b, 0x5e, + 0x10, 0x67, 0x51, 0x10, 0xb4, 0x2e, 0xc8, 0x36, 0x64, 0x53, 0x90, 0x93, 0x59, 0x3c, 0x19, 0xf7, + 0x82, 0x4a, 0x09, 0xa2, 0xed, 0xd0, 0x63, 0x6e, 0x3d, 0x81, 0xa9, 0x50, 0x7e, 0xad, 0x85, 0x3a, + 0xc7, 0xe1, 0xd9, 0xba, 0x20, 0x46, 0xd8, 0x14, 0xa4, 0x61, 0x6c, 0xfa, 0x1a, 0x44, 0x46, 0xf6, + 0x9e, 0xdc, 0x7a, 0x96, 0xa7, 0x09, 0xf7, 0xf7, 0x74, 0xb7, 0x73, 0x6a, 0xb6, 0x61, 0xca, 0xd9, + 0x6d, 0xd0, 0x47, 0x9e, 0x3c, 0x40, 0x2a, 0xc2, 0x8b, 0xb2, 0x50, 0x19, 0xa9, 0x2d, 0xbb, 0x48, + 0x7d, 0x0d, 0x22, 0x23, 0xf7, 0xf6, 0x7f, 0x3e, 0x09, 0x0a, 0xef, 0xe7, 0x4b, 0x8c, 0x16, 0x4b, + 0x8c, 0xbe, 0x97, 0x18, 0x7d, 0xac, 0xb0, 0xb3, 0x58, 0x61, 0xe7, 0x6b, 0x85, 0x9d, 0x97, 0xcb, + 0x6c, 0x34, 0xa4, 0xf1, 0x48, 0xd1, 0xb4, 0xfc, 0x07, 0x26, 0x60, 0xc0, 0xff, 0xf9, 0xda, 0xfe, + 0x81, 0x5e, 0xe8, 0xed, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0x8d, 0xd1, 0xcf, 0xfd, 0x01, + 0x00, 0x00, } func (this *ResourceUnit) Equal(that interface{}) bool { diff --git a/go/node/deployment/v1beta4/service.pb.go b/go/node/deployment/v1beta4/service.pb.go index a5641122..8a825e85 100644 --- a/go/node/deployment/v1beta4/service.pb.go +++ b/go/node/deployment/v1beta4/service.pb.go @@ -6,12 +6,14 @@ package v1beta4 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + 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" + v1 "pkg.akt.io/go/node/deployment/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -30,28 +32,29 @@ func init() { } var fileDescriptor_2013a754c1800268 = []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, - 0x80, 0xc2, 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, 0xfb, 0x75, 0x74, 0x9a, 0xbd, 0x47, 0x28, 0x79, 0x74, 0xf1, 0xb9, 0x0d, 0xbc, - 0x4e, 0xf9, 0x8c, 0x04, 0x62, 0x56, 0x11, 0x66, 0x3b, 0x97, 0x3c, 0xac, 0xd6, 0x71, 0xb0, 0xa4, - 0xe3, 0x60, 0xb6, 0x73, 0x6d, 0xb9, 0xb6, 0x55, 0x3a, 0x0e, 0x96, 0x74, 0x1c, 0xfc, 0xee, 0x9c, - 0xdf, 0xbe, 0x46, 0xa4, 0xb9, 0x89, 0x48, 0xf3, 0x3d, 0x22, 0xcd, 0xe7, 0x98, 0x34, 0x36, 0x31, - 0x69, 0xbc, 0xc5, 0xa4, 0x71, 0x77, 0x26, 0x7c, 0x3b, 0x0b, 0xc7, 0x74, 0x22, 0x97, 0x2c, 0x19, - 0xda, 0x0b, 0xc0, 0x3e, 0x48, 0x3d, 0xdf, 0x5e, 0x71, 0xe5, 0x33, 0x21, 0x59, 0x20, 0xa7, 0xf0, - 0xc7, 0x79, 0x1c, 0xb7, 0x92, 0x73, 0x78, 0xfc, 0x11, 0x00, 0x00, 0xff, 0xff, 0x99, 0x1b, 0x7d, - 0x02, 0x22, 0x04, 0x00, 0x00, + // 339 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd3, 0x3d, 0x4e, 0xc3, 0x30, + 0x14, 0xc0, 0xf1, 0x46, 0x88, 0x0e, 0x5e, 0x28, 0x59, 0x40, 0x96, 0xf0, 0x06, 0x15, 0xa8, 0xd8, + 0x2a, 0x94, 0x19, 0x89, 0x56, 0x62, 0xaa, 0x84, 0x40, 0x2c, 0x6c, 0x6e, 0x6b, 0x4c, 0xd5, 0x8f, + 0x67, 0x62, 0xb7, 0x2a, 0x1b, 0x47, 0xe0, 0x0c, 0x9c, 0x80, 0x63, 0x30, 0x76, 0x64, 0x44, 0xcd, + 0xc0, 0x35, 0x50, 0x02, 0xc4, 0x21, 0x24, 0x24, 0x99, 0x22, 0x25, 0xbf, 0xbc, 0xbf, 0x5e, 0x14, + 0xa3, 0x3d, 0x3e, 0xe2, 0xfa, 0x8e, 0x0d, 0x84, 0x1a, 0xc3, 0xc3, 0x44, 0x4c, 0x0d, 0x9b, 0x37, + 0x7b, 0xc2, 0xf0, 0x16, 0xd3, 0xc2, 0x9b, 0x0f, 0xfb, 0x82, 0x2a, 0x0f, 0x0c, 0xb8, 0xdb, 0xa1, + 0xa3, 0xd6, 0xd1, 0x6f, 0x87, 0xb7, 0xfa, 0xa0, 0x27, 0xa0, 0xd9, 0x44, 0x4b, 0x36, 0x6f, 0x06, + 0x97, 0xaf, 0x57, 0x70, 0x23, 0x73, 0xb4, 0xbd, 0x65, 0x75, 0x3d, 0x53, 0x4b, 0x0f, 0x66, 0xca, + 0xc2, 0x9d, 0x14, 0x68, 0xab, 0x47, 0xcf, 0x55, 0xb4, 0xd6, 0xd5, 0xd2, 0x5d, 0xa0, 0x5a, 0xdb, + 0x13, 0xdc, 0x88, 0x4e, 0x04, 0xdd, 0x43, 0x9a, 0xb5, 0x05, 0xed, 0x6a, 0x99, 0xe4, 0xf8, 0xa4, + 0x14, 0xbf, 0x14, 0x5a, 0xc1, 0x54, 0x0b, 0xf7, 0x1e, 0x6d, 0x76, 0x84, 0x02, 0x3d, 0x34, 0xb1, + 0xf4, 0x7e, 0xda, 0xac, 0x60, 0xcc, 0x1f, 0x8a, 0x9b, 0x85, 0x69, 0x94, 0x5c, 0xa0, 0xda, 0xb5, + 0x1a, 0x94, 0x59, 0x36, 0xc9, 0x73, 0x96, 0x4d, 0xf2, 0xa8, 0x3c, 0x43, 0x1b, 0xed, 0x31, 0xe8, + 0x78, 0xb8, 0xf1, 0xff, 0x67, 0xfb, 0xad, 0x71, 0xab, 0x8c, 0x8e, 0xb2, 0xb7, 0x08, 0x85, 0x8f, + 0xce, 0x83, 0x7f, 0xc3, 0xad, 0xe7, 0xcf, 0x08, 0x21, 0x66, 0x05, 0x61, 0xbc, 0x73, 0xc1, 0x67, + 0xc5, 0x3a, 0x16, 0xe6, 0x74, 0x2c, 0x8c, 0x77, 0xae, 0x0c, 0xf7, 0x4c, 0x91, 0x8e, 0x85, 0x39, + 0x1d, 0x0b, 0x7f, 0x3a, 0x78, 0xfd, 0xf1, 0xe3, 0xe5, 0xc0, 0x39, 0x3b, 0x7d, 0x5d, 0x11, 0x67, + 0xb9, 0x22, 0xce, 0xfb, 0x8a, 0x38, 0x4f, 0x3e, 0xa9, 0x2c, 0x7d, 0x52, 0x79, 0xf3, 0x49, 0xe5, + 0x66, 0x57, 0x8d, 0x24, 0xe5, 0x23, 0x43, 0x87, 0xc0, 0x24, 0xb0, 0x29, 0x0c, 0x44, 0xca, 0x99, + 0xec, 0x55, 0xc3, 0xc3, 0x76, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x90, 0x9d, 0xc1, 0xee, 0x3f, + 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -69,7 +72,7 @@ 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) + DepositDeployment(ctx context.Context, in *v1.MsgDepositDeployment, opts ...grpc.CallOption) (*v1.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. @@ -99,8 +102,8 @@ func (c *msgClient) CreateDeployment(ctx context.Context, in *MsgCreateDeploymen return out, nil } -func (c *msgClient) DepositDeployment(ctx context.Context, in *MsgDepositDeployment, opts ...grpc.CallOption) (*MsgDepositDeploymentResponse, error) { - out := new(MsgDepositDeploymentResponse) +func (c *msgClient) DepositDeployment(ctx context.Context, in *v1.MsgDepositDeployment, opts ...grpc.CallOption) (*v1.MsgDepositDeploymentResponse, error) { + out := new(v1.MsgDepositDeploymentResponse) err := c.cc.Invoke(ctx, "/akash.deployment.v1beta4.Msg/DepositDeployment", in, out, opts...) if err != nil { return nil, err @@ -158,7 +161,7 @@ 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) + DepositDeployment(context.Context, *v1.MsgDepositDeployment) (*v1.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. @@ -178,7 +181,7 @@ 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) { +func (*UnimplementedMsgServer) DepositDeployment(ctx context.Context, req *v1.MsgDepositDeployment) (*v1.MsgDepositDeploymentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositDeployment not implemented") } func (*UnimplementedMsgServer) UpdateDeployment(ctx context.Context, req *MsgUpdateDeployment) (*MsgUpdateDeploymentResponse, error) { @@ -220,7 +223,7 @@ func _Msg_CreateDeployment_Handler(srv interface{}, ctx context.Context, dec fun } func _Msg_DepositDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDepositDeployment) + in := new(v1.MsgDepositDeployment) if err := dec(in); err != nil { return nil, err } @@ -232,7 +235,7 @@ func _Msg_DepositDeployment_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/akash.deployment.v1beta4.Msg/DepositDeployment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DepositDeployment(ctx, req.(*MsgDepositDeployment)) + return srv.(MsgServer).DepositDeployment(ctx, req.(*v1.MsgDepositDeployment)) } return interceptor(ctx, in, info, handler) } diff --git a/go/node/deployment/v1beta4/types.go b/go/node/deployment/v1beta4/types.go index 1f9e2683..9af507f1 100644 --- a/go/node/deployment/v1beta4/types.go +++ b/go/node/deployment/v1beta4/types.go @@ -3,14 +3,15 @@ package v1beta4 import ( "bytes" - types "github.com/akash-network/akash-api/go/node/types/resources/v1" + v1 "pkg.akt.io/go/node/deployment/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" ) -type attributesMatching map[string]types.Attributes +type attributesMatching map[string]attr.Attributes const ( - // ManifestVersionLength is the length of manifest version - ManifestVersionLength = 32 + // ManifestHashLength is the length of manifest hash + ManifestHashLength = 32 // DefaultOrderBiddingDuration is the default time limit for an Order being active. // After the duration, the Order is automatically closed. @@ -21,19 +22,9 @@ const ( 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 +func (g *GroupSpec) MatchAttributes(at attr.Attributes) bool { + return attr.AttributesSubsetOf(g.Requirements.Attributes, at) } // ValidateClosable provides error response if group is already closed, @@ -41,7 +32,7 @@ func (g Group) ID() GroupID { func (g Group) ValidateClosable() error { switch g.State { case GroupClosed: - return ErrGroupClosed + return v1.ErrGroupClosed default: return nil } @@ -51,9 +42,9 @@ func (g Group) ValidateClosable() error { func (g Group) ValidatePausable() error { switch g.State { case GroupClosed: - return ErrGroupClosed + return v1.ErrGroupClosed case GroupPaused: - return ErrGroupPaused + return v1.ErrGroupPaused default: return nil } @@ -63,9 +54,9 @@ func (g Group) ValidatePausable() error { func (g Group) ValidateStartable() error { switch g.State { case GroupClosed: - return ErrGroupClosed + return v1.ErrGroupClosed case GroupOpen: - return ErrGroupOpen + return v1.ErrGroupOpen default: return nil } @@ -102,14 +93,14 @@ func (ds DeploymentResponses) String() string { } // Accept returns whether deployment filters valid or not -func (filters DeploymentFilters) Accept(obj Deployment, stateVal Deployment_State) bool { +func (filters DeploymentFilters) Accept(obj v1.Deployment, stateVal v1.DeploymentState) bool { // Checking owner filter - if filters.Owner != "" && filters.Owner != obj.DeploymentID.Owner { + if filters.Owner != "" && filters.Owner != obj.ID.Owner { return false } // Checking dseq filter - if filters.DSeq != 0 && filters.DSeq != obj.DeploymentID.DSeq { + if filters.DSeq != 0 && filters.DSeq != obj.ID.DSeq { return false } diff --git a/go/node/deployment/v1beta4/types_test.go b/go/node/deployment/v1beta4/types_test.go index d4217039..719220aa 100644 --- a/go/node/deployment/v1beta4/types_test.go +++ b/go/node/deployment/v1beta4/types_test.go @@ -6,19 +6,21 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - types "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - akashtypes "github.com/akash-network/akash-api/go/node/types/resources/v1" - "github.com/akash-network/akash-api/go/sdkutil" - tutil "github.com/akash-network/akash-api/go/testutil" - testutil "github.com/akash-network/akash-api/go/testutil/v1beta3" + + v1 "pkg.akt.io/go/node/deployment/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" + tutil "pkg.akt.io/go/testutil" + testutil "pkg.akt.io/go/testutil/v1beta3" + + atypes "pkg.akt.io/go/node/audit/v1" + types "pkg.akt.io/go/node/deployment/v1beta4" + "pkg.akt.io/go/sdkutil" ) type gStateTest struct { - state types.Group_State + state types.GroupState expValidateClosable error } @@ -35,17 +37,17 @@ func TestGroupState(t *testing.T) { }, { state: types.GroupClosed, - expValidateClosable: types.ErrGroupClosed, + expValidateClosable: v1.ErrGroupClosed, }, { - state: types.Group_State(99), + state: types.GroupState(99), }, } for _, test := range tests { group := types.Group{ - GroupID: testutil.GroupID(t), - State: test.state, + ID: testutil.GroupID(t), + State: test.state, } assert.Equal(t, group.ValidateClosable(), test.expValidateClosable, group.State) @@ -56,20 +58,20 @@ func TestDeploymentVersionAttributeLifecycle(t *testing.T) { d := testutil.Deployment(t) t.Run("deployment created", func(t *testing.T) { - edc := types.NewEventDeploymentCreated(d.ID(), d.Version) + edc := types.NewEventDeploymentCreated(d.GetID(), d.Hash) sdkEvent := edc.ToSDKEvent() strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) ev, err := sdkutil.ParseEvent(strEvent) require.NoError(t, err) - versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + hashString, err := types.ParseEVDeploymentHash(ev.Attributes) require.NoError(t, err) - assert.Equal(t, d.Version, versionString) + assert.Equal(t, d.Hash, hashString) }) t.Run("deployment updated", func(t *testing.T) { - edu := types.NewEventDeploymentUpdated(d.ID(), d.Version) + edu := types.NewEventDeploymentUpdated(d.GetID(), d.GetHash()) sdkEvent := edu.ToSDKEvent() strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) @@ -77,13 +79,13 @@ func TestDeploymentVersionAttributeLifecycle(t *testing.T) { ev, err := sdkutil.ParseEvent(strEvent) require.NoError(t, err) - versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + hashString, err := types.ParseEVDeploymentHash(ev.Attributes) require.NoError(t, err) - assert.Equal(t, d.Version, versionString) + assert.Equal(t, d.Hash, hashString) }) t.Run("deployment closed error", func(t *testing.T) { - edc := types.NewEventDeploymentClosed(d.ID()) + edc := types.NewEventDeploymentClosed(d.GetID()) sdkEvent := edc.ToSDKEvent() strEvent := sdk.StringifyEvent(abci.Event(sdkEvent)) @@ -91,9 +93,9 @@ func TestDeploymentVersionAttributeLifecycle(t *testing.T) { ev, err := sdkutil.ParseEvent(strEvent) require.NoError(t, err) - versionString, err := types.ParseEVDeploymentVersion(ev.Attributes) + hashString, err := types.ParseEVDeploymentHash(ev.Attributes) require.Error(t, err) - assert.NotEqual(t, d.Version, versionString) + assert.NotEqual(t, d.Hash, hashString) }) } @@ -110,7 +112,7 @@ func TestGroupSpecValidation(t *testing.T) { Requirements: testutil.PlacementRequirements(t), Resources: testutil.ResourcesList(t, 1), }, - expErr: types.ErrInvalidGroups, + expErr: v1.ErrInvalidGroups, }, { desc: "groupspec valid", @@ -277,37 +279,37 @@ func TestGroupSpec_MatchResourcesAttributes(t *testing.T) { Resources: testutil.ResourcesList(t, 1), } - group.Resources[0].Storage[0].Attributes = akashtypes.Attributes{ - { + group.Resources[0].Storage[0].Attributes = attr.Attributes{ + attr.Attribute{ Key: "persistent", Value: "true", }, - { + attr.Attribute{ Key: "class", Value: "default", }, } - provAttributes := akashtypes.Attributes{ - { + provAttributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, - { + attr.Attribute{ Key: "capabilities/storage/1/persistent", Value: "true", }, } - prov2Attributes := akashtypes.Attributes{ - { + prov2Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, } - prov3Attributes := akashtypes.Attributes{ - { + prov3Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "beta2", }, @@ -328,37 +330,37 @@ func TestGroupSpec_MatchGPUAttributes(t *testing.T) { Resources: testutil.ResourcesList(t, 1), } - group.Resources[0].GPU.Attributes = akashtypes.Attributes{ - { + group.Resources[0].GPU.Attributes = attr.Attributes{ + attr.Attribute{ Key: "vendor/nvidia/model/a100", Value: "true", }, } - provAttributes := akashtypes.Attributes{ - { + provAttributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, - { + attr.Attribute{ Key: "capabilities/storage/1/persistent", Value: "true", }, - { + attr.Attribute{ Key: "capabilities/gpu/vendor/nvidia/model/a100", Value: "true", }, } - prov2Attributes := akashtypes.Attributes{ - { + prov2Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, } - prov3Attributes := akashtypes.Attributes{ - { + prov3Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "beta2", }, @@ -379,37 +381,37 @@ func TestGroupSpec_MatchGPUAttributesWildcard(t *testing.T) { Resources: testutil.ResourcesList(t, 1), } - group.Resources[0].GPU.Attributes = akashtypes.Attributes{ - { + group.Resources[0].GPU.Attributes = attr.Attributes{ + attr.Attribute{ Key: "vendor/nvidia/model/*", Value: "true", }, } - provAttributes := akashtypes.Attributes{ - { + provAttributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, - { + attr.Attribute{ Key: "capabilities/storage/1/persistent", Value: "true", }, - { + attr.Attribute{ Key: "capabilities/gpu/vendor/nvidia/model/a100", Value: "true", }, } - prov2Attributes := akashtypes.Attributes{ - { + prov2Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "default", }, } - prov3Attributes := akashtypes.Attributes{ - { + prov3Attributes := attr.Attributes{ + attr.Attribute{ Key: "capabilities/storage/1/class", Value: "beta2", }, @@ -425,7 +427,7 @@ func TestGroupSpec_MatchGPUAttributesWildcard(t *testing.T) { func TestDepositDeploymentAuthorization_Accept(t *testing.T) { limit := sdk.NewInt64Coin(tutil.CoinDenom, 333) - dda := types.NewDepositDeploymentAuthorization(limit) + dda := v1.NewDepositAuthorization(limit) // Send the wrong type of message, expect an error var msg sdk.Msg @@ -435,25 +437,25 @@ func TestDepositDeploymentAuthorization_Accept(t *testing.T) { require.Zero(t, response) // Try to deposit too much coin, expect an error - msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), limit.Add(sdk.NewInt64Coin(tutil.CoinDenom, 1)), testutil.AccAddress(t).String()) + msg = v1.NewMsgDepositDeployment(testutil.DeploymentID(t), limit.Add(sdk.NewInt64Coin(tutil.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(tutil.CoinDenom, 1)), testutil.AccAddress(t).String()) + msg = v1.NewMsgDepositDeployment(testutil.DeploymentID(t), limit.Sub(sdk.NewInt64Coin(tutil.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) + dda, ok = response.Updated.(*v1.DepositAuthorization) require.True(t, ok) // Deposit the limit (now 1), expect that it is not to be deleted - msg = types.NewMsgDepositDeployment(testutil.DeploymentID(t), sdk.NewInt64Coin(tutil.CoinDenom, 1), testutil.AccAddress(t).String()) + msg = v1.NewMsgDepositDeployment(testutil.DeploymentID(t), sdk.NewInt64Coin(tutil.CoinDenom, 1), testutil.AccAddress(t).String()) response, err = dda.Accept(sdk.Context{}, msg) require.NoError(t, err) require.True(t, response.Accept) diff --git a/go/node/deployment/v1beta4/validation_config.go b/go/node/deployment/v1beta4/validation_config.go index a1b97d71..e43faab3 100644 --- a/go/node/deployment/v1beta4/validation_config.go +++ b/go/node/deployment/v1beta4/validation_config.go @@ -1,7 +1,7 @@ package v1beta4 import ( - "github.com/akash-network/akash-api/go/node/types/unit" + "pkg.akt.io/go/node/types/unit" ) const ( diff --git a/go/node/escrow/v1/account.go b/go/node/escrow/v1/account.go new file mode 100644 index 00000000..79ba7e3b --- /dev/null +++ b/go/node/escrow/v1/account.go @@ -0,0 +1,8 @@ +package v1 + +type Accounts []Account +type FractionalPayments []FractionalPayment + +func (m *Account) HasDepositor() bool { + return m.Owner != m.Depositor +} diff --git a/go/node/escrow/v1/codec.go b/go/node/escrow/v1/codec.go new file mode 100644 index 00000000..7fbaead6 --- /dev/null +++ b/go/node/escrow/v1/codec.go @@ -0,0 +1,11 @@ +package v1 + +import ( + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// 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/v1/error.go b/go/node/escrow/v1/error.go new file mode 100644 index 00000000..72d04abf --- /dev/null +++ b/go/node/escrow/v1/error.go @@ -0,0 +1,39 @@ +package v1 + +import ( + cerrors "cosmossdk.io/errors" +) + +const ( + errAccountExists uint32 = iota + 1 + errAccountClosed + errAccountNotFound + errAccountOverdrawn + errInvalidDenomination + errPaymentExists + errPaymentClosed + errPaymentNotFound + errPaymentRateZero + errInvalidPayment + errInvalidSettlement + errInvalidAccountID + errInvalidAccount + errInvalidAccountDepositor +) + +var ( + ErrAccountExists = cerrors.Register(ModuleName, errAccountExists, "account exists") + ErrAccountClosed = cerrors.Register(ModuleName, errAccountClosed, "account closed") + ErrAccountNotFound = cerrors.Register(ModuleName, errAccountNotFound, "account not found") + ErrAccountOverdrawn = cerrors.Register(ModuleName, errAccountOverdrawn, "account overdrawn") + ErrInvalidDenomination = cerrors.Register(ModuleName, errInvalidDenomination, "invalid denomination") + ErrPaymentExists = cerrors.Register(ModuleName, errPaymentExists, "payment exists") + ErrPaymentClosed = cerrors.Register(ModuleName, errPaymentClosed, "payment closed") + ErrPaymentNotFound = cerrors.Register(ModuleName, errPaymentNotFound, "payment not found") + ErrPaymentRateZero = cerrors.Register(ModuleName, errPaymentRateZero, "payment rate zero") + ErrInvalidPayment = cerrors.Register(ModuleName, errInvalidPayment, "invalid payment") + ErrInvalidSettlement = cerrors.Register(ModuleName, errInvalidSettlement, "invalid settlement") + ErrInvalidAccountID = cerrors.Register(ModuleName, errInvalidAccountID, "invalid account ID") + ErrInvalidAccount = cerrors.Register(ModuleName, errInvalidAccount, "invalid account") + ErrInvalidAccountDepositor = cerrors.Register(ModuleName, errInvalidAccountDepositor, "invalid account depositor") +) diff --git a/go/node/escrow/v1beta2/genesis.pb.go b/go/node/escrow/v1/genesis.pb.go similarity index 77% rename from go/node/escrow/v1beta2/genesis.pb.go rename to go/node/escrow/v1/genesis.pb.go index dde023ad..644a8bd9 100644 --- a/go/node/escrow/v1beta2/genesis.pb.go +++ b/go/node/escrow/v1/genesis.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/escrow/v1beta2/genesis.proto +// source: akash/escrow/v1/genesis.proto -package v1beta2 +package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,15 +25,15 @@ 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"` + Accounts Accounts `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts" yaml:"accounts"` + Payments FractionalPayments `protobuf:"bytes,2,rep,name=payments,proto3,castrepeated=FractionalPayments" 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} + return fileDescriptor_c65ae044e44df997, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -62,14 +62,14 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetAccounts() []Account { +func (m *GenesisState) GetAccounts() Accounts { if m != nil { return m.Accounts } return nil } -func (m *GenesisState) GetPayments() []FractionalPayment { +func (m *GenesisState) GetPayments() FractionalPayments { if m != nil { return m.Payments } @@ -77,33 +77,30 @@ func (m *GenesisState) GetPayments() []FractionalPayment { } func init() { - proto.RegisterType((*GenesisState)(nil), "akash.escrow.v1beta2.GenesisState") + proto.RegisterType((*GenesisState)(nil), "akash.escrow.v1.GenesisState") } -func init() { - proto.RegisterFile("akash/escrow/v1beta2/genesis.proto", fileDescriptor_707a683aff806dd0) -} +func init() { proto.RegisterFile("akash/escrow/v1/genesis.proto", fileDescriptor_c65ae044e44df997) } -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, +var fileDescriptor_c65ae044e44df997 = []byte{ + // 267 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x4f, 0x2d, 0x4e, 0x2e, 0xca, 0x2f, 0xd7, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, + 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x07, 0x4b, 0xeb, 0x41, 0xa4, + 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x72, 0xfa, 0x20, 0x16, 0x44, 0x99, + 0x94, 0x34, 0xba, 0x29, 0x25, 0x95, 0x05, 0xa9, 0x50, 0x33, 0x94, 0x3e, 0x30, 0x72, 0xf1, 0xb8, + 0x43, 0x4c, 0x0d, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x4a, 0xe5, 0xe2, 0x48, 0x4c, 0x4e, 0xce, 0x2f, + 0xcd, 0x2b, 0x29, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x92, 0xd0, 0x43, 0xb3, 0x47, 0xcf, + 0x11, 0xa2, 0xc0, 0x49, 0xff, 0xc4, 0x3d, 0x79, 0x86, 0x57, 0xf7, 0xe4, 0xe1, 0x3a, 0x3e, 0xdd, + 0x93, 0xe7, 0xaf, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x82, 0x89, 0x28, 0xad, 0xba, 0x2f, 0xcf, 0x01, + 0x55, 0x5f, 0x1c, 0x04, 0x57, 0x28, 0x54, 0xc9, 0xc5, 0x51, 0x90, 0x58, 0x99, 0x9b, 0x0a, 0xb2, + 0x86, 0x09, 0x6c, 0x8d, 0x12, 0x86, 0x35, 0x6e, 0x45, 0x89, 0xc9, 0x25, 0x99, 0xf9, 0x79, 0x89, + 0x39, 0x01, 0x10, 0xa5, 0x4e, 0x96, 0x30, 0x0b, 0x61, 0x7a, 0x11, 0x16, 0xc2, 0x44, 0x40, 0x16, + 0x0a, 0x61, 0xe8, 0x2c, 0x0e, 0x82, 0x6b, 0x71, 0x32, 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, 0x99, 0x82, 0xec, 0x74, 0xbd, 0xc4, 0xec, 0x12, 0xbd, 0x4c, 0x50, 0x00, + 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0x22, 0x82, 0x2d, 0x89, 0x0d, 0x1c, 0x62, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xf7, 0xf5, 0x0a, 0xc0, 0x96, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/escrow/v1beta1/key.go b/go/node/escrow/v1/key.go similarity index 95% rename from go/node/escrow/v1beta1/key.go rename to go/node/escrow/v1/key.go index 50220fa1..9c657ec3 100644 --- a/go/node/escrow/v1beta1/key.go +++ b/go/node/escrow/v1/key.go @@ -1,4 +1,4 @@ -package v1beta1 +package v1 const ( // ModuleName is the module name constant used in many places diff --git a/go/node/escrow/v1beta2/query.pb.go b/go/node/escrow/v1/query.pb.go similarity index 89% rename from go/node/escrow/v1beta2/query.pb.go rename to go/node/escrow/v1/query.pb.go index 4aef731a..f5e92f8b 100644 --- a/go/node/escrow/v1beta2/query.pb.go +++ b/go/node/escrow/v1/query.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/escrow/v1beta2/query.proto +// source: akash/escrow/v1/query.proto -package v1beta2 +package v1 import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -43,7 +43,7 @@ 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} + return fileDescriptor_5a5573bbd1dc8788, []int{0} } func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -109,7 +109,7 @@ func (m *QueryAccountsRequest) GetPagination() *query.PageRequest { // QueryProvidersResponse is response type for the Query/Providers RPC method type QueryAccountsResponse struct { - Accounts []Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"` + Accounts Accounts `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -117,7 +117,7 @@ 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} + return fileDescriptor_5a5573bbd1dc8788, []int{1} } func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -146,7 +146,7 @@ func (m *QueryAccountsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo -func (m *QueryAccountsResponse) GetAccounts() []Account { +func (m *QueryAccountsResponse) GetAccounts() Accounts { if m != nil { return m.Accounts } @@ -174,7 +174,7 @@ 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} + return fileDescriptor_5a5573bbd1dc8788, []int{2} } func (m *QueryPaymentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest { // QueryProvidersResponse is response type for the Query/Providers RPC method type QueryPaymentsResponse struct { - Payments []FractionalPayment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments"` + Payments FractionalPayments `protobuf:"bytes,1,rep,name=payments,proto3,castrepeated=FractionalPayments" json:"payments"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -255,7 +255,7 @@ 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} + return fileDescriptor_5a5573bbd1dc8788, []int{3} } func (m *QueryPaymentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -284,7 +284,7 @@ func (m *QueryPaymentsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPaymentsResponse proto.InternalMessageInfo -func (m *QueryPaymentsResponse) GetPayments() []FractionalPayment { +func (m *QueryPaymentsResponse) GetPayments() FractionalPayments { if m != nil { return m.Payments } @@ -299,48 +299,48 @@ func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse { } 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, + proto.RegisterType((*QueryAccountsRequest)(nil), "akash.escrow.v1.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "akash.escrow.v1.QueryAccountsResponse") + proto.RegisterType((*QueryPaymentsRequest)(nil), "akash.escrow.v1.QueryPaymentsRequest") + proto.RegisterType((*QueryPaymentsResponse)(nil), "akash.escrow.v1.QueryPaymentsResponse") +} + +func init() { proto.RegisterFile("akash/escrow/v1/query.proto", fileDescriptor_5a5573bbd1dc8788) } + +var fileDescriptor_5a5573bbd1dc8788 = []byte{ + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0x80, 0x73, 0x4e, 0x53, 0x85, 0xab, 0x04, 0xd5, 0x29, 0x48, 0x56, 0xa8, 0xdc, 0x28, 0x82, + 0x10, 0x21, 0x74, 0xa7, 0x04, 0x89, 0x9d, 0x0c, 0x65, 0x2d, 0x19, 0xbb, 0x5d, 0x9c, 0x93, 0xb1, + 0x92, 0xfa, 0x75, 0x7d, 0x97, 0x94, 0xac, 0x2c, 0xac, 0x48, 0x8c, 0xfc, 0x01, 0xc4, 0xc8, 0xcc, + 0xc4, 0xd4, 0xb1, 0x12, 0x0b, 0x13, 0xa0, 0x84, 0x1f, 0x82, 0xee, 0xc3, 0x49, 0x9b, 0x0f, 0x45, + 0x8a, 0xba, 0xf9, 0xee, 0xfd, 0xf0, 0xf3, 0x3e, 0x67, 0x1f, 0x7e, 0xc4, 0x07, 0x5c, 0xbe, 0x65, + 0x42, 0x86, 0x19, 0x5c, 0xb2, 0x71, 0x8b, 0x5d, 0x8c, 0x44, 0x36, 0xa1, 0x69, 0x06, 0x0a, 0xc8, + 0x03, 0x13, 0xa4, 0x36, 0x48, 0xc7, 0xad, 0x6a, 0x25, 0x82, 0x08, 0x4c, 0x8c, 0xe9, 0x27, 0x9b, + 0x56, 0x3d, 0x8a, 0x00, 0xa2, 0xa1, 0x60, 0x3c, 0x8d, 0x19, 0x4f, 0x12, 0x50, 0x5c, 0xc5, 0x90, + 0x48, 0x17, 0x7d, 0x16, 0x82, 0x3c, 0x07, 0xc9, 0x7a, 0x5c, 0x0a, 0xdb, 0x9d, 0x8d, 0x5b, 0x3d, + 0xa1, 0x78, 0x8b, 0xa5, 0x3c, 0x8a, 0x13, 0x93, 0xec, 0x72, 0x57, 0x68, 0xd4, 0x24, 0x15, 0xae, + 0x51, 0xfd, 0x1b, 0xc2, 0x95, 0x37, 0xba, 0xfe, 0x55, 0x18, 0xc2, 0x28, 0x51, 0xb2, 0x2b, 0x2e, + 0x46, 0x42, 0x2a, 0x52, 0xc1, 0x25, 0x19, 0x42, 0x2a, 0x7c, 0x54, 0x43, 0xcd, 0x7b, 0x5d, 0xbb, + 0x20, 0x87, 0xb8, 0xf8, 0x2e, 0xee, 0xfb, 0x9e, 0xd9, 0xd3, 0x8f, 0x3a, 0x0f, 0x2e, 0x13, 0x91, + 0xf9, 0x45, 0x9b, 0x67, 0x16, 0xa6, 0x5a, 0x71, 0x25, 0xfc, 0x3d, 0x57, 0xad, 0x17, 0xe4, 0x04, + 0xe3, 0x05, 0x9d, 0x5f, 0xaa, 0xa1, 0xe6, 0x41, 0xbb, 0x41, 0xed, 0x28, 0x54, 0x8f, 0x42, 0xad, + 0x28, 0x37, 0x0a, 0x3d, 0xe5, 0x91, 0x70, 0x3c, 0xdd, 0x1b, 0x95, 0xf5, 0x2f, 0x08, 0x3f, 0x5c, + 0x82, 0x96, 0x29, 0x24, 0x52, 0xbf, 0xa1, 0xcc, 0xdd, 0x9e, 0x8f, 0x6a, 0xc5, 0xe6, 0x41, 0xdb, + 0xa7, 0x4b, 0xbe, 0xa9, 0x2b, 0xea, 0x1c, 0x5e, 0xfd, 0x3e, 0x2e, 0x7c, 0xfd, 0x73, 0x5c, 0x9e, + 0x77, 0x99, 0xd7, 0x92, 0xd7, 0xb7, 0x48, 0x3d, 0x43, 0xfa, 0x74, 0x2b, 0xa9, 0x85, 0xb8, 0x85, + 0xfa, 0x23, 0xf7, 0x7b, 0xca, 0x27, 0xe7, 0x62, 0x07, 0xbf, 0xf7, 0xb1, 0x17, 0xf7, 0x9d, 0x5c, + 0xef, 0xa6, 0xef, 0xbd, 0xb5, 0xbe, 0x4b, 0x9b, 0x7d, 0xef, 0xef, 0xec, 0xfb, 0x7b, 0xee, 0x7b, + 0x31, 0x84, 0xf3, 0x7d, 0x86, 0xcb, 0xa9, 0xdb, 0x73, 0xbe, 0xeb, 0x2b, 0xbe, 0x4f, 0x32, 0x1e, + 0xea, 0x36, 0x7c, 0xe8, 0xca, 0x3b, 0x55, 0x67, 0x9e, 0xac, 0x84, 0x64, 0x77, 0xde, 0xef, 0xce, + 0xce, 0xa0, 0xfd, 0xd9, 0xc3, 0x25, 0x83, 0x4f, 0x3e, 0x20, 0x3c, 0x3f, 0x6d, 0xf2, 0x64, 0x85, + 0x74, 0xdd, 0x8f, 0x50, 0x6d, 0x6c, 0x4b, 0xb3, 0x6f, 0xac, 0x3f, 0x7f, 0xff, 0xf3, 0xdf, 0x27, + 0xaf, 0x41, 0x1e, 0xb3, 0xb5, 0xff, 0x1b, 0xcb, 0xbf, 0x2d, 0x36, 0x8c, 0xa5, 0x32, 0x24, 0xf9, + 0xcc, 0x9b, 0x48, 0x96, 0x3e, 0x99, 0x4d, 0x24, 0xcb, 0x87, 0xb2, 0x95, 0x24, 0x37, 0x6c, 0x48, + 0x3a, 0x2f, 0xaf, 0xa6, 0x01, 0xba, 0x9e, 0x06, 0xe8, 0xef, 0x34, 0x40, 0x1f, 0x67, 0x41, 0xe1, + 0x7a, 0x16, 0x14, 0x7e, 0xcd, 0x82, 0xc2, 0xd9, 0x51, 0x3a, 0x88, 0x28, 0x1f, 0x28, 0x1a, 0xeb, + 0x9b, 0x89, 0x25, 0xd0, 0x17, 0x8b, 0x5e, 0xbd, 0x7d, 0x73, 0x81, 0xbc, 0xf8, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xee, 0xaa, 0xe4, 0x7f, 0xed, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -375,7 +375,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { 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...) + err := c.cc.Invoke(ctx, "/akash.escrow.v1.Query/Accounts", in, out, opts...) if err != nil { return nil, err } @@ -384,7 +384,7 @@ func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, op 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...) + err := c.cc.Invoke(ctx, "/akash.escrow.v1.Query/Payments", in, out, opts...) if err != nil { return nil, err } @@ -428,7 +428,7 @@ func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.escrow.v1beta2.Query/Accounts", + FullMethod: "/akash.escrow.v1.Query/Accounts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) @@ -446,7 +446,7 @@ func _Query_Payments_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/akash.escrow.v1beta2.Query/Payments", + FullMethod: "/akash.escrow.v1.Query/Payments", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Payments(ctx, req.(*QueryPaymentsRequest)) @@ -455,7 +455,7 @@ func _Query_Payments_Handler(srv interface{}, ctx context.Context, dec func(inte } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "akash.escrow.v1beta2.Query", + ServiceName: "akash.escrow.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -468,7 +468,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "akash/escrow/v1beta2/query.proto", + Metadata: "akash/escrow/v1/query.proto", } func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { diff --git a/go/node/escrow/v1beta2/query.pb.gw.go b/go/node/escrow/v1/query.pb.gw.go similarity index 97% rename from go/node/escrow/v1beta2/query.pb.gw.go rename to go/node/escrow/v1/query.pb.gw.go index a22f74ef..cb96ef68 100644 --- a/go/node/escrow/v1beta2/query.pb.gw.go +++ b/go/node/escrow/v1/query.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/escrow/v1beta2/query.proto +// source: akash/escrow/v1/query.proto /* -Package v1beta2 is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1beta2 +package v1 import ( "context" @@ -242,9 +242,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } 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(true))) + 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", "v1", "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(true))) + 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", "v1", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/escrow/v1beta3/types.pb.go b/go/node/escrow/v1/types.pb.go similarity index 82% rename from go/node/escrow/v1beta3/types.pb.go rename to go/node/escrow/v1/types.pb.go index 4b544f72..10aaca1d 100644 --- a/go/node/escrow/v1beta3/types.pb.go +++ b/go/node/escrow/v1/types.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/escrow/v1beta3/types.proto +// source: akash/escrow/v1/types.proto -package v1beta3 +package v1 import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,39 +26,39 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // State stores state for an escrow account -type Account_State int32 +type AccountState int32 const ( // AccountStateInvalid is an invalid state - AccountStateInvalid Account_State = 0 + AccountStateInvalid AccountState = 0 // AccountOpen is the state when an account is open - AccountOpen Account_State = 1 + AccountOpen AccountState = 1 // AccountClosed is the state when an account is closed - AccountClosed Account_State = 2 + AccountClosed AccountState = 2 // AccountOverdrawn is the state when an account is overdrawn - AccountOverdrawn Account_State = 3 + AccountOverdrawn AccountState = 3 ) -var Account_State_name = map[int32]string{ +var AccountState_name = map[int32]string{ 0: "invalid", 1: "open", 2: "closed", 3: "overdrawn", } -var Account_State_value = map[string]int32{ +var AccountState_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 (x AccountState) String() string { + return proto.EnumName(AccountState_name, int32(x)) } -func (Account_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c4875611bf6739ee, []int{1, 0} +func (AccountState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_50b386ecf43f1d04, []int{0} } // Payment State @@ -93,7 +94,7 @@ func (x FractionalPayment_State) String() string { } func (FractionalPayment_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c4875611bf6739ee, []int{2, 0} + return fileDescriptor_50b386ecf43f1d04, []int{2, 0} } // AccountID is the account identifier @@ -106,7 +107,7 @@ 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} + return fileDescriptor_50b386ecf43f1d04, []int{0} } func (m *AccountID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,7 +157,7 @@ type Account struct { // 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"` + State AccountState `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.v1.AccountState" 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 @@ -176,7 +177,7 @@ 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} + return fileDescriptor_50b386ecf43f1d04, []int{1} } func (m *Account) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +220,7 @@ func (m *Account) GetOwner() string { return "" } -func (m *Account) GetState() Account_State { +func (m *Account) GetState() AccountState { if m != nil { return m.State } @@ -266,7 +267,7 @@ 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"` + State FractionalPayment_State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1.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"` @@ -276,7 +277,7 @@ 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} + return fileDescriptor_50b386ecf43f1d04, []int{2} } func (m *FractionalPayment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,68 +356,69 @@ func (m *FractionalPayment) GetWithdrawn() 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") + proto.RegisterEnum("akash.escrow.v1.AccountState", AccountState_name, AccountState_value) + proto.RegisterEnum("akash.escrow.v1.FractionalPayment_State", FractionalPayment_State_name, FractionalPayment_State_value) + proto.RegisterType((*AccountID)(nil), "akash.escrow.v1.AccountID") + proto.RegisterType((*Account)(nil), "akash.escrow.v1.Account") + proto.RegisterType((*FractionalPayment)(nil), "akash.escrow.v1.FractionalPayment") } -func init() { proto.RegisterFile("akash/escrow/v1beta3/types.proto", fileDescriptor_c4875611bf6739ee) } +func init() { proto.RegisterFile("akash/escrow/v1/types.proto", fileDescriptor_50b386ecf43f1d04) } -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, +var fileDescriptor_50b386ecf43f1d04 = []byte{ + // 829 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x8e, 0xe3, 0x44, + 0x14, 0x8d, 0xf3, 0x6a, 0x5c, 0x19, 0x66, 0x32, 0x45, 0x4b, 0xb8, 0x3d, 0xdd, 0x76, 0x30, 0x20, + 0x35, 0x48, 0xd8, 0x4a, 0x90, 0x90, 0x60, 0xd7, 0x99, 0x16, 0x28, 0x8b, 0xe1, 0xe1, 0x5e, 0xc0, + 0xb0, 0x20, 0xaa, 0xd8, 0x35, 0x19, 0xab, 0x13, 0x97, 0xe5, 0xaa, 0x49, 0xa6, 0xff, 0x00, 0x65, + 0x85, 0x10, 0x1b, 0x16, 0x59, 0xb1, 0x67, 0xc5, 0x47, 0xcc, 0x72, 0xc4, 0x8a, 0x95, 0x85, 0xd2, + 0xbb, 0x2c, 0xf3, 0x05, 0xa8, 0x1e, 0x7e, 0xc0, 0x74, 0xa3, 0x48, 0xb0, 0xea, 0xdc, 0x73, 0xee, + 0x3d, 0x75, 0xeb, 0xdc, 0xba, 0x6d, 0xf0, 0x00, 0x5d, 0x22, 0xfa, 0xd4, 0xc3, 0x34, 0x48, 0xc9, + 0xd2, 0x5b, 0xf4, 0x3d, 0x76, 0x95, 0x60, 0xea, 0x26, 0x29, 0x61, 0x04, 0xde, 0x13, 0xa4, 0x2b, + 0x49, 0x77, 0xd1, 0x37, 0x0f, 0xa7, 0x64, 0x4a, 0x04, 0xe7, 0xf1, 0x5f, 0x32, 0xcd, 0x3c, 0x0a, + 0x08, 0x9d, 0x13, 0x3a, 0x96, 0x84, 0x0c, 0x14, 0x65, 0xc9, 0xc8, 0x9b, 0x20, 0x8a, 0xbd, 0x45, + 0x7f, 0x82, 0x19, 0xea, 0x7b, 0x01, 0x89, 0x62, 0xc9, 0x3b, 0x33, 0xa0, 0x9f, 0x05, 0x01, 0x79, + 0x16, 0xb3, 0xd1, 0x39, 0xf4, 0x40, 0x8b, 0x06, 0x24, 0xc1, 0x86, 0xd6, 0xd3, 0x4e, 0xf5, 0xe1, + 0xd1, 0x36, 0xb3, 0x25, 0xb0, 0xcb, 0xec, 0x3b, 0x57, 0x68, 0x3e, 0xfb, 0xc4, 0x11, 0xa1, 0xe3, + 0x4b, 0x18, 0xba, 0xa0, 0xf1, 0x3c, 0x0a, 0x8d, 0xba, 0x48, 0x3f, 0xde, 0x64, 0x76, 0xe3, 0x9b, + 0xd1, 0xf9, 0x36, 0xb3, 0x39, 0xba, 0xcb, 0x6c, 0x20, 0x6b, 0x9e, 0x47, 0xa1, 0xe3, 0x73, 0xc8, + 0xf9, 0xb5, 0x05, 0x0e, 0xd4, 0x71, 0x70, 0x04, 0xea, 0x51, 0x28, 0x4e, 0xea, 0x0c, 0x4c, 0xf7, + 0x1f, 0x17, 0x75, 0x8b, 0xa6, 0x86, 0x27, 0x2f, 0x32, 0xbb, 0xb6, 0xc9, 0xec, 0xba, 0x50, 0xae, + 0x0b, 0x61, 0x5d, 0x0a, 0x73, 0xdd, 0x7a, 0x14, 0xc2, 0xcf, 0x40, 0x8b, 0x2c, 0x63, 0x9c, 0xaa, + 0x46, 0xfa, 0xbc, 0x6f, 0x01, 0x94, 0x7d, 0x8b, 0xd0, 0xf9, 0xfd, 0xb7, 0x0f, 0x0e, 0x95, 0x3d, + 0x67, 0x61, 0x98, 0x62, 0x4a, 0x2f, 0x58, 0x1a, 0xc5, 0x53, 0x5f, 0xa6, 0xc3, 0xcf, 0x41, 0x8b, + 0x32, 0xc4, 0xb0, 0xd1, 0xe8, 0x69, 0xa7, 0x77, 0x07, 0x27, 0xb7, 0xb5, 0x75, 0xc1, 0x93, 0x94, + 0x3f, 0xfc, 0x67, 0xc5, 0x1f, 0x1e, 0x72, 0x7f, 0xf8, 0x5f, 0xf8, 0x18, 0x1c, 0x4c, 0xd0, 0x0c, + 0xc5, 0x01, 0x36, 0x9a, 0xe2, 0xa2, 0xc7, 0xae, 0x3a, 0x9e, 0xcf, 0xc3, 0x55, 0xf3, 0x70, 0xcf, + 0x71, 0xf0, 0x90, 0x44, 0xf1, 0xf0, 0x2d, 0x7e, 0xd5, 0x6d, 0x66, 0xe7, 0x45, 0xbb, 0xcc, 0xbe, + 0x2b, 0x65, 0x15, 0xe0, 0xf8, 0x39, 0x05, 0x23, 0xd0, 0x61, 0x29, 0x8a, 0xe9, 0x13, 0x9c, 0xa6, + 0x38, 0x34, 0x5a, 0x7b, 0xc8, 0xbf, 0xa7, 0xe4, 0xab, 0x85, 0xbb, 0xcc, 0x86, 0xf2, 0x88, 0x0a, + 0xe8, 0xf8, 0xd5, 0x14, 0xf8, 0x08, 0x00, 0x8a, 0x19, 0x9b, 0xe1, 0x70, 0x8c, 0x98, 0xd1, 0xee, + 0x69, 0xa7, 0x8d, 0xa1, 0xbb, 0xc9, 0x6c, 0xfd, 0x42, 0xa2, 0x67, 0x6c, 0x9b, 0xd9, 0x3a, 0xcd, + 0x83, 0x5d, 0x66, 0x77, 0x95, 0x19, 0x39, 0xe4, 0xf8, 0x25, 0x0d, 0xbf, 0x06, 0x7a, 0x88, 0x13, + 0x42, 0x23, 0x46, 0x52, 0xe3, 0x40, 0x4c, 0xec, 0x63, 0x2e, 0x50, 0x80, 0xa5, 0x40, 0x01, 0xdd, + 0x3e, 0xb9, 0xb2, 0x0c, 0x7e, 0x05, 0x5a, 0x4f, 0x9e, 0xc5, 0x21, 0x35, 0x5e, 0xdb, 0xc3, 0x8c, + 0x13, 0x65, 0x86, 0x2c, 0x29, 0x07, 0x28, 0x42, 0xc7, 0x97, 0xb0, 0xf3, 0x53, 0x1b, 0xdc, 0xff, + 0x34, 0x45, 0x01, 0x8b, 0x48, 0x8c, 0x66, 0x5f, 0xa2, 0xab, 0x39, 0x8e, 0x19, 0x9c, 0x03, 0x80, + 0xe4, 0x43, 0x18, 0xef, 0xf5, 0x84, 0x07, 0xea, 0x09, 0x97, 0xab, 0xc6, 0xef, 0x8b, 0xf2, 0xa0, + 0xbc, 0x6f, 0x01, 0x39, 0x7e, 0x41, 0x0b, 0xff, 0x13, 0x79, 0xf2, 0xb8, 0x58, 0x36, 0xe1, 0xbf, + 0xea, 0x47, 0xca, 0x25, 0x79, 0x50, 0xca, 0x15, 0x90, 0xe3, 0x17, 0x74, 0x65, 0x5b, 0x1a, 0xff, + 0x71, 0x5b, 0x1e, 0xe7, 0xdb, 0xd2, 0x14, 0xdb, 0x72, 0xfa, 0x8a, 0x03, 0xaf, 0x38, 0xe7, 0xee, + 0xbb, 0x38, 0x8f, 0x40, 0x33, 0xe5, 0xca, 0xfb, 0x3c, 0xeb, 0x07, 0x6a, 0x92, 0xa2, 0x62, 0x97, + 0xd9, 0x1d, 0x29, 0x98, 0x0a, 0x3d, 0x01, 0x56, 0xf7, 0xb0, 0xfd, 0x3f, 0xef, 0xe1, 0x77, 0x40, + 0x5f, 0x46, 0xec, 0x69, 0x98, 0xa2, 0x65, 0x2c, 0x5e, 0x73, 0x67, 0x70, 0x74, 0xa3, 0xb8, 0x50, + 0x7e, 0x57, 0x29, 0x97, 0x35, 0xe5, 0xb4, 0x0a, 0xc8, 0xf1, 0x4b, 0xda, 0xf9, 0x51, 0x03, 0x2d, + 0xe1, 0x1a, 0x7c, 0x07, 0x1c, 0x44, 0xf1, 0x02, 0xcd, 0xa2, 0xb0, 0x5b, 0x33, 0xdf, 0x5c, 0xad, + 0x7b, 0x6f, 0x28, 0x57, 0x05, 0x3d, 0x92, 0x14, 0x3c, 0x02, 0x4d, 0x92, 0xe0, 0xb8, 0xab, 0x99, + 0xf7, 0x56, 0xeb, 0x5e, 0x47, 0xa5, 0x7c, 0x91, 0xe0, 0x18, 0x9e, 0x80, 0x76, 0x30, 0x23, 0x14, + 0x87, 0xdd, 0xba, 0x79, 0x7f, 0xb5, 0xee, 0xbd, 0xae, 0xc8, 0x87, 0x02, 0x84, 0x6f, 0x03, 0x9d, + 0x2c, 0x70, 0x2a, 0x8e, 0xed, 0x36, 0xcc, 0xc3, 0xd5, 0xba, 0xd7, 0xcd, 0xcb, 0x73, 0xdc, 0x6c, + 0x7e, 0xff, 0x8b, 0x55, 0x7b, 0xff, 0x67, 0x0d, 0xdc, 0xa9, 0xfe, 0x2b, 0xbc, 0xa1, 0xb7, 0x2a, + 0x7d, 0x4b, 0x6f, 0x2a, 0xe5, 0xe6, 0xde, 0x14, 0xf9, 0x2f, 0xbd, 0xe5, 0xe5, 0x7f, 0xef, 0x6d, + 0xf8, 0xd1, 0x8b, 0x8d, 0xa5, 0xbd, 0xdc, 0x58, 0xda, 0x9f, 0x1b, 0x4b, 0xfb, 0xe1, 0xda, 0xaa, + 0xbd, 0xbc, 0xb6, 0x6a, 0x7f, 0x5c, 0x5b, 0xb5, 0x6f, 0x8f, 0x93, 0xcb, 0xa9, 0x8b, 0x2e, 0x99, + 0x1b, 0xf1, 0xaf, 0xa7, 0x17, 0x93, 0x10, 0x97, 0xdf, 0xdd, 0x49, 0x5b, 0x7c, 0x10, 0x3f, 0xfc, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x7d, 0x98, 0x9c, 0x91, 0x07, 0x00, 0x00, } func (m *AccountID) Marshal() (dAtA []byte, err error) { @@ -940,7 +942,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= Account_State(b&0x7F) << shift + m.State |= AccountState(b&0x7F) << shift if b < 0x80 { break } diff --git a/go/node/escrow/v1beta2/validate.go b/go/node/escrow/v1/validate.go similarity index 53% rename from go/node/escrow/v1beta2/validate.go rename to go/node/escrow/v1/validate.go index 7c2ebdfd..2eeff956 100644 --- a/go/node/escrow/v1beta2/validate.go +++ b/go/node/escrow/v1/validate.go @@ -1,48 +1,49 @@ -package v1beta2 +package v1 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") + return ErrInvalidAccountID.Wrap("empty scope") } + if len(obj.XID) == 0 { - return errors.Wrap(ErrInvalidAccountID, "empty scope") + return ErrInvalidAccountID.Wrap("empty XID") } + return nil } func (obj *Account) ValidateBasic() error { if err := obj.ID.ValidateBasic(); err != nil { - return errors.Wrapf(ErrInvalidAccount, "invalid account: id - %s", err) + return ErrInvalidAccount.Wrap(err.Error()) } if _, err := sdk.AccAddressFromBech32(obj.Owner); err != nil { - return errors.Wrapf(ErrInvalidAccount, "invalid account: owner - %s", err) + return ErrInvalidAccount.Wrap(err.Error()) } if obj.State == AccountStateInvalid { - return errors.Wrapf(ErrInvalidAccount, "invalid account: state - %s", obj.State) + return ErrInvalidAccount.Wrap("invalid state") } if _, err := sdk.AccAddressFromBech32(obj.Depositor); err != nil { - return errors.Wrapf(ErrInvalidAccount, "invalid account: depositor - %s", err) + return ErrInvalidAccount.Wrapf("invalid depositor") } return nil } func (obj *FractionalPayment) ValidateBasic() error { if err := obj.AccountID.ValidateBasic(); err != nil { - return errors.Wrapf(ErrInvalidPayment, "invalid account id: %s", err) + return ErrInvalidPayment.Wrap(err.Error()) } if len(obj.PaymentID) == 0 { - return errors.Wrap(ErrInvalidPayment, "empty payment id") + return ErrInvalidPayment.Wrap("empty payment id") } if obj.Rate.IsZero() { - return errors.Wrap(ErrInvalidPayment, "payment rate zero") + return ErrInvalidPayment.Wrap("payment rate zero") } if obj.State == PaymentStateInvalid { - return errors.Wrap(ErrInvalidPayment, "invalid state") + return ErrInvalidPayment.Wrap("invalid state") } return nil } diff --git a/go/node/escrow/v1beta1/codec.go b/go/node/escrow/v1beta1/codec.go deleted file mode 100644 index 9076af5c..00000000 --- a/go/node/escrow/v1beta1/codec.go +++ /dev/null @@ -1,35 +0,0 @@ -package v1beta1 - -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() -} - -// RegisterLegacyAminoCodec register concrete types on codec -func RegisterLegacyAminoCodec(_ *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/v1beta1/error.go b/go/node/escrow/v1beta1/error.go deleted file mode 100644 index 499e2055..00000000 --- a/go/node/escrow/v1beta1/error.go +++ /dev/null @@ -1,11 +0,0 @@ -package v1beta1 - -import ( - "errors" -) - -var ( - ErrInvalidPayment = errors.New("invalid payment") - ErrInvalidAccountID = errors.New("invalid account ID") - ErrInvalidAccount = errors.New("invalid account") -) diff --git a/go/node/escrow/v1beta1/genesis.pb.go b/go/node/escrow/v1beta1/genesis.pb.go deleted file mode 100644 index 83a1e8d7..00000000 --- a/go/node/escrow/v1beta1/genesis.pb.go +++ /dev/null @@ -1,398 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/escrow/v1beta1/genesis.proto - -package v1beta1 - -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 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 deleted file mode 100644 index 320b3922..00000000 --- a/go/node/escrow/v1beta1/query.pb.go +++ /dev/null @@ -1,1604 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 62fb3f75..00000000 --- a/go/node/escrow/v1beta1/query.pb.gw.go +++ /dev/null @@ -1,254 +0,0 @@ -// 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index db23b2d4..00000000 --- a/go/node/escrow/v1beta1/types.pb.go +++ /dev/null @@ -1,1353 +0,0 @@ -// 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" - _ "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 - -// 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/v1beta1/validate.go b/go/node/escrow/v1beta1/validate.go deleted file mode 100644 index 5488f965..00000000 --- a/go/node/escrow/v1beta1/validate.go +++ /dev/null @@ -1,45 +0,0 @@ -package v1beta1 - -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) - } - return nil -} - -func (obj *Payment) 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 -} diff --git a/go/node/escrow/v1beta2/codec.go b/go/node/escrow/v1beta2/codec.go deleted file mode 100644 index a2ddd516..00000000 --- a/go/node/escrow/v1beta2/codec.go +++ /dev/null @@ -1,35 +0,0 @@ -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() -} - -// RegisterLegacyAminoCodec register concrete types on codec -func RegisterLegacyAminoCodec(_ *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 deleted file mode 100644 index 0de3bf0c..00000000 --- a/go/node/escrow/v1beta2/error.go +++ /dev/null @@ -1,21 +0,0 @@ -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/key.go b/go/node/escrow/v1beta2/key.go deleted file mode 100644 index c8662ad5..00000000 --- a/go/node/escrow/v1beta2/key.go +++ /dev/null @@ -1,20 +0,0 @@ -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/types.pb.go b/go/node/escrow/v1beta2/types.pb.go deleted file mode 100644 index 8f618371..00000000 --- a/go/node/escrow/v1beta2/types.pb.go +++ /dev/null @@ -1,1467 +0,0 @@ -// 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" - _ "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 - -// 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/v1beta3/account.go b/go/node/escrow/v1beta3/account.go deleted file mode 100644 index 53dbbd0d..00000000 --- a/go/node/escrow/v1beta3/account.go +++ /dev/null @@ -1,5 +0,0 @@ -package v1beta3 - -func (m *Account) HasDepositor() bool { - return m.Owner != m.Depositor -} diff --git a/go/node/escrow/v1beta3/codec.go b/go/node/escrow/v1beta3/codec.go deleted file mode 100644 index 6cd32bfa..00000000 --- a/go/node/escrow/v1beta3/codec.go +++ /dev/null @@ -1,35 +0,0 @@ -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() -} - -// RegisterLegacyAminoCodec register concrete types on codec -func RegisterLegacyAminoCodec(_ *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 deleted file mode 100644 index aa924e95..00000000 --- a/go/node/escrow/v1beta3/error.go +++ /dev/null @@ -1,39 +0,0 @@ -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 - errInvalidAcountDepositor -) - -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") - ErrInvalidAccountDepositor = sdkerrors.Register(ModuleName, errInvalidAcountDepositor, "invalid account depositor") -) diff --git a/go/node/escrow/v1beta3/genesis.pb.go b/go/node/escrow/v1beta3/genesis.pb.go deleted file mode 100644 index 35b9f4cf..00000000 --- a/go/node/escrow/v1beta3/genesis.pb.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/escrow/v1beta3/genesis.proto - -package v1beta3 - -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 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 deleted file mode 100644 index 53bb7f9a..00000000 --- a/go/node/escrow/v1beta3/key.go +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index ef0ed242..00000000 --- a/go/node/escrow/v1beta3/query.pb.go +++ /dev/null @@ -1,1605 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 2f3ae5ac..00000000 --- a/go/node/escrow/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,254 +0,0 @@ -// 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(true))) - - 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(true))) -) - -var ( - forward_Query_Accounts_0 = runtime.ForwardResponseMessage - - forward_Query_Payments_0 = runtime.ForwardResponseMessage -) diff --git a/go/node/escrow/v1beta3/validate.go b/go/node/escrow/v1beta3/validate.go deleted file mode 100644 index 8b29e7d1..00000000 --- a/go/node/escrow/v1beta3/validate.go +++ /dev/null @@ -1,53 +0,0 @@ -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/gov/v1beta3/codec.go b/go/node/gov/v1beta3/codec.go deleted file mode 100644 index cb3f6e09..00000000 --- a/go/node/gov/v1beta3/codec.go +++ /dev/null @@ -1,24 +0,0 @@ -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" -) - -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() { - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} diff --git a/go/node/gov/v1beta3/genesis.pb.go b/go/node/gov/v1beta3/genesis.pb.go index b1255113..5d4da09f 100644 --- a/go/node/gov/v1beta3/genesis.pb.go +++ b/go/node/gov/v1beta3/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("akash/gov/v1beta3/genesis.proto", fileDescriptor_2cb71729a1a68e2a) } var fileDescriptor_2cb71729a1a68e2a = []byte{ - // 238 bytes of a gzipped FileDescriptorProto + // 220 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0xcf, 0x2f, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x04, 0x2b, 0xd0, @@ -85,12 +85,11 @@ var fileDescriptor_2cb71729a1a68e2a = []byte{ 0x92, 0x5a, 0x90, 0x5f, 0x9c, 0x59, 0x12, 0x0f, 0x51, 0x28, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xa0, 0x87, 0x61, 0xa5, 0x9e, 0x0b, 0x44, 0x61, 0x00, 0x58, 0x9d, 0x93, 0xfe, 0x89, 0x7b, 0xf2, 0x0c, 0xaf, 0xee, 0xc9, 0xa3, 0xe9, 0xff, 0x74, 0x4f, 0x5e, 0xb4, 0x32, 0x31, 0x37, 0xc7, - 0x4a, 0x09, 0x55, 0x5c, 0x29, 0x88, 0x37, 0x05, 0x45, 0x7f, 0xc0, 0x89, 0x47, 0x72, 0x8c, 0x17, + 0x4a, 0x09, 0x55, 0x5c, 0x29, 0x88, 0x37, 0x05, 0x45, 0xbf, 0xc5, 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, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, - 0xea, 0x83, 0x5d, 0xa1, 0x9b, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, 0x16, 0x64, - 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, 0xa7, 0xa4, 0x22, 0xfb, 0x34, 0x89, 0x0d, 0xec, 0x47, 0x63, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0xb2, 0x6b, 0xbd, 0x4f, 0x01, 0x00, 0x00, + 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xc9, 0x15, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, + 0xfc, 0xa6, 0x9f, 0x97, 0x9f, 0x92, 0x8a, 0xec, 0xa3, 0x24, 0x36, 0xb0, 0x5f, 0x8c, 0x01, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x52, 0x2e, 0xda, 0x4a, 0x37, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/gov/v1beta3/key.go b/go/node/gov/v1beta3/key.go deleted file mode 100644 index f2cce01e..00000000 --- a/go/node/gov/v1beta3/key.go +++ /dev/null @@ -1,15 +0,0 @@ -package v1beta3 - -const ( - // ModuleName is the name of the module - ModuleName = "agov" - - // StoreKey is the store key string for gov - StoreKey = ModuleName - - // RouterKey is the message route for gov - RouterKey = ModuleName - - // QuerierRoute is the querier route for gov - QuerierRoute = ModuleName -) diff --git a/go/node/gov/v1beta3/params.go b/go/node/gov/v1beta3/params.go deleted file mode 100644 index 8f9d085e..00000000 --- a/go/node/gov/v1beta3/params.go +++ /dev/null @@ -1,75 +0,0 @@ -package v1beta3 - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -) - -// var _ paramtypes.ParamSet = (*DepositParams)(nil) - -var ( - DefaultMinInitialDepositRate = sdk.NewDecWithPrec(40, 2) -) - -var ( - KeyDepositParams = []byte("depositparams") -) - -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable( - paramtypes.NewParamSetPair(KeyDepositParams, DepositParams{}, validateDepositParams), - ) -} - -// NewDepositParams creates a new DepositParams object -func NewDepositParams(minInitialDepositRate sdk.Dec) DepositParams { - return DepositParams{ - MinInitialDepositRate: minInitialDepositRate, - } -} - -func DefaultDepositParams() DepositParams { - return NewDepositParams( - DefaultMinInitialDepositRate, - ) -} - -func (p DepositParams) Validate() error { - if err := validateMinInitialDepositRate(p.MinInitialDepositRate); err != nil { - return err - } - - return nil -} - -func validateDepositParams(i interface{}) error { - v, ok := i.(DepositParams) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if err := validateMinInitialDepositRate(v.MinInitialDepositRate); err != nil { - return err - } - - return nil -} - -func validateMinInitialDepositRate(i interface{}) error { - v, ok := i.(sdk.Dec) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if v.IsNegative() { - return fmt.Errorf("min deposit on proposal create cannot be negative: %s", v) - } - - if v.GT(sdk.OneDec()) { - return fmt.Errorf("min deposit on proposal create is too large: %s", v) - } - - return nil -} diff --git a/go/node/gov/v1beta3/params.pb.go b/go/node/gov/v1beta3/params.pb.go index 560c4f33..08bbd78b 100644 --- a/go/node/gov/v1beta3/params.pb.go +++ b/go/node/gov/v1beta3/params.pb.go @@ -6,8 +6,8 @@ package v1beta3 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -71,7 +71,7 @@ func init() { func init() { proto.RegisterFile("akash/gov/v1beta3/params.proto", fileDescriptor_ff7c87bcce7fe71f) } var fileDescriptor_ff7c87bcce7fe71f = []byte{ - // 274 bytes of a gzipped FileDescriptorProto + // 265 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0xcf, 0x2f, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x04, 0xcb, 0xeb, 0xa5, @@ -84,12 +84,11 @@ var fileDescriptor_ff7c87bcce7fe71f = []byte{ 0x53, 0xb2, 0xf5, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0xf5, 0x5c, 0x52, 0x93, 0x1f, 0xdd, 0x93, 0x17, 0xf5, 0xcd, 0xcc, 0xf3, 0x84, 0x98, 0x08, 0xb5, 0x2e, 0x28, 0xb1, 0x24, 0xf5, 0xd5, 0x3d, 0x79, 0x9c, 0x76, 0x7d, 0xba, 0x27, 0x2f, 0x5f, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x84, 0x4b, 0x85, 0x52, - 0x90, 0x68, 0x2e, 0x36, 0x53, 0x9d, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, + 0x90, 0x68, 0x2e, 0x36, 0x53, 0x9d, 0x2c, 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, 0x0c, 0xc9, 0xc1, 0xe0, 0x20, 0xd2, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0x86, - 0xf2, 0x12, 0x0b, 0x32, 0xf5, 0xd3, 0xf3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x91, 0x03, 0x37, 0x89, - 0x0d, 0x1c, 0x5a, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x50, 0xf2, 0xd6, 0x78, 0x01, - 0x00, 0x00, + 0x21, 0x4a, 0xae, 0x20, 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x13, 0x14, 0x0a, 0xfa, 0x79, + 0xf9, 0x29, 0xa9, 0xc8, 0x81, 0x98, 0xc4, 0x06, 0x0e, 0x15, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x3d, 0x1d, 0x4e, 0x9e, 0x60, 0x01, 0x00, 0x00, } func (m *DepositParams) Marshal() (dAtA []byte, err error) { diff --git a/go/node/inflation/types/v1beta2/genesis.pb.go b/go/node/inflation/types/v1beta2/genesis.pb.go index 37242296..afa253f3 100644 --- a/go/node/inflation/types/v1beta2/genesis.pb.go +++ b/go/node/inflation/types/v1beta2/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta2 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -77,7 +77,7 @@ func init() { } var fileDescriptor_912221706d9e5bb6 = []byte{ - // 236 bytes of a gzipped FileDescriptorProto + // 219 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, @@ -87,12 +87,11 @@ var fileDescriptor_912221706d9e5bb6 = []byte{ 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, + 0x70, 0x72, 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, 0xad, 0x82, 0xec, + 0x74, 0xbd, 0xc4, 0xec, 0x12, 0xbd, 0x4c, 0x90, 0x07, 0xf4, 0xf3, 0xf2, 0x53, 0x52, 0x91, 0x9c, + 0x5d, 0x52, 0x59, 0x90, 0x5a, 0x0c, 0x73, 0x7c, 0x12, 0x1b, 0xd8, 0xd9, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xb3, 0x65, 0xc2, 0xc2, 0x34, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/inflation/types/v1beta2/params.pb.go b/go/node/inflation/types/v1beta2/params.pb.go index 885990e5..1c1ae7e4 100644 --- a/go/node/inflation/types/v1beta2/params.pb.go +++ b/go/node/inflation/types/v1beta2/params.pb.go @@ -6,8 +6,8 @@ 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -78,30 +78,29 @@ func init() { } 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, + // 351 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, 0x93, 0xcb, 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, 0x69, 0x15, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, 0x12, 0x84, + 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x52, 0xda, 0x02, 0x5b, 0x0b, 0x4b, 0x61, 0x49, 0x6c, 0xe0, 0xc4, + 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x53, 0x6d, 0x44, 0xd1, 0x83, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/go/node/inflation/v1beta2/errors.go b/go/node/inflation/v1beta2/errors.go deleted file mode 100644 index d0b1f9bd..00000000 --- a/go/node/inflation/v1beta2/errors.go +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index f0f1c2a2..00000000 --- a/go/node/inflation/v1beta2/genesis.pb.go +++ /dev/null @@ -1,325 +0,0 @@ -// 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 deleted file mode 100644 index 27048080..00000000 --- a/go/node/inflation/v1beta2/inflation_calculator.go +++ /dev/null @@ -1,102 +0,0 @@ -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 deleted file mode 100644 index 981a25cd..00000000 --- a/go/node/inflation/v1beta2/inflation_calculator_test.go +++ /dev/null @@ -1,83 +0,0 @@ -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 deleted file mode 100644 index 4083fff8..00000000 --- a/go/node/inflation/v1beta2/key.go +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index e5aaa85c..00000000 --- a/go/node/inflation/v1beta2/params.go +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index 73b2569d..00000000 --- a/go/node/inflation/v1beta2/params.pb.go +++ /dev/null @@ -1,427 +0,0 @@ -// 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 deleted file mode 100644 index 71679b09..00000000 --- a/go/node/inflation/v1beta3/errors.go +++ /dev/null @@ -1,12 +0,0 @@ -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 index 4150c2b8..9f4999c6 100644 --- a/go/node/inflation/v1beta3/genesis.pb.go +++ b/go/node/inflation/v1beta3/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -77,7 +77,7 @@ func init() { } var fileDescriptor_9715c8a93ab9af0b = []byte{ - // 229 bytes of a gzipped FileDescriptorProto + // 211 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, @@ -87,12 +87,11 @@ var fileDescriptor_9715c8a93ab9af0b = []byte{ 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, + 0x70, 0xb2, 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, 0x95, 0x82, 0xec, + 0x74, 0xbd, 0xc4, 0xec, 0x12, 0xbd, 0x4c, 0x90, 0x07, 0xf4, 0xf3, 0xf2, 0x53, 0x52, 0x31, 0x9d, + 0x9d, 0xc4, 0x06, 0x76, 0xb0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xf0, 0x66, 0x47, 0x2e, + 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/inflation/v1beta3/inflation_calculator.go b/go/node/inflation/v1beta3/inflation_calculator.go deleted file mode 100644 index 78782d25..00000000 --- a/go/node/inflation/v1beta3/inflation_calculator.go +++ /dev/null @@ -1,102 +0,0 @@ -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 deleted file mode 100644 index 0a9dd17f..00000000 --- a/go/node/inflation/v1beta3/inflation_calculator_test.go +++ /dev/null @@ -1,83 +0,0 @@ -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 deleted file mode 100644 index 504b7f76..00000000 --- a/go/node/inflation/v1beta3/key.go +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index c09e26c1..00000000 --- a/go/node/inflation/v1beta3/params.go +++ /dev/null @@ -1,94 +0,0 @@ -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 index 06f332d9..0ef36778 100644 --- a/go/node/inflation/v1beta3/params.pb.go +++ b/go/node/inflation/v1beta3/params.pb.go @@ -6,8 +6,8 @@ package v1beta3 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -78,30 +78,29 @@ func init() { } 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, + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xb1, 0x6a, 0xc2, 0x40, + 0x18, 0xc7, 0x73, 0x15, 0xc4, 0x66, 0xa9, 0x0d, 0xd2, 0x86, 0x42, 0x73, 0x25, 0x48, 0xe9, 0xd2, + 0x3b, 0x8a, 0x5b, 0x87, 0x0e, 0x22, 0x05, 0xb7, 0xe2, 0x50, 0x68, 0x17, 0xf9, 0x8c, 0x31, 0x1e, + 0x31, 0xb9, 0x90, 0x3b, 0x05, 0xc7, 0xbe, 0x41, 0x1f, 0xa1, 0x8f, 0xd1, 0x47, 0x70, 0x74, 0x2c, + 0x85, 0x1e, 0x25, 0x6e, 0x8e, 0x3e, 0x41, 0xf1, 0xd4, 0x0c, 0x6a, 0x07, 0xa7, 0x3b, 0xee, 0xfb, + 0x7f, 0xbf, 0xfb, 0x0d, 0x7f, 0xb3, 0x0a, 0x21, 0x88, 0x3e, 0x65, 0x71, 0x6f, 0x00, 0x92, 0xf1, + 0x98, 0x8e, 0xee, 0x3a, 0xbe, 0x84, 0x1a, 0x4d, 0x20, 0x85, 0x48, 0x90, 0x24, 0xe5, 0x92, 0x5b, + 0xe7, 0x3a, 0x45, 0xf2, 0x14, 0x59, 0xa7, 0x2e, 0x2a, 0x01, 0x0f, 0xb8, 0xce, 0xd0, 0xe5, 0x6d, + 0x15, 0x77, 0x7f, 0x0a, 0x66, 0xf1, 0x49, 0xef, 0x5b, 0x9f, 0xc8, 0x3c, 0xcb, 0xd7, 0xda, 0x5d, + 0xdf, 0x83, 0x71, 0xbb, 0x07, 0x9e, 0xe4, 0xa9, 0x8d, 0xae, 0xd0, 0xcd, 0x71, 0xfd, 0x0d, 0x4d, + 0x14, 0x36, 0xbe, 0x15, 0xbe, 0x0e, 0x98, 0xec, 0x0f, 0x3b, 0xc4, 0xe3, 0x11, 0xf5, 0xb8, 0x88, + 0xb8, 0x58, 0x1f, 0xb7, 0xa2, 0x1b, 0x52, 0x39, 0x4e, 0x7c, 0x41, 0x1a, 0xbe, 0x97, 0x29, 0x5c, + 0x69, 0x6e, 0x80, 0x8d, 0x25, 0xef, 0x51, 0xe3, 0xe6, 0x0a, 0xff, 0xf3, 0xd1, 0x42, 0xe1, 0xcb, + 0x31, 0x44, 0x83, 0x7b, 0x77, 0xff, 0xdc, 0x6d, 0x55, 0xd8, 0x1e, 0xa0, 0xf5, 0x81, 0xcc, 0x53, + 0x16, 0x33, 0xc9, 0x60, 0xd0, 0xce, 0x03, 0xf6, 0x91, 0xb6, 0x16, 0x07, 0x4b, 0x97, 0x9b, 0x2b, + 0x54, 0xee, 0x3e, 0x57, 0x78, 0x17, 0xbf, 0x50, 0xd8, 0xde, 0xb8, 0x6e, 0x8d, 0xdc, 0x56, 0x99, + 0x6d, 0x21, 0xac, 0xa1, 0x59, 0x1a, 0x41, 0xca, 0x20, 0xf6, 0x7c, 0xbb, 0xa0, 0xc5, 0x5e, 0x0e, + 0x16, 0x2b, 0x3d, 0xaf, 0x09, 0x73, 0x85, 0x73, 0xda, 0x42, 0xe1, 0x93, 0x95, 0xc7, 0xe6, 0xc5, + 0x6d, 0xe5, 0xc3, 0xfa, 0xc3, 0x24, 0x73, 0xd0, 0x34, 0x73, 0xd0, 0x6f, 0xe6, 0xa0, 0xf7, 0x99, + 0x63, 0x4c, 0x67, 0x8e, 0xf1, 0x35, 0x73, 0x8c, 0xd7, 0x6a, 0x12, 0x06, 0x04, 0x42, 0x49, 0xd8, + 0xb2, 0x10, 0x34, 0xe6, 0x5d, 0x7f, 0xb7, 0x5b, 0x9d, 0xa2, 0xae, 0x49, 0xed, 0x2f, 0x00, 0x00, + 0xff, 0xff, 0x1b, 0x96, 0xb1, 0x7f, 0x7d, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/go/node/market/v1/bid.go b/go/node/market/v1/bid.go new file mode 100644 index 00000000..1d7394bd --- /dev/null +++ b/go/node/market/v1/bid.go @@ -0,0 +1,72 @@ +package v1 + +import ( + "fmt" + + cerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + dtypes "pkg.akt.io/go/node/deployment/v1" +) + +// 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 cerrors.Wrap(err, "BidID: Invalid OrderID") + } + if _, err := sdk.AccAddressFromBech32(id.Provider); err != nil { + return sdkerrors.ErrInvalidAddress.Wrap("BidID: Invalid Provider Address") + } + if id.Owner == id.Provider { + return sdkerrors.ErrConflict.Wrap("BidID: self-bid") + } + return nil +} diff --git a/go/node/market/v1/bid.pb.go b/go/node/market/v1/bid.pb.go new file mode 100644 index 00000000..797b113a --- /dev/null +++ b/go/node/market/v1/bid.pb.go @@ -0,0 +1,533 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1/bid.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// BidState is an enum which refers to state of bid +type BidState int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + BidStateInvalid BidState = 0 + // BidOpen denotes state for bid open + BidOpen BidState = 1 + // BidMatched denotes state for bid open + BidActive BidState = 2 + // BidLost denotes state for bid lost + BidLost BidState = 3 + // BidClosed denotes state for bid closed + BidClosed BidState = 4 +) + +var BidState_name = map[int32]string{ + 0: "bid_invalid", + 1: "bid_open", + 2: "bid_active", + 3: "bid_lost", + 4: "bid_closed", +} + +var BidState_value = map[string]int32{ + "bid_invalid": 0, + "bid_open": 1, + "bid_active": 2, + "bid_lost": 3, + "bid_closed": 4, +} + +func (x BidState) String() string { + return proto.EnumName(BidState_name, int32(x)) +} + +func (BidState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3938cb3dd8faff6a, []int{0} +} + +// 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_3938cb3dd8faff6a, []int{0} +} +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 "" +} + +func init() { + proto.RegisterEnum("akash.market.v1.BidState", BidState_name, BidState_value) + proto.RegisterType((*BidID)(nil), "akash.market.v1.BidID") +} + +func init() { proto.RegisterFile("akash/market/v1/bid.proto", fileDescriptor_3938cb3dd8faff6a) } + +var fileDescriptor_3938cb3dd8faff6a = []byte{ + // 451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xb1, 0x6a, 0xdb, 0x40, + 0x18, 0x07, 0x70, 0x9d, 0x23, 0xb7, 0xce, 0xb9, 0xc1, 0x42, 0xcd, 0x60, 0x8b, 0x56, 0x27, 0x4c, + 0x07, 0x53, 0xa8, 0x84, 0x09, 0xb4, 0x90, 0x2d, 0x6a, 0x20, 0x04, 0x0a, 0x81, 0x78, 0xeb, 0x12, + 0x64, 0xdf, 0xa1, 0x1e, 0xb6, 0xf5, 0x29, 0xba, 0x43, 0xa5, 0x6f, 0x50, 0x3c, 0x75, 0xec, 0x62, + 0x08, 0x74, 0xeb, 0xdc, 0x87, 0xe8, 0x54, 0x42, 0xa7, 0x4e, 0xa2, 0xd8, 0x4b, 0xf1, 0xe8, 0x27, + 0x28, 0x77, 0x67, 0x3b, 0x64, 0xc8, 0x24, 0xdd, 0xff, 0xff, 0xfd, 0x0e, 0x0e, 0x3e, 0xdc, 0x49, + 0xc6, 0x89, 0xf8, 0x10, 0x4d, 0x93, 0x62, 0xcc, 0x64, 0x54, 0xf6, 0xa3, 0x21, 0xa7, 0x61, 0x5e, + 0x80, 0x04, 0xb7, 0xa5, 0xab, 0xd0, 0x54, 0x61, 0xd9, 0xf7, 0x0e, 0x53, 0x48, 0x41, 0x77, 0x91, + 0xfa, 0x33, 0x63, 0x5e, 0x67, 0x04, 0x62, 0x0a, 0xe2, 0xca, 0x14, 0xe6, 0x60, 0xaa, 0xee, 0xaf, + 0x1a, 0xae, 0xc7, 0x9c, 0x9e, 0x9f, 0xba, 0x67, 0xb8, 0x0e, 0x1f, 0x33, 0x56, 0xb4, 0x51, 0x80, + 0x7a, 0xfb, 0x71, 0x7f, 0x55, 0x11, 0x13, 0xac, 0x2b, 0xf2, 0xe4, 0x53, 0x32, 0x9d, 0x1c, 0x77, + 0xf5, 0xb1, 0xfb, 0xfb, 0xc7, 0xab, 0xc3, 0xcd, 0x1d, 0x27, 0x94, 0x16, 0x4c, 0x88, 0x81, 0x2c, + 0x78, 0x96, 0x5e, 0x9a, 0x71, 0xf7, 0x08, 0xdb, 0x54, 0xb0, 0xeb, 0x76, 0x2d, 0x40, 0x3d, 0x3b, + 0x26, 0x8b, 0x8a, 0xd8, 0xa7, 0x03, 0x76, 0xbd, 0xaa, 0x88, 0xce, 0xd7, 0x15, 0x69, 0x9a, 0xeb, + 0xd4, 0xa9, 0x7b, 0xa9, 0x43, 0x85, 0x52, 0x85, 0xf6, 0x02, 0xd4, 0x3b, 0x30, 0xe8, 0x6c, 0x83, + 0xd2, 0x7b, 0x28, 0x35, 0x28, 0xdd, 0x20, 0x50, 0xc8, 0xbe, 0x43, 0x17, 0x1b, 0x04, 0xf7, 0x10, + 0x18, 0xa4, 0x3e, 0xee, 0x00, 0x37, 0xf2, 0x02, 0x4a, 0x4e, 0x59, 0xd1, 0xae, 0xeb, 0xa7, 0xbe, + 0x59, 0x55, 0x64, 0x97, 0xad, 0x2b, 0xd2, 0x32, 0x68, 0x9b, 0x3c, 0xfc, 0xe0, 0x1d, 0x3a, 0x6e, + 0x7c, 0xbd, 0x21, 0xd6, 0xbf, 0x1b, 0x62, 0xbd, 0xfc, 0x8e, 0x70, 0x23, 0xe6, 0x74, 0x20, 0x13, + 0xc9, 0xdc, 0x17, 0xb8, 0x39, 0xe4, 0xf4, 0x8a, 0x67, 0x65, 0x32, 0xe1, 0xd4, 0xb1, 0xbc, 0xa7, + 0xb3, 0x79, 0xd0, 0xda, 0xd6, 0xe7, 0x26, 0x76, 0x3b, 0xb8, 0xa1, 0xa6, 0x20, 0x67, 0x99, 0x83, + 0xbc, 0xe6, 0x6c, 0x1e, 0x3c, 0x8e, 0x39, 0xbd, 0xc8, 0x59, 0xe6, 0x3e, 0xc7, 0x58, 0x55, 0xc9, + 0x48, 0xf2, 0x92, 0x39, 0x35, 0xef, 0x60, 0x36, 0x0f, 0xf6, 0x63, 0x4e, 0x4f, 0x74, 0xb0, 0x95, + 0x13, 0x10, 0xd2, 0xd9, 0xdb, 0xc9, 0x77, 0x20, 0xe4, 0x56, 0x8e, 0x26, 0x20, 0x18, 0x75, 0xec, + 0x9d, 0x7c, 0xab, 0x03, 0xcf, 0xfe, 0xfc, 0xcd, 0xb7, 0xe2, 0xd7, 0x3f, 0x17, 0x3e, 0xba, 0x5d, + 0xf8, 0xe8, 0xef, 0xc2, 0x47, 0x5f, 0x96, 0xbe, 0x75, 0xbb, 0xf4, 0xad, 0x3f, 0x4b, 0xdf, 0x7a, + 0xff, 0x2c, 0x1f, 0xa7, 0x61, 0x32, 0x96, 0x21, 0x57, 0x9b, 0x14, 0x65, 0x40, 0xd9, 0xdd, 0x06, + 0x0e, 0x1f, 0xe9, 0xe5, 0x39, 0xfa, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x97, 0x2c, 0xa5, 0xad, 0x9b, + 0x02, 0x00, 0x00, +} + +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 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 *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 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 *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 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/v1/event.pb.go b/go/node/market/v1/event.pb.go new file mode 100644 index 00000000..e1700553 --- /dev/null +++ b/go/node/market/v1/event.pb.go @@ -0,0 +1,1300 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1/event.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventOrderCreated struct { + ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventOrderCreated) Reset() { *m = EventOrderCreated{} } +func (m *EventOrderCreated) String() string { return proto.CompactTextString(m) } +func (*EventOrderCreated) ProtoMessage() {} +func (*EventOrderCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{0} +} +func (m *EventOrderCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOrderCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOrderCreated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventOrderCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOrderCreated.Merge(m, src) +} +func (m *EventOrderCreated) XXX_Size() int { + return m.Size() +} +func (m *EventOrderCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventOrderCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOrderCreated proto.InternalMessageInfo + +func (m *EventOrderCreated) GetID() OrderID { + if m != nil { + return m.ID + } + return OrderID{} +} + +type EventOrderClosed struct { + ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventOrderClosed) Reset() { *m = EventOrderClosed{} } +func (m *EventOrderClosed) String() string { return proto.CompactTextString(m) } +func (*EventOrderClosed) ProtoMessage() {} +func (*EventOrderClosed) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{1} +} +func (m *EventOrderClosed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventOrderClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventOrderClosed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventOrderClosed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventOrderClosed.Merge(m, src) +} +func (m *EventOrderClosed) XXX_Size() int { + return m.Size() +} +func (m *EventOrderClosed) XXX_DiscardUnknown() { + xxx_messageInfo_EventOrderClosed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventOrderClosed proto.InternalMessageInfo + +func (m *EventOrderClosed) GetID() OrderID { + if m != nil { + return m.ID + } + return OrderID{} +} + +type EventBidCreated struct { + ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` +} + +func (m *EventBidCreated) Reset() { *m = EventBidCreated{} } +func (m *EventBidCreated) String() string { return proto.CompactTextString(m) } +func (*EventBidCreated) ProtoMessage() {} +func (*EventBidCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{2} +} +func (m *EventBidCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBidCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBidCreated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBidCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBidCreated.Merge(m, src) +} +func (m *EventBidCreated) XXX_Size() int { + return m.Size() +} +func (m *EventBidCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventBidCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBidCreated proto.InternalMessageInfo + +func (m *EventBidCreated) GetID() BidID { + if m != nil { + return m.ID + } + return BidID{} +} + +func (m *EventBidCreated) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +type EventBidClosed struct { + ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventBidClosed) Reset() { *m = EventBidClosed{} } +func (m *EventBidClosed) String() string { return proto.CompactTextString(m) } +func (*EventBidClosed) ProtoMessage() {} +func (*EventBidClosed) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{3} +} +func (m *EventBidClosed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBidClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBidClosed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventBidClosed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBidClosed.Merge(m, src) +} +func (m *EventBidClosed) XXX_Size() int { + return m.Size() +} +func (m *EventBidClosed) XXX_DiscardUnknown() { + xxx_messageInfo_EventBidClosed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBidClosed proto.InternalMessageInfo + +func (m *EventBidClosed) GetID() BidID { + if m != nil { + return m.ID + } + return BidID{} +} + +type EventLeaseCreated struct { + ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"` +} + +func (m *EventLeaseCreated) Reset() { *m = EventLeaseCreated{} } +func (m *EventLeaseCreated) String() string { return proto.CompactTextString(m) } +func (*EventLeaseCreated) ProtoMessage() {} +func (*EventLeaseCreated) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{4} +} +func (m *EventLeaseCreated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventLeaseCreated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventLeaseCreated.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventLeaseCreated) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventLeaseCreated.Merge(m, src) +} +func (m *EventLeaseCreated) XXX_Size() int { + return m.Size() +} +func (m *EventLeaseCreated) XXX_DiscardUnknown() { + xxx_messageInfo_EventLeaseCreated.DiscardUnknown(m) +} + +var xxx_messageInfo_EventLeaseCreated proto.InternalMessageInfo + +func (m *EventLeaseCreated) GetID() LeaseID { + if m != nil { + return m.ID + } + return LeaseID{} +} + +func (m *EventLeaseCreated) GetPrice() types.DecCoin { + if m != nil { + return m.Price + } + return types.DecCoin{} +} + +type EventLeaseClosed struct { + ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` +} + +func (m *EventLeaseClosed) Reset() { *m = EventLeaseClosed{} } +func (m *EventLeaseClosed) String() string { return proto.CompactTextString(m) } +func (*EventLeaseClosed) ProtoMessage() {} +func (*EventLeaseClosed) Descriptor() ([]byte, []int) { + return fileDescriptor_95cc31d2d9808e8a, []int{5} +} +func (m *EventLeaseClosed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventLeaseClosed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventLeaseClosed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventLeaseClosed) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventLeaseClosed.Merge(m, src) +} +func (m *EventLeaseClosed) XXX_Size() int { + return m.Size() +} +func (m *EventLeaseClosed) XXX_DiscardUnknown() { + xxx_messageInfo_EventLeaseClosed.DiscardUnknown(m) +} + +var xxx_messageInfo_EventLeaseClosed proto.InternalMessageInfo + +func (m *EventLeaseClosed) GetID() LeaseID { + if m != nil { + return m.ID + } + return LeaseID{} +} + +func init() { + proto.RegisterType((*EventOrderCreated)(nil), "akash.market.v1.EventOrderCreated") + proto.RegisterType((*EventOrderClosed)(nil), "akash.market.v1.EventOrderClosed") + proto.RegisterType((*EventBidCreated)(nil), "akash.market.v1.EventBidCreated") + proto.RegisterType((*EventBidClosed)(nil), "akash.market.v1.EventBidClosed") + proto.RegisterType((*EventLeaseCreated)(nil), "akash.market.v1.EventLeaseCreated") + proto.RegisterType((*EventLeaseClosed)(nil), "akash.market.v1.EventLeaseClosed") +} + +func init() { proto.RegisterFile("akash/market/v1/event.proto", fileDescriptor_95cc31d2d9808e8a) } + +var fileDescriptor_95cc31d2d9808e8a = []byte{ + // 400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0xcd, 0x4a, 0xf3, 0x40, + 0x14, 0x4d, 0xf2, 0xfd, 0xc0, 0x97, 0x4f, 0xac, 0x16, 0x91, 0x5a, 0x6b, 0x46, 0xb2, 0x72, 0x35, + 0x43, 0x14, 0x5c, 0x74, 0x99, 0xb6, 0x48, 0x41, 0x10, 0xbb, 0x14, 0x44, 0x26, 0x99, 0xa1, 0x0e, + 0x69, 0x33, 0x25, 0x09, 0x01, 0xdf, 0xc2, 0x47, 0xf0, 0x15, 0x5c, 0xf8, 0x0e, 0x5d, 0x76, 0xe9, + 0x2a, 0x48, 0xba, 0x91, 0x2e, 0xfb, 0x04, 0x92, 0x99, 0xa9, 0x96, 0x16, 0x21, 0x8b, 0x82, 0xbb, + 0xdc, 0x9c, 0x7b, 0xef, 0x39, 0x77, 0xce, 0xbd, 0xe6, 0x21, 0x0e, 0x70, 0x7c, 0x8f, 0x86, 0x38, + 0x0a, 0x68, 0x82, 0x52, 0x07, 0xd1, 0x94, 0x86, 0x09, 0x1c, 0x45, 0x3c, 0xe1, 0xd5, 0x8a, 0x00, + 0xa1, 0x04, 0x61, 0xea, 0xd4, 0xf7, 0xfa, 0xbc, 0xcf, 0x05, 0x86, 0x8a, 0x2f, 0x99, 0x56, 0x3f, + 0xf0, 0x79, 0x3c, 0xe4, 0xf1, 0x9d, 0x04, 0x64, 0xa0, 0x20, 0x4b, 0x46, 0xc8, 0xc3, 0x31, 0x45, + 0xa9, 0xe3, 0xd1, 0x04, 0x3b, 0xc8, 0xe7, 0x2c, 0x5c, 0x94, 0xae, 0xd2, 0x7b, 0x8c, 0x28, 0x68, + 0x4d, 0x19, 0x8f, 0x08, 0x8d, 0xbe, 0x03, 0x07, 0x14, 0xc7, 0x54, 0x82, 0xb6, 0x67, 0xee, 0x76, + 0x8a, 0x29, 0xae, 0x8a, 0x82, 0x56, 0x44, 0x71, 0x42, 0x49, 0xf5, 0xc2, 0x34, 0x18, 0xa9, 0xe9, + 0xc7, 0xfa, 0xc9, 0xff, 0xd3, 0x1a, 0x5c, 0x19, 0x0c, 0x8a, 0xd4, 0x6e, 0xdb, 0x3d, 0x1a, 0x67, + 0x40, 0xcb, 0x33, 0x60, 0x74, 0xdb, 0xb3, 0x0c, 0x18, 0x8c, 0xcc, 0x33, 0xf0, 0xef, 0x01, 0x0f, + 0x07, 0x4d, 0x9b, 0x11, 0xbb, 0x67, 0x30, 0xd2, 0xfc, 0xfd, 0xfe, 0x04, 0x34, 0x1b, 0x9b, 0x3b, + 0x4b, 0x1c, 0x03, 0x1e, 0x6f, 0x9e, 0xe2, 0x59, 0x37, 0x2b, 0x82, 0xc3, 0x65, 0x64, 0x31, 0x45, + 0x67, 0x89, 0x62, 0x7f, 0x8d, 0xc2, 0x65, 0xa4, 0x14, 0x41, 0xf5, 0xda, 0xfc, 0x33, 0x8a, 0x98, + 0x4f, 0x6b, 0xbf, 0x44, 0xa7, 0x06, 0x54, 0xa6, 0x15, 0x36, 0x41, 0x65, 0x13, 0x6c, 0x53, 0xbf, + 0xc5, 0x59, 0x28, 0xfb, 0xcd, 0x32, 0x20, 0x4b, 0xe6, 0x19, 0xd8, 0x92, 0xcd, 0x44, 0x68, 0xf7, + 0xe4, 0x6f, 0xa5, 0xf9, 0xd6, 0xdc, 0xfe, 0x94, 0x2c, 0x1f, 0x65, 0x33, 0x8a, 0x55, 0xfb, 0x17, + 0x5d, 0x59, 0x7b, 0x59, 0xd8, 0x5d, 0xce, 0x5a, 0x91, 0xfa, 0xc3, 0xcf, 0xb2, 0xd8, 0x16, 0x29, + 0xbb, 0xcc, 0xb6, 0x94, 0x57, 0x2d, 0x29, 0xdc, 0xf3, 0x71, 0x6e, 0xe9, 0x93, 0xdc, 0xd2, 0xdf, + 0x72, 0x4b, 0x7f, 0x9c, 0x5a, 0xda, 0x64, 0x6a, 0x69, 0xaf, 0x53, 0x4b, 0xbb, 0x69, 0x8c, 0x82, + 0x3e, 0xc4, 0x41, 0x02, 0x59, 0x71, 0xb5, 0x28, 0xe4, 0x84, 0x7e, 0x1d, 0x8e, 0xf7, 0x57, 0xdc, + 0xcc, 0xd9, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0xe0, 0x00, 0x64, 0x09, 0x04, 0x00, 0x00, +} + +func (m *EventOrderCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventOrderCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOrderCreated) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventOrderClosed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventOrderClosed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventOrderClosed) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventBidCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBidCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBidCreated) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventBidClosed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventBidClosed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBidClosed) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventLeaseCreated) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventLeaseCreated) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventLeaseCreated) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventLeaseClosed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventLeaseClosed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventLeaseClosed) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventOrderCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventOrderClosed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventBidCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventBidClosed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventLeaseCreated) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + l = m.Price.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func (m *EventLeaseClosed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventOrderCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventOrderCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOrderCreated: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventOrderClosed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventOrderClosed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventOrderClosed: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBidCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBidCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBidCreated: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBidClosed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBidClosed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBidClosed: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventLeaseCreated) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventLeaseCreated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventLeaseCreated: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventLeaseClosed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventLeaseClosed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventLeaseClosed: 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrIntOverflowEvent + } + 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, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1/filters.pb.go b/go/node/market/v1/filters.pb.go new file mode 100644 index 00000000..314602b9 --- /dev/null +++ b/go/node/market/v1/filters.pb.go @@ -0,0 +1,1246 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1/filters.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// 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_601e383ab343d6e3, []int{0} +} +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 "" +} + +// 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_601e383ab343d6e3, []int{1} +} +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 "" +} + +// 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_601e383ab343d6e3, []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.RegisterType((*BidFilters)(nil), "akash.market.v1.BidFilters") + proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1.LeaseFilters") + proto.RegisterType((*OrderFilters)(nil), "akash.market.v1.OrderFilters") +} + +func init() { proto.RegisterFile("akash/market/v1/filters.proto", fileDescriptor_601e383ab343d6e3) } + +var fileDescriptor_601e383ab343d6e3 = []byte{ + // 420 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0xcb, 0xcc, 0x29, + 0x49, 0x2d, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x07, 0x4b, 0xeb, 0x41, 0xa4, + 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x72, 0xfa, 0x20, 0x16, 0x44, 0x99, + 0x94, 0x64, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x49, 0xa1, 0x5b, + 0x90, 0x94, 0x99, 0x02, 0x95, 0x92, 0x46, 0x97, 0xca, 0x49, 0x4d, 0x2c, 0x4e, 0xc5, 0x25, 0x99, + 0x5f, 0x94, 0x92, 0x5a, 0x04, 0x91, 0x54, 0x6a, 0x60, 0xe6, 0xe2, 0x72, 0xca, 0x4c, 0x71, 0x83, + 0xb8, 0x55, 0xc8, 0x9d, 0x8b, 0x35, 0xbf, 0x3c, 0x2f, 0xb5, 0x48, 0x82, 0x51, 0x81, 0x51, 0x83, + 0xd3, 0xc9, 0xf0, 0xd5, 0x3d, 0x79, 0x88, 0xc0, 0xa7, 0x7b, 0xf2, 0x3c, 0x95, 0x89, 0xb9, 0x39, + 0x56, 0x4a, 0x60, 0xae, 0xd2, 0xa5, 0x2d, 0xba, 0x22, 0x50, 0xd7, 0x39, 0xa6, 0xa4, 0x14, 0xa5, + 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0x41, 0x94, 0x0b, 0x19, 0x73, 0xb1, 0xa4, + 0x14, 0xa7, 0x16, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0xb0, 0x38, 0xc9, 0x3f, 0xba, 0x27, 0xcf, 0xe2, + 0x12, 0x9c, 0x5a, 0xf8, 0xea, 0x9e, 0x3c, 0x58, 0xfc, 0xd3, 0x3d, 0x79, 0x6e, 0x88, 0x71, 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, 0x53, 0x3a, 0x54, 0x53, 0x3e, 0x48, 0x13, + 0x0b, 0x42, 0x93, 0x3f, 0x54, 0x53, 0x3e, 0x8a, 0xa6, 0x7c, 0x88, 0x26, 0x10, 0x25, 0x14, 0xcc, + 0xc5, 0x51, 0x50, 0x94, 0x5f, 0x96, 0x99, 0x92, 0x5a, 0x24, 0xc1, 0x0a, 0xf6, 0xaa, 0xf9, 0xab, + 0x7b, 0xf2, 0x70, 0xb1, 0x4f, 0xf7, 0xe4, 0xf9, 0x21, 0x9a, 0x60, 0x22, 0xb8, 0x3d, 0x0c, 0xd7, + 0x24, 0xa4, 0xcf, 0xc5, 0x5a, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xc1, 0x06, 0x36, 0x51, 0x12, 0x14, + 0x78, 0x60, 0x01, 0x44, 0xe0, 0x81, 0xb9, 0x4a, 0x41, 0x10, 0x61, 0x2b, 0x96, 0x17, 0x0b, 0xe4, + 0x19, 0x94, 0x9a, 0x98, 0xb9, 0x78, 0x7c, 0x40, 0xf1, 0x35, 0x1a, 0x09, 0x03, 0x17, 0x09, 0x6b, + 0x99, 0xb8, 0x78, 0xfc, 0x41, 0xf9, 0x62, 0xa4, 0x45, 0x02, 0x3c, 0xbc, 0x58, 0x49, 0x09, 0x2f, + 0x27, 0xb3, 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, 0x92, 0x29, 0xc8, 0x4e, + 0xd7, 0x4b, 0xcc, 0x2e, 0xd1, 0xcb, 0x04, 0x15, 0x6c, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0x88, 0xb2, + 0x27, 0x89, 0x0d, 0x5c, 0xec, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x21, 0x47, 0xe4, 0x47, + 0x2e, 0x05, 0x00, 0x00, +} + +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 = encodeVarintFilters(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 = encodeVarintFilters(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintFilters(dAtA, i, uint64(len(m.Owner))) + 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 = encodeVarintFilters(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 = encodeVarintFilters(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintFilters(dAtA, i, uint64(len(m.Owner))) + 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 = encodeVarintFilters(dAtA, i, uint64(len(m.State))) + i-- + dAtA[i] = 0x2a + } + if m.OSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.OSeq)) + i-- + dAtA[i] = 0x20 + } + if m.GSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.GSeq)) + i-- + dAtA[i] = 0x18 + } + if m.DSeq != 0 { + i = encodeVarintFilters(dAtA, i, uint64(m.DSeq)) + i-- + dAtA[i] = 0x10 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintFilters(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFilters(dAtA []byte, offset int, v uint64) int { + offset -= sovFilters(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovFilters(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovFilters(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovFilters(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovFilters(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + 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 + sovFilters(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovFilters(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovFilters(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovFilters(uint64(m.OSeq)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + 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 + sovFilters(uint64(l)) + } + if m.DSeq != 0 { + n += 1 + sovFilters(uint64(m.DSeq)) + } + if m.GSeq != 0 { + n += 1 + sovFilters(uint64(m.GSeq)) + } + if m.OSeq != 0 { + n += 1 + sovFilters(uint64(m.OSeq)) + } + l = len(m.State) + if l > 0 { + n += 1 + l + sovFilters(uint64(l)) + } + return n +} + +func sovFilters(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFilters(x uint64) (n int) { + return sovFilters(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowFilters + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFilters(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFilters(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrIntOverflowFilters + } + 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 ErrInvalidLengthFilters + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFilters + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.State = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFilters(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFilters + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFilters(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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrIntOverflowFilters + } + 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, ErrInvalidLengthFilters + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFilters + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFilters + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFilters = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFilters = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFilters = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1/lease.go b/go/node/market/v1/lease.go new file mode 100644 index 00000000..fb6dae2b --- /dev/null +++ b/go/node/market/v1/lease.go @@ -0,0 +1,107 @@ +package v1 + +import ( + "strings" + + sdkerrors "cosmossdk.io/errors" + "gopkg.in/yaml.v3" + + dtypes "pkg.akt.io/go/node/deployment/v1" +) + +// 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() +} + +// 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) +} + +// Filters returns whether lease filters valid or not +func (obj Lease) Filters(filters LeaseFilters, stateVal LeaseState) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != obj.ID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != obj.ID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != obj.ID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != obj.ID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != obj.ID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != obj.State { + return false + } + + return true +} diff --git a/go/node/market/v1/lease.pb.go b/go/node/market/v1/lease.pb.go new file mode 100644 index 00000000..90f03008 --- /dev/null +++ b/go/node/market/v1/lease.pb.go @@ -0,0 +1,871 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1/lease.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// State is an enum which refers to state of lease +type LeaseState int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + LeaseStateInvalid LeaseState = 0 + // LeaseActive denotes state for lease active + LeaseActive LeaseState = 1 + // LeaseInsufficientFunds denotes state for lease insufficient_funds + LeaseInsufficientFunds LeaseState = 2 + // LeaseClosed denotes state for lease closed + LeaseClosed LeaseState = 3 +) + +var LeaseState_name = map[int32]string{ + 0: "lease_invalid", + 1: "lease_active", + 2: "lease_insufficient_funds", + 3: "lease_closed", +} + +var LeaseState_value = map[string]int32{ + "lease_invalid": 0, + "lease_active": 1, + "lease_insufficient_funds": 2, + "lease_closed": 3, +} + +func (x LeaseState) String() string { + return proto.EnumName(LeaseState_name, int32(x)) +} + +func (LeaseState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_122c076f440f07dc, []int{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_122c076f440f07dc, []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 { + ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + State LeaseState `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1.LeaseState" 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" yaml:"created_at"` + ClosedOn int64 `protobuf:"varint,5,opt,name=closed_on,json=closedOn,proto3" json:"closed_on" yaml:"closed_on"` +} + +func (m *Lease) Reset() { *m = Lease{} } +func (*Lease) ProtoMessage() {} +func (*Lease) Descriptor() ([]byte, []int) { + return fileDescriptor_122c076f440f07dc, []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) GetID() LeaseID { + if m != nil { + return m.ID + } + return LeaseID{} +} + +func (m *Lease) GetState() LeaseState { + 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 +} + +func init() { + proto.RegisterEnum("akash.market.v1.LeaseState", LeaseState_name, LeaseState_value) + proto.RegisterType((*LeaseID)(nil), "akash.market.v1.LeaseID") + proto.RegisterType((*Lease)(nil), "akash.market.v1.Lease") +} + +func init() { proto.RegisterFile("akash/market/v1/lease.proto", fileDescriptor_122c076f440f07dc) } + +var fileDescriptor_122c076f440f07dc = []byte{ + // 652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x93, 0xb4, 0x85, 0xd5, 0xdd, 0x58, 0x17, 0x0d, 0xd4, 0x65, 0x23, 0xee, 0xc2, 0xa5, + 0x42, 0x22, 0x51, 0x37, 0x09, 0xd0, 0x0e, 0x48, 0xcb, 0x2a, 0xa6, 0x49, 0x93, 0x26, 0xd2, 0x1b, + 0x97, 0xca, 0x8b, 0xbd, 0x60, 0xb5, 0x8b, 0xbb, 0x24, 0x2b, 0xe2, 0x1b, 0xa0, 0x9d, 0x38, 0x72, + 0x99, 0x34, 0x89, 0xaf, 0xc0, 0x91, 0x0f, 0xb0, 0xe3, 0xc4, 0x89, 0x93, 0x85, 0xba, 0x0b, 0xea, + 0xb1, 0x5f, 0x00, 0x64, 0x3b, 0x5b, 0x3a, 0x04, 0xa7, 0xe6, 0xfd, 0xff, 0xef, 0xf7, 0x6c, 0xbf, + 0x67, 0x17, 0xac, 0xa2, 0x3e, 0x4a, 0xdf, 0x79, 0xc7, 0x28, 0xe9, 0x93, 0xcc, 0x1b, 0xb5, 0xbd, + 0x01, 0x41, 0x29, 0x71, 0x87, 0x09, 0xcb, 0x98, 0xb9, 0x28, 0x4d, 0x57, 0x99, 0xee, 0xa8, 0x6d, + 0x2d, 0x47, 0x2c, 0x62, 0xd2, 0xf3, 0xc4, 0x97, 0x4a, 0xb3, 0x56, 0x42, 0x96, 0x1e, 0xb3, 0xb4, + 0xa7, 0x0c, 0x15, 0xe4, 0x96, 0xad, 0x22, 0xef, 0x10, 0xa5, 0xc4, 0x1b, 0xb5, 0x0f, 0x49, 0x86, + 0xda, 0x5e, 0xc8, 0x68, 0xac, 0x7c, 0xe7, 0xca, 0x00, 0xf7, 0xf7, 0xc5, 0x8a, 0x7b, 0x1d, 0x73, + 0x17, 0x54, 0xd8, 0xfb, 0x98, 0x24, 0x0d, 0xbd, 0xa9, 0xb7, 0xaa, 0x7e, 0x7b, 0xc2, 0xa1, 0x12, + 0xa6, 0x1c, 0xce, 0x7f, 0x40, 0xc7, 0x83, 0x2d, 0x47, 0x86, 0xce, 0xf7, 0xaf, 0xcf, 0x96, 0xf3, + 0x55, 0xb6, 0x31, 0x4e, 0x48, 0x9a, 0x76, 0xb3, 0x84, 0xc6, 0x51, 0xa0, 0xd2, 0xcd, 0x4d, 0x50, + 0xc6, 0x29, 0x39, 0x69, 0x18, 0x4d, 0xbd, 0x55, 0xf6, 0xe1, 0x98, 0xc3, 0x72, 0xa7, 0x4b, 0x4e, + 0x26, 0x1c, 0x4a, 0x7d, 0xca, 0x61, 0x4d, 0x95, 0x13, 0x91, 0x13, 0x48, 0x51, 0x40, 0x91, 0x80, + 0x4a, 0x4d, 0xbd, 0xb5, 0xa0, 0xa0, 0xdd, 0x1c, 0x8a, 0xee, 0x40, 0x91, 0x82, 0xa2, 0x1c, 0x62, + 0x02, 0x2a, 0x17, 0xd0, 0x41, 0x0e, 0xb1, 0x3b, 0x10, 0x53, 0x90, 0xf8, 0x31, 0xbb, 0x60, 0x6e, + 0x98, 0xb0, 0x11, 0xc5, 0x24, 0x69, 0x54, 0xe4, 0x51, 0x5f, 0x4c, 0x38, 0xbc, 0xd5, 0xa6, 0x1c, + 0x2e, 0x2a, 0xe8, 0x46, 0xf9, 0xff, 0x81, 0x6f, 0xa1, 0xad, 0xb9, 0xcf, 0x17, 0x50, 0xfb, 0x75, + 0x01, 0x35, 0xe7, 0xb7, 0x01, 0x2a, 0xb2, 0xa5, 0xe6, 0x2e, 0x30, 0x28, 0x96, 0xdd, 0xac, 0x6d, + 0x34, 0xdc, 0xbf, 0x66, 0xe9, 0xe6, 0x6d, 0xf7, 0x1f, 0x5f, 0x72, 0xa8, 0x8d, 0x39, 0x34, 0xf6, + 0x3a, 0x13, 0x0e, 0x0d, 0x8a, 0xa7, 0x1c, 0x56, 0xd5, 0x06, 0x28, 0x76, 0x02, 0x83, 0x62, 0x73, + 0x1f, 0x54, 0xd2, 0x0c, 0x65, 0x44, 0x76, 0xf4, 0xc1, 0xc6, 0xea, 0xbf, 0x6b, 0x75, 0x45, 0x8a, + 0xbf, 0x22, 0xc6, 0x26, 0xb3, 0x8b, 0xb1, 0xc9, 0xd0, 0x09, 0x94, 0x6c, 0xbe, 0x01, 0x95, 0x61, + 0x42, 0x43, 0x22, 0x5b, 0x5d, 0xdb, 0x58, 0x73, 0xf3, 0xa3, 0x89, 0x3b, 0xe2, 0xe6, 0x77, 0xc4, + 0xed, 0x90, 0x70, 0x87, 0xd1, 0x58, 0xed, 0x4e, 0x94, 0x94, 0x48, 0x51, 0x52, 0x86, 0x4e, 0xa0, + 0x64, 0xd3, 0x07, 0x20, 0x4c, 0x08, 0xca, 0x08, 0xee, 0xa1, 0x4c, 0x4e, 0xa3, 0xe4, 0x3f, 0x99, + 0x70, 0x38, 0xa3, 0x4e, 0x39, 0x5c, 0x52, 0x68, 0xa1, 0x39, 0x41, 0x35, 0x0f, 0xb6, 0x33, 0xf3, + 0x15, 0xa8, 0x86, 0x03, 0x96, 0x12, 0xdc, 0x63, 0xb1, 0x9c, 0x4b, 0xc9, 0x5f, 0x9f, 0x70, 0x58, + 0x88, 0x53, 0x0e, 0xeb, 0x79, 0x85, 0x1b, 0xc9, 0x09, 0xe6, 0xd4, 0xf7, 0x41, 0x5c, 0x4c, 0xe0, + 0xe9, 0x37, 0x1d, 0x80, 0xa2, 0x23, 0x66, 0x0b, 0x2c, 0xc8, 0x47, 0xd5, 0xa3, 0xf1, 0x08, 0x0d, + 0x28, 0xae, 0x6b, 0xd6, 0xc3, 0xb3, 0xf3, 0xe6, 0x52, 0x91, 0xb2, 0xa7, 0x0c, 0x73, 0x1d, 0xcc, + 0xab, 0x4c, 0x14, 0x66, 0x74, 0x44, 0xea, 0xba, 0xb5, 0x78, 0x76, 0xde, 0xac, 0xc9, 0xc4, 0x6d, + 0x29, 0x99, 0x2f, 0x41, 0xe3, 0xa6, 0x58, 0x7a, 0x7a, 0x74, 0x44, 0x43, 0x4a, 0xe2, 0xac, 0x77, + 0x74, 0x1a, 0xe3, 0xb4, 0x6e, 0x58, 0xd6, 0xd9, 0x79, 0xf3, 0x91, 0x1a, 0xec, 0x8c, 0xfd, 0x5a, + 0xb8, 0x45, 0x71, 0xb5, 0xe3, 0x7a, 0x69, 0xa6, 0xf8, 0x8e, 0x94, 0xac, 0xf2, 0xc7, 0x2f, 0xb6, + 0xe6, 0x3f, 0xbf, 0x1c, 0xdb, 0xfa, 0xd5, 0xd8, 0xd6, 0x7f, 0x8e, 0x6d, 0xfd, 0xd3, 0xb5, 0xad, + 0x5d, 0x5d, 0xdb, 0xda, 0x8f, 0x6b, 0x5b, 0x7b, 0xbb, 0x36, 0xec, 0x47, 0x2e, 0xea, 0x67, 0x2e, + 0x15, 0xef, 0xdf, 0x8b, 0x19, 0x26, 0xc5, 0x3f, 0xc7, 0xe1, 0x3d, 0xf9, 0xa4, 0x37, 0xff, 0x04, + 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc0, 0x5e, 0x31, 0x53, 0x04, 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.ID.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 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.ID.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 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 ID", 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.ID.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 |= LeaseState(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 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/v1/migrate/v1beta4.go b/go/node/market/v1/migrate/v1beta4.go new file mode 100644 index 00000000..57b1f6d2 --- /dev/null +++ b/go/node/market/v1/migrate/v1beta4.go @@ -0,0 +1,50 @@ +package migrate + +import ( + "github.com/akash-network/akash-api/go/node/market/v1beta4" + + "pkg.akt.io/go/node/market/v1" +) + +func BidStateFromV1beta4(from v1beta4.Bid_State) v1.BidState { + return v1.BidState(from) +} + +func LeaseIDFromV1beta4(from v1beta4.LeaseID) v1.LeaseID { + return v1.LeaseID{ + Owner: from.Owner, + DSeq: from.DSeq, + GSeq: from.GSeq, + OSeq: from.OSeq, + Provider: from.Provider, + } +} + +func BidIDFromV1beta4(from v1beta4.BidID) v1.BidID { + return v1.BidID{ + Owner: from.Owner, + DSeq: from.DSeq, + GSeq: from.GSeq, + OSeq: from.OSeq, + Provider: from.Provider, + } +} + +func OrderIDFromV1beta4(from v1beta4.OrderID) v1.OrderID { + return v1.OrderID{ + Owner: from.Owner, + DSeq: from.DSeq, + GSeq: from.GSeq, + OSeq: from.OSeq, + } +} + +func LeaseFromV1beta4(from v1beta4.Lease) v1.Lease { + return v1.Lease{ + ID: LeaseIDFromV1beta4(from.LeaseID), + State: v1.LeaseState(from.State), + Price: from.Price, + CreatedAt: from.CreatedAt, + ClosedOn: from.ClosedOn, + } +} diff --git a/go/node/market/v1/order.go b/go/node/market/v1/order.go new file mode 100644 index 00000000..808e8641 --- /dev/null +++ b/go/node/market/v1/order.go @@ -0,0 +1,50 @@ +package v1 + +import ( + "fmt" + + cerrors "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + dtypes "pkg.akt.io/go/node/deployment/v1" +) + +// 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 cerrors.Wrap(err, "OrderID: Invalid GroupID") + } + if id.OSeq == 0 { + return sdkerrors.ErrInvalidSequence.Wrap("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) +} diff --git a/go/node/market/v1/order.pb.go b/go/node/market/v1/order.pb.go new file mode 100644 index 00000000..ccc50639 --- /dev/null +++ b/go/node/market/v1/order.pb.go @@ -0,0 +1,474 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1/order.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// OrderState is an enum which refers to state of order +type OrderState int32 + +const ( + // Prefix should start with 0 in enum. So declaring dummy state + OrderStateInvalid OrderState = 0 + // OrderOpen denotes state for order open + OrderOpen OrderState = 1 + // OrderMatched denotes state for order matched + OrderActive OrderState = 2 + // OrderClosed denotes state for order lost + OrderClosed OrderState = 3 +) + +var OrderState_name = map[int32]string{ + 0: "order_invalid", + 1: "order_open", + 2: "order_active", + 3: "order_closed", +} + +var OrderState_value = map[string]int32{ + "order_invalid": 0, + "order_open": 1, + "order_active": 2, + "order_closed": 3, +} + +func (x OrderState) String() string { + return proto.EnumName(OrderState_name, int32(x)) +} + +func (OrderState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_84d7e2ed6a8c3a6e, []int{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_84d7e2ed6a8c3a6e, []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 +} + +func init() { + proto.RegisterEnum("akash.market.v1.OrderState", OrderState_name, OrderState_value) + proto.RegisterType((*OrderID)(nil), "akash.market.v1.OrderID") +} + +func init() { proto.RegisterFile("akash/market/v1/order.proto", fileDescriptor_84d7e2ed6a8c3a6e) } + +var fileDescriptor_84d7e2ed6a8c3a6e = []byte{ + // 407 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x3f, 0xcb, 0xd3, 0x40, + 0x1c, 0xc7, 0x73, 0xcf, 0x13, 0xff, 0x3c, 0xd7, 0x96, 0xc6, 0x50, 0xa1, 0x46, 0xcd, 0xc5, 0x4c, + 0x41, 0x30, 0xa1, 0x14, 0x1c, 0xba, 0xb5, 0x16, 0x4a, 0xa7, 0x42, 0xbb, 0xb9, 0x94, 0xb3, 0x39, + 0xce, 0x90, 0x36, 0x97, 0x26, 0x21, 0xe2, 0x3b, 0x90, 0x4e, 0x8e, 0x2e, 0x85, 0x8a, 0x6f, 0xc1, + 0x17, 0xe1, 0x58, 0x9c, 0x9c, 0x82, 0xa4, 0x8b, 0x74, 0xec, 0xea, 0x22, 0x77, 0x17, 0x88, 0x9d, + 0x92, 0xdf, 0xf7, 0xfb, 0xf9, 0xfc, 0x20, 0xb9, 0x83, 0x4f, 0x71, 0x88, 0xd3, 0xf7, 0xde, 0x06, + 0x27, 0x21, 0xc9, 0xbc, 0xbc, 0xe7, 0xb1, 0xc4, 0x27, 0x89, 0x1b, 0x27, 0x2c, 0x63, 0x7a, 0x5b, + 0x94, 0xae, 0x2c, 0xdd, 0xbc, 0x67, 0x74, 0x28, 0xa3, 0x4c, 0x74, 0x1e, 0x7f, 0x93, 0x98, 0xf1, + 0x64, 0xc5, 0xd2, 0x0d, 0x4b, 0x97, 0xb2, 0x90, 0x83, 0xac, 0xec, 0xbf, 0x00, 0x3e, 0x98, 0xf1, + 0x8d, 0xd3, 0xb1, 0x3e, 0x81, 0xf7, 0xd8, 0x87, 0x88, 0x24, 0x5d, 0x60, 0x01, 0xe7, 0x6e, 0xd4, + 0x3b, 0x17, 0x48, 0x06, 0x97, 0x02, 0x35, 0x3f, 0xe2, 0xcd, 0x7a, 0x60, 0x8b, 0xd1, 0xfe, 0xf9, + 0xfd, 0x55, 0xa7, 0xda, 0x32, 0xf4, 0xfd, 0x84, 0xa4, 0xe9, 0x22, 0x4b, 0x82, 0x88, 0xce, 0x25, + 0xae, 0xf7, 0xa1, 0xea, 0xa7, 0x64, 0xdb, 0xbd, 0xb1, 0x80, 0xa3, 0x8e, 0x50, 0x59, 0x20, 0x75, + 0xbc, 0x20, 0xdb, 0x73, 0x81, 0x44, 0x7e, 0x29, 0x50, 0x43, 0xae, 0xe3, 0x93, 0x3d, 0x17, 0x21, + 0x97, 0x28, 0x97, 0x6e, 0x2d, 0xe0, 0xb4, 0xa4, 0x34, 0xa9, 0x24, 0x7a, 0x25, 0x51, 0x29, 0xd1, + 0x4a, 0x62, 0x5c, 0x52, 0x6b, 0x69, 0x56, 0x49, 0xec, 0x4a, 0x62, 0x52, 0xe2, 0x8f, 0xc1, 0xc3, + 0x2f, 0x07, 0xa4, 0xfc, 0x39, 0x20, 0xe5, 0xe5, 0x57, 0x00, 0xa1, 0xf8, 0xfa, 0x45, 0x86, 0x33, + 0xa2, 0x3b, 0xb0, 0x25, 0xfe, 0xee, 0x32, 0x88, 0x72, 0xbc, 0x0e, 0x7c, 0x4d, 0x31, 0x1e, 0xef, + 0xf6, 0xd6, 0xa3, 0x1a, 0x99, 0xca, 0x42, 0x7f, 0x0e, 0xa1, 0x24, 0x59, 0x4c, 0x22, 0x0d, 0x18, + 0xad, 0xdd, 0xde, 0xba, 0x13, 0xd8, 0x2c, 0x26, 0x91, 0xfe, 0x02, 0x36, 0x65, 0x8d, 0x57, 0x59, + 0x90, 0x13, 0xed, 0xc6, 0x68, 0xef, 0xf6, 0x56, 0x43, 0x00, 0x43, 0x11, 0xd5, 0xc8, 0x6a, 0xcd, + 0x52, 0xe2, 0x6b, 0xb7, 0xff, 0x21, 0x6f, 0x44, 0x64, 0xa8, 0x9f, 0xbe, 0x99, 0xca, 0xe8, 0xf5, + 0x8f, 0xd2, 0x04, 0xc7, 0xd2, 0x04, 0xbf, 0x4b, 0x13, 0x7c, 0x3e, 0x99, 0xca, 0xf1, 0x64, 0x2a, + 0xbf, 0x4e, 0xa6, 0xf2, 0xf6, 0x59, 0x1c, 0x52, 0x17, 0x87, 0x99, 0x1b, 0xf0, 0xd3, 0xf6, 0x22, + 0xe6, 0x93, 0xfa, 0x9e, 0xbc, 0xbb, 0x2f, 0x0e, 0xb8, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xb5, + 0xf9, 0xd5, 0x8a, 0x41, 0x02, 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 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 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 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/v1beta1/bid.pb.go b/go/node/market/v1beta1/bid.pb.go deleted file mode 100644 index 7a550c6a..00000000 --- a/go/node/market/v1beta1/bid.pb.go +++ /dev/null @@ -1,1966 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/bid.proto - -package v1beta1 - -import ( - fmt "fmt" - 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 - -// 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_057fd80e533b030c, []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.Coin `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_057fd80e533b030c, []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.Coin { - if m != nil { - return m.Price - } - return types.Coin{} -} - -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_057fd80e533b030c, []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_057fd80e533b030c, []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_057fd80e533b030c, []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_057fd80e533b030c, []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.v1beta1.Bid_State" json:"state" yaml:"state"` - Price types.Coin `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_057fd80e533b030c, []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.Coin { - if m != nil { - return m.Price - } - return types.Coin{} -} - -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_057fd80e533b030c, []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.v1beta1.Bid_State", Bid_State_name, Bid_State_value) - proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta1.MsgCreateBid") - proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta1.MsgCreateBidResponse") - proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta1.MsgCloseBid") - proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta1.MsgCloseBidResponse") - proto.RegisterType((*BidID)(nil), "akash.market.v1beta1.BidID") - proto.RegisterType((*Bid)(nil), "akash.market.v1beta1.Bid") - proto.RegisterType((*BidFilters)(nil), "akash.market.v1beta1.BidFilters") -} - -func init() { proto.RegisterFile("akash/market/v1beta1/bid.proto", fileDescriptor_057fd80e533b030c) } - -var fileDescriptor_057fd80e533b030c = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xed, 0xc4, 0x4e, 0x9b, 0x4d, 0x3f, 0x22, 0xb7, 0x45, 0x6d, 0x50, 0xbd, 0xc6, 0x07, - 0xd4, 0x93, 0xad, 0xb6, 0xb7, 0x72, 0xaa, 0x5b, 0x01, 0x91, 0x80, 0x22, 0x17, 0x71, 0x80, 0x43, - 0xe5, 0x78, 0x57, 0xee, 0xaa, 0x49, 0xd6, 0xf5, 0x9a, 0x40, 0xdf, 0x00, 0xf5, 0x84, 0xc4, 0x85, - 0x4b, 0x51, 0x25, 0x5e, 0x83, 0x07, 0xe8, 0xb1, 0x27, 0xc4, 0xc9, 0x42, 0xe9, 0x05, 0xe5, 0x98, - 0x27, 0x40, 0xbb, 0xeb, 0x38, 0xa9, 0x54, 0x40, 0x48, 0x70, 0xe3, 0xe4, 0xcc, 0x7f, 0xe6, 0x37, - 0x19, 0xcf, 0x8c, 0x77, 0x81, 0x19, 0x1c, 0x05, 0xec, 0xd0, 0xed, 0x04, 0xc9, 0x11, 0x4e, 0xdd, - 0xde, 0x7a, 0x0b, 0xa7, 0xc1, 0xba, 0xdb, 0x22, 0xc8, 0x89, 0x13, 0x9a, 0x52, 0x63, 0x51, 0xf8, - 0x1d, 0xe9, 0x77, 0x72, 0x7f, 0x63, 0x31, 0xa2, 0x11, 0x15, 0x01, 0x2e, 0xff, 0x25, 0x63, 0x1b, - 0xd6, 0x8d, 0xb9, 0x68, 0x82, 0x70, 0x92, 0x47, 0x98, 0x21, 0x65, 0x1d, 0xca, 0xdc, 0x56, 0xc0, - 0x70, 0x11, 0x10, 0x52, 0xd2, 0x95, 0x7e, 0xfb, 0x4b, 0x09, 0xcc, 0x3c, 0x66, 0xd1, 0x4e, 0x82, - 0x83, 0x14, 0x7b, 0x04, 0x19, 0x2f, 0x81, 0x2e, 0xf8, 0x65, 0xd5, 0x52, 0xd7, 0x6a, 0x1b, 0xab, - 0xce, 0x4d, 0xe5, 0x38, 0x7b, 0x3c, 0xa4, 0xb9, 0xeb, 0xdd, 0xbd, 0xc8, 0xa0, 0xd2, 0xcf, 0xa0, - 0x2e, 0x84, 0x41, 0x06, 0x25, 0x3c, 0xcc, 0xe0, 0xcc, 0x49, 0xd0, 0x69, 0x6f, 0xd9, 0xc2, 0xb4, - 0x7d, 0x29, 0x1b, 0xf7, 0xc0, 0x74, 0x9c, 0xd0, 0x1e, 0xe1, 0xf9, 0x4b, 0x96, 0xba, 0x56, 0xf5, - 0xe0, 0x20, 0x83, 0x85, 0x36, 0xcc, 0xe0, 0xbc, 0xc4, 0x46, 0x8a, 0xed, 0x17, 0x4e, 0xe3, 0x09, - 0xd0, 0xe3, 0x84, 0x84, 0x78, 0xb9, 0x2c, 0x2a, 0x5b, 0x71, 0xe4, 0xab, 0x39, 0xfc, 0xd5, 0x8a, - 0xc2, 0x76, 0x28, 0xe9, 0x7a, 0xab, 0xbc, 0x2a, 0x5e, 0x8c, 0x88, 0x1f, 0x17, 0x23, 0x4c, 0xdb, - 0x97, 0xb2, 0xf1, 0x1c, 0x4c, 0x21, 0x1c, 0x53, 0x46, 0xd2, 0x65, 0xed, 0x77, 0x19, 0xef, 0xe4, - 0x19, 0x47, 0xc4, 0x30, 0x83, 0x73, 0x32, 0x67, 0x2e, 0xd8, 0xfe, 0xc8, 0xb5, 0xa5, 0x7d, 0x3f, - 0x87, 0x8a, 0x7d, 0x0b, 0x2c, 0x4e, 0xf6, 0xd5, 0xc7, 0x2c, 0xa6, 0x5d, 0x86, 0x6d, 0x02, 0x6a, - 0x5c, 0x6f, 0x53, 0x26, 0xda, 0xfd, 0x0c, 0x54, 0x5a, 0x04, 0x1d, 0x10, 0x94, 0xf7, 0xfb, 0xf6, - 0xcd, 0xfd, 0xf6, 0x08, 0x6a, 0xee, 0x7a, 0xd6, 0xa8, 0xdb, 0xc2, 0x1c, 0x64, 0xb0, 0x44, 0xd0, - 0x30, 0x83, 0x55, 0x59, 0x09, 0x41, 0xb6, 0xaf, 0xb7, 0x08, 0x6a, 0xa2, 0xbc, 0x84, 0x25, 0xb0, - 0x30, 0xf1, 0x57, 0x45, 0x05, 0x1f, 0x4b, 0x40, 0x26, 0x30, 0x5c, 0xa0, 0xd3, 0xd7, 0xdd, 0x7c, - 0xd6, 0x55, 0x6f, 0x45, 0xcc, 0x8f, 0x0b, 0x13, 0xf3, 0xe3, 0x26, 0x9f, 0x1f, 0x7f, 0x1a, 0x9b, - 0x40, 0x43, 0x0c, 0x1f, 0x8b, 0xd9, 0x69, 0x1e, 0xec, 0x67, 0x50, 0xdb, 0xdd, 0xc7, 0xc7, 0x83, - 0x0c, 0x0a, 0x7d, 0x98, 0xc1, 0x5a, 0xde, 0x15, 0x86, 0x8f, 0x6d, 0x5f, 0x88, 0x1c, 0x8a, 0x38, - 0xc4, 0xc7, 0x36, 0x2b, 0xa1, 0x07, 0x39, 0x14, 0x5d, 0x83, 0x22, 0x09, 0x45, 0x39, 0x44, 0x39, - 0xa4, 0x8d, 0xa1, 0xbd, 0x1c, 0xa2, 0xd7, 0x20, 0x2a, 0x21, 0xfe, 0xb8, 0xb6, 0x5e, 0xfa, 0x1f, - 0xae, 0xd7, 0xd6, 0xf4, 0x87, 0x73, 0xa8, 0x88, 0xbe, 0x7d, 0x2e, 0x83, 0xf2, 0x3f, 0x9b, 0x8d, - 0xf1, 0x14, 0xe8, 0x2c, 0x0d, 0x52, 0x2c, 0x9a, 0x38, 0xb7, 0x01, 0x7f, 0x9a, 0xd4, 0xd9, 0xe7, - 0x61, 0x72, 0x2a, 0x82, 0x18, 0x4f, 0x45, 0x98, 0xb6, 0x2f, 0xe5, 0xbf, 0xfe, 0x61, 0xac, 0x02, - 0x10, 0x8a, 0xbd, 0x45, 0x07, 0x81, 0xfc, 0x36, 0xca, 0x7e, 0x35, 0x57, 0xb6, 0x53, 0xfb, 0xbd, - 0x0a, 0x74, 0x51, 0x9a, 0x61, 0x81, 0x29, 0xd2, 0xed, 0x05, 0x6d, 0x82, 0xea, 0x4a, 0x63, 0xe1, - 0xf4, 0xcc, 0x9a, 0xf7, 0x08, 0x12, 0xae, 0xa6, 0x94, 0x8d, 0x25, 0xa0, 0xd1, 0x18, 0x77, 0xeb, - 0x6a, 0xa3, 0x76, 0x7a, 0x66, 0x4d, 0x79, 0x04, 0xed, 0xc5, 0xb8, 0x6b, 0xac, 0x80, 0x4a, 0x10, - 0xa6, 0xa4, 0x87, 0xeb, 0xa5, 0xc6, 0xec, 0xe9, 0x99, 0x55, 0xf5, 0x08, 0xda, 0x16, 0x02, 0x27, - 0xda, 0x94, 0xa5, 0xf5, 0x72, 0x41, 0x3c, 0xa2, 0x2c, 0xe5, 0x44, 0xc8, 0x17, 0x19, 0xd5, 0xb5, - 0x82, 0x10, 0x9b, 0x8d, 0x1a, 0xda, 0xdb, 0x4f, 0xa6, 0x32, 0x31, 0xbe, 0xcb, 0x12, 0x00, 0x1e, - 0x41, 0xf7, 0x49, 0x3b, 0xc5, 0x09, 0xfb, 0xbf, 0xe4, 0x93, 0x67, 0xa8, 0x3b, 0x5a, 0xbe, 0xca, - 0xb8, 0x19, 0xbf, 0xda, 0x2d, 0x79, 0x92, 0x78, 0x0f, 0x2f, 0xfa, 0xa6, 0x7a, 0xd9, 0x37, 0xd5, - 0x6f, 0x7d, 0x53, 0x7d, 0x77, 0x65, 0x2a, 0x97, 0x57, 0xa6, 0xf2, 0xf5, 0xca, 0x54, 0x5e, 0x38, - 0x11, 0x49, 0x0f, 0x5f, 0xb5, 0x9c, 0x90, 0x76, 0x5c, 0xda, 0x4b, 0xc2, 0xf6, 0x91, 0x2b, 0xef, - 0xa4, 0x37, 0xa3, 0x5b, 0x29, 0x3d, 0x89, 0x31, 0x1b, 0x5d, 0x3d, 0xad, 0x8a, 0xb8, 0x76, 0x36, - 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xef, 0x46, 0xe7, 0x06, 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/v1beta1/codec.go b/go/node/market/v1beta1/codec.go deleted file mode 100644 index ba062059..00000000 --- a/go/node/market/v1beta1/codec.go +++ /dev/null @@ -1,50 +0,0 @@ -package v1beta1 - -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/v1beta1/errors.go b/go/node/market/v1beta1/errors.go deleted file mode 100644 index 66dba9f2..00000000 --- a/go/node/market/v1beta1/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -package v1beta1 - -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") - // ErrBidZeroPrice zero price - ErrBidZeroPrice = errors.New("invalid bid: zero price") - // ErrOrderActive order active - ErrOrderActive = errors.New("order active") - // ErrOrderClosed order closed - ErrOrderClosed = errors.New("order closed") - // ErrInvalidParam indicates an invalid chain parameter - ErrInvalidParam = errors.New("parameter invalid") - // ErrInvalidBid indicates an invalid chain parameter - ErrInvalidBid = errors.New("unknown provider") -) diff --git a/go/node/market/v1beta1/escrow.go b/go/node/market/v1beta1/escrow.go deleted file mode 100644 index 40fbe101..00000000 --- a/go/node/market/v1beta1/escrow.go +++ /dev/null @@ -1,60 +0,0 @@ -package v1beta1 - -import ( - "fmt" - "strconv" - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta1" -) - -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/v1beta1/event.go b/go/node/market/v1beta1/event.go deleted file mode 100644 index be7d2d7f..00000000 --- a/go/node/market/v1beta1/event.go +++ /dev/null @@ -1,359 +0,0 @@ -package v1beta1 - -import ( - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - "github.com/akash-network/akash-api/go/sdkutil" -) - -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.Coin `json:"price"` -} - -func NewEventBidCreated(id BidID, price sdk.Coin) 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.Coin `json:"price"` -} - -func NewEventBidClosed(id BidID, price sdk.Coin) 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.Coin `json:"price"` -} - -func NewEventLeaseCreated(id LeaseID, price sdk.Coin) 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.Coin `json:"price"` -} - -func NewEventLeaseClosed(id LeaseID, price sdk.Coin) 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.Coin) []sdk.Attribute { - return []sdk.Attribute{ - sdk.NewAttribute(evPriceDenomKey, price.Denom), - sdk.NewAttribute(evPriceAmountKey, price.Amount.String()), - } -} - -func parseEVPriceAttributes(attrs []sdk.Attribute) (sdk.Coin, error) { - denom, err := sdkutil.GetString(attrs, evPriceDenomKey) - if err != nil { - return sdk.Coin{}, err - } - - amounts, err := sdkutil.GetString(attrs, evPriceAmountKey) - if err != nil { - return sdk.Coin{}, err - } - - amount, ok := sdk.NewIntFromString(amounts) - if !ok { - return sdk.Coin{}, ErrParsingPrice - } - - return sdk.NewCoin(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/v1beta1/events_test.go b/go/node/market/v1beta1/events_test.go deleted file mode 100644 index a4457775..00000000 --- a/go/node/market/v1beta1/events_test.go +++ /dev/null @@ -1,460 +0,0 @@ -package v1beta1 - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/pkg/errors" - - "github.com/stretchr/testify/require" - - "github.com/akash-network/akash-api/go/sdkutil" -) - -var ( - 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/v1beta1/genesis.pb.go b/go/node/market/v1beta1/genesis.pb.go deleted file mode 100644 index a03e558c..00000000 --- a/go/node/market/v1beta1/genesis.pb.go +++ /dev/null @@ -1,453 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/genesis.proto - -package v1beta1 - -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 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_3add0908026fd9bf, []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.v1beta1.GenesisState") -} - -func init() { - proto.RegisterFile("akash/market/v1beta1/genesis.proto", fileDescriptor_3add0908026fd9bf) -} - -var fileDescriptor_3add0908026fd9bf = []byte{ - // 296 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, - 0x14, 0x45, 0xe3, 0x56, 0xca, 0x90, 0xc2, 0x12, 0x75, 0x88, 0x0a, 0x72, 0x82, 0xa7, 0x4e, 0xb6, - 0x5a, 0x36, 0xc6, 0x2e, 0x30, 0x20, 0x81, 0x02, 0x2c, 0x6c, 0x4e, 0xb1, 0xd2, 0x2a, 0x09, 0x8e, - 0x6c, 0x53, 0xd1, 0xbf, 0x80, 0xbf, 0xea, 0xd8, 0x91, 0x29, 0x42, 0xc9, 0xc6, 0xc8, 0x17, 0x54, - 0xb1, 0x5d, 0x65, 0x89, 0xba, 0xe5, 0xe9, 0x9d, 0x77, 0x72, 0x7d, 0x3d, 0x44, 0x33, 0x2a, 0x57, - 0xa4, 0xa0, 0x22, 0x63, 0x8a, 0x6c, 0x66, 0x09, 0x53, 0x74, 0x46, 0x52, 0xf6, 0xce, 0xe4, 0x5a, - 0xe2, 0x52, 0x70, 0xc5, 0xfd, 0xb1, 0x66, 0xb0, 0x61, 0xb0, 0x65, 0x26, 0xe3, 0x94, 0xa7, 0x5c, - 0x03, 0xa4, 0xfd, 0x32, 0xec, 0x24, 0xea, 0xf5, 0x71, 0xf1, 0xc6, 0xc4, 0x49, 0x22, 0x67, 0x54, - 0x32, 0x4b, 0x5c, 0xf5, 0x12, 0x25, 0x15, 0xb4, 0xb0, 0x91, 0xd0, 0xf7, 0xc0, 0x3b, 0xbb, 0x35, - 0x21, 0x9f, 0x14, 0x55, 0xcc, 0x7f, 0xf6, 0x5c, 0xfd, 0x13, 0x19, 0x80, 0x68, 0x38, 0x1d, 0xcd, - 0x2f, 0x70, 0x5f, 0x68, 0xfc, 0xd0, 0x32, 0x8b, 0x70, 0x57, 0x85, 0xce, 0x5f, 0x15, 0xda, 0x93, - 0xff, 0x2a, 0x3c, 0xdf, 0xd2, 0x22, 0xbf, 0x41, 0x66, 0x46, 0xb1, 0x5d, 0xb4, 0x56, 0x1d, 0x4c, - 0x06, 0x83, 0x53, 0xd6, 0xfb, 0x96, 0xe9, 0xac, 0xe6, 0xa4, 0xb3, 0x9a, 0x19, 0xc5, 0x76, 0xe1, - 0xbf, 0x78, 0xae, 0x79, 0x4c, 0x30, 0x8c, 0xc0, 0x74, 0x34, 0xbf, 0xec, 0xb7, 0x3e, 0x6a, 0xa6, - 0xd3, 0x9a, 0x9b, 0x4e, 0x6b, 0x66, 0x14, 0xdb, 0xc5, 0xe2, 0x6e, 0x57, 0x43, 0xb0, 0xaf, 0x21, - 0xf8, 0xad, 0x21, 0xf8, 0x6a, 0xa0, 0xb3, 0x6f, 0xa0, 0xf3, 0xd3, 0x40, 0xe7, 0x15, 0xa7, 0x6b, - 0xb5, 0xfa, 0x48, 0xf0, 0x92, 0x17, 0x84, 0x6f, 0xc4, 0x32, 0xcf, 0x88, 0xa9, 0xf8, 0xf3, 0x58, - 0xb2, 0xda, 0x96, 0x4c, 0x1e, 0xab, 0x4e, 0x5c, 0x5d, 0xf2, 0xf5, 0x21, 0x00, 0x00, 0xff, 0xff, - 0x8b, 0xfa, 0xcc, 0xec, 0x1d, 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/v1beta1/id.go b/go/node/market/v1beta1/id.go deleted file mode 100644 index 7bce98d1..00000000 --- a/go/node/market/v1beta1/id.go +++ /dev/null @@ -1,154 +0,0 @@ -package v1beta1 - -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/v1beta1" -) - -// 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/v1beta1/key.go b/go/node/market/v1beta1/key.go deleted file mode 100644 index 396358af..00000000 --- a/go/node/market/v1beta1/key.go +++ /dev/null @@ -1,24 +0,0 @@ -package v1beta1 - -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} -} diff --git a/go/node/market/v1beta1/lease.pb.go b/go/node/market/v1beta1/lease.pb.go deleted file mode 100644 index 0becfdf5..00000000 --- a/go/node/market/v1beta1/lease.pb.go +++ /dev/null @@ -1,2097 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/lease.proto - -package v1beta1 - -import ( - fmt "fmt" - 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 - -// 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_b81e11575e79ba08, []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_b81e11575e79ba08, []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.v1beta1.Lease_State" json:"state" yaml:"state"` - Price types.Coin `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 *Lease) Reset() { *m = Lease{} } -func (*Lease) ProtoMessage() {} -func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_b81e11575e79ba08, []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.Coin { - if m != nil { - return m.Price - } - return types.Coin{} -} - -func (m *Lease) GetCreatedAt() int64 { - if m != nil { - return m.CreatedAt - } - 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_b81e11575e79ba08, []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_b81e11575e79ba08, []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_b81e11575e79ba08, []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_b81e11575e79ba08, []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_b81e11575e79ba08, []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_b81e11575e79ba08, []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_b81e11575e79ba08, []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.v1beta1.Lease_State", Lease_State_name, Lease_State_value) - proto.RegisterType((*LeaseID)(nil), "akash.market.v1beta1.LeaseID") - proto.RegisterType((*Lease)(nil), "akash.market.v1beta1.Lease") - proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1beta1.LeaseFilters") - proto.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta1.MsgCreateLease") - proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta1.MsgCreateLeaseResponse") - proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta1.MsgWithdrawLease") - proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta1.MsgWithdrawLeaseResponse") - proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta1.MsgCloseLease") - proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta1.MsgCloseLeaseResponse") -} - -func init() { proto.RegisterFile("akash/market/v1beta1/lease.proto", fileDescriptor_b81e11575e79ba08) } - -var fileDescriptor_b81e11575e79ba08 = []byte{ - // 731 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4d, 0x4f, 0xdb, 0x4a, - 0x14, 0xb5, 0x93, 0x38, 0xc0, 0x84, 0x8f, 0x3c, 0x0b, 0x78, 0xc1, 0x08, 0x8f, 0x9f, 0x57, 0xac, - 0x6c, 0x11, 0x76, 0xbc, 0x15, 0x01, 0xf1, 0x5e, 0xa4, 0xd2, 0x4a, 0xa6, 0x52, 0xab, 0xaa, 0x12, - 0x72, 0x3c, 0x83, 0x19, 0x91, 0x78, 0x82, 0xc7, 0x84, 0xf2, 0x0f, 0x2a, 0x56, 0x5d, 0x76, 0x83, - 0x8a, 0xd4, 0x3f, 0xc3, 0x12, 0x55, 0x5d, 0x74, 0x65, 0x55, 0x61, 0x53, 0x65, 0x99, 0x5f, 0x50, - 0xcd, 0x8c, 0xf3, 0x85, 0x22, 0x56, 0x55, 0x57, 0x5d, 0x25, 0x73, 0xee, 0x3d, 0xf7, 0x9e, 0x9c, - 0x7b, 0x27, 0x03, 0x2c, 0xff, 0xcc, 0x67, 0xa7, 0x6e, 0xcb, 0x8f, 0xcf, 0x70, 0xe2, 0x76, 0xb6, - 0x1a, 0x38, 0xf1, 0xb7, 0xdc, 0x26, 0xf6, 0x19, 0x76, 0xda, 0x31, 0x4d, 0xa8, 0xbe, 0x2c, 0x32, - 0x1c, 0x99, 0xe1, 0x64, 0x19, 0xc6, 0x72, 0x48, 0x43, 0x2a, 0x12, 0x5c, 0xfe, 0x4d, 0xe6, 0x1a, - 0x66, 0x40, 0x59, 0x8b, 0x32, 0xb7, 0xe1, 0x33, 0x3c, 0x2c, 0x16, 0x50, 0x12, 0x0d, 0xe2, 0x53, - 0xbb, 0x35, 0x08, 0x92, 0x71, 0xfb, 0x36, 0x07, 0x66, 0x9e, 0xf1, 0xde, 0xf5, 0x7d, 0xdd, 0x05, - 0x1a, 0xbd, 0x8c, 0x70, 0x5c, 0x51, 0x2d, 0x75, 0x73, 0xae, 0xb6, 0xd6, 0x4b, 0xa1, 0x04, 0xfa, - 0x29, 0x9c, 0xbf, 0xf2, 0x5b, 0xcd, 0x1d, 0x5b, 0x1c, 0x6d, 0x4f, 0xc2, 0xfa, 0x36, 0x28, 0x20, - 0x86, 0xcf, 0x2b, 0x39, 0x4b, 0xdd, 0x2c, 0xd4, 0x60, 0x37, 0x85, 0x85, 0xfd, 0x23, 0x7c, 0xde, - 0x4b, 0xa1, 0xc0, 0xfb, 0x29, 0x2c, 0x49, 0x1a, 0x3f, 0xd9, 0x9e, 0x00, 0x39, 0x29, 0xe4, 0xa4, - 0xbc, 0xa5, 0x6e, 0x2e, 0x48, 0xd2, 0x7f, 0x19, 0x29, 0x9c, 0x20, 0x85, 0x92, 0x14, 0x66, 0x24, - 0xca, 0x49, 0x85, 0x11, 0xe9, 0x45, 0x46, 0xa2, 0x13, 0x24, 0x2a, 0x49, 0xfc, 0x43, 0xff, 0x17, - 0xcc, 0xb6, 0x63, 0xda, 0x21, 0x08, 0xc7, 0x15, 0x4d, 0xfc, 0x24, 0xd8, 0x4b, 0xe1, 0x10, 0xeb, - 0xa7, 0x70, 0x49, 0x92, 0x06, 0x88, 0xed, 0x0d, 0x83, 0x3b, 0xb3, 0x1f, 0x6f, 0xa1, 0xf2, 0xe3, - 0x16, 0x2a, 0xf6, 0xd7, 0x3c, 0xd0, 0x84, 0x45, 0xfa, 0x5b, 0x30, 0x2b, 0xe6, 0x74, 0x4c, 0x90, - 0xf0, 0xa8, 0x54, 0xdd, 0x70, 0xa6, 0xcd, 0xca, 0xc9, 0x1c, 0xad, 0xd9, 0x77, 0x29, 0x54, 0xba, - 0x29, 0x1c, 0x58, 0xdc, 0x4b, 0x61, 0x8e, 0xa0, 0x7e, 0x0a, 0xe7, 0x64, 0x63, 0x82, 0x6c, 0x6f, - 0x46, 0x94, 0xac, 0x23, 0xdd, 0x03, 0x1a, 0x4b, 0xfc, 0x04, 0x0b, 0x3b, 0x17, 0xab, 0xff, 0x3c, - 0x51, 0xda, 0x39, 0xe2, 0x89, 0x72, 0x42, 0x82, 0x33, 0x9a, 0x90, 0x38, 0xda, 0x9e, 0x84, 0xf5, - 0xe7, 0x40, 0x6b, 0xc7, 0x24, 0xc0, 0xc2, 0xed, 0x52, 0x75, 0xcd, 0x91, 0xeb, 0xe2, 0xf0, 0x75, - 0x19, 0x96, 0xdc, 0xa3, 0x24, 0xaa, 0x6d, 0x70, 0xa9, 0xbc, 0x9e, 0xc8, 0x1f, 0xd5, 0x13, 0x47, - 0xdb, 0x93, 0xb0, 0xbe, 0x01, 0x40, 0x10, 0x63, 0x3f, 0xc1, 0xe8, 0xd8, 0x4f, 0xc4, 0x34, 0xf2, - 0xde, 0x5c, 0x86, 0xec, 0x26, 0xf6, 0x27, 0x15, 0x68, 0x42, 0x9a, 0x6e, 0x83, 0x19, 0x12, 0x75, - 0xfc, 0x26, 0x41, 0x65, 0xc5, 0x58, 0xb9, 0xbe, 0xb1, 0xfe, 0x12, 0xc2, 0x45, 0xb0, 0x2e, 0x03, - 0xfa, 0x3a, 0x28, 0xfa, 0x41, 0x42, 0x3a, 0xb8, 0xac, 0x1a, 0x4b, 0xd7, 0x37, 0x56, 0x49, 0xa4, - 0xec, 0x0a, 0x48, 0xaf, 0x02, 0x9d, 0x44, 0xec, 0xe2, 0xe4, 0x84, 0x04, 0x04, 0x47, 0xc9, 0xf1, - 0xc9, 0x45, 0x84, 0x58, 0x39, 0x67, 0x18, 0xd7, 0x37, 0xd6, 0xaa, 0xb4, 0x73, 0x2c, 0x7c, 0xc0, - 0xa3, 0xbc, 0x60, 0xd0, 0xa4, 0x0c, 0xa3, 0x72, 0x7e, 0xac, 0xe0, 0x9e, 0x80, 0x8c, 0xc2, 0xfb, - 0xcf, 0xa6, 0x32, 0x36, 0xd6, 0x2f, 0x39, 0x30, 0x2f, 0xe2, 0x07, 0xa4, 0x99, 0xe0, 0x98, 0xfd, - 0x59, 0xff, 0xb1, 0xf5, 0xe7, 0x66, 0xc8, 0x65, 0x2c, 0x8e, 0xcc, 0x78, 0x6a, 0xd3, 0x76, 0x0a, - 0xc2, 0xd4, 0x26, 0x58, 0x3c, 0x64, 0xe1, 0x9e, 0x58, 0x08, 0x79, 0x67, 0x5e, 0x82, 0x62, 0x83, - 0xa0, 0xd1, 0x8d, 0x59, 0x9f, 0xbe, 0xd6, 0x35, 0x82, 0xea, 0xfb, 0x35, 0x2b, 0xbb, 0x2f, 0x9a, - 0x38, 0x4e, 0xbb, 0x2d, 0x5a, 0x83, 0xa0, 0x3a, 0xca, 0xba, 0x55, 0xc0, 0xea, 0x64, 0x37, 0x0f, - 0xb3, 0x36, 0x8d, 0x18, 0xb6, 0x63, 0x50, 0x3e, 0x64, 0xe1, 0x2b, 0x92, 0x9c, 0xa2, 0xd8, 0xbf, - 0x94, 0x4a, 0x5e, 0x3f, 0x52, 0xf2, 0x0b, 0xee, 0xee, 0x84, 0x1a, 0x03, 0x54, 0x1e, 0xf7, 0x1c, - 0xea, 0x61, 0x60, 0x81, 0x2b, 0xe5, 0x9b, 0xf8, 0x1b, 0xfe, 0x4a, 0x32, 0x41, 0x7f, 0x83, 0x95, - 0x89, 0xa6, 0x03, 0x35, 0xb5, 0xff, 0xef, 0xba, 0xa6, 0x7a, 0xdf, 0x35, 0xd5, 0xef, 0x5d, 0x53, - 0xfd, 0xf0, 0x60, 0x2a, 0xf7, 0x0f, 0xa6, 0xf2, 0xed, 0xc1, 0x54, 0xde, 0x38, 0x21, 0x49, 0x4e, - 0x2f, 0x1a, 0x4e, 0x40, 0x5b, 0x2e, 0xed, 0xc4, 0x41, 0xf3, 0xcc, 0x95, 0x0f, 0xc8, 0xbb, 0xc1, - 0x13, 0x92, 0x5c, 0xb5, 0x31, 0x1b, 0x3c, 0x24, 0x8d, 0xa2, 0x78, 0x45, 0xb6, 0x7f, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x0a, 0x38, 0xdf, 0xb1, 0xd5, 0x06, 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.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)) - } - 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 - } - } - 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/v1beta1/msgs.go b/go/node/market/v1beta1/msgs.go deleted file mode 100644 index 525c9947..00000000 --- a/go/node/market/v1beta1/msgs.go +++ /dev/null @@ -1,215 +0,0 @@ -package v1beta1 - -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.Coin, 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/v1beta1/order.pb.go b/go/node/market/v1beta1/order.pb.go deleted file mode 100644 index ab64bf4e..00000000 --- a/go/node/market/v1beta1/order.pb.go +++ /dev/null @@ -1,1107 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/order.proto - -package v1beta1 - -import ( - fmt "fmt" - v1beta1 "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - _ "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 - -// 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_0d97b6ff257f8a05, []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_0d97b6ff257f8a05, []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.v1beta1.Order_State" json:"state" yaml:"state"` - Spec v1beta1.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_0d97b6ff257f8a05, []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() v1beta1.GroupSpec { - if m != nil { - return m.Spec - } - return v1beta1.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_0d97b6ff257f8a05, []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.v1beta1.Order_State", Order_State_name, Order_State_value) - proto.RegisterType((*OrderID)(nil), "akash.market.v1beta1.OrderID") - proto.RegisterType((*Order)(nil), "akash.market.v1beta1.Order") - proto.RegisterType((*OrderFilters)(nil), "akash.market.v1beta1.OrderFilters") -} - -func init() { proto.RegisterFile("akash/market/v1beta1/order.proto", fileDescriptor_0d97b6ff257f8a05) } - -var fileDescriptor_0d97b6ff257f8a05 = []byte{ - // 579 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0x31, 0x6f, 0xd3, 0x4e, - 0x18, 0xc6, 0xed, 0xc4, 0x69, 0x9a, 0x4b, 0xfb, 0xff, 0x07, 0xab, 0x88, 0xe2, 0xaa, 0x3e, 0x63, - 0x18, 0x32, 0xd9, 0x6a, 0xba, 0x65, 0x6b, 0xa8, 0x28, 0x99, 0x22, 0x39, 0x4c, 0x08, 0xa9, 0x72, - 0xec, 0x93, 0x6b, 0xc5, 0xc9, 0xb9, 0xf6, 0x35, 0x90, 0x9d, 0x01, 0x65, 0x62, 0x41, 0x62, 0x89, - 0x54, 0x89, 0x0f, 0xc2, 0xda, 0xb1, 0x23, 0x93, 0x85, 0x92, 0x05, 0x65, 0xcc, 0x27, 0x40, 0xf7, - 0x9e, 0x83, 0x5b, 0x09, 0xf5, 0x03, 0x30, 0x25, 0xf7, 0xbc, 0xcf, 0xef, 0xf5, 0xdd, 0x73, 0xa7, - 0x17, 0x19, 0xee, 0xd0, 0x4d, 0x2f, 0xec, 0x91, 0x9b, 0x0c, 0x09, 0xb3, 0x27, 0x47, 0x03, 0xc2, - 0xdc, 0x23, 0x9b, 0x26, 0x3e, 0x49, 0xac, 0x38, 0xa1, 0x8c, 0xaa, 0x7b, 0xe0, 0xb0, 0x84, 0xc3, - 0xca, 0x1d, 0xda, 0x5e, 0x40, 0x03, 0x0a, 0x06, 0x9b, 0xff, 0x13, 0x5e, 0xed, 0x85, 0xe8, 0xe6, - 0x93, 0x38, 0xa2, 0xd3, 0x11, 0x19, 0x17, 0x1d, 0x83, 0x84, 0x5e, 0xc5, 0xc2, 0x65, 0x2e, 0x65, - 0x54, 0xed, 0xf1, 0x2f, 0x74, 0x4f, 0x55, 0x1b, 0x55, 0xe8, 0xfb, 0x31, 0x49, 0xf6, 0x65, 0x43, - 0x6e, 0xd6, 0x3a, 0x4f, 0x57, 0x19, 0x16, 0xc2, 0x3a, 0xc3, 0x3b, 0x53, 0x77, 0x14, 0xb5, 0x4d, - 0x58, 0x9a, 0x8e, 0x90, 0xd5, 0x63, 0xa4, 0xf8, 0x29, 0xb9, 0xdc, 0x2f, 0x19, 0x72, 0x53, 0xe9, - 0xe0, 0x45, 0x86, 0x95, 0xd3, 0x3e, 0xb9, 0x5c, 0x65, 0x18, 0xf4, 0x75, 0x86, 0xeb, 0x02, 0xe3, - 0x2b, 0xd3, 0x01, 0x91, 0x43, 0x01, 0x87, 0xca, 0x86, 0xdc, 0xdc, 0x15, 0xd0, 0x59, 0x0e, 0x05, - 0xf7, 0xa0, 0x40, 0x40, 0x41, 0x0e, 0x51, 0x0e, 0x29, 0x05, 0xd4, 0xcb, 0x21, 0x7a, 0x0f, 0xa2, - 0x02, 0xe2, 0x3f, 0xed, 0xed, 0xaf, 0xd7, 0x58, 0xfa, 0x75, 0x8d, 0x25, 0xf3, 0x7b, 0x19, 0x55, - 0xe0, 0x94, 0xea, 0x3b, 0xb4, 0x0d, 0x81, 0x9e, 0x87, 0x3e, 0x1c, 0xb3, 0xde, 0x3a, 0xb4, 0xfe, - 0x16, 0xaa, 0x95, 0x87, 0xd2, 0x31, 0x6f, 0x32, 0x2c, 0x2d, 0x32, 0xbc, 0x49, 0x69, 0x95, 0xe1, - 0x52, 0xe8, 0xaf, 0x33, 0x5c, 0x13, 0x1f, 0x0c, 0x7d, 0xd3, 0xa9, 0x42, 0xcb, 0xae, 0xaf, 0x3a, - 0xa8, 0x92, 0x32, 0x97, 0x11, 0x48, 0xe4, 0xbf, 0xd6, 0xb3, 0x07, 0x5a, 0x5b, 0x7d, 0x6e, 0x14, - 0x21, 0x03, 0x53, 0x84, 0x0c, 0x4b, 0xd3, 0x11, 0xb2, 0xfa, 0x06, 0x29, 0x69, 0x4c, 0x3c, 0xc8, - 0xab, 0xde, 0x7a, 0x9e, 0xb7, 0x2c, 0xae, 0xf5, 0x4f, 0xdb, 0x33, 0x7e, 0xad, 0xfd, 0x98, 0x78, - 0x9d, 0x03, 0xbe, 0x67, 0x9e, 0x0d, 0x07, 0x8b, 0x6c, 0xf8, 0xca, 0x74, 0x40, 0x54, 0x0f, 0x11, - 0xf2, 0x12, 0xe2, 0x32, 0xe2, 0x9f, 0xbb, 0x0c, 0x62, 0x2d, 0x3b, 0xb5, 0x5c, 0x39, 0x61, 0xe6, - 0x47, 0x19, 0x55, 0x60, 0x83, 0xaa, 0x89, 0xaa, 0xe1, 0x78, 0xe2, 0x46, 0xa1, 0xdf, 0x90, 0xb4, - 0xc7, 0xb3, 0xb9, 0xf1, 0x08, 0xb6, 0x0f, 0xc5, 0xae, 0x28, 0xa8, 0x4f, 0x90, 0x42, 0x63, 0x32, - 0x6e, 0xc8, 0xda, 0xee, 0x6c, 0x6e, 0xd4, 0xc0, 0xd0, 0x8b, 0xc9, 0x58, 0x3d, 0x40, 0x5b, 0xae, - 0xc7, 0xc2, 0x09, 0x69, 0x94, 0xb4, 0xff, 0x67, 0x73, 0xa3, 0x0e, 0xa5, 0x13, 0x90, 0x78, 0xd1, - 0x8b, 0x68, 0x4a, 0xfc, 0x46, 0xf9, 0x4e, 0xf1, 0x25, 0x48, 0x9a, 0xf2, 0xe9, 0x9b, 0x2e, 0xdd, - 0xb9, 0xc1, 0x2f, 0x25, 0xb4, 0x03, 0xf5, 0x57, 0x61, 0xc4, 0x48, 0x92, 0xfe, 0x6b, 0x8f, 0x95, - 0x9f, 0x47, 0x3c, 0x9d, 0x4a, 0x71, 0x9e, 0x87, 0xde, 0x45, 0x5b, 0xe1, 0xb9, 0x74, 0x5e, 0xdf, - 0x2c, 0x74, 0xf9, 0x76, 0xa1, 0xcb, 0x3f, 0x17, 0xba, 0xfc, 0x79, 0xa9, 0x4b, 0xb7, 0x4b, 0x5d, - 0xfa, 0xb1, 0xd4, 0xa5, 0xb7, 0x56, 0x10, 0xb2, 0x8b, 0xab, 0x81, 0xe5, 0xd1, 0x91, 0x4d, 0x27, - 0x89, 0x17, 0x0d, 0x6d, 0x31, 0x11, 0x3e, 0x6c, 0x26, 0x0c, 0x9b, 0xc6, 0x24, 0xdd, 0x4c, 0x85, - 0xc1, 0x16, 0x0c, 0x84, 0xe3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x86, 0x03, 0x4f, 0x86, - 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/v1beta1/params.go b/go/node/market/v1beta1/params.go deleted file mode 100644 index 996b951c..00000000 --- a/go/node/market/v1beta1/params.go +++ /dev/null @@ -1,76 +0,0 @@ -package v1beta1 - -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(50000000)) - 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/v1beta1/params.pb.go b/go/node/market/v1beta1/params.pb.go deleted file mode 100644 index b332f0bf..00000000 --- a/go/node/market/v1beta1/params.pb.go +++ /dev/null @@ -1,364 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/params.proto - -package v1beta1 - -import ( - fmt "fmt" - 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 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_7d76da213caa5dbb, []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.v1beta1.Params") -} - -func init() { proto.RegisterFile("akash/market/v1beta1/params.proto", fileDescriptor_7d76da213caa5dbb) } - -var fileDescriptor_7d76da213caa5dbb = []byte{ - // 313 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x31, 0x4f, 0x02, 0x31, - 0x14, 0xc7, 0xaf, 0x0e, 0x0c, 0x27, 0x68, 0x42, 0xd0, 0x20, 0x43, 0x8b, 0x37, 0x31, 0xb5, 0x41, - 0x37, 0xdd, 0x4e, 0x07, 0x17, 0xa2, 0x61, 0x74, 0xb9, 0xb4, 0x77, 0x17, 0x68, 0xa0, 0xf7, 0x2e, - 0xd7, 0x4a, 0xe0, 0x03, 0xb8, 0xfb, 0xb1, 0x18, 0x19, 0x9d, 0x1a, 0x73, 0x6c, 0x8c, 0xf8, 0x05, - 0x0c, 0x57, 0x31, 0xc8, 0xd6, 0xf4, 0xff, 0xfb, 0xff, 0x5e, 0xf2, 0x9e, 0x7f, 0xcd, 0x27, 0x5c, - 0x8f, 0x99, 0xe2, 0xc5, 0x24, 0x35, 0x6c, 0xd6, 0x17, 0xa9, 0xe1, 0x7d, 0x96, 0xf3, 0x82, 0x2b, - 0x4d, 0xf3, 0x02, 0x0c, 0x34, 0x5b, 0x15, 0x42, 0x1d, 0x42, 0x7f, 0x91, 0x4e, 0x6b, 0x04, 0x23, - 0xa8, 0x00, 0xb6, 0x7b, 0x39, 0xb6, 0x83, 0x63, 0xd0, 0x0a, 0x34, 0x13, 0x5c, 0xa7, 0x7f, 0xb6, - 0x18, 0x64, 0xe6, 0xf2, 0xe0, 0x1b, 0xf9, 0xb5, 0x97, 0x4a, 0xde, 0x7c, 0x47, 0xfe, 0xb9, 0x90, - 0x49, 0xa4, 0x64, 0x16, 0x25, 0x69, 0x0e, 0x5a, 0x9a, 0x36, 0xea, 0xa2, 0xde, 0xe9, 0xcd, 0x15, - 0x75, 0x16, 0xba, 0xb3, 0xec, 0x07, 0xd2, 0x07, 0x90, 0x59, 0x18, 0x2e, 0x2d, 0xf1, 0x4a, 0x4b, - 0x1a, 0xa1, 0x4c, 0x06, 0x32, 0x7b, 0x74, 0xbd, 0x8d, 0x25, 0xc7, 0xaa, 0xad, 0x25, 0x97, 0x0b, - 0xae, 0xa6, 0x77, 0xc1, 0x51, 0x10, 0x0c, 0x1b, 0xe2, 0xb0, 0xdb, 0xe4, 0xfe, 0x19, 0x14, 0x49, - 0x5a, 0x44, 0x8a, 0xcf, 0x23, 0x21, 0x13, 0xdd, 0x3e, 0xe9, 0xa2, 0x5e, 0x23, 0xbc, 0x2f, 0x2d, - 0xa9, 0x3f, 0xef, 0x92, 0x01, 0x9f, 0x87, 0x32, 0xd1, 0x1b, 0x4b, 0x8e, 0xc8, 0xad, 0x25, 0x17, - 0x6e, 0xc8, 0xff, 0xff, 0x60, 0x58, 0x87, 0x83, 0x62, 0xf8, 0xb4, 0x2c, 0x31, 0x5a, 0x95, 0x18, - 0x7d, 0x95, 0x18, 0x7d, 0xac, 0xb1, 0xb7, 0x5a, 0x63, 0xef, 0x73, 0x8d, 0xbd, 0x57, 0x3a, 0x92, - 0x66, 0xfc, 0x26, 0x68, 0x0c, 0x8a, 0xc1, 0xac, 0x88, 0xa7, 0x13, 0xe6, 0x0e, 0x32, 0xdf, 0x9f, - 0xc4, 0x2c, 0xf2, 0x54, 0xef, 0x57, 0x29, 0x6a, 0xd5, 0x1a, 0x6f, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x4a, 0x69, 0x9c, 0x2e, 0xb7, 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/v1beta1/query.pb.go b/go/node/market/v1beta1/query.pb.go deleted file mode 100644 index 356a275c..00000000 --- a/go/node/market/v1beta1/query.pb.go +++ /dev/null @@ -1,3033 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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 v1beta1.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_50f1db5c661b7517, []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() v1beta1.Account { - if m != nil { - return m.EscrowAccount - } - return v1beta1.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_50f1db5c661b7517, []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_50f1db5c661b7517, []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_50f1db5c661b7517, []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 v1beta1.Payment `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_50f1db5c661b7517, []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() v1beta1.Payment { - if m != nil { - return m.EscrowPayment - } - return v1beta1.Payment{} -} - -func init() { - proto.RegisterType((*QueryOrdersRequest)(nil), "akash.market.v1beta1.QueryOrdersRequest") - proto.RegisterType((*QueryOrdersResponse)(nil), "akash.market.v1beta1.QueryOrdersResponse") - proto.RegisterType((*QueryOrderRequest)(nil), "akash.market.v1beta1.QueryOrderRequest") - proto.RegisterType((*QueryOrderResponse)(nil), "akash.market.v1beta1.QueryOrderResponse") - proto.RegisterType((*QueryBidsRequest)(nil), "akash.market.v1beta1.QueryBidsRequest") - proto.RegisterType((*QueryBidsResponse)(nil), "akash.market.v1beta1.QueryBidsResponse") - proto.RegisterType((*QueryBidRequest)(nil), "akash.market.v1beta1.QueryBidRequest") - proto.RegisterType((*QueryBidResponse)(nil), "akash.market.v1beta1.QueryBidResponse") - proto.RegisterType((*QueryLeasesRequest)(nil), "akash.market.v1beta1.QueryLeasesRequest") - proto.RegisterType((*QueryLeasesResponse)(nil), "akash.market.v1beta1.QueryLeasesResponse") - proto.RegisterType((*QueryLeaseRequest)(nil), "akash.market.v1beta1.QueryLeaseRequest") - proto.RegisterType((*QueryLeaseResponse)(nil), "akash.market.v1beta1.QueryLeaseResponse") -} - -func init() { proto.RegisterFile("akash/market/v1beta1/query.proto", fileDescriptor_50f1db5c661b7517) } - -var fileDescriptor_50f1db5c661b7517 = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0xd3, 0x4a, - 0x14, 0x8d, 0xd3, 0x36, 0x4f, 0x9a, 0xea, 0xf5, 0xbd, 0x37, 0xaf, 0x8b, 0x92, 0x82, 0xd3, 0x06, - 0xd1, 0xa4, 0x2c, 0x6c, 0xb5, 0x2c, 0x2a, 0x76, 0xc5, 0x54, 0x85, 0x56, 0x7c, 0x94, 0x2c, 0xd9, - 0xa0, 0x71, 0x3c, 0x75, 0x47, 0x4d, 0x3c, 0xa9, 0xc7, 0x29, 0x74, 0x81, 0x84, 0x90, 0x90, 0x58, - 0x82, 0x58, 0x21, 0x21, 0x84, 0x84, 0xc4, 0x82, 0x0d, 0x7f, 0xa3, 0xcb, 0x4a, 0x6c, 0x58, 0x15, - 0x94, 0xf2, 0x43, 0x90, 0xe7, 0xc3, 0xb1, 0x2b, 0xc7, 0x76, 0xa5, 0x76, 0x17, 0xc5, 0xe7, 0xde, - 0x39, 0xf7, 0x9e, 0x33, 0xc7, 0x06, 0x73, 0x68, 0x17, 0xb1, 0x1d, 0xb3, 0x8b, 0xfc, 0x5d, 0x1c, - 0x98, 0xfb, 0x4b, 0x36, 0x0e, 0xd0, 0x92, 0xb9, 0xd7, 0xc7, 0xfe, 0x81, 0xd1, 0xf3, 0x69, 0x40, - 0xe1, 0x34, 0x47, 0x18, 0x02, 0x61, 0x48, 0x44, 0x75, 0xda, 0xa5, 0x2e, 0xe5, 0x00, 0x33, 0xfc, - 0x25, 0xb0, 0xd5, 0xcb, 0x2e, 0xa5, 0x6e, 0x07, 0x9b, 0xa8, 0x47, 0x4c, 0xe4, 0x79, 0x34, 0x40, - 0x01, 0xa1, 0x1e, 0x93, 0x4f, 0xaf, 0xb7, 0x29, 0xeb, 0x52, 0x66, 0xda, 0x88, 0x61, 0x71, 0x44, - 0x74, 0x60, 0x0f, 0xb9, 0xc4, 0xe3, 0x60, 0x89, 0x4d, 0xe7, 0x45, 0x7d, 0x07, 0xfb, 0x12, 0xa1, - 0xa7, 0x22, 0x6c, 0xe2, 0x64, 0x76, 0xe8, 0x60, 0xc4, 0x70, 0x12, 0x81, 0x59, 0xdb, 0xa7, 0x4f, - 0x23, 0x44, 0x70, 0xd0, 0xc3, 0x92, 0x71, 0xfd, 0x93, 0x06, 0xe0, 0xa3, 0x90, 0xe8, 0xc3, 0xf0, - 0x60, 0xd6, 0xc2, 0x7b, 0x7d, 0xcc, 0x02, 0x68, 0x81, 0xbf, 0xb6, 0x49, 0x27, 0xc0, 0x3e, 0x9b, - 0xd1, 0xe6, 0xb4, 0xe6, 0xe4, 0x72, 0xdd, 0x48, 0x5b, 0x92, 0xc1, 0xab, 0xd6, 0x05, 0xd2, 0x1a, - 0x3f, 0x3c, 0xae, 0x95, 0x5a, 0xaa, 0x10, 0xae, 0x03, 0x30, 0x1c, 0x7a, 0xa6, 0xcc, 0xdb, 0x2c, - 0x18, 0x62, 0x43, 0x46, 0xb8, 0x21, 0x43, 0x88, 0xa0, 0x7a, 0x6d, 0x21, 0x17, 0xcb, 0xf3, 0x5b, - 0xb1, 0xca, 0xfa, 0x67, 0x0d, 0xfc, 0x9f, 0xa0, 0xc8, 0x7a, 0xd4, 0x63, 0x18, 0xde, 0x06, 0x15, - 0xbe, 0xad, 0x90, 0xe2, 0x58, 0x73, 0x72, 0x79, 0x36, 0x83, 0xa2, 0x35, 0x15, 0x72, 0xfb, 0xfa, - 0xb3, 0x56, 0x91, 0x4d, 0x64, 0x29, 0xbc, 0x93, 0x42, 0xb2, 0x91, 0x4b, 0x52, 0x30, 0x48, 0xb0, - 0x7c, 0x00, 0xfe, 0x1b, 0x92, 0x54, 0x6b, 0xbc, 0x09, 0xca, 0xc4, 0x91, 0x1b, 0xbc, 0x92, 0x41, - 0x6f, 0x63, 0xcd, 0x02, 0x21, 0xc1, 0xc1, 0x71, 0xad, 0xbc, 0xb1, 0xd6, 0x2a, 0x13, 0xa7, 0x7e, - 0x3f, 0xae, 0x4b, 0x34, 0xf3, 0x0a, 0x98, 0xe0, 0xc4, 0x65, 0xcf, 0xcc, 0x91, 0x85, 0x1c, 0x02, - 0x5f, 0xff, 0xa0, 0x81, 0x7f, 0x79, 0x3f, 0x8b, 0x38, 0x91, 0xca, 0xab, 0xa7, 0x55, 0x9e, 0x4b, - 0xef, 0x67, 0x11, 0xe7, 0x82, 0x35, 0xfe, 0xa8, 0xc9, 0xf5, 0x09, 0x7a, 0x72, 0xda, 0x55, 0x30, - 0x6e, 0x13, 0x47, 0xe9, 0xbb, 0x90, 0x4e, 0x4e, 0x95, 0xa9, 0x2a, 0x49, 0x91, 0x57, 0x9e, 0x9f, - 0xbc, 0x9b, 0xe0, 0x9f, 0xe1, 0x41, 0x62, 0x7b, 0x2b, 0x31, 0x71, 0x67, 0x47, 0x2e, 0x2e, 0x45, - 0xda, 0xb7, 0x31, 0x2d, 0xa2, 0x59, 0x97, 0xc0, 0x98, 0x1d, 0xb5, 0xbb, 0x34, 0xb2, 0x9d, 0x9c, - 0x2e, 0xc4, 0xc2, 0x4d, 0x30, 0x25, 0x6e, 0xf6, 0x13, 0xd4, 0x6e, 0xd3, 0xbe, 0x17, 0xc8, 0x01, - 0x95, 0xd3, 0xc4, 0xc3, 0xa8, 0xfa, 0x96, 0x00, 0xc9, 0x0e, 0x7f, 0x8b, 0xa7, 0xf2, 0xcf, 0x61, - 0x0e, 0xdc, 0x0b, 0xe3, 0xe3, 0xcc, 0x39, 0xc0, 0xab, 0x2e, 0xd8, 0x23, 0x5f, 0x54, 0x0e, 0x28, - 0x8a, 0x72, 0x73, 0xeb, 0xa0, 0xc2, 0x33, 0x4f, 0xf9, 0xa4, 0x99, 0xe1, 0x13, 0x5e, 0x7a, 0xca, - 0x29, 0xb2, 0xfa, 0xfc, 0xa3, 0x40, 0x1e, 0x56, 0x38, 0x0a, 0x38, 0x3e, 0xc5, 0x2f, 0xef, 0x13, - 0xda, 0xc4, 0xb3, 0x80, 0x33, 0xcf, 0xb6, 0x20, 0xaf, 0x51, 0x59, 0xc0, 0xf1, 0x31, 0xdf, 0xf4, - 0xd0, 0x41, 0x17, 0xe7, 0xf9, 0x66, 0x4b, 0x80, 0x92, 0xbe, 0x91, 0x7f, 0x2e, 0x7f, 0xab, 0x80, - 0x09, 0xce, 0x0d, 0xbe, 0xd6, 0x80, 0x0c, 0x57, 0x98, 0xa5, 0x40, 0xe2, 0x3d, 0x53, 0x5d, 0x2c, - 0x80, 0x14, 0xe3, 0xd6, 0x17, 0x5f, 0x7e, 0xff, 0xfd, 0xae, 0x7c, 0x15, 0xce, 0x9b, 0xa3, 0x5f, - 0x9c, 0xcc, 0xec, 0x10, 0x16, 0xc0, 0x57, 0x1a, 0x98, 0xe0, 0xd5, 0xb0, 0x91, 0xd7, 0x5f, 0x11, - 0x69, 0xe6, 0x03, 0xcf, 0xc4, 0x83, 0x78, 0xdb, 0x14, 0xbe, 0xd0, 0xc0, 0x78, 0x18, 0x68, 0x30, - 0x27, 0xba, 0xa2, 0x75, 0x34, 0x72, 0x71, 0x92, 0x44, 0x83, 0x93, 0x98, 0x87, 0x35, 0x73, 0xd4, - 0x37, 0x82, 0x5c, 0xc5, 0x73, 0x30, 0x66, 0x11, 0x07, 0x5e, 0xcb, 0xcb, 0x4e, 0x71, 0x7e, 0xc1, - 0x88, 0x2d, 0x74, 0x3c, 0xdf, 0x40, 0x68, 0x0a, 0x71, 0x5d, 0x61, 0xee, 0xb5, 0x2c, 0x64, 0x8a, - 0xe4, 0xdd, 0xcf, 0x13, 0x43, 0xdc, 0xec, 0xa1, 0x29, 0x78, 0x75, 0xa6, 0x29, 0xe2, 0x77, 0xb6, - 0x5a, 0x38, 0x49, 0x0a, 0xf2, 0x08, 0x57, 0x62, 0xdd, 0x3d, 0x1c, 0xe8, 0xda, 0xd1, 0x40, 0xd7, - 0x7e, 0x0d, 0x74, 0xed, 0xcd, 0x89, 0x5e, 0x3a, 0x3a, 0xd1, 0x4b, 0x3f, 0x4e, 0xf4, 0xd2, 0x63, - 0xc3, 0x25, 0xc1, 0x4e, 0xdf, 0x36, 0xda, 0xb4, 0x6b, 0xd2, 0x7d, 0xbf, 0xdd, 0xd9, 0x95, 0xdd, - 0x9e, 0xa9, 0x7e, 0xfc, 0xcb, 0x4d, 0x75, 0xb5, 0x2b, 0xfc, 0x13, 0xee, 0xc6, 0x9f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xf5, 0xbf, 0x6e, 0xf5, 0xe2, 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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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/v1beta1/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/v1beta1/query.pb.gw.go b/go/node/market/v1beta1/query.pb.gw.go deleted file mode 100644 index 66d32ed7..00000000 --- a/go/node/market/v1beta1/query.pb.gw.go +++ /dev/null @@ -1,586 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/market/v1beta2/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_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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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/v1beta1/service.pb.go b/go/node/market/v1beta1/service.pb.go deleted file mode 100644 index 8dd2bcea..00000000 --- a/go/node/market/v1beta1/service.pb.go +++ /dev/null @@ -1,286 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta1/service.proto - -package v1beta1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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/v1beta1/service.proto", fileDescriptor_2f0b59ab7d50774b) -} - -var fileDescriptor_2f0b59ab7d50774b = []byte{ - // 287 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, - 0xd4, 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, 0xc9, - 0xe3, 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, 0xf4, 0xd2, 0x33, 0x4b, 0x32, - 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xf3, 0xcb, 0x8a, 0x92, 0x73, 0xb2, 0xf5, 0x21, 0x09, - 0xa7, 0x02, 0x96, 0x74, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x61, 0x09, 0x28, 0x89, 0x0d, 0x9c, 0x76, - 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0x61, 0x73, 0xee, 0xb9, 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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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/v1beta1/service.proto", -} diff --git a/go/node/market/v1beta1/types.go b/go/node/market/v1beta1/types.go deleted file mode 100644 index e078c156..00000000 --- a/go/node/market/v1beta1/types.go +++ /dev/null @@ -1,225 +0,0 @@ -package v1beta1 - -import ( - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta1" - types "github.com/akash-network/akash-api/go/node/types/v1beta1" - - "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.Coin { - 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) -} - -// 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 -} diff --git a/go/node/market/v1beta2/bid.pb.go b/go/node/market/v1beta2/bid.pb.go deleted file mode 100644 index 027435ac..00000000 --- a/go/node/market/v1beta2/bid.pb.go +++ /dev/null @@ -1,1967 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 75350343..00000000 --- a/go/node/market/v1beta2/codec.go +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index 6f74841d..00000000 --- a/go/node/market/v1beta2/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -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 deleted file mode 100644 index fbc9e455..00000000 --- a/go/node/market/v1beta2/escrow.go +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 0fe56d00..00000000 --- a/go/node/market/v1beta2/event.go +++ /dev/null @@ -1,360 +0,0 @@ -package v1beta2 - -import ( - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" - - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 6906526a..00000000 --- a/go/node/market/v1beta2/genesis.pb.go +++ /dev/null @@ -1,453 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/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 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 deleted file mode 100644 index a78cc598..00000000 --- a/go/node/market/v1beta2/id.go +++ /dev/null @@ -1,154 +0,0 @@ -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 deleted file mode 100644 index 78c5e7e8..00000000 --- a/go/node/market/v1beta2/key.go +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 6a365b6d..00000000 --- a/go/node/market/v1beta2/lease.pb.go +++ /dev/null @@ -1,2134 +0,0 @@ -// 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" - _ "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 - -// 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/migrate/v1beta1.go b/go/node/market/v1beta2/migrate/v1beta1.go deleted file mode 100644 index e7413f26..00000000 --- a/go/node/market/v1beta2/migrate/v1beta1.go +++ /dev/null @@ -1,16 +0,0 @@ -package migrate - -import ( - "github.com/akash-network/akash-api/go/node/market/v1beta1" - "github.com/akash-network/akash-api/go/node/market/v1beta2" -) - -func LeaseIDToV1beta1(from v1beta1.LeaseID) v1beta2.LeaseID { - return v1beta2.LeaseID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - OSeq: from.OSeq, - Provider: from.Provider, - } -} diff --git a/go/node/market/v1beta2/msgs.go b/go/node/market/v1beta2/msgs.go deleted file mode 100644 index 47a8df17..00000000 --- a/go/node/market/v1beta2/msgs.go +++ /dev/null @@ -1,215 +0,0 @@ -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 deleted file mode 100644 index 41790dd6..00000000 --- a/go/node/market/v1beta2/order.pb.go +++ /dev/null @@ -1,1107 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 2b773491..00000000 --- a/go/node/market/v1beta2/params.go +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index c92a62c2..00000000 --- a/go/node/market/v1beta2/params.pb.go +++ /dev/null @@ -1,365 +0,0 @@ -// 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" - _ "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 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 deleted file mode 100644 index 8e232167..00000000 --- a/go/node/market/v1beta2/query.pb.go +++ /dev/null @@ -1,3034 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 5ebd8b82..00000000 --- a/go/node/market/v1beta2/query.pb.gw.go +++ /dev/null @@ -1,586 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index fe1dae41..00000000 --- a/go/node/market/v1beta2/service.pb.go +++ /dev/null @@ -1,287 +0,0 @@ -// 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/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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 deleted file mode 100644 index 575d2695..00000000 --- a/go/node/market/v1beta2/types.go +++ /dev/null @@ -1,240 +0,0 @@ -package v1beta2 - -import ( - "strings" - - "gopkg.in/yaml.v3" - - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta2" - types "github.com/akash-network/akash-api/go/node/types/v1beta2" -) - -// 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 deleted file mode 100644 index 7786a2c1..00000000 --- a/go/node/market/v1beta3/bid.pb.go +++ /dev/null @@ -1,1967 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index c8dbf100..00000000 --- a/go/node/market/v1beta3/codec.go +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index 044de7d7..00000000 --- a/go/node/market/v1beta3/errors.go +++ /dev/null @@ -1,107 +0,0 @@ -package v1beta3 - -import ( - "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 = 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/v1beta3/escrow.go b/go/node/market/v1beta3/escrow.go deleted file mode 100644 index f49ee939..00000000 --- a/go/node/market/v1beta3/escrow.go +++ /dev/null @@ -1,61 +0,0 @@ -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 deleted file mode 100644 index 7277c237..00000000 --- a/go/node/market/v1beta3/event.go +++ /dev/null @@ -1,359 +0,0 @@ -package v1beta3 - -import ( - "errors" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - "github.com/akash-network/akash-api/go/sdkutil" -) - -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 deleted file mode 100644 index 5134314f..00000000 --- a/go/node/market/v1beta3/events_test.go +++ /dev/null @@ -1,460 +0,0 @@ -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/akash-api/go/sdkutil" -) - -var ( - 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 deleted file mode 100644 index 5d1a89d0..00000000 --- a/go/node/market/v1beta3/genesis.pb.go +++ /dev/null @@ -1,518 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta3/genesis.proto - -package v1beta3 - -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 defines the basic genesis state used by market module -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` - Orders []Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders" yaml:"orders"` - Leases []Lease `protobuf:"bytes,3,rep,name=leases,proto3" json:"leases" yaml:"leases"` - Bids []Bid `protobuf:"bytes,4,rep,name=bids,proto3" json:"bids" yaml:"bids"` -} - -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) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -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) GetBids() []Bid { - if m != nil { - return m.Bids - } - return nil -} - -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{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0x93, 0xb6, 0xea, 0x90, 0xde, 0xbb, 0x44, 0x1d, 0x42, 0x8b, 0x9c, 0xe2, 0xa9, 0x0b, - 0xb6, 0x68, 0x27, 0x18, 0xb3, 0x20, 0x21, 0x24, 0x50, 0x0a, 0x0b, 0x9b, 0x43, 0xac, 0xd4, 0x6a, - 0x53, 0x57, 0xb6, 0x01, 0xf1, 0x16, 0x3c, 0x56, 0xc7, 0x8e, 0x2c, 0x44, 0xa8, 0xdd, 0x18, 0xfb, - 0x04, 0x28, 0xb6, 0xa5, 0x48, 0xc8, 0xea, 0x96, 0x3f, 0xff, 0x77, 0xbe, 0xe4, 0xd8, 0x01, 0x24, - 0x0b, 0x22, 0xe7, 0xb8, 0x24, 0x62, 0x41, 0x15, 0x7e, 0xbd, 0xc8, 0xa8, 0x22, 0x53, 0x5c, 0xd0, - 0x15, 0x95, 0x4c, 0xa2, 0xb5, 0xe0, 0x8a, 0x87, 0x7d, 0xcd, 0x20, 0xc3, 0x20, 0xcb, 0x0c, 0xfa, - 0x05, 0x2f, 0xb8, 0x06, 0x70, 0xfd, 0x64, 0xd8, 0xc1, 0xc8, 0xe9, 0xe3, 0x22, 0xa7, 0xe2, 0x28, - 0xb1, 0xa4, 0x44, 0x52, 0x4b, 0x00, 0x27, 0x91, 0xb1, 0xdc, 0xf6, 0x67, 0xce, 0x7e, 0x4d, 0x04, - 0x29, 0xed, 0x2f, 0xc3, 0xaf, 0x56, 0xf0, 0xef, 0xda, 0x2c, 0x31, 0x53, 0x44, 0xd1, 0xf0, 0x31, - 0xe8, 0x1a, 0x20, 0xf2, 0x47, 0xfe, 0xb8, 0x37, 0x39, 0x45, 0xae, 0xa5, 0xd0, 0xbd, 0x66, 0x92, - 0x78, 0x53, 0xc5, 0xde, 0x4f, 0x15, 0xdb, 0x99, 0x43, 0x15, 0xff, 0x7f, 0x27, 0xe5, 0xf2, 0x0a, - 0x9a, 0x0c, 0x53, 0x5b, 0x84, 0x0f, 0x41, 0x57, 0xef, 0x26, 0xa3, 0xd6, 0xa8, 0x3d, 0xee, 0x4d, - 0x86, 0x6e, 0xed, 0x5d, 0xcd, 0x34, 0x56, 0x33, 0xd2, 0x58, 0x4d, 0x86, 0xa9, 0x2d, 0x6a, 0xab, - 0x3e, 0x0f, 0x19, 0xb5, 0x8f, 0x59, 0x6f, 0x6b, 0xa6, 0xb1, 0x9a, 0x91, 0xc6, 0x6a, 0x32, 0x4c, - 0x6d, 0x11, 0xde, 0x04, 0x9d, 0x8c, 0xe5, 0x32, 0xea, 0x68, 0xe7, 0x89, 0xdb, 0x99, 0xb0, 0x3c, - 0x19, 0x5a, 0xa3, 0xc6, 0x0f, 0x55, 0xdc, 0x33, 0xbe, 0x3a, 0xc1, 0x54, 0xbf, 0x4c, 0x66, 0x9b, - 0x1d, 0xf0, 0xb7, 0x3b, 0xe0, 0x7f, 0xef, 0x80, 0xff, 0xb1, 0x07, 0xde, 0x76, 0x0f, 0xbc, 0xcf, - 0x3d, 0xf0, 0x9e, 0x2e, 0x0b, 0xa6, 0xe6, 0x2f, 0x19, 0x7a, 0xe6, 0x25, 0xd6, 0x5f, 0x38, 0x5f, - 0x51, 0xf5, 0xc6, 0xc5, 0xc2, 0x26, 0xb2, 0x66, 0xb8, 0xe0, 0x78, 0xc5, 0x73, 0xfa, 0xe7, 0x06, - 0xb3, 0xae, 0xbe, 0xbb, 0xe9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0f, 0x57, 0x88, 0x94, - 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 - 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 = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - 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] = 0x1a - } - } - 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] = 0x12 - } - } - { - 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)) - 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)) - } - } - if len(m.Bids) > 0 { - for _, e := range m.Bids { - 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 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 - case 2: - 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 3: - 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 4: - 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 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.Bids = append(m.Bids, Bid{}) - if err := m.Bids[len(m.Bids)-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/market/v1beta3/id.go b/go/node/market/v1beta3/id.go deleted file mode 100644 index e8981526..00000000 --- a/go/node/market/v1beta3/id.go +++ /dev/null @@ -1,154 +0,0 @@ -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 deleted file mode 100644 index d6afb173..00000000 --- a/go/node/market/v1beta3/key.go +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 31c5a327..00000000 --- a/go/node/market/v1beta3/lease.pb.go +++ /dev/null @@ -1,2134 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 57fb883c..00000000 --- a/go/node/market/v1beta3/migrate/v1beta2.go +++ /dev/null @@ -1,16 +0,0 @@ -package migrate - -import ( - "github.com/akash-network/akash-api/go/node/market/v1beta2" - "github.com/akash-network/akash-api/go/node/market/v1beta3" -) - -func LeaseIDFromV1beta2(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 deleted file mode 100644 index 1dfe91a9..00000000 --- a/go/node/market/v1beta3/msgs.go +++ /dev/null @@ -1,215 +0,0 @@ -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 deleted file mode 100644 index 1d2f1958..00000000 --- a/go/node/market/v1beta3/order.pb.go +++ /dev/null @@ -1,1107 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 4dbe0ddd..00000000 --- a/go/node/market/v1beta3/params.go +++ /dev/null @@ -1,76 +0,0 @@ -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 deleted file mode 100644 index a7e88138..00000000 --- a/go/node/market/v1beta3/params.pb.go +++ /dev/null @@ -1,365 +0,0 @@ -// 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" - _ "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 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 deleted file mode 100644 index 14409581..00000000 --- a/go/node/market/v1beta3/query.pb.go +++ /dev/null @@ -1,3034 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 64ecf0c3..00000000 --- a/go/node/market/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,586 +0,0 @@ -// 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index 1c01a3cd..00000000 --- a/go/node/market/v1beta3/service.pb.go +++ /dev/null @@ -1,287 +0,0 @@ -// 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/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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 deleted file mode 100644 index b67ea4e6..00000000 --- a/go/node/market/v1beta3/types.go +++ /dev/null @@ -1,241 +0,0 @@ -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/market/v1beta4/bid.go b/go/node/market/v1beta4/bid.go deleted file mode 100644 index deaba01a..00000000 --- a/go/node/market/v1beta4/bid.go +++ /dev/null @@ -1,82 +0,0 @@ -package v1beta4 - -import ( - "sort" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" -) - -type ResourcesOffer []ResourceOffer - -var _ sort.Interface = (*ResourcesOffer)(nil) - -func (s ResourcesOffer) MatchGSpec(gspec dtypes.GroupSpec) bool { - if len(s) == 0 { - return true - } - - ru := make(map[uint32]*dtypes.ResourceUnit) - - for idx := range gspec.Resources { - ru[gspec.Resources[idx].ID] = &gspec.Resources[idx] - } - - for _, ro := range s { - res, exists := ru[ro.Resources.ID] - if !exists { - return false - } - - ru[ro.Resources.ID] = nil - - if res.Count != ro.Count { - return false - } - - // TODO @troian check resources boundaries - } - - return true -} - -func (r *ResourceOffer) Dup() ResourceOffer { - return ResourceOffer{ - Resources: r.Resources.Dup(), - Count: r.Count, - } -} - -func (s ResourcesOffer) Len() int { - return len(s) -} - -func (s ResourcesOffer) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s ResourcesOffer) Less(i, j int) bool { - return s[i].Resources.ID < s[j].Resources.ID -} - -func (s ResourcesOffer) Dup() ResourcesOffer { - res := make(ResourcesOffer, 0, len(s)) - - for _, ru := range s { - res = append(res, ru.Dup()) - } - - return res -} - -func ResourceOfferFromRU(ru dtypes.ResourceUnits) ResourcesOffer { - res := make(ResourcesOffer, 0, len(ru)) - - for _, r := range ru { - res = append(res, ResourceOffer{ - Resources: r.Resources, - Count: r.Count, - }) - } - - return res -} diff --git a/go/node/market/v1beta4/bid.pb.go b/go/node/market/v1beta4/bid.pb.go deleted file mode 100644 index 37d581df..00000000 --- a/go/node/market/v1beta4/bid.pb.go +++ /dev/null @@ -1,2337 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/bid.proto - -package v1beta4 - -import ( - fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/types/v1beta3" - 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 - -// 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_c19fff42684bf143, []int{6, 0} -} - -// ResourceOffer describes resources that provider is offering -// for deployment -type ResourceOffer struct { - Resources v1beta3.Resources `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources" yaml:"resources"` - Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` -} - -func (m *ResourceOffer) Reset() { *m = ResourceOffer{} } -func (m *ResourceOffer) String() string { return proto.CompactTextString(m) } -func (*ResourceOffer) ProtoMessage() {} -func (*ResourceOffer) Descriptor() ([]byte, []int) { - return fileDescriptor_c19fff42684bf143, []int{0} -} -func (m *ResourceOffer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceOffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceOffer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceOffer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceOffer.Merge(m, src) -} -func (m *ResourceOffer) XXX_Size() int { - return m.Size() -} -func (m *ResourceOffer) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceOffer.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceOffer proto.InternalMessageInfo - -func (m *ResourceOffer) GetResources() v1beta3.Resources { - if m != nil { - return m.Resources - } - return v1beta3.Resources{} -} - -func (m *ResourceOffer) GetCount() uint32 { - if m != nil { - return m.Count - } - return 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"` - ResourcesOffer ResourcesOffer `protobuf:"bytes,5,rep,name=resources_offer,json=resourcesOffer,proto3,castrepeated=ResourcesOffer" json:"resources_offer" yaml:"resources_offer"` -} - -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_c19fff42684bf143, []int{1} -} -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{} -} - -func (m *MsgCreateBid) GetResourcesOffer() ResourcesOffer { - if m != nil { - return m.ResourcesOffer - } - return nil -} - -// 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_c19fff42684bf143, []int{2} -} -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_c19fff42684bf143, []int{3} -} -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_c19fff42684bf143, []int{4} -} -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_c19fff42684bf143, []int{5} -} -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.v1beta4.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"` - ResourcesOffer ResourcesOffer `protobuf:"bytes,5,rep,name=resources_offer,json=resourcesOffer,proto3,castrepeated=ResourcesOffer" json:"resources_offer" yaml:"resources_offer"` -} - -func (m *Bid) Reset() { *m = Bid{} } -func (*Bid) ProtoMessage() {} -func (*Bid) Descriptor() ([]byte, []int) { - return fileDescriptor_c19fff42684bf143, []int{6} -} -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 -} - -func (m *Bid) GetResourcesOffer() ResourcesOffer { - if m != nil { - return m.ResourcesOffer - } - return nil -} - -// 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_c19fff42684bf143, []int{7} -} -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.v1beta4.Bid_State", Bid_State_name, Bid_State_value) - proto.RegisterType((*ResourceOffer)(nil), "akash.market.v1beta4.ResourceOffer") - proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta4.MsgCreateBid") - proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta4.MsgCreateBidResponse") - proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta4.MsgCloseBid") - proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta4.MsgCloseBidResponse") - proto.RegisterType((*BidID)(nil), "akash.market.v1beta4.BidID") - proto.RegisterType((*Bid)(nil), "akash.market.v1beta4.Bid") - proto.RegisterType((*BidFilters)(nil), "akash.market.v1beta4.BidFilters") -} - -func init() { proto.RegisterFile("akash/market/v1beta4/bid.proto", fileDescriptor_c19fff42684bf143) } - -var fileDescriptor_c19fff42684bf143 = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x96, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0xe3, 0xc4, 0x6e, 0x37, 0x93, 0x6d, 0x1b, 0x79, 0xbb, 0xab, 0x34, 0x50, 0x8f, 0x19, - 0x04, 0xea, 0x05, 0x5b, 0x6d, 0xb9, 0x50, 0x4e, 0xeb, 0xad, 0x40, 0x95, 0x40, 0x05, 0x17, 0x38, - 0xc0, 0xa1, 0x72, 0x3c, 0xb3, 0xde, 0x51, 0x53, 0x4f, 0xea, 0x71, 0xbb, 0xe2, 0x3f, 0x40, 0x3d, - 0x21, 0x71, 0xe1, 0x52, 0xb4, 0xd2, 0xde, 0xf6, 0x2f, 0xd9, 0x63, 0x8f, 0x9c, 0x06, 0x94, 0x0a, - 0x09, 0xe5, 0x98, 0x7f, 0x00, 0x34, 0x3f, 0xe2, 0xfc, 0x50, 0x41, 0xe2, 0xd0, 0x03, 0xd2, 0x9e, - 0xdc, 0xf9, 0xbe, 0xf9, 0xbc, 0x79, 0x7e, 0xf3, 0x7d, 0x8d, 0x81, 0x97, 0x9c, 0x24, 0xfc, 0x59, - 0x78, 0x9a, 0x14, 0x27, 0xa4, 0x0c, 0x2f, 0xb6, 0x7b, 0xa4, 0x4c, 0x3e, 0x0c, 0x7b, 0x14, 0x07, - 0x83, 0x82, 0x95, 0xcc, 0x5d, 0x57, 0xf1, 0x40, 0xc7, 0x03, 0x13, 0xef, 0xae, 0x67, 0x2c, 0x63, - 0x6a, 0x43, 0x28, 0xff, 0xd2, 0x7b, 0xbb, 0x5e, 0xca, 0xf8, 0x29, 0xe3, 0x61, 0x2f, 0xe1, 0xc4, - 0xa4, 0xda, 0x0e, 0x53, 0x46, 0x73, 0x13, 0x47, 0xfa, 0xac, 0x99, 0xf0, 0x6e, 0x58, 0x10, 0xce, - 0xce, 0x8b, 0x94, 0x70, 0xb3, 0xc7, 0xbf, 0xb5, 0x1e, 0x56, 0x60, 0x52, 0xe8, 0x1d, 0xe8, 0x95, - 0x05, 0x56, 0x62, 0x43, 0x1d, 0x3e, 0x7d, 0x4a, 0x0a, 0xb7, 0x07, 0x9a, 0x55, 0x9a, 0x8e, 0xe5, - 0x5b, 0x5b, 0xad, 0x9d, 0xcd, 0x40, 0xd7, 0x2d, 0xcf, 0x32, 0x55, 0xef, 0x06, 0x13, 0x8a, 0x47, - 0xef, 0xbd, 0x16, 0xb0, 0x36, 0x12, 0x70, 0xca, 0x8d, 0x05, 0x6c, 0x7f, 0x9f, 0x9c, 0xf6, 0xf7, - 0x50, 0x25, 0xa1, 0x78, 0x1a, 0x76, 0x43, 0xe0, 0xa4, 0xec, 0x3c, 0x2f, 0x3b, 0x75, 0xdf, 0xda, - 0x5a, 0x89, 0x36, 0x46, 0x02, 0x6a, 0x61, 0x2c, 0xe0, 0x7d, 0x0d, 0xaa, 0x25, 0x8a, 0xb5, 0xbc, - 0x67, 0xff, 0xf9, 0x02, 0x5a, 0xe8, 0xaf, 0x06, 0xb8, 0xff, 0x39, 0xcf, 0x9e, 0x14, 0x24, 0x29, - 0x49, 0x44, 0xb1, 0xfb, 0x1d, 0x70, 0xd4, 0xcb, 0x2c, 0xd4, 0x39, 0xdf, 0xdf, 0xe0, 0x50, 0x6e, - 0x39, 0xd8, 0x8f, 0xde, 0x97, 0x75, 0x0e, 0x05, 0x74, 0x94, 0x20, 0xcf, 0x54, 0xf0, 0xf4, 0x4c, - 0xb5, 0x44, 0xb1, 0x96, 0xdd, 0x8f, 0xc1, 0xbd, 0x41, 0xc1, 0x2e, 0xa8, 0xcc, 0x2f, 0xeb, 0x6c, - 0x46, 0x70, 0x24, 0x60, 0xa5, 0x8d, 0x05, 0x5c, 0xd3, 0xd8, 0x44, 0x41, 0x71, 0x15, 0x74, 0xbf, - 0x04, 0xce, 0xa0, 0xa0, 0x29, 0xe9, 0x34, 0x54, 0x65, 0x6f, 0x07, 0xfa, 0x36, 0x67, 0x5b, 0xb8, - 0x1d, 0xec, 0x93, 0xf4, 0x09, 0xa3, 0x79, 0xb4, 0x69, 0x1a, 0xa8, 0x91, 0x69, 0x3d, 0x6a, 0x89, - 0x62, 0x2d, 0xbb, 0xdf, 0x80, 0x65, 0x4c, 0x06, 0x8c, 0xd3, 0xb2, 0x63, 0xab, 0xa4, 0x1b, 0xb7, - 0x26, 0x55, 0x19, 0xdf, 0x31, 0x19, 0x27, 0xc4, 0x58, 0xc0, 0x55, 0x9d, 0xd3, 0x08, 0x28, 0x9e, - 0x84, 0xdc, 0x97, 0x16, 0x58, 0xab, 0xae, 0xe6, 0x98, 0x49, 0x13, 0x74, 0x1c, 0xbf, 0xb1, 0xd5, - 0xda, 0x79, 0xf7, 0xf6, 0x7e, 0xce, 0xf9, 0x25, 0xfa, 0xda, 0x74, 0x75, 0xb5, 0x32, 0x84, 0xd2, - 0x47, 0x02, 0x2e, 0x66, 0x1d, 0x0b, 0xf8, 0x68, 0xc1, 0x15, 0x3a, 0x80, 0x5e, 0xfd, 0xb6, 0x88, - 0xc7, 0xab, 0xc5, 0xdc, 0x5a, 0x39, 0xa0, 0x86, 0x1e, 0x81, 0xf5, 0x59, 0x03, 0xc4, 0x84, 0x0f, - 0x58, 0xce, 0x09, 0xa2, 0xa0, 0x25, 0xf5, 0x3e, 0xe3, 0xca, 0x17, 0x5f, 0x81, 0xa5, 0x1e, 0xc5, - 0xc7, 0x14, 0x1b, 0x63, 0xbc, 0x75, 0xfb, 0x8b, 0x44, 0x14, 0x1f, 0xec, 0x47, 0xfe, 0xc4, 0x16, - 0x6a, 0x39, 0x12, 0xb0, 0x4e, 0xf1, 0x58, 0xc0, 0xa6, 0x2e, 0x95, 0x62, 0x14, 0x3b, 0x3d, 0x8a, - 0x0f, 0xb0, 0x29, 0xe1, 0x21, 0x78, 0x30, 0x73, 0x54, 0x55, 0xc1, 0x2f, 0x75, 0xa0, 0x13, 0x48, - 0x73, 0xb3, 0xe7, 0xb9, 0x31, 0x65, 0x53, 0x9b, 0x5b, 0x09, 0x33, 0x46, 0x93, 0x4b, 0x69, 0x34, - 0xf9, 0x74, 0x77, 0x81, 0x8d, 0x39, 0x39, 0x53, 0x26, 0xb3, 0x23, 0x38, 0x14, 0xd0, 0xde, 0x3f, - 0x22, 0x67, 0x23, 0x01, 0x95, 0x3e, 0x16, 0xb0, 0x65, 0xee, 0x8e, 0x93, 0x33, 0x14, 0x2b, 0x51, - 0x42, 0x99, 0x84, 0x1a, 0x6a, 0x82, 0x14, 0xf4, 0xa9, 0x81, 0xb2, 0x39, 0x28, 0xd3, 0x50, 0x66, - 0x20, 0x26, 0x21, 0x7b, 0x0a, 0x1d, 0x1a, 0x88, 0xcd, 0x41, 0x4c, 0x43, 0xf2, 0x31, 0x37, 0x07, - 0xce, 0x7f, 0x9c, 0x83, 0xbd, 0x7b, 0x3f, 0xbf, 0x80, 0x35, 0xd5, 0xb7, 0x3f, 0x6c, 0xd0, 0xb8, - 0xb3, 0xbb, 0x71, 0xbf, 0x00, 0x0e, 0x2f, 0x93, 0x92, 0xa8, 0x26, 0xae, 0xee, 0xc0, 0x7f, 0x4c, - 0x1a, 0x1c, 0xc9, 0x6d, 0xfa, 0x56, 0x14, 0x31, 0xbd, 0x15, 0xb5, 0x44, 0xb1, 0x96, 0xef, 0x62, - 0x82, 0x37, 0x01, 0x48, 0x95, 0x75, 0xf1, 0x71, 0xa2, 0x87, 0xb8, 0x11, 0x37, 0x8d, 0xf2, 0xf8, - 0x7f, 0x32, 0x88, 0xe8, 0x27, 0x0b, 0x38, 0xaa, 0x87, 0xae, 0x0f, 0x96, 0x69, 0x7e, 0x91, 0xf4, - 0x29, 0x6e, 0xd7, 0xba, 0x0f, 0x2e, 0xaf, 0xfc, 0xb5, 0x88, 0x62, 0x15, 0x3a, 0xd0, 0xb2, 0xfb, - 0x10, 0xd8, 0x6c, 0x40, 0xf2, 0xb6, 0xd5, 0x6d, 0x5d, 0x5e, 0xf9, 0xcb, 0x11, 0xc5, 0x87, 0x03, - 0x92, 0xbb, 0x1b, 0x60, 0x29, 0x49, 0x4b, 0x7a, 0x41, 0xda, 0xf5, 0xee, 0xca, 0xe5, 0x95, 0xdf, - 0x8c, 0x28, 0x7e, 0xac, 0x04, 0x49, 0xf4, 0x19, 0x2f, 0xdb, 0x8d, 0x8a, 0xf8, 0x8c, 0xf1, 0x52, - 0x12, 0xa9, 0x9c, 0x38, 0xdc, 0xb6, 0x2b, 0x42, 0x8d, 0x20, 0xee, 0xda, 0x3f, 0xbc, 0xf4, 0x6a, - 0x33, 0x3e, 0xbb, 0xae, 0x03, 0x10, 0x51, 0xfc, 0x09, 0xed, 0x97, 0xa4, 0xe0, 0x6f, 0xa6, 0x71, - 0xf6, 0x57, 0x29, 0x9c, 0x4c, 0xc9, 0xd2, 0xb4, 0x19, 0xff, 0x36, 0x04, 0xfa, 0x5f, 0x5e, 0x74, - 0xf4, 0x7a, 0xe8, 0x59, 0xd7, 0x43, 0xcf, 0xfa, 0x7d, 0xe8, 0x59, 0x3f, 0xde, 0x78, 0xb5, 0xeb, - 0x1b, 0xaf, 0xf6, 0xeb, 0x8d, 0x57, 0xfb, 0xf6, 0xa3, 0x8c, 0x96, 0xcf, 0xce, 0x7b, 0x41, 0xca, - 0x4e, 0x43, 0x65, 0xd1, 0x0f, 0x72, 0x52, 0x3e, 0x67, 0xc5, 0x89, 0x59, 0x25, 0x03, 0x1a, 0x66, - 0x2c, 0xcc, 0x19, 0x26, 0x0b, 0x5f, 0x21, 0xbd, 0x25, 0xf5, 0x01, 0xb2, 0xfb, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x32, 0x11, 0x67, 0xc4, 0x34, 0x09, 0x00, 0x00, -} - -func (this *ResourceOffer) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceOffer) - if !ok { - that2, ok := that.(ResourceOffer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Resources.Equal(&that1.Resources) { - return false - } - if this.Count != that1.Count { - return false - } - return true -} -func (m *ResourceOffer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceOffer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceOffer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Count != 0 { - i = encodeVarintBid(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 = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -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 - if len(m.ResourcesOffer) > 0 { - for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - { - 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 len(m.ResourcesOffer) > 0 { - for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - 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 *ResourceOffer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resources.Size() - n += 1 + l + sovBid(uint64(l)) - if m.Count != 0 { - n += 1 + sovBid(uint64(m.Count)) - } - return n -} - -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)) - if len(m.ResourcesOffer) > 0 { - for _, e := range m.ResourcesOffer { - l = e.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)) - } - if len(m.ResourcesOffer) > 0 { - for _, e := range m.ResourcesOffer { - l = e.Size() - n += 1 + l + sovBid(uint64(l)) - } - } - 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 *ResourceOffer) Unmarshal(dAtA []byte) 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: ResourceOffer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceOffer: 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 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.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 ErrIntOverflowBid - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= uint32(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 *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 - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourcesOffer", 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 - } - m.ResourcesOffer = append(m.ResourcesOffer, ResourceOffer{}) - if err := m.ResourcesOffer[len(m.ResourcesOffer)-1].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 - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourcesOffer", 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 - } - m.ResourcesOffer = append(m.ResourcesOffer, ResourceOffer{}) - if err := m.ResourcesOffer[len(m.ResourcesOffer)-1].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 *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/v1beta4/bid_test.go b/go/node/market/v1beta4/bid_test.go deleted file mode 100644 index 5c64979a..00000000 --- a/go/node/market/v1beta4/bid_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package v1beta4_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/akash-network/akash-api/go/node/market/v1beta4" - testutil "github.com/akash-network/akash-api/go/testutil/v1beta3" -) - -func TestBid_GSpecMatch_Valid(t *testing.T) { - gspec := testutil.GroupSpec(t) - - rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources) - - require.True(t, rOffer.MatchGSpec(gspec)) -} - -func TestBid_GSpecMatch_Valid2(t *testing.T) { - gspec := testutil.GroupSpec(t) - - if len(gspec.Resources) == 1 { - rl := testutil.ResourcesList(t, 2) - rl[0].Count = 4 - gspec.Resources = append(gspec.Resources, rl...) - } - - rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources) - - require.True(t, rOffer.MatchGSpec(gspec)) -} - -func TestBid_GSpecMatch_InvalidCount(t *testing.T) { - gspec := testutil.GroupSpec(t) - - if len(gspec.Resources) == 1 { - rl := testutil.ResourcesList(t, 2) - gspec.Resources = append(gspec.Resources, rl...) - } - - rOffer := v1beta4.ResourceOfferFromRU(gspec.Resources) - - gspec.Resources[0].Count = 2 - - require.False(t, rOffer.MatchGSpec(gspec)) -} diff --git a/go/node/market/v1beta4/codec.go b/go/node/market/v1beta4/codec.go deleted file mode 100644 index b7ccd985..00000000 --- a/go/node/market/v1beta4/codec.go +++ /dev/null @@ -1,50 +0,0 @@ -package v1beta4 - -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/v1beta4/errors.go b/go/node/market/v1beta4/errors.go deleted file mode 100644 index ae255f13..00000000 --- a/go/node/market/v1beta4/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -package v1beta4 - -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("leas`e 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/v1beta4/escrow.go b/go/node/market/v1beta4/escrow.go deleted file mode 100644 index eebb2edf..00000000 --- a/go/node/market/v1beta4/escrow.go +++ /dev/null @@ -1,61 +0,0 @@ -package v1beta4 - -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/v1beta4/event.go b/go/node/market/v1beta4/event.go deleted file mode 100644 index a5ddc150..00000000 --- a/go/node/market/v1beta4/event.go +++ /dev/null @@ -1,359 +0,0 @@ -package v1beta4 - -import ( - "errors" - "strconv" - - sdk "github.com/cosmos/cosmos-sdk/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - "github.com/akash-network/akash-api/go/sdkutil" -) - -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/v1beta4/events_test.go b/go/node/market/v1beta4/events_test.go deleted file mode 100644 index eab6ad81..00000000 --- a/go/node/market/v1beta4/events_test.go +++ /dev/null @@ -1,460 +0,0 @@ -package v1beta4 - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/pkg/errors" - - "github.com/stretchr/testify/require" - - "github.com/akash-network/akash-api/go/sdkutil" -) - -var ( - 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/v1beta4/genesis.pb.go b/go/node/market/v1beta4/genesis.pb.go deleted file mode 100644 index 55e4deb4..00000000 --- a/go/node/market/v1beta4/genesis.pb.go +++ /dev/null @@ -1,518 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/genesis.proto - -package v1beta4 - -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 defines the basic genesis state used by market module -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` - Orders []Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders" yaml:"orders"` - Leases []Lease `protobuf:"bytes,3,rep,name=leases,proto3" json:"leases" yaml:"leases"` - Bids []Bid `protobuf:"bytes,4,rep,name=bids,proto3" json:"bids" yaml:"bids"` -} - -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_e52179524daaace5, []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 (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) GetBids() []Bid { - if m != nil { - return m.Bids - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "akash.market.v1beta4.GenesisState") -} - -func init() { - proto.RegisterFile("akash/market/v1beta4/genesis.proto", fileDescriptor_e52179524daaace5) -} - -var fileDescriptor_e52179524daaace5 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0x93, 0xb6, 0xea, 0x90, 0xde, 0xbb, 0x44, 0x1d, 0x42, 0x8b, 0x9c, 0xe2, 0xa9, 0x0b, - 0xb6, 0x28, 0x2c, 0x30, 0x66, 0x41, 0x42, 0x48, 0xa0, 0x14, 0x16, 0x36, 0x87, 0x58, 0xa9, 0xd5, - 0xa6, 0xae, 0x6c, 0x03, 0xe2, 0x2d, 0x78, 0xac, 0x8e, 0x1d, 0x59, 0x88, 0x50, 0xbb, 0x31, 0xf6, - 0x09, 0x50, 0x6c, 0x4b, 0x91, 0x90, 0xd5, 0x2d, 0x7f, 0xfe, 0xef, 0x7c, 0xc9, 0xb1, 0x03, 0x48, - 0xe6, 0x44, 0xce, 0x70, 0x49, 0xc4, 0x9c, 0x2a, 0xfc, 0x7a, 0x96, 0x51, 0x45, 0x2e, 0x70, 0x41, - 0x97, 0x54, 0x32, 0x89, 0x56, 0x82, 0x2b, 0x1e, 0xf6, 0x35, 0x83, 0x0c, 0x83, 0x2c, 0x33, 0xe8, - 0x17, 0xbc, 0xe0, 0x1a, 0xc0, 0xf5, 0x93, 0x61, 0x07, 0x23, 0xa7, 0x8f, 0x8b, 0x9c, 0x8a, 0x83, - 0xc4, 0x82, 0x12, 0x49, 0x2d, 0x01, 0x9c, 0x44, 0xc6, 0x72, 0xdb, 0x9f, 0x38, 0xfb, 0x15, 0x11, - 0xa4, 0xb4, 0xbf, 0x0c, 0xbf, 0x5a, 0xc1, 0xbf, 0x6b, 0xb3, 0xc4, 0x54, 0x11, 0x45, 0xc3, 0xc7, - 0xa0, 0x6b, 0x80, 0xc8, 0x1f, 0xf9, 0xe3, 0xde, 0xe4, 0x18, 0xb9, 0x96, 0x42, 0xf7, 0x9a, 0x49, - 0xe2, 0x75, 0x15, 0x7b, 0x3f, 0x55, 0x6c, 0x67, 0xf6, 0x55, 0xfc, 0xff, 0x9d, 0x94, 0x8b, 0x2b, - 0x68, 0x32, 0x4c, 0x6d, 0x11, 0x3e, 0x04, 0x5d, 0xbd, 0x9b, 0x8c, 0x5a, 0xa3, 0xf6, 0xb8, 0x37, - 0x19, 0xba, 0xb5, 0x77, 0x35, 0xd3, 0x58, 0xcd, 0x48, 0x63, 0x35, 0x19, 0xa6, 0xb6, 0xa8, 0xad, - 0xfa, 0x3c, 0x64, 0xd4, 0x3e, 0x64, 0xbd, 0xad, 0x99, 0xc6, 0x6a, 0x46, 0x1a, 0xab, 0xc9, 0x30, - 0xb5, 0x45, 0x78, 0x13, 0x74, 0x32, 0x96, 0xcb, 0xa8, 0xa3, 0x9d, 0x47, 0x6e, 0x67, 0xc2, 0xf2, - 0x64, 0x68, 0x8d, 0x1a, 0xdf, 0x57, 0x71, 0xcf, 0xf8, 0xea, 0x04, 0x53, 0xfd, 0x32, 0x99, 0xae, - 0xb7, 0xc0, 0xdf, 0x6c, 0x81, 0xff, 0xbd, 0x05, 0xfe, 0xc7, 0x0e, 0x78, 0x9b, 0x1d, 0xf0, 0x3e, - 0x77, 0xc0, 0x7b, 0xba, 0x2c, 0x98, 0x9a, 0xbd, 0x64, 0xe8, 0x99, 0x97, 0x58, 0x7f, 0xe1, 0x74, - 0x49, 0xd5, 0x1b, 0x17, 0x73, 0x9b, 0xc8, 0x8a, 0xe1, 0x82, 0xe3, 0x25, 0xcf, 0xe9, 0x9f, 0x1b, - 0xcc, 0xba, 0xfa, 0xee, 0xce, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xfd, 0x9d, 0x36, 0x94, - 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 - 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 = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - 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] = 0x1a - } - } - 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] = 0x12 - } - } - { - 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)) - 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)) - } - } - if len(m.Bids) > 0 { - for _, e := range m.Bids { - 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 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 - case 2: - 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 3: - 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 4: - 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 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.Bids = append(m.Bids, Bid{}) - if err := m.Bids[len(m.Bids)-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/market/v1beta4/id.go b/go/node/market/v1beta4/id.go deleted file mode 100644 index c2f7a010..00000000 --- a/go/node/market/v1beta4/id.go +++ /dev/null @@ -1,154 +0,0 @@ -package v1beta4 - -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/v1beta4/key.go b/go/node/market/v1beta4/key.go deleted file mode 100644 index 75026acf..00000000 --- a/go/node/market/v1beta4/key.go +++ /dev/null @@ -1,28 +0,0 @@ -package v1beta4 - -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/v1beta4/lease.pb.go b/go/node/market/v1beta4/lease.pb.go deleted file mode 100644 index c5cbfe3a..00000000 --- a/go/node/market/v1beta4/lease.pb.go +++ /dev/null @@ -1,2134 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/lease.proto - -package v1beta4 - -import ( - fmt "fmt" - 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 - -// 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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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.v1beta4.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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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_4ab6faa2f1861aa1, []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.v1beta4.Lease_State", Lease_State_name, Lease_State_value) - proto.RegisterType((*LeaseID)(nil), "akash.market.v1beta4.LeaseID") - proto.RegisterType((*Lease)(nil), "akash.market.v1beta4.Lease") - proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1beta4.LeaseFilters") - proto.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta4.MsgCreateLease") - proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta4.MsgCreateLeaseResponse") - proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta4.MsgWithdrawLease") - proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta4.MsgWithdrawLeaseResponse") - proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta4.MsgCloseLease") - proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta4.MsgCloseLeaseResponse") -} - -func init() { proto.RegisterFile("akash/market/v1beta4/lease.proto", fileDescriptor_4ab6faa2f1861aa1) } - -var fileDescriptor_4ab6faa2f1861aa1 = []byte{ - // 756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x4f, 0xdb, 0x4a, - 0x10, 0xb7, 0x93, 0x38, 0x24, 0x1b, 0xfe, 0xe4, 0x59, 0xc0, 0xcb, 0x33, 0x0f, 0xdb, 0xf5, 0x89, - 0x4b, 0x6d, 0x11, 0x7a, 0x29, 0x3d, 0x11, 0x22, 0xaa, 0x48, 0x45, 0xa8, 0xa6, 0x52, 0xab, 0xaa, - 0x52, 0xe4, 0x78, 0x17, 0xb3, 0x22, 0xf1, 0x06, 0xaf, 0x09, 0xea, 0x37, 0xa8, 0x38, 0xf5, 0xd8, - 0x0b, 0x2a, 0x52, 0xbf, 0x0c, 0x47, 0xd4, 0x53, 0x4f, 0x56, 0x15, 0x2e, 0x55, 0x8e, 0x51, 0x3f, - 0x40, 0xb5, 0xbb, 0x0e, 0x49, 0x50, 0xc4, 0xa9, 0xea, 0xa9, 0xa7, 0x64, 0x7e, 0x33, 0xbf, 0x99, - 0xf1, 0x6f, 0x66, 0x6c, 0x60, 0x7a, 0x27, 0x1e, 0x3d, 0x76, 0x3a, 0x5e, 0x74, 0x82, 0x62, 0xa7, - 0xb7, 0xd9, 0x42, 0xb1, 0xf7, 0xc4, 0x69, 0x23, 0x8f, 0x22, 0xbb, 0x1b, 0x91, 0x98, 0xa8, 0xcb, - 0x3c, 0xc2, 0x16, 0x11, 0x76, 0x1a, 0xa1, 0x2d, 0x07, 0x24, 0x20, 0x3c, 0xc0, 0x61, 0xff, 0x44, - 0xac, 0xa6, 0xfb, 0x84, 0x76, 0x08, 0x75, 0x5a, 0x1e, 0x45, 0x69, 0xb2, 0x4d, 0xc7, 0x27, 0x38, - 0x1c, 0xf9, 0x67, 0x56, 0x6b, 0x61, 0x28, 0xfc, 0xd6, 0x55, 0x06, 0xcc, 0xbd, 0x60, 0xb5, 0x1b, - 0x75, 0xd5, 0x01, 0x0a, 0x39, 0x0f, 0x51, 0x54, 0x91, 0x4d, 0x79, 0xa3, 0x58, 0xfb, 0x6f, 0x90, - 0x18, 0x02, 0x18, 0x26, 0xc6, 0xfc, 0x7b, 0xaf, 0xd3, 0xde, 0xb6, 0xb8, 0x69, 0xb9, 0x02, 0x56, - 0xb7, 0x40, 0x0e, 0x52, 0x74, 0x5a, 0xc9, 0x98, 0xf2, 0x46, 0xae, 0x66, 0xf4, 0x13, 0x23, 0x57, - 0x3f, 0x44, 0xa7, 0x83, 0xc4, 0xe0, 0xf8, 0x30, 0x31, 0x4a, 0x82, 0xc6, 0x2c, 0xcb, 0xe5, 0x20, - 0x23, 0x05, 0x8c, 0x94, 0x35, 0xe5, 0x8d, 0x05, 0x41, 0x7a, 0x9e, 0x92, 0x82, 0x29, 0x52, 0x20, - 0x48, 0x41, 0x4a, 0x22, 0x8c, 0x94, 0x1b, 0x93, 0x0e, 0x52, 0x12, 0x99, 0x22, 0x11, 0x41, 0x62, - 0x3f, 0xea, 0x33, 0x50, 0xe8, 0x46, 0xa4, 0x87, 0x21, 0x8a, 0x2a, 0x0a, 0x7f, 0x24, 0x63, 0x90, - 0x18, 0x77, 0xd8, 0x30, 0x31, 0x96, 0x04, 0x69, 0x84, 0x58, 0xee, 0x9d, 0x73, 0xbb, 0xf0, 0xe9, - 0xca, 0x90, 0x7e, 0x5c, 0x19, 0x92, 0xf5, 0x33, 0x0b, 0x14, 0x2e, 0x91, 0xfa, 0x0e, 0x14, 0xf8, - 0x9c, 0x9a, 0x18, 0x72, 0x8d, 0x4a, 0xd5, 0x75, 0x7b, 0xd6, 0xac, 0xec, 0x54, 0xd1, 0x9a, 0x75, - 0x9d, 0x18, 0x52, 0x3f, 0x31, 0x46, 0x12, 0x0f, 0x12, 0x23, 0x83, 0xe1, 0x30, 0x31, 0x8a, 0xa2, - 0x30, 0x86, 0x96, 0x3b, 0xc7, 0x53, 0x36, 0xa0, 0xea, 0x02, 0x85, 0xc6, 0x5e, 0x8c, 0xb8, 0x9c, - 0x8b, 0xd5, 0x47, 0x0f, 0xa4, 0xb6, 0x0f, 0x59, 0xa0, 0x98, 0x10, 0xe7, 0x8c, 0x27, 0xc4, 0x4d, - 0xcb, 0x15, 0xb0, 0xfa, 0x12, 0x28, 0xdd, 0x08, 0xfb, 0x88, 0xab, 0x5d, 0xaa, 0xfe, 0x6f, 0x8b, - 0x75, 0xb1, 0xd9, 0xba, 0xa4, 0x29, 0x37, 0xed, 0x3a, 0xf2, 0x77, 0x09, 0x0e, 0x6b, 0xeb, 0xac, - 0x5b, 0x96, 0x92, 0x53, 0xc6, 0x29, 0xb9, 0x69, 0xb9, 0x02, 0x56, 0xd7, 0x01, 0xf0, 0x23, 0xe4, - 0xc5, 0x08, 0x36, 0xbd, 0x98, 0x0f, 0x24, 0xeb, 0x16, 0x53, 0x64, 0x27, 0x56, 0xd7, 0x40, 0xd1, - 0x6f, 0x13, 0x8a, 0x60, 0x93, 0x84, 0x5c, 0xf5, 0xac, 0x5b, 0x10, 0xc0, 0x41, 0x68, 0x7d, 0x96, - 0x81, 0xc2, 0x5b, 0x57, 0x2d, 0x30, 0x87, 0xc3, 0x9e, 0xd7, 0xc6, 0xb0, 0x2c, 0x69, 0x2b, 0x17, - 0x97, 0xe6, 0x3f, 0xfc, 0xc1, 0xb8, 0xb3, 0x21, 0x1c, 0xea, 0x1a, 0xc8, 0x7b, 0x7e, 0x8c, 0x7b, - 0xa8, 0x2c, 0x6b, 0x4b, 0x17, 0x97, 0x66, 0x89, 0x87, 0xec, 0x70, 0x48, 0xad, 0x02, 0x15, 0x87, - 0xf4, 0xec, 0xe8, 0x08, 0xfb, 0x18, 0x85, 0x71, 0xf3, 0xe8, 0x2c, 0x84, 0xb4, 0x9c, 0xd1, 0xb4, - 0x8b, 0x4b, 0x73, 0x55, 0xc8, 0x3d, 0xe1, 0xde, 0x63, 0x5e, 0x96, 0x50, 0xb4, 0x52, 0xce, 0x4e, - 0x24, 0xdc, 0xe5, 0x90, 0x96, 0xfb, 0xf0, 0x45, 0x97, 0x26, 0xc6, 0xfe, 0x35, 0x03, 0xe6, 0xb9, - 0x7f, 0x0f, 0xb7, 0x63, 0x14, 0xd1, 0xbf, 0xe7, 0x31, 0x71, 0x1e, 0x4c, 0x0c, 0xb1, 0xac, 0xf9, - 0xb1, 0x18, 0x0f, 0x6d, 0xe2, 0x76, 0x8e, 0x8b, 0xda, 0x06, 0x8b, 0xfb, 0x34, 0xd8, 0xe5, 0xdb, - 0x22, 0x6e, 0xea, 0x15, 0xc8, 0xb7, 0x30, 0x1c, 0x5f, 0xd4, 0xda, 0xec, 0xb5, 0xaf, 0x61, 0xd8, - 0xa8, 0xd7, 0xcc, 0xf4, 0x9e, 0x14, 0x6e, 0xce, 0xba, 0x26, 0xa5, 0x85, 0x61, 0x03, 0xa6, 0xd5, - 0x2a, 0x60, 0x75, 0xba, 0x9a, 0x8b, 0x68, 0x97, 0x84, 0x14, 0x59, 0x11, 0x28, 0xef, 0xd3, 0xe0, - 0x35, 0x8e, 0x8f, 0x61, 0xe4, 0x9d, 0x8b, 0x4e, 0xde, 0xdc, 0xeb, 0xe4, 0x37, 0xdc, 0xf6, 0x54, - 0x37, 0x1a, 0xa8, 0xdc, 0xaf, 0x79, 0xd7, 0x0f, 0x05, 0x0b, 0xac, 0x53, 0xb6, 0x89, 0x7f, 0xe0, - 0x55, 0x93, 0x36, 0xf4, 0x2f, 0x58, 0x99, 0x2a, 0x3a, 0xea, 0xa6, 0x76, 0x78, 0xdd, 0xd7, 0xe5, - 0x9b, 0xbe, 0x2e, 0x7f, 0xef, 0xeb, 0xf2, 0xc7, 0x5b, 0x5d, 0xba, 0xb9, 0xd5, 0xa5, 0x6f, 0xb7, - 0xba, 0xf4, 0xf6, 0x69, 0x80, 0xe3, 0xe3, 0xb3, 0x96, 0xed, 0x93, 0x8e, 0xc3, 0xdb, 0x79, 0x1c, - 0xa2, 0xf8, 0x9c, 0x44, 0x27, 0xa9, 0xe5, 0x75, 0xb1, 0x13, 0x10, 0x27, 0x24, 0x10, 0xdd, 0xfb, - 0xe6, 0xb4, 0xf2, 0xfc, 0x83, 0xb3, 0xf5, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xc4, 0x50, 0x62, - 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/v1beta4/migrate/v1beta3.go b/go/node/market/v1beta4/migrate/v1beta3.go deleted file mode 100644 index f87f9b94..00000000 --- a/go/node/market/v1beta4/migrate/v1beta3.go +++ /dev/null @@ -1,40 +0,0 @@ -package migrate - -import ( - "github.com/akash-network/akash-api/go/node/market/v1beta3" - "github.com/akash-network/akash-api/go/node/market/v1beta4" -) - -func BidStateFromV1beta3(from v1beta3.Bid_State) v1beta4.Bid_State { - return v1beta4.Bid_State(from) -} - -func LeaseIDFromV1beta3(from v1beta3.LeaseID) v1beta4.LeaseID { - return v1beta4.LeaseID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - OSeq: from.OSeq, - Provider: from.Provider, - } -} - -func BidIDFromV1beta3(from v1beta3.BidID) v1beta4.BidID { - return v1beta4.BidID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - OSeq: from.OSeq, - Provider: from.Provider, - } -} - -func BidFromV1beta3(from v1beta3.Bid) v1beta4.Bid { - return v1beta4.Bid{ - BidID: BidIDFromV1beta3(from.BidID), - State: BidStateFromV1beta3(from.State), - Price: from.Price, - CreatedAt: from.CreatedAt, - ResourcesOffer: v1beta4.ResourcesOffer{}, - } -} diff --git a/go/node/market/v1beta4/msgs.go b/go/node/market/v1beta4/msgs.go deleted file mode 100644 index 9aa2ef63..00000000 --- a/go/node/market/v1beta4/msgs.go +++ /dev/null @@ -1,216 +0,0 @@ -package v1beta4 - -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, roffer ResourcesOffer) *MsgCreateBid { - return &MsgCreateBid{ - Order: id, - Provider: provider.String(), - Price: price, - Deposit: deposit, - ResourcesOffer: roffer, - } -} - -// 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/v1beta4/order.pb.go b/go/node/market/v1beta4/order.pb.go deleted file mode 100644 index fbf5abc5..00000000 --- a/go/node/market/v1beta4/order.pb.go +++ /dev/null @@ -1,1107 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/order.proto - -package v1beta4 - -import ( - fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - _ "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 - -// 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_f7500a2881510f8f, []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_f7500a2881510f8f, []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.v1beta4.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_f7500a2881510f8f, []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_f7500a2881510f8f, []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.v1beta4.Order_State", Order_State_name, Order_State_value) - proto.RegisterType((*OrderID)(nil), "akash.market.v1beta4.OrderID") - proto.RegisterType((*Order)(nil), "akash.market.v1beta4.Order") - proto.RegisterType((*OrderFilters)(nil), "akash.market.v1beta4.OrderFilters") -} - -func init() { proto.RegisterFile("akash/market/v1beta4/order.proto", fileDescriptor_f7500a2881510f8f) } - -var fileDescriptor_f7500a2881510f8f = []byte{ - // 587 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xb1, 0x6b, 0xdb, 0x4e, - 0x14, 0x96, 0x6c, 0x39, 0x89, 0xcf, 0xc9, 0xef, 0xe7, 0x8a, 0x94, 0xa6, 0x0a, 0xd1, 0xa9, 0xea, - 0xe2, 0xa5, 0x12, 0xb5, 0xbb, 0xd4, 0x5b, 0xdc, 0xd0, 0xe0, 0xc9, 0x20, 0x77, 0x2a, 0x85, 0x20, - 0xeb, 0x0e, 0x45, 0xd8, 0xd6, 0x29, 0xd2, 0xc5, 0x21, 0x7b, 0x87, 0xe2, 0xa9, 0x4b, 0xa1, 0x8b, - 0x21, 0xd0, 0x3f, 0xa4, 0x6b, 0xc6, 0x8c, 0x9d, 0x44, 0xb1, 0x97, 0xe2, 0xd1, 0x7f, 0x41, 0xb9, - 0x77, 0x0a, 0x4e, 0x4a, 0xc9, 0x1f, 0xd0, 0x49, 0x7a, 0xdf, 0xfb, 0xbe, 0x77, 0xf7, 0xbe, 0xf7, - 0x38, 0x64, 0xf9, 0x43, 0x3f, 0x3b, 0x75, 0xc7, 0x7e, 0x3a, 0xa4, 0xdc, 0x9d, 0xbc, 0x1c, 0x50, - 0xee, 0xbf, 0x72, 0x59, 0x4a, 0x68, 0xea, 0x24, 0x29, 0xe3, 0x4c, 0xdf, 0x05, 0x86, 0x23, 0x19, - 0x4e, 0xc1, 0x30, 0x76, 0x43, 0x16, 0x32, 0x20, 0xb8, 0xe2, 0x4f, 0x72, 0x8d, 0x86, 0xac, 0x46, - 0x68, 0x32, 0x62, 0x97, 0x63, 0x1a, 0xdf, 0x56, 0x6c, 0xb9, 0x61, 0xca, 0xce, 0x93, 0x2c, 0xa1, - 0x81, 0x64, 0xda, 0x0b, 0x15, 0x6d, 0xf6, 0xc4, 0x29, 0xdd, 0x23, 0xdd, 0x45, 0x15, 0x76, 0x11, - 0xd3, 0x74, 0x4f, 0xb5, 0xd4, 0x46, 0xb5, 0xf3, 0x74, 0x99, 0x63, 0x09, 0xac, 0x72, 0xbc, 0x7d, - 0xe9, 0x8f, 0x47, 0x6d, 0x1b, 0x42, 0xdb, 0x93, 0xb0, 0xde, 0x42, 0x1a, 0xc9, 0xe8, 0xd9, 0x5e, - 0xc9, 0x52, 0x1b, 0x5a, 0x07, 0xcf, 0x73, 0xac, 0x1d, 0xf5, 0xe9, 0xd9, 0x32, 0xc7, 0x80, 0xaf, - 0x72, 0x5c, 0x93, 0x32, 0x11, 0xd9, 0x1e, 0x80, 0x42, 0x14, 0x0a, 0x51, 0xd9, 0x52, 0x1b, 0x3b, - 0x52, 0x74, 0x5c, 0x88, 0xc2, 0x7b, 0xa2, 0x50, 0x8a, 0xc2, 0x42, 0xc4, 0x84, 0x48, 0x5b, 0x8b, - 0x7a, 0x85, 0x88, 0xdd, 0x13, 0x31, 0x29, 0x12, 0x9f, 0xf6, 0xd6, 0xd7, 0x2b, 0xac, 0xfc, 0xba, - 0xc2, 0x8a, 0xfd, 0xbd, 0x8c, 0x2a, 0xd0, 0xa5, 0xfe, 0x01, 0x6d, 0x81, 0xa9, 0x27, 0x11, 0x81, - 0x36, 0x6b, 0xcd, 0x03, 0xe7, 0x6f, 0xc6, 0x3a, 0x85, 0x29, 0x1d, 0xfb, 0x3a, 0xc7, 0xca, 0x3c, - 0xc7, 0xb7, 0x2e, 0x2d, 0x73, 0x5c, 0x8a, 0xc8, 0x2a, 0xc7, 0x55, 0x79, 0x60, 0x44, 0x6c, 0x6f, - 0x13, 0x4a, 0x76, 0x89, 0xee, 0xa1, 0x4a, 0xc6, 0x7d, 0x4e, 0xc1, 0x91, 0xff, 0x9a, 0xcf, 0x1e, - 0x28, 0xed, 0xf4, 0x05, 0x51, 0x9a, 0x0c, 0x9a, 0xb5, 0xc9, 0x10, 0xda, 0x9e, 0x84, 0xf5, 0x77, - 0x48, 0x13, 0xf3, 0x02, 0xbf, 0x6a, 0xcd, 0xe7, 0x45, 0xc9, 0xf5, 0x68, 0x8b, 0xb2, 0x2d, 0xe7, - 0x58, 0x8c, 0xb6, 0x9f, 0xd0, 0xa0, 0xb3, 0x2f, 0xee, 0x2c, 0xbc, 0x11, 0xc2, 0xb5, 0x37, 0x22, - 0xb2, 0x3d, 0x00, 0xf5, 0x03, 0x84, 0x82, 0x94, 0xfa, 0x9c, 0x92, 0x13, 0x9f, 0x83, 0xad, 0x65, - 0xaf, 0x5a, 0x20, 0x87, 0xdc, 0xfe, 0xa8, 0xa2, 0x0a, 0x5c, 0x50, 0xb7, 0xd1, 0x66, 0x14, 0x4f, - 0xfc, 0x51, 0x44, 0xea, 0x8a, 0xf1, 0x78, 0x3a, 0xb3, 0x1e, 0xc1, 0xf5, 0x21, 0xd9, 0x95, 0x09, - 0xfd, 0x09, 0xd2, 0x58, 0x42, 0xe3, 0xba, 0x6a, 0xec, 0x4c, 0x67, 0x56, 0x15, 0x08, 0xbd, 0x84, - 0xc6, 0xfa, 0x3e, 0xda, 0xf0, 0x03, 0x1e, 0x4d, 0x68, 0xbd, 0x64, 0xfc, 0x3f, 0x9d, 0x59, 0x35, - 0x48, 0x1d, 0x02, 0x24, 0x92, 0xc1, 0x88, 0x65, 0x94, 0xd4, 0xcb, 0x77, 0x92, 0x6f, 0x00, 0x32, - 0xb4, 0x4f, 0xdf, 0x4c, 0xe5, 0xce, 0x04, 0xbf, 0x94, 0xd0, 0x36, 0xe4, 0xdf, 0x46, 0x23, 0x4e, - 0xd3, 0xec, 0x5f, 0x5b, 0x56, 0xd1, 0x8f, 0x5c, 0x9d, 0xca, 0xba, 0x9f, 0x87, 0xf6, 0xa2, 0xad, - 0x09, 0x5f, 0x3a, 0xfd, 0xeb, 0xb9, 0xa9, 0xde, 0xcc, 0x4d, 0xf5, 0xe7, 0xdc, 0x54, 0x3f, 0x2f, - 0x4c, 0xe5, 0x66, 0x61, 0x2a, 0x3f, 0x16, 0xa6, 0xf2, 0xfe, 0x75, 0x18, 0xf1, 0xd3, 0xf3, 0x81, - 0x13, 0xb0, 0xb1, 0x0b, 0x3b, 0xf3, 0x22, 0xa6, 0xfc, 0x82, 0xa5, 0xc3, 0x22, 0xf2, 0x93, 0xc8, - 0x0d, 0x99, 0x1b, 0x33, 0x42, 0xff, 0x78, 0x76, 0x06, 0x1b, 0xf0, 0x36, 0xb4, 0x7e, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x9c, 0xe7, 0x69, 0x2b, 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/v1beta4/params.go b/go/node/market/v1beta4/params.go deleted file mode 100644 index e154e735..00000000 --- a/go/node/market/v1beta4/params.go +++ /dev/null @@ -1,76 +0,0 @@ -package v1beta4 - -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(500000)) - 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/v1beta4/params.pb.go b/go/node/market/v1beta4/params.pb.go deleted file mode 100644 index a454cdf4..00000000 --- a/go/node/market/v1beta4/params.pb.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/params.proto - -package v1beta4 - -import ( - fmt "fmt" - 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 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_80f1e7d9604b0c57, []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.v1beta4.Params") -} - -func init() { proto.RegisterFile("akash/market/v1beta4/params.proto", fileDescriptor_80f1e7d9604b0c57) } - -var fileDescriptor_80f1e7d9604b0c57 = []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, 0x02, 0x0b, 0xb0, 0x05, 0xd6, 0x0a, 0x54, 0x36, 0x96, 0xc8, 0xae, 0xad, 0xd4, 0x2a, - 0xce, 0x17, 0xc5, 0x01, 0xca, 0x0f, 0x60, 0xe7, 0x67, 0x75, 0xec, 0xc8, 0x64, 0xa1, 0x74, 0xeb, - 0x58, 0xfe, 0x00, 0x6a, 0x92, 0xa1, 0x64, 0xb3, 0xfd, 0x3e, 0xef, 0xf3, 0x49, 0x9f, 0xfd, 0x63, - 0xbe, 0xe0, 0x76, 0xce, 0x0c, 0xcf, 0x16, 0x2a, 0x67, 0xcf, 0x63, 0xa1, 0x72, 0x7e, 0xce, 0x52, - 0x9e, 0x71, 0x63, 0x69, 0x9a, 0x41, 0x0e, 0xdd, 0x5e, 0x89, 0xd0, 0x0a, 0xa1, 0x35, 0x32, 0xe8, - 0xc5, 0x10, 0x43, 0x09, 0xb0, 0xfd, 0xa9, 0x62, 0x07, 0x78, 0x06, 0xd6, 0x80, 0x65, 0x82, 0x5b, - 0x55, 0xdb, 0xc6, 0x6c, 0x06, 0x3a, 0xa9, 0xf2, 0xe0, 0x0b, 0xf9, 0xad, 0xbb, 0x52, 0xde, 0x7d, - 0x43, 0xfe, 0x5f, 0xa1, 0x65, 0x64, 0x74, 0x12, 0x49, 0x95, 0x82, 0xd5, 0x79, 0x1f, 0x0d, 0xd1, - 0xe8, 0xf7, 0xe9, 0x11, 0xad, 0x2c, 0x74, 0x6f, 0xa9, 0x07, 0x8e, 0xe9, 0x35, 0xe8, 0x24, 0x0c, - 0x57, 0x8e, 0x78, 0x85, 0x23, 0x9d, 0x50, 0xcb, 0x89, 0x4e, 0x6e, 0xaa, 0xde, 0xd6, 0x91, 0xa6, - 0x6a, 0xe7, 0xc8, 0xff, 0x57, 0x6e, 0x1e, 0x2f, 0x83, 0x46, 0x10, 0x4c, 0x3b, 0xe2, 0xb0, 0xdb, - 0xe5, 0xfe, 0x1f, 0xc8, 0xa4, 0xca, 0x22, 0xc3, 0x97, 0x91, 0xd0, 0xd2, 0xf6, 0x7f, 0x0d, 0xd1, - 0xa8, 0x13, 0x5e, 0x15, 0x8e, 0xb4, 0x6f, 0xf7, 0xc9, 0x84, 0x2f, 0x43, 0x2d, 0xed, 0xd6, 0x91, - 0x06, 0xb9, 0x73, 0xe4, 0x5f, 0x35, 0xe4, 0xe7, 0x7b, 0x30, 0x6d, 0xc3, 0x41, 0x31, 0xbc, 0x5f, - 0x15, 0x18, 0xad, 0x0b, 0x8c, 0x3e, 0x0b, 0x8c, 0xde, 0x37, 0xd8, 0x5b, 0x6f, 0xb0, 0xf7, 0xb1, - 0xc1, 0xde, 0xc3, 0x45, 0xac, 0xf3, 0xf9, 0x93, 0xa0, 0x33, 0x30, 0xac, 0x5c, 0xf3, 0x49, 0xa2, - 0xf2, 0x17, 0xc8, 0x16, 0xf5, 0x8d, 0xa7, 0x9a, 0xc5, 0xc0, 0x12, 0x90, 0xaa, 0xf1, 0x47, 0xa2, - 0x55, 0x6e, 0xf4, 0xec, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x64, 0x8e, 0xc0, 0xcc, 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/v1beta4/query.pb.go b/go/node/market/v1beta4/query.pb.go deleted file mode 100644 index 87c4eac0..00000000 --- a/go/node/market/v1beta4/query.pb.go +++ /dev/null @@ -1,3035 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/query.proto - -package v1beta4 - -import ( - context "context" - fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/escrow/v1beta3" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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_18494cd3f4a720d6, []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.v1beta4.QueryOrdersRequest") - proto.RegisterType((*QueryOrdersResponse)(nil), "akash.market.v1beta4.QueryOrdersResponse") - proto.RegisterType((*QueryOrderRequest)(nil), "akash.market.v1beta4.QueryOrderRequest") - proto.RegisterType((*QueryOrderResponse)(nil), "akash.market.v1beta4.QueryOrderResponse") - proto.RegisterType((*QueryBidsRequest)(nil), "akash.market.v1beta4.QueryBidsRequest") - proto.RegisterType((*QueryBidsResponse)(nil), "akash.market.v1beta4.QueryBidsResponse") - proto.RegisterType((*QueryBidRequest)(nil), "akash.market.v1beta4.QueryBidRequest") - proto.RegisterType((*QueryBidResponse)(nil), "akash.market.v1beta4.QueryBidResponse") - proto.RegisterType((*QueryLeasesRequest)(nil), "akash.market.v1beta4.QueryLeasesRequest") - proto.RegisterType((*QueryLeasesResponse)(nil), "akash.market.v1beta4.QueryLeasesResponse") - proto.RegisterType((*QueryLeaseRequest)(nil), "akash.market.v1beta4.QueryLeaseRequest") - proto.RegisterType((*QueryLeaseResponse)(nil), "akash.market.v1beta4.QueryLeaseResponse") -} - -func init() { proto.RegisterFile("akash/market/v1beta4/query.proto", fileDescriptor_18494cd3f4a720d6) } - -var fileDescriptor_18494cd3f4a720d6 = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0x13, 0x4d, - 0x18, 0xee, 0x16, 0xe8, 0x97, 0x0c, 0xf9, 0xf8, 0xbe, 0x6f, 0x3e, 0x0e, 0x58, 0xb4, 0x85, 0x1a, - 0x69, 0x31, 0x71, 0x37, 0x80, 0x09, 0xe1, 0x86, 0x2b, 0xa9, 0x81, 0xf8, 0x03, 0xab, 0x27, 0x2f, - 0x66, 0xda, 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, 0xcc, 0xbb, 0xfd, 0x95, 0xed, 0x6e, 0x49, 0xe0, 0x06, 0xdd, 0xe7, 0x7d, 0xe7, - 0x79, 0x9f, 0xf7, 0x99, 0x67, 0x17, 0xcd, 0x91, 0x3d, 0x22, 0x76, 0xad, 0x06, 0xf1, 0xf7, 0x68, - 0x60, 0xbd, 0x58, 0xaa, 0xd2, 0x80, 0xdc, 0xb6, 0xf6, 0x5b, 0xd4, 0x3f, 0x34, 0x9b, 0x3e, 0x0f, - 0x38, 0x9e, 0x56, 0x08, 0x53, 0x23, 0x4c, 0x40, 0x64, 0xa7, 0x5d, 0xee, 0x72, 0x05, 0xb0, 0xe4, - 0x5f, 0x1a, 0x9b, 0xbd, 0xea, 0x72, 0xee, 0xd6, 0xa9, 0x45, 0x9a, 0xcc, 0x22, 0x9e, 0xc7, 0x03, - 0x12, 0x30, 0xee, 0x09, 0x78, 0x7a, 0xb3, 0xc6, 0x45, 0x83, 0x0b, 0xab, 0x4a, 0x04, 0xd5, 0x47, - 0xc0, 0x81, 0x4b, 0x56, 0x93, 0xb8, 0xcc, 0x53, 0x60, 0xc0, 0x02, 0x2f, 0x2a, 0x6a, 0x3e, 0x3f, - 0x00, 0xd8, 0x8a, 0x15, 0x1c, 0x36, 0xa9, 0xe8, 0x47, 0x0c, 0x30, 0xe7, 0xbe, 0x43, 0x7d, 0x40, - 0xe4, 0x22, 0x11, 0x55, 0xe6, 0xc4, 0x76, 0xa8, 0x53, 0x22, 0xa8, 0x46, 0x14, 0x3e, 0x1b, 0x08, - 0x3f, 0x96, 0x44, 0x1f, 0xc9, 0xb6, 0xa2, 0x42, 0xf7, 0x5b, 0x54, 0x04, 0xd8, 0x46, 0x7f, 0xed, - 0xb0, 0x7a, 0x40, 0x7d, 0x31, 0x63, 0xcc, 0x19, 0xa5, 0xc9, 0xe5, 0x82, 0x19, 0x25, 0x92, 0xa9, - 0xaa, 0xca, 0x1a, 0x69, 0x8f, 0x1f, 0x9f, 0xe6, 0x53, 0x95, 0xb0, 0x10, 0x97, 0x11, 0xea, 0x0e, - 0x3d, 0x93, 0x56, 0x6d, 0x16, 0x4c, 0xad, 0x90, 0x29, 0x15, 0x32, 0xf5, 0x12, 0x40, 0x21, 0x73, - 0x9b, 0xb8, 0x14, 0xce, 0xaf, 0xf4, 0x54, 0x16, 0x8e, 0x0c, 0xf4, 0x7f, 0x1f, 0x45, 0xd1, 0xe4, - 0x9e, 0xa0, 0xf8, 0x2e, 0xca, 0x28, 0x2d, 0x24, 0xc5, 0xb1, 0xd2, 0xe4, 0xf2, 0x6c, 0x0c, 0x45, - 0x7b, 0x4a, 0x72, 0xfb, 0xfa, 0x33, 0x9f, 0x81, 0x26, 0x50, 0x8a, 0xef, 0x45, 0x90, 0x2c, 0x26, - 0x92, 0xd4, 0x0c, 0xfa, 0x58, 0x3e, 0x44, 0xff, 0x75, 0x49, 0x86, 0x32, 0xae, 0xa1, 0x34, 0x73, - 0x40, 0xc1, 0x6b, 0x31, 0xf4, 0x36, 0x37, 0x6c, 0x24, 0x09, 0xb6, 0x4f, 0xf3, 0xe9, 0xcd, 0x8d, - 0x4a, 0x9a, 0x39, 0x85, 0x07, 0xbd, 0x7b, 0xe9, 0xcc, 0xbc, 0x8a, 0x26, 0x14, 0x71, 0xe8, 0x19, - 0x3b, 0xb2, 0x5e, 0x87, 0xc6, 0x17, 0x3e, 0x1a, 0xe8, 0x5f, 0xd5, 0xcf, 0x66, 0x4e, 0x67, 0xcb, - 0xeb, 0x83, 0x5b, 0x9e, 0x8b, 0xee, 0x67, 0x33, 0xe7, 0x92, 0x77, 0xfc, 0xc9, 0x00, 0xf9, 0x34, - 0x3d, 0x98, 0x76, 0x1d, 0x8d, 0x57, 0x99, 0x13, 0xee, 0x77, 0x21, 0x9a, 0x5c, 0x58, 0x16, 0x56, - 0x01, 0x45, 0x55, 0x79, 0x71, 0xeb, 0xdd, 0x42, 0xff, 0x74, 0x0f, 0xd2, 0xea, 0xad, 0xf6, 0x2c, - 0x77, 0x76, 0xa8, 0x70, 0x11, 0xab, 0x7d, 0xdf, 0xb3, 0x8b, 0xce, 0xac, 0x4b, 0x68, 0xac, 0xda, - 0x69, 0x77, 0x65, 0x68, 0x3b, 0x98, 0x4e, 0x62, 0xf1, 0x16, 0x9a, 0xd2, 0xe9, 0xf1, 0x9c, 0xd4, - 0x6a, 0xbc, 0xe5, 0x05, 0x30, 0x60, 0xe8, 0x34, 0xfd, 0x10, 0xaa, 0x57, 0xcc, 0x3b, 0x1a, 0x04, - 0x1d, 0xfe, 0xd6, 0x4f, 0xe1, 0xc7, 0x6e, 0x0e, 0xdc, 0x97, 0xe1, 0x70, 0xee, 0x1c, 0x50, 0x55, - 0x97, 0xec, 0x91, 0x2f, 0x61, 0x0e, 0x84, 0x14, 0x41, 0xb9, 0x32, 0xca, 0xa8, 0x44, 0x0b, 0x7d, - 0x52, 0x8a, 0xf1, 0x89, 0x2a, 0x1d, 0x70, 0x0a, 0x54, 0x5f, 0x7c, 0x14, 0xc0, 0x61, 0x23, 0x47, - 0x81, 0xc2, 0x47, 0xf8, 0xe5, 0xa8, 0x6f, 0x37, 0xbd, 0x59, 0xa0, 0x98, 0xc7, 0x5b, 0x50, 0xd5, - 0x84, 0x59, 0xa0, 0xf0, 0xf8, 0x69, 0xc7, 0x37, 0x4d, 0x72, 0xd8, 0xa0, 0x1d, 0xdf, 0x14, 0xa3, - 0x7d, 0x53, 0xf6, 0x49, 0x4d, 0xce, 0x45, 0xea, 0xdb, 0x1a, 0xde, 0xef, 0x20, 0xf8, 0x71, 0xf9, - 0x5b, 0x06, 0x4d, 0x28, 0x96, 0xf8, 0xad, 0x81, 0x20, 0x66, 0x71, 0xdc, 0x2e, 0xfa, 0xde, 0x38, - 0xd9, 0xc5, 0x11, 0x90, 0x7a, 0xf0, 0xc2, 0xe2, 0xeb, 0xef, 0xbf, 0x3f, 0xa4, 0xaf, 0xe3, 0x79, - 0x6b, 0xf8, 0x0b, 0x52, 0x58, 0x75, 0x26, 0x02, 0xfc, 0xc6, 0x40, 0x13, 0xaa, 0x1a, 0x17, 0x93, - 0xfa, 0x87, 0x44, 0x4a, 0xc9, 0xc0, 0x73, 0xf1, 0x60, 0xde, 0x0e, 0xc7, 0xaf, 0x0c, 0x34, 0x2e, - 0xa3, 0x0d, 0x27, 0x84, 0x58, 0x47, 0x8e, 0x62, 0x22, 0x0e, 0x48, 0x14, 0x15, 0x89, 0x79, 0x9c, - 0xb7, 0x86, 0x7d, 0x0b, 0x80, 0x14, 0x2f, 0xd1, 0x98, 0xcd, 0x1c, 0x7c, 0x23, 0x29, 0x45, 0xf5, - 0xf9, 0x23, 0x86, 0xed, 0x48, 0xc7, 0x2b, 0x05, 0xa4, 0x29, 0xf4, 0xc5, 0xc5, 0x89, 0x17, 0x74, - 0x24, 0x53, 0xf4, 0xa7, 0x40, 0xd2, 0x32, 0xf4, 0x1d, 0xef, 0x9a, 0x42, 0x55, 0xc7, 0x9a, 0xa2, - 0xf7, 0xf6, 0x66, 0x47, 0xce, 0x94, 0x11, 0x79, 0x48, 0x49, 0xec, 0x27, 0xc7, 0xed, 0x9c, 0x71, - 0xd2, 0xce, 0x19, 0xbf, 0xda, 0x39, 0xe3, 0xdd, 0x59, 0x2e, 0x75, 0x72, 0x96, 0x4b, 0xfd, 0x38, - 0xcb, 0xa5, 0x9e, 0xad, 0xb9, 0x2c, 0xd8, 0x6d, 0x55, 0xcd, 0x1a, 0x6f, 0xe8, 0x36, 0xb7, 0x3c, - 0x1a, 0x1c, 0x70, 0x7f, 0x0f, 0xfe, 0x93, 0x5f, 0x9f, 0x2e, 0xb7, 0x3c, 0xee, 0xd0, 0x81, 0x03, - 0xaa, 0x19, 0xf5, 0x5d, 0xb7, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x13, 0x08, 0x1a, 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/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/v1beta4/query.pb.gw.go b/go/node/market/v1beta4/query.pb.gw.go deleted file mode 100644 index ee29aa23..00000000 --- a/go/node/market/v1beta4/query.pb.gw.go +++ /dev/null @@ -1,586 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: akash/market/v1beta4/query.proto - -/* -Package v1beta4 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1beta4 - -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", "v1beta4", "orders", "list"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "orders", "info"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "list"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "info"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "list"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "info"}, "", runtime.AssumeColonVerbOpt(true))) -) - -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/v1beta4/service.pb.go b/go/node/market/v1beta4/service.pb.go deleted file mode 100644 index f9273b07..00000000 --- a/go/node/market/v1beta4/service.pb.go +++ /dev/null @@ -1,287 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta4/service.proto - -package v1beta4 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/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/v1beta4/service.proto", fileDescriptor_3f002bb22b8d66bc) -} - -var fileDescriptor_3f002bb22b8d66bc = []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, - 0xd1, 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, 0x5a, 0x33, 0xac, 0x52, - 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/service.proto", -} diff --git a/go/node/market/v1beta4/types.go b/go/node/market/v1beta4/types.go deleted file mode 100644 index 9aa87d68..00000000 --- a/go/node/market/v1beta4/types.go +++ /dev/null @@ -1,245 +0,0 @@ -package v1beta4 - -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" -) - -const ( - APIVersion = "v1beta4" -) - -// 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/v1beta5/bid.go b/go/node/market/v1beta5/bid.go index ce83b154..4d638d01 100644 --- a/go/node/market/v1beta5/bid.go +++ b/go/node/market/v1beta5/bid.go @@ -2,14 +2,72 @@ package v1beta5 import ( "sort" + "strings" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" + "gopkg.in/yaml.v3" + + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + v1 "pkg.akt.io/go/node/market/v1" ) type ResourcesOffer []ResourceOffer +// Bids is a collection of Bid +type Bids []Bid + var _ sort.Interface = (*ResourcesOffer)(nil) +// String implements the Stringer interface for a Bid object. +func (o *Bid) String() string { + out, _ := yaml.Marshal(o) + return string(out) +} + +// 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) +} + +// Filters returns whether bid filters valid or not +func (o *Bid) Filters(filters v1.BidFilters, stateVal v1.BidState) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != o.ID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != o.ID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != o.ID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != o.ID.OSeq { + return false + } + + // Checking provider filter + if filters.Provider != "" && filters.Provider != o.ID.Provider { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != o.State { + return false + } + + return true +} + func (s ResourcesOffer) MatchGSpec(gspec dtypes.GroupSpec) bool { if len(s) == 0 { return true diff --git a/go/node/market/v1beta5/bid.pb.go b/go/node/market/v1beta5/bid.pb.go index d59485d9..11232df4 100644 --- a/go/node/market/v1beta5/bid.pb.go +++ b/go/node/market/v1beta5/bid.pb.go @@ -5,13 +5,13 @@ package v1beta5 import ( fmt "fmt" - v1 "github.com/akash-network/akash-api/go/node/types/resources/v1" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1 "pkg.akt.io/go/node/market/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,386 +25,19 @@ var _ = math.Inf // 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_9a051a9ee62f13b0, []int{6, 0} -} - -// ResourceOffer describes resources that provider is offering -// for deployment -type ResourceOffer struct { - Resources v1.Resources `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources" yaml:"resources"` - Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` -} - -func (m *ResourceOffer) Reset() { *m = ResourceOffer{} } -func (m *ResourceOffer) String() string { return proto.CompactTextString(m) } -func (*ResourceOffer) ProtoMessage() {} -func (*ResourceOffer) Descriptor() ([]byte, []int) { - return fileDescriptor_9a051a9ee62f13b0, []int{0} -} -func (m *ResourceOffer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceOffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceOffer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceOffer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceOffer.Merge(m, src) -} -func (m *ResourceOffer) XXX_Size() int { - return m.Size() -} -func (m *ResourceOffer) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceOffer.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceOffer proto.InternalMessageInfo - -func (m *ResourceOffer) GetResources() v1.Resources { - if m != nil { - return m.Resources - } - return v1.Resources{} -} - -func (m *ResourceOffer) GetCount() uint32 { - if m != nil { - return m.Count - } - return 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"` - ResourcesOffer ResourcesOffer `protobuf:"bytes,5,rep,name=resources_offer,json=resourcesOffer,proto3,castrepeated=ResourcesOffer" json:"resources_offer" yaml:"resources_offer"` -} - -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_9a051a9ee62f13b0, []int{1} -} -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{} -} - -func (m *MsgCreateBid) GetResourcesOffer() ResourcesOffer { - if m != nil { - return m.ResourcesOffer - } - return nil -} - -// 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_9a051a9ee62f13b0, []int{2} -} -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_9a051a9ee62f13b0, []int{3} -} -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_9a051a9ee62f13b0, []int{4} -} -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_9a051a9ee62f13b0, []int{5} -} -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.v1beta5.Bid_State" json:"state" yaml:"state"` + ID v1.BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + State v1.BidState `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1.BidState" 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"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"state" yaml:"created_at"` ResourcesOffer ResourcesOffer `protobuf:"bytes,5,rep,name=resources_offer,json=resourcesOffer,proto3,castrepeated=ResourcesOffer" json:"resources_offer" yaml:"resources_offer"` } func (m *Bid) Reset() { *m = Bid{} } func (*Bid) ProtoMessage() {} func (*Bid) Descriptor() ([]byte, []int) { - return fileDescriptor_9a051a9ee62f13b0, []int{6} + return fileDescriptor_9a051a9ee62f13b0, []int{0} } func (m *Bid) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,18 +66,18 @@ func (m *Bid) XXX_DiscardUnknown() { var xxx_messageInfo_Bid proto.InternalMessageInfo -func (m *Bid) GetBidID() BidID { +func (m *Bid) GetID() v1.BidID { if m != nil { - return m.BidID + return m.ID } - return BidID{} + return v1.BidID{} } -func (m *Bid) GetState() Bid_State { +func (m *Bid) GetState() v1.BidState { if m != nil { return m.State } - return BidStateInvalid + return v1.BidStateInvalid } func (m *Bid) GetPrice() types.DecCoin { @@ -468,442 +101,50 @@ func (m *Bid) GetResourcesOffer() ResourcesOffer { return nil } -// 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_9a051a9ee62f13b0, []int{7} -} -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.v1beta5.Bid_State", Bid_State_name, Bid_State_value) - proto.RegisterType((*ResourceOffer)(nil), "akash.market.v1beta5.ResourceOffer") - proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta5.MsgCreateBid") - proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta5.MsgCreateBidResponse") - proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta5.MsgCloseBid") - proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta5.MsgCloseBidResponse") - proto.RegisterType((*BidID)(nil), "akash.market.v1beta5.BidID") proto.RegisterType((*Bid)(nil), "akash.market.v1beta5.Bid") - proto.RegisterType((*BidFilters)(nil), "akash.market.v1beta5.BidFilters") } func init() { proto.RegisterFile("akash/market/v1beta5/bid.proto", fileDescriptor_9a051a9ee62f13b0) } var fileDescriptor_9a051a9ee62f13b0 = []byte{ - // 897 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x13, 0xbb, 0xdd, 0x4c, 0xb6, 0x6d, 0xe4, 0xed, 0xae, 0xd2, 0x40, 0x3d, 0x66, 0x10, - 0xd0, 0x0b, 0xb6, 0xda, 0x15, 0x07, 0xca, 0x69, 0xbd, 0x15, 0xa8, 0x12, 0xa8, 0xe0, 0x02, 0x07, - 0x38, 0x54, 0x8e, 0x67, 0xd6, 0x3b, 0x6a, 0xea, 0x71, 0x3d, 0x6e, 0x56, 0x7c, 0x03, 0xd4, 0x13, - 0x12, 0x17, 0x2e, 0x45, 0x2b, 0xed, 0x8d, 0x0b, 0x5f, 0x63, 0x8f, 0x3d, 0x72, 0x32, 0x28, 0x15, - 0x12, 0xca, 0x31, 0x5f, 0x00, 0x34, 0x7f, 0x62, 0x27, 0x55, 0x40, 0xe2, 0xb0, 0x07, 0x24, 0x4e, - 0xee, 0xfb, 0xbd, 0xf7, 0x7b, 0xef, 0xf9, 0xbd, 0xdf, 0x6b, 0x0c, 0x9c, 0xe8, 0x34, 0xe2, 0x4f, - 0xfd, 0xb3, 0x28, 0x3f, 0x25, 0x85, 0x3f, 0xda, 0x1d, 0x90, 0x22, 0x7a, 0xcf, 0x1f, 0x50, 0xec, - 0x65, 0x39, 0x2b, 0x98, 0xbd, 0x29, 0xfd, 0x9e, 0xf2, 0x7b, 0xda, 0xdf, 0xdf, 0x4c, 0x58, 0xc2, - 0x64, 0x80, 0x2f, 0xfe, 0x52, 0xb1, 0x7d, 0x27, 0x66, 0xfc, 0x8c, 0x71, 0x7f, 0x10, 0x71, 0xa2, - 0x53, 0xed, 0xfa, 0x31, 0xa3, 0xa9, 0xf6, 0xbf, 0xa3, 0x6a, 0x49, 0x77, 0x4e, 0x38, 0xbb, 0xc8, - 0x63, 0xc2, 0xfd, 0xd1, 0x6e, 0x6d, 0xe8, 0x40, 0x77, 0x69, 0x53, 0x2c, 0xc7, 0x24, 0x57, 0x11, - 0xe8, 0x67, 0x03, 0xac, 0x85, 0x9a, 0x75, 0xf4, 0xe4, 0x09, 0xc9, 0xed, 0x04, 0xb4, 0xab, 0x34, - 0x3d, 0xc3, 0x35, 0x76, 0x3a, 0x7b, 0xc8, 0x53, 0xcd, 0x8b, 0x82, 0x5e, 0x5d, 0x63, 0xb4, 0xeb, - 0xcd, 0xa8, 0x3c, 0x78, 0xeb, 0x65, 0x09, 0x1b, 0x93, 0x12, 0xd6, 0xe4, 0x69, 0x09, 0xbb, 0xdf, - 0x44, 0x67, 0xc3, 0x7d, 0x54, 0x41, 0x28, 0xac, 0xdd, 0xb6, 0x0f, 0xac, 0x98, 0x5d, 0xa4, 0x45, - 0xaf, 0xe9, 0x1a, 0x3b, 0x6b, 0xc1, 0xd6, 0xa4, 0x84, 0x0a, 0x98, 0x96, 0xf0, 0xae, 0x22, 0x4a, - 0x13, 0x85, 0x0a, 0xde, 0x37, 0xff, 0x78, 0x0e, 0x0d, 0xf4, 0x67, 0x0b, 0xdc, 0xfd, 0x84, 0x27, - 0x8f, 0x73, 0x12, 0x15, 0x24, 0xa0, 0xd8, 0xfe, 0x1a, 0x58, 0xf2, 0x8d, 0x74, 0xb3, 0xdb, 0xde, - 0xb2, 0x49, 0x7b, 0x47, 0x22, 0xe4, 0xf0, 0x20, 0x78, 0x5b, 0xf4, 0x39, 0x2e, 0xa1, 0x25, 0x01, - 0x51, 0x53, 0x92, 0xeb, 0x9a, 0xd2, 0x44, 0xa1, 0x82, 0xed, 0x0f, 0xc0, 0x9d, 0x2c, 0x67, 0x23, - 0x2a, 0xf2, 0x8b, 0x3e, 0xdb, 0x01, 0x9c, 0x94, 0xb0, 0xc2, 0xa6, 0x25, 0xdc, 0x50, 0xb4, 0x19, - 0x82, 0xc2, 0xca, 0x69, 0x7f, 0x06, 0xac, 0x2c, 0xa7, 0x31, 0xe9, 0xb5, 0x64, 0x67, 0xaf, 0x7b, - 0x6a, 0xaf, 0x6a, 0x8e, 0x7a, 0xaf, 0xde, 0x01, 0x89, 0x1f, 0x33, 0x9a, 0x06, 0xdb, 0x7a, 0x80, - 0x8a, 0x52, 0xf7, 0x23, 0x4d, 0x14, 0x2a, 0xd8, 0xfe, 0x12, 0xac, 0x62, 0x92, 0x31, 0x4e, 0x8b, - 0x9e, 0x29, 0x93, 0x6e, 0x2d, 0x4d, 0x2a, 0x33, 0xbe, 0xa1, 0x33, 0xce, 0x18, 0xd3, 0x12, 0xae, - 0xab, 0x9c, 0x1a, 0x40, 0xe1, 0xcc, 0x65, 0xbf, 0x30, 0xc0, 0x46, 0xb5, 0x9a, 0x13, 0x26, 0x94, - 0xd0, 0xb3, 0xdc, 0xd6, 0x4e, 0x67, 0xef, 0xcd, 0xe5, 0xf3, 0x5c, 0x10, 0x4d, 0xf0, 0x85, 0x9e, - 0xea, 0x7a, 0x25, 0x08, 0x89, 0x4f, 0x4a, 0x78, 0x3b, 0xeb, 0xb4, 0x84, 0x0f, 0x6e, 0xa9, 0x42, - 0x39, 0xd0, 0x4f, 0xbf, 0xde, 0xa6, 0x87, 0xeb, 0xf9, 0x82, 0x2d, 0x15, 0xd0, 0x40, 0x0f, 0xc0, - 0xe6, 0xbc, 0x00, 0x42, 0xc2, 0x33, 0x96, 0x72, 0x82, 0x28, 0xe8, 0x08, 0x7c, 0xc8, 0xb8, 0xd4, - 0xc5, 0xe7, 0x60, 0x65, 0x40, 0xf1, 0x09, 0xc5, 0x5a, 0x18, 0xaf, 0x2d, 0x7f, 0x91, 0x80, 0xe2, - 0xc3, 0x83, 0xc0, 0x9d, 0xc9, 0x42, 0x9a, 0x93, 0x12, 0x36, 0x29, 0x9e, 0x96, 0xb0, 0xad, 0x5a, - 0xa5, 0x18, 0x85, 0xd6, 0x80, 0xe2, 0x43, 0xac, 0x5b, 0xb8, 0x0f, 0xee, 0xcd, 0x95, 0xaa, 0x3a, - 0xf8, 0xb1, 0x09, 0x54, 0x02, 0x21, 0x6e, 0xf6, 0x2c, 0xd5, 0xa2, 0x6c, 0x2b, 0x71, 0x4b, 0x60, - 0x4e, 0x68, 0xc2, 0x14, 0x42, 0x13, 0x4f, 0xfb, 0x21, 0x30, 0x31, 0x27, 0xe7, 0x52, 0x64, 0x66, - 0x00, 0xc7, 0x25, 0x34, 0x0f, 0x8e, 0xc9, 0xf9, 0xa4, 0x84, 0x12, 0x9f, 0x96, 0xb0, 0xa3, 0x77, - 0xc7, 0xc9, 0x39, 0x0a, 0x25, 0x28, 0x48, 0x89, 0x20, 0xb5, 0xe4, 0x05, 0x49, 0xd2, 0x47, 0x9a, - 0x94, 0x2c, 0x90, 0x12, 0x45, 0x4a, 0x34, 0x89, 0x09, 0x92, 0x59, 0x93, 0x8e, 0x34, 0x89, 0x2d, - 0x90, 0x98, 0x22, 0x89, 0xc7, 0xc2, 0x1d, 0x58, 0xff, 0xf2, 0x0e, 0xf6, 0xef, 0xfc, 0xf0, 0x1c, - 0x36, 0xe4, 0xdc, 0x7e, 0x37, 0x41, 0xeb, 0x95, 0xed, 0xc6, 0xfe, 0x14, 0x58, 0xbc, 0x88, 0x0a, - 0x22, 0x87, 0xb8, 0xbe, 0x07, 0xff, 0x36, 0xa9, 0x77, 0x2c, 0xc2, 0xd4, 0x56, 0x24, 0xa3, 0xde, - 0x8a, 0x34, 0x51, 0xa8, 0xe0, 0x57, 0x71, 0xc1, 0xdb, 0x00, 0xc4, 0x52, 0xba, 0xf8, 0x24, 0x52, - 0x47, 0xdc, 0x0a, 0xdb, 0x1a, 0x79, 0xf4, 0x1f, 0x39, 0x44, 0xf4, 0xbd, 0x01, 0x2c, 0x39, 0x43, - 0xdb, 0x05, 0xab, 0x34, 0x1d, 0x45, 0x43, 0x8a, 0xbb, 0x8d, 0xfe, 0xbd, 0xcb, 0x2b, 0x77, 0x23, - 0xa0, 0x58, 0xba, 0x0e, 0x15, 0x6c, 0xdf, 0x07, 0x26, 0xcb, 0x48, 0xda, 0x35, 0xfa, 0x9d, 0xcb, - 0x2b, 0x77, 0x35, 0xa0, 0xf8, 0x28, 0x23, 0xa9, 0xbd, 0x05, 0x56, 0xa2, 0xb8, 0xa0, 0x23, 0xd2, - 0x6d, 0xf6, 0xd7, 0x2e, 0xaf, 0xdc, 0x76, 0x40, 0xf1, 0x23, 0x09, 0x08, 0xc6, 0x90, 0xf1, 0xa2, - 0xdb, 0xaa, 0x18, 0x1f, 0x33, 0x5e, 0x08, 0x46, 0x2c, 0x2e, 0x0e, 0x77, 0xcd, 0x8a, 0x21, 0x4f, - 0x10, 0xf7, 0xcd, 0x6f, 0x5f, 0x38, 0x8d, 0x39, 0x9d, 0x5d, 0x37, 0x01, 0x08, 0x28, 0xfe, 0x90, - 0x0e, 0x0b, 0x92, 0xf3, 0xff, 0xaf, 0x71, 0xfe, 0x57, 0xc9, 0x9f, 0x5d, 0xc9, 0x4a, 0x3d, 0x8c, - 0x7f, 0x3a, 0x02, 0xf5, 0x2f, 0x2f, 0x38, 0x7e, 0x39, 0x76, 0x8c, 0xeb, 0xb1, 0x63, 0xfc, 0x36, - 0x76, 0x8c, 0xef, 0x6e, 0x9c, 0xc6, 0xf5, 0x8d, 0xd3, 0xf8, 0xe5, 0xc6, 0x69, 0x7c, 0xf5, 0x7e, - 0x42, 0x8b, 0xa7, 0x17, 0x03, 0x2f, 0x66, 0x67, 0xbe, 0x94, 0xe8, 0xbb, 0x29, 0x29, 0x9e, 0xb1, - 0xfc, 0x54, 0x5b, 0x51, 0x46, 0xfd, 0x84, 0xf9, 0x29, 0xc3, 0xe4, 0xd6, 0xa7, 0xc8, 0x60, 0x45, - 0x7e, 0x85, 0x3c, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x48, 0xf9, 0x25, 0x2a, 0x3e, 0x09, 0x00, - 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x3f, 0x6f, 0x13, 0x31, + 0x18, 0xc6, 0xef, 0x0f, 0x41, 0xd4, 0x45, 0x41, 0x9c, 0xaa, 0xea, 0x52, 0x81, 0x1d, 0x8e, 0x25, + 0x2c, 0x3e, 0x25, 0x88, 0xa5, 0x88, 0x81, 0x23, 0x0c, 0x65, 0x41, 0x1c, 0x62, 0x61, 0xa9, 0x9c, + 0xb3, 0x1b, 0xac, 0x90, 0x38, 0xb2, 0x0d, 0x12, 0xdf, 0x82, 0x91, 0xb1, 0x12, 0x1b, 0x9f, 0xa4, + 0x63, 0x47, 0xc4, 0x60, 0xd0, 0x65, 0x41, 0x19, 0xf3, 0x09, 0xd0, 0xd9, 0x86, 0xd0, 0x53, 0xb6, + 0x7b, 0xdf, 0xf7, 0xf7, 0x3e, 0xf7, 0xe8, 0xf1, 0x0b, 0x20, 0x99, 0x11, 0xf5, 0x2e, 0x9f, 0x13, + 0x39, 0x63, 0x3a, 0xff, 0x38, 0x9c, 0x30, 0x4d, 0x1e, 0xe5, 0x13, 0x4e, 0xf1, 0x52, 0x0a, 0x2d, + 0x92, 0x03, 0x3b, 0xc7, 0x6e, 0x8e, 0xfd, 0xfc, 0xe8, 0x60, 0x2a, 0xa6, 0xc2, 0x02, 0x79, 0xf3, + 0xe5, 0xd8, 0x23, 0x58, 0x09, 0x35, 0x17, 0x2a, 0x9f, 0x10, 0xc5, 0xbc, 0xd4, 0x30, 0xaf, 0x04, + 0x5f, 0xf8, 0xf9, 0x83, 0x9d, 0xff, 0x92, 0x4c, 0x89, 0x0f, 0xb2, 0x62, 0x4a, 0x9c, 0x9d, 0x31, + 0xe9, 0xd1, 0x5e, 0x0b, 0xdd, 0x3a, 0xca, 0x7e, 0xc4, 0x20, 0x2e, 0x38, 0x4d, 0x9e, 0x83, 0x88, + 0xd3, 0x34, 0xec, 0x87, 0x83, 0xfd, 0xd1, 0x21, 0x6e, 0xd9, 0xc4, 0x05, 0xa7, 0x27, 0xe3, 0xe2, + 0xee, 0x85, 0x41, 0x41, 0x6d, 0x50, 0x74, 0x32, 0x5e, 0x1b, 0x14, 0x71, 0xba, 0x31, 0x68, 0xef, + 0x13, 0x99, 0xbf, 0x3f, 0xce, 0x38, 0xcd, 0xca, 0x88, 0xd3, 0xe4, 0x05, 0xe8, 0x28, 0x4d, 0x34, + 0x4b, 0xa3, 0x7e, 0x38, 0xe8, 0x8e, 0x7a, 0xbb, 0x94, 0x5e, 0x37, 0x40, 0xd1, 0x5b, 0x1b, 0xe4, + 0xd8, 0x8d, 0x41, 0x37, 0x9d, 0x8a, 0x2d, 0xb3, 0xd2, 0xb5, 0x93, 0x57, 0xa0, 0xb3, 0x94, 0xbc, + 0x62, 0x69, 0x6c, 0x5d, 0xdd, 0xc1, 0x2e, 0x10, 0xdc, 0x04, 0xe2, 0xb3, 0x1b, 0xe2, 0x31, 0xab, + 0x9e, 0x09, 0xbe, 0x70, 0xde, 0x1a, 0x49, 0xbb, 0xb2, 0x95, 0xb4, 0x65, 0x56, 0xba, 0x76, 0xf2, + 0x04, 0x80, 0x4a, 0x32, 0xa2, 0x19, 0x3d, 0x25, 0x3a, 0xbd, 0xd6, 0x0f, 0x07, 0x71, 0x01, 0xff, + 0x37, 0x72, 0xdb, 0x6d, 0x6d, 0xa1, 0xac, 0xdc, 0xf3, 0xc5, 0x53, 0x9d, 0x7c, 0x0d, 0xc1, 0xad, + 0x7f, 0x01, 0x9f, 0xda, 0x84, 0xd3, 0x4e, 0x3f, 0x1e, 0xec, 0x8f, 0xee, 0xe3, 0x5d, 0x2f, 0x8b, + 0x4b, 0x0f, 0xbf, 0x6c, 0xd0, 0xe2, 0x8d, 0xcf, 0xaf, 0xfb, 0xb7, 0xad, 0x6c, 0x7f, 0x6d, 0x50, + 0x5b, 0x75, 0x63, 0xd0, 0xa1, 0x73, 0xd2, 0x1a, 0x64, 0xdf, 0x7e, 0xb6, 0xd7, 0xcb, 0xae, 0xbc, + 0x52, 0x1f, 0xdf, 0xf8, 0x72, 0x8e, 0x82, 0xdf, 0xe7, 0x28, 0x28, 0x1e, 0x5f, 0xd4, 0x30, 0xbc, + 0xac, 0x61, 0xf8, 0xab, 0x86, 0xe1, 0xe7, 0x15, 0x0c, 0x2e, 0x57, 0x30, 0xf8, 0xbe, 0x82, 0xc1, + 0xdb, 0x7b, 0xcb, 0xd9, 0x14, 0x93, 0x99, 0xc6, 0xbc, 0xb9, 0xb9, 0x7c, 0x21, 0x28, 0x6b, 0x5d, + 0xd2, 0xe4, 0xba, 0x3d, 0x90, 0x87, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x51, 0xbd, 0x89, + 0xd4, 0x02, 0x00, 0x00, } -func (this *ResourceOffer) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ResourceOffer) - if !ok { - that2, ok := that.(ResourceOffer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Resources.Equal(&that1.Resources) { - return false - } - if this.Count != that1.Count { - return false - } - return true -} -func (m *ResourceOffer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceOffer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceOffer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Count != 0 { - i = encodeVarintBid(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 = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -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 - if len(m.ResourcesOffer) > 0 { - for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - { - 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 +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 } @@ -917,949 +158,95 @@ func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int - _ = l - if len(m.ResourcesOffer) > 0 { - for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBid(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - 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 *ResourceOffer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resources.Size() - n += 1 + l + sovBid(uint64(l)) - if m.Count != 0 { - n += 1 + sovBid(uint64(m.Count)) - } - return n -} - -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)) - if len(m.ResourcesOffer) > 0 { - for _, e := range m.ResourcesOffer { - l = e.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)) - } - if len(m.ResourcesOffer) > 0 { - for _, e := range m.ResourcesOffer { - l = e.Size() - n += 1 + l + sovBid(uint64(l)) - } - } - 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 *ResourceOffer) Unmarshal(dAtA []byte) 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: ResourceOffer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceOffer: 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 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.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 ErrIntOverflowBid - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= uint32(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 *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 - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourcesOffer", 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 - } - m.ResourcesOffer = append(m.ResourcesOffer, ResourceOffer{}) - if err := m.ResourcesOffer[len(m.ResourcesOffer)-1].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 + _ = l + if len(m.ResourcesOffer) > 0 { + for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBid(dAtA, i, uint64(size)) } - iNdEx += skippy + i-- + dAtA[i] = 0x2a + } + } + 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.ID.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 +} - if iNdEx > l { - return io.ErrUnexpectedEOF +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++ } - return nil + dAtA[offset] = uint8(v) + return base +} +func (m *Bid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ID.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)) + } + if len(m.ResourcesOffer) > 0 { + for _, e := range m.ResourcesOffer { + l = e.Size() + 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 *Bid) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1892,7 +279,7 @@ func (m *Bid) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BidID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1919,7 +306,7 @@ func (m *Bid) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BidID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1937,7 +324,7 @@ func (m *Bid) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= Bid_State(b&0x7F) << shift + m.State |= v1.BidState(b&0x7F) << shift if b < 0x80 { break } @@ -2049,209 +436,6 @@ func (m *Bid) Unmarshal(dAtA []byte) error { } 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 diff --git a/go/node/market/v1beta5/bid_test.go b/go/node/market/v1beta5/bid_test.go index 95006dc2..b3e154b0 100644 --- a/go/node/market/v1beta5/bid_test.go +++ b/go/node/market/v1beta5/bid_test.go @@ -1,48 +1,48 @@ package v1beta5_test -import ( - "testing" - - "github.com/stretchr/testify/require" - - testutil "github.com/akash-network/akash-api/go/node/client/testutil/v1beta3" - - "github.com/akash-network/akash-api/go/node/market/v1beta5" -) - -func TestBid_GSpecMatch_Valid(t *testing.T) { - gspec := testutil.GroupSpec(t) - - rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) - - require.True(t, rOffer.MatchGSpec(gspec)) -} - -func TestBid_GSpecMatch_Valid2(t *testing.T) { - gspec := testutil.GroupSpec(t) - - if len(gspec.Resources) == 1 { - rl := testutil.ResourcesList(t, 2) - rl[0].Count = 4 - gspec.Resources = append(gspec.Resources, rl...) - } - - rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) - - require.True(t, rOffer.MatchGSpec(gspec)) -} - -func TestBid_GSpecMatch_InvalidCount(t *testing.T) { - gspec := testutil.GroupSpec(t) - - if len(gspec.Resources) == 1 { - rl := testutil.ResourcesList(t, 2) - gspec.Resources = append(gspec.Resources, rl...) - } - - rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) - - gspec.Resources[0].Count = 2 - - require.False(t, rOffer.MatchGSpec(gspec)) -} +// import ( +// "testing" +// +// "github.com/stretchr/testify/require" +// +// testutil "pkg.akt.io/go/node/client/testutil/v1beta3" +// +// "pkg.akt.io/go/node/market/v1beta5" +// ) +// +// func TestBid_GSpecMatch_Valid(t *testing.T) { +// gspec := testutil.GroupSpec(t) +// +// rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) +// +// require.True(t, rOffer.MatchGSpec(gspec)) +// } +// +// func TestBid_GSpecMatch_Valid2(t *testing.T) { +// gspec := testutil.GroupSpec(t) +// +// if len(gspec.Resources) == 1 { +// rl := testutil.ResourcesList(t, 2) +// rl[0].Count = 4 +// gspec.Resources = append(gspec.Resources, rl...) +// } +// +// rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) +// +// require.True(t, rOffer.MatchGSpec(gspec)) +// } +// +// func TestBid_GSpecMatch_InvalidCount(t *testing.T) { +// gspec := testutil.GroupSpec(t) +// +// if len(gspec.Resources) == 1 { +// rl := testutil.ResourcesList(t, 2) +// gspec.Resources = append(gspec.Resources, rl...) +// } +// +// rOffer := v1beta5.ResourceOfferFromRU(gspec.Resources) +// +// gspec.Resources[0].Count = 2 +// +// require.False(t, rOffer.MatchGSpec(gspec)) +// } diff --git a/go/node/market/v1beta5/bidmsg.pb.go b/go/node/market/v1beta5/bidmsg.pb.go new file mode 100644 index 00000000..fe392f1c --- /dev/null +++ b/go/node/market/v1beta5/bidmsg.pb.go @@ -0,0 +1,977 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta5/bidmsg.proto + +package v1beta5 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + v1 "pkg.akt.io/go/node/market/v1" +) + +// 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 + +// MsgCreateBid defines an SDK message for creating Bid +type MsgCreateBid struct { + OrderID v1.OrderID `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id" yaml:"order_id"` + 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"` + ResourcesOffer ResourcesOffer `protobuf:"bytes,5,rep,name=resources_offer,json=resourcesOffer,proto3,castrepeated=ResourcesOffer" json:"resources_offer" yaml:"resources_offer"` +} + +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_63a6438beb6a54f7, []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) GetOrderID() v1.OrderID { + if m != nil { + return m.OrderID + } + return v1.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{} +} + +func (m *MsgCreateBid) GetResourcesOffer() ResourcesOffer { + if m != nil { + return m.ResourcesOffer + } + return nil +} + +// 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_63a6438beb6a54f7, []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 { + ID v1.BidID `protobuf:"bytes,1,opt,name=id,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_63a6438beb6a54f7, []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) GetID() v1.BidID { + if m != nil { + return m.ID + } + return v1.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_63a6438beb6a54f7, []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 + +func init() { + proto.RegisterType((*MsgCreateBid)(nil), "akash.market.v1beta5.MsgCreateBid") + proto.RegisterType((*MsgCreateBidResponse)(nil), "akash.market.v1beta5.MsgCreateBidResponse") + proto.RegisterType((*MsgCloseBid)(nil), "akash.market.v1beta5.MsgCloseBid") + proto.RegisterType((*MsgCloseBidResponse)(nil), "akash.market.v1beta5.MsgCloseBidResponse") +} + +func init() { proto.RegisterFile("akash/market/v1beta5/bidmsg.proto", fileDescriptor_63a6438beb6a54f7) } + +var fileDescriptor_63a6438beb6a54f7 = []byte{ + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x3d, 0x6f, 0xd3, 0x4e, + 0x18, 0x8f, 0xd3, 0xf4, 0x9f, 0xf6, 0x52, 0xa5, 0x92, 0xff, 0x21, 0x72, 0x0b, 0xf8, 0x12, 0xb3, + 0x84, 0x81, 0xb3, 0x52, 0x84, 0x90, 0xca, 0x84, 0x1b, 0x86, 0x0c, 0xa8, 0xc2, 0x15, 0x0c, 0x5d, + 0x22, 0xc7, 0x77, 0x35, 0xa7, 0x34, 0x39, 0xeb, 0xce, 0x54, 0xe2, 0x5b, 0xf0, 0x0d, 0x40, 0x62, + 0x63, 0xe6, 0x43, 0x74, 0xac, 0x98, 0x98, 0x0c, 0x4a, 0x16, 0x94, 0x31, 0x9f, 0x00, 0xf9, 0x5e, + 0x42, 0x31, 0xd9, 0x7c, 0xbf, 0x97, 0xe7, 0x79, 0xfc, 0xdc, 0xef, 0x40, 0x37, 0x9a, 0x44, 0xe2, + 0xad, 0x3f, 0x8d, 0xf8, 0x84, 0x64, 0xfe, 0x55, 0x7f, 0x4c, 0xb2, 0xe8, 0x89, 0x3f, 0xa6, 0x78, + 0x2a, 0x12, 0x94, 0x72, 0x96, 0x31, 0xbb, 0x25, 0x25, 0x48, 0x49, 0x90, 0x96, 0x1c, 0xb6, 0x12, + 0x96, 0x30, 0x29, 0xf0, 0x8b, 0x2f, 0xa5, 0x3d, 0x3c, 0x88, 0x99, 0x98, 0x32, 0x31, 0x52, 0x84, + 0x3a, 0x68, 0xca, 0x55, 0x27, 0x7f, 0x1c, 0x09, 0xa2, 0x1b, 0xf5, 0xfd, 0x98, 0xd1, 0x99, 0xe6, + 0x1f, 0x6e, 0x9c, 0x84, 0x13, 0xc1, 0xde, 0xf1, 0x98, 0x08, 0x76, 0x71, 0x41, 0xb8, 0xe9, 0x52, + 0x92, 0x16, 0xf3, 0x6a, 0xea, 0x6e, 0x99, 0x62, 0x1c, 0x1b, 0x9f, 0xf7, 0xb1, 0x06, 0xf6, 0x5e, + 0x8a, 0xe4, 0x84, 0x93, 0x28, 0x23, 0x01, 0xc5, 0x76, 0x0c, 0x76, 0x24, 0x3f, 0xa2, 0xd8, 0xb1, + 0x3a, 0x56, 0xaf, 0x71, 0xe4, 0xa0, 0xd2, 0xdf, 0xa2, 0xd3, 0x42, 0x30, 0x1c, 0x04, 0xe8, 0x3a, + 0x87, 0x95, 0x79, 0x0e, 0xeb, 0x1a, 0x58, 0xe6, 0x70, 0x6d, 0x5e, 0xe5, 0x70, 0xff, 0x7d, 0x34, + 0xbd, 0x3c, 0xf6, 0x0c, 0xe2, 0x85, 0x75, 0xf9, 0x39, 0xc4, 0xf6, 0x19, 0xd8, 0x49, 0x39, 0xbb, + 0xa2, 0x98, 0x70, 0xa7, 0xda, 0xb1, 0x7a, 0xbb, 0xc1, 0xd3, 0xc2, 0x6b, 0xb0, 0x3f, 0x5e, 0x83, + 0x78, 0xdf, 0xbe, 0x3e, 0x6a, 0xe9, 0xdd, 0x3d, 0xc7, 0x98, 0x13, 0x21, 0xce, 0x32, 0x4e, 0x67, + 0x49, 0xb8, 0x36, 0xd9, 0xaf, 0xc0, 0x76, 0xca, 0x69, 0x4c, 0x9c, 0x2d, 0x39, 0xf6, 0x3d, 0xa4, + 0xf5, 0xc5, 0x76, 0xf5, 0x1d, 0xf5, 0xd1, 0x80, 0xc4, 0x27, 0x8c, 0xce, 0x82, 0xfb, 0xc5, 0xe8, + 0xcb, 0x1c, 0x2a, 0xcb, 0x2a, 0x87, 0x7b, 0xa6, 0x21, 0x8d, 0x89, 0x17, 0x2a, 0xd8, 0x7e, 0x03, + 0xea, 0x98, 0xa4, 0x4c, 0xd0, 0xcc, 0xa9, 0xc9, 0xa2, 0x07, 0x1b, 0x8b, 0xca, 0x8a, 0x5d, 0x5d, + 0xd1, 0x38, 0x56, 0x39, 0x6c, 0xaa, 0x9a, 0x1a, 0xf0, 0x42, 0x43, 0xd9, 0x9f, 0x2d, 0xb0, 0xbf, + 0xbe, 0xc6, 0x91, 0xbc, 0x47, 0x67, 0xbb, 0xb3, 0xd5, 0x6b, 0x1c, 0x3d, 0x40, 0x9b, 0xa2, 0x85, + 0x42, 0x2d, 0x3e, 0x2d, 0xa4, 0xc1, 0x6b, 0xbd, 0xf7, 0xa6, 0x81, 0x85, 0xc4, 0x97, 0x39, 0x2c, + 0x57, 0x5d, 0xe5, 0xb0, 0xad, 0x86, 0x28, 0x11, 0xde, 0x97, 0x1f, 0x65, 0x7b, 0xd8, 0xe4, 0x7f, + 0x9d, 0x8f, 0x6b, 0xbf, 0x3e, 0xc1, 0x8a, 0xd7, 0x06, 0xad, 0xdb, 0x01, 0x09, 0x89, 0x48, 0xd9, + 0x4c, 0x10, 0xef, 0x1c, 0x34, 0x0a, 0xfc, 0x92, 0x09, 0x99, 0x9b, 0x17, 0xa0, 0xba, 0x4e, 0x4c, + 0xfb, 0x9f, 0xc4, 0x04, 0x14, 0x0f, 0x07, 0x6a, 0xe9, 0xf3, 0x1c, 0x56, 0x65, 0x54, 0xaa, 0x32, + 0x24, 0xbb, 0x6a, 0xbc, 0x22, 0x1e, 0x55, 0x8a, 0x75, 0xcf, 0x3b, 0xe0, 0xff, 0x5b, 0xb5, 0x4d, + 0xcb, 0xe0, 0xd9, 0xf5, 0xdc, 0xb5, 0x6e, 0xe6, 0xae, 0xf5, 0x73, 0xee, 0x5a, 0x1f, 0x16, 0x6e, + 0xe5, 0x66, 0xe1, 0x56, 0xbe, 0x2f, 0xdc, 0xca, 0x79, 0x37, 0x9d, 0x24, 0x28, 0x9a, 0x64, 0x88, + 0x16, 0x6f, 0xcf, 0x9f, 0x31, 0x4c, 0x4a, 0xcf, 0x66, 0xfc, 0x9f, 0x0c, 0xfc, 0xe3, 0xdf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x06, 0xf1, 0x7c, 0x4f, 0xdf, 0x03, 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 + if len(m.ResourcesOffer) > 0 { + for iNdEx := len(m.ResourcesOffer) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourcesOffer[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBidmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBidmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBidmsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintBidmsg(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.OrderID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBidmsg(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.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBidmsg(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 encodeVarintBidmsg(dAtA []byte, offset int, v uint64) int { + offset -= sovBidmsg(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.OrderID.Size() + n += 1 + l + sovBidmsg(uint64(l)) + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovBidmsg(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovBidmsg(uint64(l)) + l = m.Deposit.Size() + n += 1 + l + sovBidmsg(uint64(l)) + if len(m.ResourcesOffer) > 0 { + for _, e := range m.ResourcesOffer { + l = e.Size() + n += 1 + l + sovBidmsg(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.ID.Size() + n += 1 + l + sovBidmsg(uint64(l)) + return n +} + +func (m *MsgCloseBidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovBidmsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBidmsg(x uint64) (n int) { + return sovBidmsg(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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 OrderID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBidmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OrderID.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 ErrIntOverflowBidmsg + } + 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 ErrInvalidLengthBidmsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + 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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBidmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + 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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBidmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + 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 ResourcesOffer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBidmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourcesOffer = append(m.ResourcesOffer, ResourceOffer{}) + if err := m.ResourcesOffer[len(m.ResourcesOffer)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBidmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBidmsg + } + 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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipBidmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBidmsg + } + 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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBidmsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBidmsg + } + 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 := skipBidmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBidmsg + } + 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 ErrIntOverflowBidmsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipBidmsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBidmsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBidmsg(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, ErrIntOverflowBidmsg + } + 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, ErrIntOverflowBidmsg + } + 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, ErrIntOverflowBidmsg + } + 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, ErrInvalidLengthBidmsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBidmsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBidmsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBidmsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBidmsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBidmsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta5/errors.go b/go/node/market/v1beta5/errors.go index ba941f1a..d00908c4 100644 --- a/go/node/market/v1beta5/errors.go +++ b/go/node/market/v1beta5/errors.go @@ -1,7 +1,7 @@ package v1beta5 import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) const ( diff --git a/go/node/market/v1beta5/escrow.go b/go/node/market/v1beta5/escrow.go index 328b81fb..ed70278f 100644 --- a/go/node/market/v1beta5/escrow.go +++ b/go/node/market/v1beta5/escrow.go @@ -7,54 +7,56 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - etypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" + dtypesv1 "pkg.akt.io/go/node/deployment/v1" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + etypes "pkg.akt.io/go/node/escrow/v1" + v1 "pkg.akt.io/go/node/market/v1" ) const ( bidEscrowScope = "bid" ) -func EscrowAccountForBid(id BidID) etypes.AccountID { +func EscrowAccountForBid(id v1.BidID) etypes.AccountID { return etypes.AccountID{ Scope: bidEscrowScope, XID: id.String(), } } -func EscrowPaymentForLease(id LeaseID) string { +func EscrowPaymentForLease(id v1.LeaseID) string { return fmt.Sprintf("%v/%v/%s", id.GSeq, id.OSeq, id.Provider) } -func LeaseIDFromEscrowAccount(id etypes.AccountID, pid string) (LeaseID, bool) { +func LeaseIDFromEscrowAccount(id etypes.AccountID, pid string) (v1.LeaseID, bool) { did, ok := dtypes.DeploymentIDFromEscrowAccount(id) if !ok { - return LeaseID{}, false + return v1.LeaseID{}, false } parts := strings.Split(pid, "/") if len(parts) != 3 { - return LeaseID{}, false + return v1.LeaseID{}, false } gseq, err := strconv.ParseUint(parts[0], 10, 32) if err != nil { - return LeaseID{}, false + return v1.LeaseID{}, false } oseq, err := strconv.ParseUint(parts[1], 10, 32) if err != nil { - return LeaseID{}, false + return v1.LeaseID{}, false } owner, err := sdk.AccAddressFromBech32(parts[2]) if err != nil { - return LeaseID{}, false + return v1.LeaseID{}, false } - return MakeLeaseID( - MakeBidID( - MakeOrderID( - dtypes.MakeGroupID( + return v1.MakeLeaseID( + v1.MakeBidID( + v1.MakeOrderID( + dtypesv1.MakeGroupID( did, uint32(gseq)), uint32(oseq)), owner)), true } diff --git a/go/node/market/v1beta5/event.go b/go/node/market/v1beta5/event.go index bb9787b7..2fd5f2f4 100644 --- a/go/node/market/v1beta5/event.go +++ b/go/node/market/v1beta5/event.go @@ -6,8 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - "github.com/akash-network/akash-api/go/sdkutil" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + v1 "pkg.akt.io/go/node/market/v1" + + "pkg.akt.io/go/sdkutil" ) const ( @@ -31,10 +33,10 @@ var ( // EventOrderCreated struct type EventOrderCreated struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID OrderID `json:"id"` + ID v1.OrderID `json:"id"` } -func NewEventOrderCreated(id OrderID) EventOrderCreated { +func NewEventOrderCreated(id v1.OrderID) EventOrderCreated { return EventOrderCreated{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -57,10 +59,10 @@ func (e EventOrderCreated) ToSDKEvent() sdk.Event { // EventOrderClosed struct type EventOrderClosed struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID OrderID `json:"id"` + ID v1.OrderID `json:"id"` } -func NewEventOrderClosed(id OrderID) EventOrderClosed { +func NewEventOrderClosed(id v1.OrderID) EventOrderClosed { return EventOrderClosed{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -83,11 +85,11 @@ func (e EventOrderClosed) ToSDKEvent() sdk.Event { // EventBidCreated struct type EventBidCreated struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID BidID `json:"id"` + ID v1.BidID `json:"id"` Price sdk.DecCoin `json:"price"` } -func NewEventBidCreated(id BidID, price sdk.DecCoin) EventBidCreated { +func NewEventBidCreated(id v1.BidID, price sdk.DecCoin) EventBidCreated { return EventBidCreated{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -113,11 +115,11 @@ func (e EventBidCreated) ToSDKEvent() sdk.Event { // EventBidClosed struct type EventBidClosed struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID BidID `json:"id"` + ID v1.BidID `json:"id"` Price sdk.DecCoin `json:"price"` } -func NewEventBidClosed(id BidID, price sdk.DecCoin) EventBidClosed { +func NewEventBidClosed(id v1.BidID, price sdk.DecCoin) EventBidClosed { return EventBidClosed{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -143,11 +145,11 @@ func (e EventBidClosed) ToSDKEvent() sdk.Event { // EventLeaseCreated struct type EventLeaseCreated struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID LeaseID `json:"id"` + ID v1.LeaseID `json:"id"` Price sdk.DecCoin `json:"price"` } -func NewEventLeaseCreated(id LeaseID, price sdk.DecCoin) EventLeaseCreated { +func NewEventLeaseCreated(id v1.LeaseID, price sdk.DecCoin) EventLeaseCreated { return EventLeaseCreated{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -172,11 +174,11 @@ func (e EventLeaseCreated) ToSDKEvent() sdk.Event { // EventLeaseClosed struct type EventLeaseClosed struct { Context sdkutil.BaseModuleEvent `json:"context"` - ID LeaseID `json:"id"` + ID v1.LeaseID `json:"id"` Price sdk.DecCoin `json:"price"` } -func NewEventLeaseClosed(id LeaseID, price sdk.DecCoin) EventLeaseClosed { +func NewEventLeaseClosed(id v1.LeaseID, price sdk.DecCoin) EventLeaseClosed { return EventLeaseClosed{ Context: sdkutil.BaseModuleEvent{ Module: ModuleName, @@ -199,23 +201,23 @@ func (e EventLeaseClosed) ToSDKEvent() sdk.Event { } // orderIDEVAttributes returns event attribues for given orderID -func orderIDEVAttributes(id OrderID) []sdk.Attribute { +func orderIDEVAttributes(id v1.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) { +func parseEVOrderID(attrs []sdk.Attribute) (v1.OrderID, error) { gid, err := dtypes.ParseEVGroupID(attrs) if err != nil { - return OrderID{}, err + return v1.OrderID{}, err } oseq, err := sdkutil.GetUint64(attrs, evOSeqKey) if err != nil { - return OrderID{}, err + return v1.OrderID{}, err } - return OrderID{ + return v1.OrderID{ Owner: gid.Owner, DSeq: gid.DSeq, GSeq: gid.GSeq, @@ -225,24 +227,24 @@ func parseEVOrderID(attrs []sdk.Attribute) (OrderID, error) { } // bidIDEVAttributes returns event attribues for given bidID -func bidIDEVAttributes(id BidID) []sdk.Attribute { +func bidIDEVAttributes(id v1.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) { +func parseEVBidID(attrs []sdk.Attribute) (v1.BidID, error) { oid, err := parseEVOrderID(attrs) if err != nil { - return BidID{}, err + return v1.BidID{}, err } provider, err := sdkutil.GetAccAddress(attrs, evProviderKey) if err != nil { - return BidID{}, err + return v1.BidID{}, err } - return BidID{ + return v1.BidID{ Owner: oid.Owner, DSeq: oid.DSeq, GSeq: oid.GSeq, @@ -252,18 +254,18 @@ func parseEVBidID(attrs []sdk.Attribute) (BidID, error) { } // leaseIDEVAttributes returns event attribues for given LeaseID -func leaseIDEVAttributes(id LeaseID) []sdk.Attribute { +func leaseIDEVAttributes(id v1.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) { +func parseEVLeaseID(attrs []sdk.Attribute) (v1.LeaseID, error) { bid, err := parseEVBidID(attrs) if err != nil { - return LeaseID{}, err + return v1.LeaseID{}, err } - return LeaseID(bid), nil + return v1.LeaseID(bid), nil } func priceEVAttributes(price sdk.DecCoin) []sdk.Attribute { diff --git a/go/node/market/v1beta5/events_test.go b/go/node/market/v1beta5/events_test.go index e8bd3f01..d7e7fcb0 100644 --- a/go/node/market/v1beta5/events_test.go +++ b/go/node/market/v1beta5/events_test.go @@ -1,459 +1,459 @@ package v1beta5 -import ( - "errors" - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/stretchr/testify/require" - - "github.com/akash-network/akash-api/go/sdkutil" -) - -var ( - 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()) - } -} +// import ( +// "errors" +// "fmt" +// "testing" +// +// sdk "github.com/cosmos/cosmos-sdk/types" +// +// "github.com/stretchr/testify/require" +// +// "pkg.akt.io/go/sdkutil" +// ) +// +// var ( +// 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/v1beta5/genesis.pb.go b/go/node/market/v1beta5/genesis.pb.go index 40a3235d..a0b4278a 100644 --- a/go/node/market/v1beta5/genesis.pb.go +++ b/go/node/market/v1beta5/genesis.pb.go @@ -5,11 +5,13 @@ package v1beta5 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_market_v1 "pkg.akt.io/go/node/market/v1" + v1 "pkg.akt.io/go/node/market/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,10 +27,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the basic genesis state used by market module type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` - Orders []Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders" yaml:"orders"` - Leases []Lease `protobuf:"bytes,3,rep,name=leases,proto3" json:"leases" yaml:"leases"` - Bids []Bid `protobuf:"bytes,4,rep,name=bids,proto3" json:"bids" yaml:"bids"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` + Orders Orders `protobuf:"bytes,2,rep,name=orders,proto3,castrepeated=Orders" json:"orders" yaml:"orders"` + Leases pkg_akt_io_go_node_market_v1.Leases `protobuf:"bytes,3,rep,name=leases,proto3,castrepeated=pkg.akt.io/go/node/market/v1.Leases" json:"leases" yaml:"leases"` + Bids Bids `protobuf:"bytes,4,rep,name=bids,proto3,castrepeated=Bids" json:"bids" yaml:"bids"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -71,21 +73,21 @@ func (m *GenesisState) GetParams() Params { return Params{} } -func (m *GenesisState) GetOrders() []Order { +func (m *GenesisState) GetOrders() Orders { if m != nil { return m.Orders } return nil } -func (m *GenesisState) GetLeases() []Lease { +func (m *GenesisState) GetLeases() pkg_akt_io_go_node_market_v1.Leases { if m != nil { return m.Leases } return nil } -func (m *GenesisState) GetBids() []Bid { +func (m *GenesisState) GetBids() Bids { if m != nil { return m.Bids } @@ -101,29 +103,30 @@ func init() { } var fileDescriptor_73efc258394be6e9 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0x93, 0xb6, 0xea, 0x90, 0xde, 0xbb, 0x44, 0x1d, 0x42, 0x8b, 0x9c, 0xe2, 0xa9, 0x0b, - 0xb6, 0x28, 0x62, 0x80, 0x31, 0x0b, 0x12, 0x42, 0x02, 0xa5, 0xb0, 0xb0, 0x39, 0xc4, 0x4a, 0xad, - 0x36, 0x75, 0x65, 0x1b, 0x10, 0x6f, 0xc1, 0x63, 0x75, 0xec, 0xc8, 0x42, 0x84, 0xda, 0x8d, 0xb1, - 0x4f, 0x80, 0x62, 0x5b, 0x8a, 0x84, 0xac, 0x6e, 0xf9, 0xf3, 0x7f, 0xe7, 0x4b, 0x8e, 0x1d, 0x40, - 0x32, 0x27, 0x72, 0x86, 0x4b, 0x22, 0xe6, 0x54, 0xe1, 0xd7, 0xb3, 0x8c, 0x2a, 0x72, 0x81, 0x0b, - 0xba, 0xa4, 0x92, 0x49, 0xb4, 0x12, 0x5c, 0xf1, 0xb0, 0xaf, 0x19, 0x64, 0x18, 0x64, 0x99, 0x41, - 0xbf, 0xe0, 0x05, 0xd7, 0x00, 0xae, 0x9f, 0x0c, 0x3b, 0x18, 0x39, 0x7d, 0x5c, 0xe4, 0x54, 0x1c, - 0x24, 0x16, 0x94, 0x48, 0x6a, 0x09, 0xe0, 0x24, 0x32, 0x96, 0xdb, 0xfe, 0xc4, 0xd9, 0xaf, 0x88, - 0x20, 0xa5, 0xfd, 0x65, 0xf8, 0xd5, 0x0a, 0xfe, 0x5d, 0x9b, 0x25, 0xa6, 0x8a, 0x28, 0x1a, 0x3e, - 0x06, 0x5d, 0x03, 0x44, 0xfe, 0xc8, 0x1f, 0xf7, 0x26, 0xc7, 0xc8, 0xb5, 0x14, 0xba, 0xd7, 0x4c, - 0x12, 0xaf, 0xab, 0xd8, 0xfb, 0xa9, 0x62, 0x3b, 0xb3, 0xaf, 0xe2, 0xff, 0xef, 0xa4, 0x5c, 0x5c, - 0x41, 0x93, 0x61, 0x6a, 0x8b, 0xf0, 0x21, 0xe8, 0xea, 0xdd, 0x64, 0xd4, 0x1a, 0xb5, 0xc7, 0xbd, - 0xc9, 0xd0, 0xad, 0xbd, 0xab, 0x99, 0xc6, 0x6a, 0x46, 0x1a, 0xab, 0xc9, 0x30, 0xb5, 0x45, 0x6d, - 0xd5, 0xe7, 0x21, 0xa3, 0xf6, 0x21, 0xeb, 0x6d, 0xcd, 0x34, 0x56, 0x33, 0xd2, 0x58, 0x4d, 0x86, - 0xa9, 0x2d, 0xc2, 0x9b, 0xa0, 0x93, 0xb1, 0x5c, 0x46, 0x1d, 0xed, 0x3c, 0x72, 0x3b, 0x13, 0x96, - 0x27, 0x43, 0x6b, 0xd4, 0xf8, 0xbe, 0x8a, 0x7b, 0xc6, 0x57, 0x27, 0x98, 0xea, 0x97, 0xc9, 0x74, - 0xbd, 0x05, 0xfe, 0x66, 0x0b, 0xfc, 0xef, 0x2d, 0xf0, 0x3f, 0x76, 0xc0, 0xdb, 0xec, 0x80, 0xf7, - 0xb9, 0x03, 0xde, 0xd3, 0x65, 0xc1, 0xd4, 0xec, 0x25, 0x43, 0xcf, 0xbc, 0xc4, 0xfa, 0x0b, 0xa7, - 0x4b, 0xaa, 0xde, 0xb8, 0x98, 0xdb, 0x44, 0x56, 0x0c, 0x17, 0x1c, 0x2f, 0x79, 0x4e, 0xff, 0xdc, - 0x60, 0xd6, 0xd5, 0x77, 0x77, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x00, 0x05, 0x09, 0x94, - 0x02, 0x00, 0x00, + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4a, 0xc3, 0x40, + 0x18, 0xc7, 0x13, 0x5b, 0x32, 0xa4, 0xba, 0x84, 0x22, 0xb1, 0x95, 0x4b, 0x9b, 0x2e, 0x75, 0xb9, + 0x60, 0xc5, 0x45, 0xb7, 0x1b, 0x74, 0x11, 0x94, 0x88, 0x8b, 0x83, 0x70, 0x21, 0x47, 0x0c, 0x69, + 0x9b, 0x92, 0x0b, 0x05, 0xdf, 0x42, 0x5f, 0xc3, 0x27, 0xe9, 0xd8, 0xd1, 0x29, 0x4a, 0xbb, 0x39, + 0xf6, 0x09, 0xe4, 0xbe, 0xef, 0x4a, 0xa1, 0x04, 0xb7, 0x7c, 0xfc, 0x7f, 0xdf, 0xef, 0x9f, 0xbb, + 0xb3, 0x7d, 0x9e, 0x71, 0xf9, 0x1a, 0x4c, 0x78, 0x91, 0x89, 0x32, 0x98, 0x9f, 0x47, 0xa2, 0xe4, + 0x97, 0x41, 0x22, 0xa6, 0x42, 0xa6, 0x92, 0xce, 0x8a, 0xbc, 0xcc, 0x9d, 0x36, 0x30, 0x14, 0x19, + 0xaa, 0x99, 0x4e, 0x3b, 0xc9, 0x93, 0x1c, 0x80, 0x40, 0x7d, 0x21, 0xdb, 0xe9, 0xee, 0xf9, 0x82, + 0xb1, 0xe0, 0x52, 0xe8, 0xb0, 0x5f, 0x5b, 0x36, 0xe3, 0x05, 0x9f, 0xe8, 0xae, 0x0e, 0xa9, 0x45, + 0xa2, 0x34, 0xd6, 0x79, 0xaf, 0x36, 0xcf, 0x8b, 0x58, 0x14, 0x48, 0xf8, 0x1f, 0x0d, 0xfb, 0xf0, + 0x16, 0xff, 0xff, 0xb1, 0xe4, 0xa5, 0x70, 0x9e, 0x6c, 0x0b, 0x2b, 0x5c, 0xb3, 0x67, 0x0e, 0x5b, + 0xa3, 0x53, 0x5a, 0x77, 0x1e, 0xfa, 0x00, 0x0c, 0xf3, 0x16, 0x95, 0x67, 0xfc, 0x56, 0x9e, 0xde, + 0xd9, 0x54, 0xde, 0xd1, 0x1b, 0x9f, 0x8c, 0xaf, 0x7c, 0x9c, 0xfd, 0x50, 0x07, 0xce, 0x8b, 0x6d, + 0x41, 0xad, 0x74, 0x0f, 0x7a, 0x8d, 0x61, 0x6b, 0xd4, 0xad, 0xd7, 0xde, 0x2b, 0x86, 0x9d, 0x6d, + 0xad, 0xb8, 0xb2, 0xb3, 0xe2, 0xec, 0x7f, 0x7e, 0x7b, 0x16, 0x90, 0x32, 0xd4, 0x88, 0x33, 0xb7, + 0x2d, 0xb8, 0x3b, 0xe9, 0x36, 0xc0, 0x7f, 0xbc, 0xef, 0xa7, 0x77, 0x2a, 0x66, 0x37, 0x5b, 0x35, + 0xd2, 0x3b, 0x35, 0xce, 0x4a, 0x3d, 0x98, 0x65, 0x09, 0xe5, 0x59, 0x49, 0x53, 0xf5, 0x56, 0xc1, + 0x34, 0x8f, 0xc5, 0xee, 0x06, 0x51, 0x23, 0x43, 0xbd, 0xef, 0x84, 0x76, 0x33, 0x4a, 0x63, 0xe9, + 0x36, 0xa1, 0xf5, 0xa4, 0xfe, 0x54, 0x2c, 0x8d, 0xd9, 0x40, 0x17, 0x03, 0xbe, 0xa9, 0xbc, 0x16, + 0xd6, 0xaa, 0x49, 0x95, 0x36, 0x59, 0x1a, 0xcb, 0x10, 0x42, 0x76, 0xbd, 0x58, 0x11, 0x73, 0xb9, + 0x22, 0xe6, 0xcf, 0x8a, 0x98, 0xef, 0x6b, 0x62, 0x2c, 0xd7, 0xc4, 0xf8, 0x5a, 0x13, 0xe3, 0xb9, + 0xff, 0xdf, 0xaf, 0x41, 0x57, 0x64, 0xc1, 0xbb, 0x5e, 0xfc, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf5, + 0x42, 0x9c, 0xe7, 0xab, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -372,7 +375,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Leases = append(m.Leases, Lease{}) + m.Leases = append(m.Leases, v1.Lease{}) if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/go/node/market/v1beta5/id.go b/go/node/market/v1beta5/id.go deleted file mode 100644 index 2d31a4df..00000000 --- a/go/node/market/v1beta5/id.go +++ /dev/null @@ -1,154 +0,0 @@ -package v1beta5 - -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/v1beta4" -) - -// 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/v1beta5/lease.pb.go b/go/node/market/v1beta5/lease.pb.go deleted file mode 100644 index cf809bdc..00000000 --- a/go/node/market/v1beta5/lease.pb.go +++ /dev/null @@ -1,2134 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/market/v1beta5/lease.proto - -package v1beta5 - -import ( - fmt "fmt" - 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 - -// 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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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.v1beta5.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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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_c206e3cb96afe42c, []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.v1beta5.Lease_State", Lease_State_name, Lease_State_value) - proto.RegisterType((*LeaseID)(nil), "akash.market.v1beta5.LeaseID") - proto.RegisterType((*Lease)(nil), "akash.market.v1beta5.Lease") - proto.RegisterType((*LeaseFilters)(nil), "akash.market.v1beta5.LeaseFilters") - proto.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta5.MsgCreateLease") - proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta5.MsgCreateLeaseResponse") - proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta5.MsgWithdrawLease") - proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta5.MsgWithdrawLeaseResponse") - proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta5.MsgCloseLease") - proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta5.MsgCloseLeaseResponse") -} - -func init() { proto.RegisterFile("akash/market/v1beta5/lease.proto", fileDescriptor_c206e3cb96afe42c) } - -var fileDescriptor_c206e3cb96afe42c = []byte{ - // 757 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x4f, 0xdb, 0x4a, - 0x10, 0xb7, 0x93, 0x38, 0x24, 0x1b, 0xfe, 0xe4, 0x59, 0xc0, 0xcb, 0x33, 0x0f, 0xdb, 0xf5, 0x89, - 0x4b, 0x6d, 0x11, 0xd4, 0x43, 0xe9, 0x89, 0x10, 0x51, 0x45, 0x2a, 0x42, 0x35, 0x95, 0x5a, 0x55, - 0x95, 0x22, 0xc7, 0xbb, 0x98, 0x15, 0x89, 0x37, 0x78, 0x4d, 0x50, 0xbf, 0x41, 0xc5, 0xa9, 0xc7, - 0x5e, 0x50, 0x91, 0xfa, 0x65, 0x38, 0xa2, 0x9e, 0x7a, 0xb2, 0xaa, 0x70, 0xa9, 0x72, 0x8c, 0xfa, - 0x01, 0xaa, 0xdd, 0x75, 0x48, 0x82, 0x22, 0x4e, 0x55, 0x4f, 0x3d, 0x25, 0xf3, 0x9b, 0xf9, 0xcd, - 0x8c, 0x7f, 0x33, 0x63, 0x03, 0xd3, 0x3b, 0xf1, 0xe8, 0xb1, 0xd3, 0xf1, 0xa2, 0x13, 0x14, 0x3b, - 0xbd, 0xcd, 0x16, 0x8a, 0xbd, 0x27, 0x4e, 0x1b, 0x79, 0x14, 0xd9, 0xdd, 0x88, 0xc4, 0x44, 0x5d, - 0xe6, 0x11, 0xb6, 0x88, 0xb0, 0xd3, 0x08, 0x6d, 0x39, 0x20, 0x01, 0xe1, 0x01, 0x0e, 0xfb, 0x27, - 0x62, 0x35, 0xdd, 0x27, 0xb4, 0x43, 0xa8, 0xd3, 0xf2, 0x28, 0x4a, 0x93, 0x6d, 0x3a, 0x3e, 0xc1, - 0xe1, 0xc8, 0x3f, 0xb3, 0x5a, 0x0b, 0x43, 0xe1, 0xb7, 0xae, 0x32, 0x60, 0xee, 0x05, 0xab, 0xdd, - 0xa8, 0xab, 0x0e, 0x50, 0xc8, 0x79, 0x88, 0xa2, 0x8a, 0x6c, 0xca, 0x1b, 0xc5, 0xda, 0x7f, 0x83, - 0xc4, 0x10, 0xc0, 0x30, 0x31, 0xe6, 0xdf, 0x7b, 0x9d, 0xf6, 0xb6, 0xc5, 0x4d, 0xcb, 0x15, 0xb0, - 0xba, 0x05, 0x72, 0x90, 0xa2, 0xd3, 0x4a, 0xc6, 0x94, 0x37, 0x72, 0x35, 0xa3, 0x9f, 0x18, 0xb9, - 0xfa, 0x21, 0x3a, 0x1d, 0x24, 0x06, 0xc7, 0x87, 0x89, 0x51, 0x12, 0x34, 0x66, 0x59, 0x2e, 0x07, - 0x19, 0x29, 0x60, 0xa4, 0xac, 0x29, 0x6f, 0x2c, 0x08, 0xd2, 0xf3, 0x94, 0x14, 0x4c, 0x91, 0x02, - 0x41, 0x0a, 0x52, 0x12, 0x61, 0xa4, 0xdc, 0x98, 0x74, 0x90, 0x92, 0xc8, 0x14, 0x89, 0x08, 0x12, - 0xfb, 0x51, 0x9f, 0x81, 0x42, 0x37, 0x22, 0x3d, 0x0c, 0x51, 0x54, 0x51, 0xf8, 0x23, 0x19, 0x83, - 0xc4, 0xb8, 0xc3, 0x86, 0x89, 0xb1, 0x24, 0x48, 0x23, 0xc4, 0x72, 0xef, 0x9c, 0xdb, 0x85, 0x4f, - 0x57, 0x86, 0xf4, 0xe3, 0xca, 0x90, 0xac, 0x9f, 0x59, 0xa0, 0x70, 0x89, 0xd4, 0x77, 0xa0, 0xc0, - 0xe7, 0xd4, 0xc4, 0x90, 0x6b, 0x54, 0xaa, 0xae, 0xdb, 0xb3, 0x66, 0x65, 0xa7, 0x8a, 0xd6, 0xac, - 0xeb, 0xc4, 0x90, 0xfa, 0x89, 0x31, 0x92, 0x78, 0x90, 0x18, 0x19, 0x0c, 0x87, 0x89, 0x51, 0x14, - 0x85, 0x31, 0xb4, 0xdc, 0x39, 0x9e, 0xb2, 0x01, 0x55, 0x17, 0x28, 0x34, 0xf6, 0x62, 0xc4, 0xe5, - 0x5c, 0xac, 0x3e, 0x7a, 0x20, 0xb5, 0x7d, 0xc8, 0x02, 0xc5, 0x84, 0x38, 0x67, 0x3c, 0x21, 0x6e, - 0x5a, 0xae, 0x80, 0xd5, 0x97, 0x40, 0xe9, 0x46, 0xd8, 0x47, 0x5c, 0xed, 0x52, 0xf5, 0x7f, 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, 0xb3, - 0x0c, 0x14, 0xde, 0xba, 0x6a, 0x81, 0x39, 0x1c, 0xf6, 0xbc, 0x36, 0x86, 0x65, 0x49, 0x5b, 0xb9, - 0xb8, 0x34, 0xff, 0xe1, 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, 0x87, 0x2f, 0xba, 0x34, 0x31, 0xf6, 0xaf, 0x19, 0x30, 0xcf, - 0xfd, 0x7b, 0xb8, 0x1d, 0xa3, 0x88, 0xfe, 0x3d, 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, 0x40, 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, - 0xaf, 0x71, 0x7c, 0x0c, 0x23, 0xef, 0x5c, 0x74, 0xf2, 0xe6, 0x5e, 0x27, 0xbf, 0xe1, 0xb6, 0xa7, - 0xba, 0xd1, 0x40, 0xe5, 0x7e, 0xcd, 0xbb, 0x7e, 0x28, 0x58, 0x60, 0x9d, 0xb2, 0x4d, 0xfc, 0x03, - 0xaf, 0x9a, 0xb4, 0xa1, 0x7f, 0xc1, 0xca, 0x54, 0xd1, 0x51, 0x37, 0xb5, 0xc3, 0xeb, 0xbe, 0x2e, - 0xdf, 0xf4, 0x75, 0xf9, 0x7b, 0x5f, 0x97, 0x3f, 0xde, 0xea, 0xd2, 0xcd, 0xad, 0x2e, 0x7d, 0xbb, - 0xd5, 0xa5, 0xb7, 0x4f, 0x03, 0x1c, 0x1f, 0x9f, 0xb5, 0x6c, 0x9f, 0x74, 0x1c, 0xde, 0xce, 0xe3, - 0x10, 0xc5, 0xe7, 0x24, 0x3a, 0x49, 0x2d, 0xaf, 0x8b, 0x9d, 0x80, 0x38, 0x21, 0x81, 0xe8, 0xde, - 0x37, 0xa7, 0x95, 0xe7, 0x1f, 0x9c, 0xad, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0xc3, 0x3a, - 0x00, 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/v1beta5/leasemsg.pb.go b/go/node/market/v1beta5/leasemsg.pb.go new file mode 100644 index 00000000..72ddf025 --- /dev/null +++ b/go/node/market/v1beta5/leasemsg.pb.go @@ -0,0 +1,1038 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta5/leasemsg.proto + +package v1beta5 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + v1 "pkg.akt.io/go/node/market/v1" +) + +// 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 + +// MsgCreateLease is sent to create a lease +type MsgCreateLease struct { + BidID v1.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_394bd78777079a40, []int{0} +} +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() v1.BidID { + if m != nil { + return m.BidID + } + return v1.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_394bd78777079a40, []int{1} +} +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 { + ID v1.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_394bd78777079a40, []int{2} +} +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) GetID() v1.LeaseID { + if m != nil { + return m.ID + } + return v1.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_394bd78777079a40, []int{3} +} +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 { + ID v1.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_394bd78777079a40, []int{4} +} +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) GetID() v1.LeaseID { + if m != nil { + return m.ID + } + return v1.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_394bd78777079a40, []int{5} +} +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.RegisterType((*MsgCreateLease)(nil), "akash.market.v1beta5.MsgCreateLease") + proto.RegisterType((*MsgCreateLeaseResponse)(nil), "akash.market.v1beta5.MsgCreateLeaseResponse") + proto.RegisterType((*MsgWithdrawLease)(nil), "akash.market.v1beta5.MsgWithdrawLease") + proto.RegisterType((*MsgWithdrawLeaseResponse)(nil), "akash.market.v1beta5.MsgWithdrawLeaseResponse") + proto.RegisterType((*MsgCloseLease)(nil), "akash.market.v1beta5.MsgCloseLease") + proto.RegisterType((*MsgCloseLeaseResponse)(nil), "akash.market.v1beta5.MsgCloseLeaseResponse") +} + +func init() { + proto.RegisterFile("akash/market/v1beta5/leasemsg.proto", fileDescriptor_394bd78777079a40) +} + +var fileDescriptor_394bd78777079a40 = []byte{ + // 332 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd5, 0xcf, 0x49, 0x4d, 0x2c, 0x4e, 0xcd, 0x2d, 0x4e, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x12, 0x01, 0x2b, 0xd2, 0x83, 0x28, 0xd2, 0x83, 0x2a, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, + 0x2b, 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x24, 0xd1, 0x0c, 0xd4, 0x4f, 0xca, 0x4c, 0x81, 0x4a, + 0x49, 0xa3, 0x4b, 0x81, 0xad, 0x81, 0x48, 0x2a, 0xa5, 0x73, 0xf1, 0xf9, 0x16, 0xa7, 0x3b, 0x17, + 0xa5, 0x26, 0x96, 0xa4, 0xfa, 0x80, 0xc4, 0x85, 0xfc, 0xb9, 0xd8, 0x92, 0x32, 0x53, 0xe2, 0x33, + 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xc4, 0xf4, 0xd0, 0x9c, 0xa1, 0xe7, 0x94, 0x99, + 0xe2, 0xe9, 0xe2, 0xa4, 0x70, 0xe2, 0x9e, 0x3c, 0xc3, 0xa3, 0x7b, 0xf2, 0xac, 0x60, 0xee, 0xab, + 0x7b, 0xf2, 0x4c, 0x99, 0x29, 0x9f, 0xee, 0xc9, 0x73, 0x56, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x65, + 0xa6, 0x28, 0x05, 0xb1, 0x26, 0x65, 0xa6, 0x78, 0xa6, 0x58, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xa0, + 0x24, 0xc1, 0x25, 0x86, 0x6a, 0x51, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x52, 0x06, + 0x97, 0x80, 0x6f, 0x71, 0x7a, 0x78, 0x66, 0x49, 0x46, 0x4a, 0x51, 0x62, 0x39, 0xc4, 0x11, 0x7e, + 0x68, 0x8e, 0x90, 0xc0, 0x70, 0x04, 0x58, 0x9d, 0xa7, 0x8b, 0x93, 0x2c, 0xd4, 0x19, 0x4c, 0x44, + 0xb8, 0x41, 0x8a, 0x4b, 0x02, 0xdd, 0x26, 0xb8, 0x2b, 0x32, 0xb9, 0x78, 0x41, 0xee, 0xcb, 0xc9, + 0x2f, 0x86, 0x86, 0x43, 0x10, 0x17, 0x07, 0x38, 0xa0, 0xa8, 0xe0, 0x08, 0x76, 0xb0, 0x41, 0x70, + 0x67, 0x88, 0x73, 0x89, 0xa2, 0x58, 0x05, 0x73, 0x83, 0x93, 0xf5, 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, 0x29, 0x16, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, + 0x62, 0x5d, 0x3f, 0x2f, 0x3f, 0x25, 0x15, 0x2d, 0xf1, 0x24, 0xb1, 0x81, 0x23, 0xd4, 0x18, 0x10, + 0x00, 0x00, 0xff, 0xff, 0xf6, 0xc2, 0x83, 0xe4, 0x5b, 0x02, 0x00, 0x00, +} + +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 = encodeVarintLeasemsg(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.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeasemsg(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.ID.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeasemsg(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 encodeVarintLeasemsg(dAtA []byte, offset int, v uint64) int { + offset -= sovLeasemsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateLease) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BidID.Size() + n += 1 + l + sovLeasemsg(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.ID.Size() + n += 1 + l + sovLeasemsg(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.ID.Size() + n += 1 + l + sovLeasemsg(uint64(l)) + return n +} + +func (m *MsgCloseLeaseResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovLeasemsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLeasemsg(x uint64) (n int) { + return sovLeasemsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLeasemsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLeasemsg + } + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLeasemsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLeasemsg + } + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLeasemsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLeasemsg + } + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + 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 ErrIntOverflowLeasemsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipLeasemsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLeasemsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLeasemsg(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, ErrIntOverflowLeasemsg + } + 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, ErrIntOverflowLeasemsg + } + 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, ErrIntOverflowLeasemsg + } + 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, ErrInvalidLengthLeasemsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLeasemsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLeasemsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLeasemsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLeasemsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLeasemsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta5/migrate/v1beta4.go b/go/node/market/v1beta5/migrate/v1beta4.go index 2f80caf0..5a591ae0 100644 --- a/go/node/market/v1beta5/migrate/v1beta4.go +++ b/go/node/market/v1beta5/migrate/v1beta4.go @@ -2,39 +2,35 @@ package migrate import ( "github.com/akash-network/akash-api/go/node/market/v1beta4" - "github.com/akash-network/akash-api/go/node/market/v1beta5" + + dmigrate "pkg.akt.io/go/node/deployment/v1beta4/migrate" + "pkg.akt.io/go/node/market/v1" + "pkg.akt.io/go/node/market/v1/migrate" + v1migrate "pkg.akt.io/go/node/market/v1/migrate" + "pkg.akt.io/go/node/market/v1beta5" ) -func BidStateFromV1beta4(from v1beta4.Bid_State) v1beta5.Bid_State { - return v1beta5.Bid_State(from) -} +func ResourcesOfferFromV1beta4(from v1beta4.ResourcesOffer) v1beta5.ResourcesOffer { + res := make(v1beta5.ResourcesOffer, 0, len(from)) -func LeaseIDFromV1beta4(from v1beta4.LeaseID) v1beta5.LeaseID { - return v1beta5.LeaseID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - OSeq: from.OSeq, - Provider: from.Provider, - } + return res } -func BidIDFromV1beta4(from v1beta4.BidID) v1beta5.BidID { - return v1beta5.BidID{ - Owner: from.Owner, - DSeq: from.DSeq, - GSeq: from.GSeq, - OSeq: from.OSeq, - Provider: from.Provider, - } -} - -func BidFromV1beta3(from v1beta4.Bid) v1beta5.Bid { +func BidFromV1beta4(from v1beta4.Bid) v1beta5.Bid { return v1beta5.Bid{ - BidID: BidIDFromV1beta4(from.BidID), - State: BidStateFromV1beta4(from.State), + ID: migrate.BidIDFromV1beta4(from.BidID), + State: migrate.BidStateFromV1beta4(from.State), Price: from.Price, CreatedAt: from.CreatedAt, - ResourcesOffer: v1beta5.ResourcesOffer{}, + ResourcesOffer: ResourcesOfferFromV1beta4(from.ResourcesOffer), + } +} + +func OrderFromV1beta4(from v1beta4.Order) v1beta5.Order { + return v1beta5.Order{ + ID: v1migrate.OrderIDFromV1beta4(from.OrderID), + State: v1.OrderState(from.State), + Spec: dmigrate.GroupSpecFromV1Beta3(from.Spec), + CreatedAt: from.CreatedAt, } } diff --git a/go/node/market/v1beta5/msgs.go b/go/node/market/v1beta5/msgs.go index a272d4e1..b0a899ff 100644 --- a/go/node/market/v1beta5/msgs.go +++ b/go/node/market/v1beta5/msgs.go @@ -4,6 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + + v1 "pkg.akt.io/go/node/market/v1" ) const ( @@ -23,9 +25,9 @@ var ( ) // NewMsgCreateBid creates a new MsgCreateBid instance -func NewMsgCreateBid(id OrderID, provider sdk.AccAddress, price sdk.DecCoin, deposit sdk.Coin, roffer ResourcesOffer) *MsgCreateBid { +func NewMsgCreateBid(id v1.OrderID, provider sdk.AccAddress, price sdk.DecCoin, deposit sdk.Coin, roffer ResourcesOffer) *MsgCreateBid { return &MsgCreateBid{ - Order: id, + OrderID: id, Provider: provider.String(), Price: price, Deposit: deposit, @@ -56,7 +58,7 @@ func (msg MsgCreateBid) GetSigners() []sdk.AccAddress { // ValidateBasic does basic validation of provider and order func (msg MsgCreateBid) ValidateBasic() error { - if err := msg.Order.Validate(); err != nil { + if err := msg.OrderID.Validate(); err != nil { return err } @@ -65,7 +67,7 @@ func (msg MsgCreateBid) ValidateBasic() error { return ErrEmptyProvider } - owner, err := sdk.AccAddressFromBech32(msg.Order.Owner) + owner, err := sdk.AccAddressFromBech32(msg.OrderID.Owner) if err != nil { return fmt.Errorf("%w: empty owner", ErrInvalidBid) } @@ -82,9 +84,9 @@ func (msg MsgCreateBid) ValidateBasic() error { } // NewMsgWithdrawLease creates a new MsgWithdrawLease instance -func NewMsgWithdrawLease(id LeaseID) *MsgWithdrawLease { +func NewMsgWithdrawLease(id v1.LeaseID) *MsgWithdrawLease { return &MsgWithdrawLease{ - LeaseID: id, + ID: id, } } @@ -101,7 +103,7 @@ func (msg MsgWithdrawLease) GetSignBytes() []byte { // GetSigners defines whose signature is required func (msg MsgWithdrawLease) GetSigners() []sdk.AccAddress { - provider, err := sdk.AccAddressFromBech32(msg.GetLeaseID().Provider) + provider, err := sdk.AccAddressFromBech32(msg.GetID().Provider) if err != nil { panic(err) } @@ -111,14 +113,14 @@ func (msg MsgWithdrawLease) GetSigners() []sdk.AccAddress { // ValidateBasic does basic validation of provider and order func (msg MsgWithdrawLease) ValidateBasic() error { - if err := msg.LeaseID.Validate(); err != nil { + if err := msg.ID.Validate(); err != nil { return err } return nil } // NewMsgCreateLease creates a new MsgCreateLease instance -func NewMsgCreateLease(id BidID) *MsgCreateLease { +func NewMsgCreateLease(id v1.BidID) *MsgCreateLease { return &MsgCreateLease{ BidID: id, } @@ -151,9 +153,9 @@ func (msg MsgCreateLease) ValidateBasic() error { } // NewMsgCloseBid creates a new MsgCloseBid instance -func NewMsgCloseBid(id BidID) *MsgCloseBid { +func NewMsgCloseBid(id v1.BidID) *MsgCloseBid { return &MsgCloseBid{ - BidID: id, + ID: id, } } @@ -170,7 +172,7 @@ func (msg MsgCloseBid) GetSignBytes() []byte { // GetSigners defines whose signature is required func (msg MsgCloseBid) GetSigners() []sdk.AccAddress { - provider, err := sdk.AccAddressFromBech32(msg.BidID.Provider) + provider, err := sdk.AccAddressFromBech32(msg.ID.Provider) if err != nil { panic(err) } @@ -180,13 +182,13 @@ func (msg MsgCloseBid) GetSigners() []sdk.AccAddress { // ValidateBasic method for MsgCloseBid func (msg MsgCloseBid) ValidateBasic() error { - return msg.BidID.Validate() + return msg.ID.Validate() } // NewMsgCloseLease creates a new MsgCloseLease instance -func NewMsgCloseLease(id LeaseID) *MsgCloseLease { +func NewMsgCloseLease(id v1.LeaseID) *MsgCloseLease { return &MsgCloseLease{ - LeaseID: id, + ID: id, } } @@ -203,7 +205,7 @@ func (msg MsgCloseLease) GetSignBytes() []byte { // GetSigners defines whose signature is required func (msg MsgCloseLease) GetSigners() []sdk.AccAddress { - owner, err := sdk.AccAddressFromBech32(msg.LeaseID.Owner) + owner, err := sdk.AccAddressFromBech32(msg.ID.Owner) if err != nil { panic(err) } @@ -213,5 +215,5 @@ func (msg MsgCloseLease) GetSigners() []sdk.AccAddress { // ValidateBasic method for MsgCloseLease func (msg MsgCloseLease) ValidateBasic() error { - return msg.LeaseID.Validate() + return msg.ID.Validate() } diff --git a/go/node/market/v1beta5/order.go b/go/node/market/v1beta5/order.go new file mode 100644 index 00000000..33fc38d2 --- /dev/null +++ b/go/node/market/v1beta5/order.go @@ -0,0 +1,108 @@ +package v1beta5 + +import ( + "strings" + + sdk "github.com/cosmos/cosmos-sdk/types" + "gopkg.in/yaml.v3" + + atypes "pkg.akt.io/go/node/audit/v1" + + v1 "pkg.akt.io/go/node/market/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" +) + +// 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 v1.OrderOpen: + return nil + case v1.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 v1.OrderClosed: + return nil + case v1.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 attr.Attributes) 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 attr.Attributes) bool { + return o.Spec.MatchResourcesRequirements(attr) +} + +// Filters returns whether order filters valid or not +func (o *Order) Filters(filters v1.OrderFilters, stateVal v1.OrderState) bool { + // Checking owner filter + if filters.Owner != "" && filters.Owner != o.ID.Owner { + return false + } + + // Checking dseq filter + if filters.DSeq != 0 && filters.DSeq != o.ID.DSeq { + return false + } + + // Checking gseq filter + if filters.GSeq != 0 && filters.GSeq != o.ID.GSeq { + return false + } + + // Checking oseq filter + if filters.OSeq != 0 && filters.OSeq != o.ID.OSeq { + return false + } + + // Checking state filter + if stateVal != 0 && stateVal != o.State { + return false + } + + return true +} diff --git a/go/node/market/v1beta5/order.pb.go b/go/node/market/v1beta5/order.pb.go index a9fae90e..fe171225 100644 --- a/go/node/market/v1beta5/order.pb.go +++ b/go/node/market/v1beta5/order.pb.go @@ -5,12 +5,13 @@ package v1beta5 import ( fmt "fmt" - v1beta4 "github.com/akash-network/akash-api/go/node/deployment/v1beta4" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + v1beta4 "pkg.akt.io/go/node/deployment/v1beta4" + v1 "pkg.akt.io/go/node/market/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,114 +25,10 @@ var _ = math.Inf // 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_a72454f2c693d67f, []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_a72454f2c693d67f, []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.v1beta5.Order_State" json:"state" yaml:"state"` + ID v1.OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` + State v1.OrderState `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1.OrderState" json:"state" yaml:"state"` Spec v1beta4.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"` } @@ -139,7 +36,7 @@ type Order struct { func (m *Order) Reset() { *m = Order{} } func (*Order) ProtoMessage() {} func (*Order) Descriptor() ([]byte, []int) { - return fileDescriptor_a72454f2c693d67f, []int{1} + return fileDescriptor_a72454f2c693d67f, []int{0} } func (m *Order) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,18 +65,18 @@ func (m *Order) XXX_DiscardUnknown() { var xxx_messageInfo_Order proto.InternalMessageInfo -func (m *Order) GetOrderID() OrderID { +func (m *Order) GetID() v1.OrderID { if m != nil { - return m.OrderID + return m.ID } - return OrderID{} + return v1.OrderID{} } -func (m *Order) GetState() Order_State { +func (m *Order) GetState() v1.OrderState { if m != nil { return m.State } - return OrderStateInvalid + return v1.OrderStateInvalid } func (m *Order) GetSpec() v1beta4.GroupSpec { @@ -196,176 +93,37 @@ func (m *Order) GetCreatedAt() int64 { 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_a72454f2c693d67f, []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.v1beta5.Order_State", Order_State_name, Order_State_value) - proto.RegisterType((*OrderID)(nil), "akash.market.v1beta5.OrderID") proto.RegisterType((*Order)(nil), "akash.market.v1beta5.Order") - proto.RegisterType((*OrderFilters)(nil), "akash.market.v1beta5.OrderFilters") } func init() { proto.RegisterFile("akash/market/v1beta5/order.proto", fileDescriptor_a72454f2c693d67f) } var fileDescriptor_a72454f2c693d67f = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xb1, 0x6b, 0xdb, 0x4e, - 0x14, 0x96, 0x6c, 0x39, 0x89, 0xcf, 0xc9, 0xef, 0xe7, 0x8a, 0x94, 0xa6, 0x0a, 0xd1, 0xa9, 0xea, - 0xe2, 0xa5, 0x12, 0x75, 0xd2, 0xa1, 0xde, 0xe2, 0x86, 0x06, 0x4f, 0x06, 0xb9, 0x53, 0x29, 0x04, - 0x59, 0x77, 0x28, 0xc2, 0xb6, 0x4e, 0x91, 0x2e, 0x0e, 0xd9, 0x3b, 0x14, 0x4f, 0x5d, 0x0a, 0x5d, - 0x0c, 0x81, 0xfe, 0x21, 0x5d, 0x33, 0x66, 0xec, 0x24, 0x8a, 0xbd, 0x14, 0x8f, 0xfe, 0x0b, 0xca, - 0xbd, 0x53, 0x70, 0x52, 0x4a, 0xfe, 0x80, 0x4e, 0xd2, 0xfb, 0xde, 0xf7, 0xbd, 0xbb, 0xf7, 0xbd, - 0xc7, 0x21, 0xcb, 0x1f, 0xf8, 0xd9, 0xa9, 0x3b, 0xf2, 0xd3, 0x01, 0xe5, 0xee, 0xf8, 0x65, 0x9f, - 0x72, 0xff, 0x95, 0xcb, 0x52, 0x42, 0x53, 0x27, 0x49, 0x19, 0x67, 0xfa, 0x36, 0x30, 0x1c, 0xc9, - 0x70, 0x0a, 0x86, 0xb1, 0x1d, 0xb2, 0x90, 0x01, 0xc1, 0x15, 0x7f, 0x92, 0x6b, 0x34, 0x64, 0x35, - 0x42, 0x93, 0x21, 0xbb, 0x1c, 0xd1, 0xf8, 0xb6, 0xe2, 0x81, 0x1b, 0xa6, 0xec, 0x3c, 0xc9, 0x12, - 0x1a, 0x48, 0xa6, 0x3d, 0x57, 0xd1, 0x7a, 0x57, 0x9c, 0xd2, 0x39, 0xd2, 0x5d, 0x54, 0x61, 0x17, - 0x31, 0x4d, 0x77, 0x54, 0x4b, 0x6d, 0x54, 0xdb, 0x4f, 0x17, 0x39, 0x96, 0xc0, 0x32, 0xc7, 0x9b, - 0x97, 0xfe, 0x68, 0xd8, 0xb2, 0x21, 0xb4, 0x3d, 0x09, 0xeb, 0xfb, 0x48, 0x23, 0x19, 0x3d, 0xdb, - 0x29, 0x59, 0x6a, 0x43, 0x6b, 0xe3, 0x59, 0x8e, 0xb5, 0xa3, 0x1e, 0x3d, 0x5b, 0xe4, 0x18, 0xf0, - 0x65, 0x8e, 0x6b, 0x52, 0x26, 0x22, 0xdb, 0x03, 0x50, 0x88, 0x42, 0x21, 0x2a, 0x5b, 0x6a, 0x63, - 0x4b, 0x8a, 0x8e, 0x0b, 0x51, 0x78, 0x4f, 0x14, 0x4a, 0x51, 0x58, 0x88, 0x98, 0x10, 0x69, 0x2b, - 0x51, 0xb7, 0x10, 0xb1, 0x7b, 0x22, 0x26, 0x45, 0xe2, 0xd3, 0xda, 0xf8, 0x7a, 0x85, 0x95, 0x5f, - 0x57, 0x58, 0xb1, 0xbf, 0x97, 0x51, 0x05, 0xba, 0xd4, 0x3f, 0xa0, 0x0d, 0x30, 0xf5, 0x24, 0x22, - 0xd0, 0x66, 0xad, 0xb9, 0xe7, 0xfc, 0xcd, 0x58, 0xa7, 0x30, 0xa5, 0x6d, 0x5f, 0xe7, 0x58, 0x99, - 0xe5, 0xf8, 0xd6, 0xa5, 0x45, 0x8e, 0x4b, 0x11, 0x59, 0xe6, 0xb8, 0x2a, 0x0f, 0x8c, 0x88, 0xed, - 0xad, 0x43, 0xc9, 0x0e, 0xd1, 0x3d, 0x54, 0xc9, 0xb8, 0xcf, 0x29, 0x38, 0xf2, 0x5f, 0xf3, 0xd9, - 0x03, 0xa5, 0x9d, 0x9e, 0x20, 0x4a, 0x93, 0x41, 0xb3, 0x32, 0x19, 0x42, 0xdb, 0x93, 0xb0, 0xfe, - 0x0e, 0x69, 0x62, 0x5e, 0xe0, 0x57, 0xad, 0xf9, 0xbc, 0x28, 0xb9, 0x1a, 0x6d, 0x51, 0xf6, 0xc0, - 0x39, 0x16, 0xa3, 0xed, 0x25, 0x34, 0x68, 0xef, 0x8a, 0x3b, 0x0b, 0x6f, 0x84, 0x70, 0xe5, 0x8d, - 0x88, 0x6c, 0x0f, 0x40, 0x7d, 0x0f, 0xa1, 0x20, 0xa5, 0x3e, 0xa7, 0xe4, 0xc4, 0xe7, 0x60, 0x6b, - 0xd9, 0xab, 0x16, 0xc8, 0x21, 0xb7, 0x3f, 0xaa, 0xa8, 0x02, 0x17, 0xd4, 0x6d, 0xb4, 0x1e, 0xc5, - 0x63, 0x7f, 0x18, 0x91, 0xba, 0x62, 0x3c, 0x9e, 0x4c, 0xad, 0x47, 0x70, 0x7d, 0x48, 0x76, 0x64, - 0x42, 0x7f, 0x82, 0x34, 0x96, 0xd0, 0xb8, 0xae, 0x1a, 0x5b, 0x93, 0xa9, 0x55, 0x05, 0x42, 0x37, - 0xa1, 0xb1, 0xbe, 0x8b, 0xd6, 0xfc, 0x80, 0x47, 0x63, 0x5a, 0x2f, 0x19, 0xff, 0x4f, 0xa6, 0x56, - 0x0d, 0x52, 0x87, 0x00, 0x89, 0x64, 0x30, 0x64, 0x19, 0x25, 0xf5, 0xf2, 0x9d, 0xe4, 0x1b, 0x80, - 0x0c, 0xed, 0xd3, 0x37, 0x53, 0xb9, 0x33, 0xc1, 0x2f, 0x25, 0xb4, 0x09, 0xf9, 0xb7, 0xd1, 0x90, - 0xd3, 0x34, 0xfb, 0xd7, 0x96, 0x55, 0xf4, 0x23, 0x57, 0xa7, 0xb2, 0xea, 0xe7, 0xa1, 0xbd, 0x68, - 0x69, 0xc2, 0x97, 0x76, 0xef, 0x7a, 0x66, 0xaa, 0x37, 0x33, 0x53, 0xfd, 0x39, 0x33, 0xd5, 0xcf, - 0x73, 0x53, 0xb9, 0x99, 0x9b, 0xca, 0x8f, 0xb9, 0xa9, 0xbc, 0x7f, 0x1d, 0x46, 0xfc, 0xf4, 0xbc, - 0xef, 0x04, 0x6c, 0xe4, 0xc2, 0xce, 0xbc, 0x88, 0x29, 0xbf, 0x60, 0xe9, 0xa0, 0x88, 0xfc, 0x24, - 0x72, 0x43, 0xe6, 0xc6, 0x8c, 0xd0, 0x3f, 0x9e, 0x9d, 0xfe, 0x1a, 0xbc, 0x0d, 0xfb, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x39, 0x50, 0x38, 0x67, 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 + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3f, 0x4b, 0xf3, 0x40, + 0x18, 0xc0, 0x93, 0xb4, 0x7d, 0x79, 0x9b, 0x8a, 0x43, 0xe8, 0x10, 0x5b, 0x9a, 0x8b, 0x71, 0xc9, + 0x74, 0xc1, 0x5a, 0x97, 0x3a, 0x19, 0x0a, 0xa5, 0x20, 0x08, 0xa9, 0x93, 0x8b, 0x5c, 0x73, 0x47, + 0x0c, 0x69, 0x7b, 0x21, 0x3d, 0x85, 0x7e, 0x0b, 0x47, 0x17, 0xa1, 0x1f, 0xa7, 0x63, 0x47, 0xa7, + 0x43, 0xd2, 0x45, 0x3a, 0xf6, 0x13, 0xc8, 0x5d, 0x22, 0x4a, 0x71, 0xbb, 0xe7, 0xe1, 0x77, 0xbf, + 0xe7, 0x9f, 0x6e, 0xa3, 0x04, 0x2d, 0x1e, 0xbd, 0x19, 0xca, 0x12, 0xc2, 0xbc, 0xe7, 0xf3, 0x09, + 0x61, 0xe8, 0xd2, 0xa3, 0x19, 0x26, 0x19, 0x4c, 0x33, 0xca, 0xa8, 0xd1, 0x94, 0x04, 0x2c, 0x08, + 0x58, 0x12, 0xad, 0x66, 0x44, 0x23, 0x2a, 0x01, 0x4f, 0xbc, 0x0a, 0xb6, 0xe5, 0x16, 0x36, 0x4c, + 0xd2, 0x29, 0x5d, 0xce, 0xc8, 0xfc, 0xdb, 0xd8, 0xf3, 0xa2, 0x8c, 0x3e, 0xa5, 0x8b, 0x94, 0x84, + 0x25, 0xd9, 0x3e, 0xa8, 0xfb, 0xbb, 0xa4, 0xf3, 0xa6, 0xe9, 0xb5, 0x5b, 0x11, 0x1b, 0x43, 0x5d, + 0x8b, 0xb1, 0xa9, 0xda, 0xaa, 0xdb, 0xe8, 0x9a, 0xf0, 0xa0, 0x13, 0x28, 0x99, 0xd1, 0xc0, 0xef, + 0xac, 0x39, 0x50, 0x72, 0x0e, 0xb4, 0xd1, 0x60, 0xc7, 0x81, 0x16, 0xe3, 0x3d, 0x07, 0xf5, 0x25, + 0x9a, 0x4d, 0xfb, 0x4e, 0x8c, 0x9d, 0x40, 0x8b, 0xb1, 0x71, 0xa3, 0xd7, 0x16, 0x0c, 0x31, 0x62, + 0x6a, 0xb6, 0xea, 0x1e, 0x77, 0xdb, 0x7f, 0xbb, 0xc6, 0x02, 0xf1, 0x4f, 0x76, 0x1c, 0x14, 0xf4, + 0x9e, 0x83, 0xa3, 0xc2, 0x23, 0x43, 0x27, 0x28, 0xd2, 0xc6, 0x9d, 0x5e, 0x15, 0xb3, 0x98, 0x15, + 0xd9, 0xd8, 0x59, 0x29, 0xfb, 0x19, 0xbb, 0x5c, 0x53, 0x0f, 0x0e, 0xc5, 0xd8, 0xe3, 0x94, 0x84, + 0x7e, 0x5b, 0xf4, 0xb8, 0xe3, 0x40, 0x7e, 0xdc, 0x73, 0xd0, 0x28, 0xbd, 0x29, 0x09, 0x9d, 0x40, + 0x26, 0x8d, 0x8e, 0xae, 0x87, 0x19, 0x41, 0x8c, 0xe0, 0x07, 0xc4, 0xcc, 0xaa, 0xad, 0xba, 0x95, + 0xa0, 0x5e, 0x66, 0xae, 0x59, 0xff, 0xff, 0xeb, 0x0a, 0x28, 0x9f, 0x2b, 0xa0, 0xf8, 0x57, 0xeb, + 0xdc, 0x52, 0x37, 0xb9, 0xa5, 0x7e, 0xe4, 0x96, 0xfa, 0xb2, 0xb5, 0x94, 0xcd, 0xd6, 0x52, 0xde, + 0xb7, 0x96, 0x72, 0x7f, 0x9a, 0x26, 0x11, 0x44, 0x09, 0x83, 0xb1, 0xb8, 0x8b, 0x37, 0xa7, 0x98, + 0x1c, 0xdc, 0x76, 0xf2, 0x4f, 0xee, 0xf8, 0xe2, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x48, 0x80, 0xed, + 0x3f, 0xfa, 0x01, 0x00, 0x00, } func (m *Order) Marshal() (dAtA []byte, err error) { @@ -409,7 +167,7 @@ func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x10 } { - size, err := m.OrderID.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ID.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -421,58 +179,6 @@ func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 @@ -484,35 +190,13 @@ func encodeVarintOrder(dAtA []byte, offset int, v uint64) int { 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() + l = m.ID.Size() n += 1 + l + sovOrder(uint64(l)) if m.State != 0 { n += 1 + sovOrder(uint64(m.State)) @@ -525,177 +209,12 @@ func (m *Order) Size() (n int) { 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 @@ -727,7 +246,7 @@ func (m *Order) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrderID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -754,7 +273,7 @@ func (m *Order) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.OrderID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -772,7 +291,7 @@ func (m *Order) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= Order_State(b&0x7F) << shift + m.State |= v1.OrderState(b&0x7F) << shift if b < 0x80 { break } @@ -850,177 +369,6 @@ func (m *Order) Unmarshal(dAtA []byte) error { } 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 diff --git a/go/node/market/v1beta5/params.pb.go b/go/node/market/v1beta5/params.pb.go index 0a9b5549..8d6a869b 100644 --- a/go/node/market/v1beta5/params.pb.go +++ b/go/node/market/v1beta5/params.pb.go @@ -6,8 +6,8 @@ package v1beta5 import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -84,27 +84,26 @@ func init() { func init() { proto.RegisterFile("akash/market/v1beta5/params.proto", fileDescriptor_5db3b08f7b20cd98) } var fileDescriptor_5db3b08f7b20cd98 = []byte{ - // 322 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, 0x82, 0x18, 0x80, 0x2d, 0xb0, 0x56, 0xa0, 0xb2, 0xb1, 0x44, 0x76, 0x6d, 0xa5, 0x56, - 0x71, 0xbe, 0x28, 0x0e, 0x50, 0x7e, 0x00, 0x3b, 0x3f, 0xab, 0x63, 0x47, 0x26, 0x0b, 0xa5, 0x5b, - 0xc7, 0xf2, 0x07, 0x50, 0x93, 0x0c, 0x25, 0x9b, 0xed, 0xf7, 0x79, 0x9f, 0x4f, 0xfa, 0xec, 0x1f, - 0xf3, 0x05, 0xb7, 0x73, 0x66, 0x78, 0xb6, 0x50, 0x39, 0x7b, 0x1e, 0x0b, 0x95, 0xf3, 0x73, 0x96, - 0xf2, 0x8c, 0x1b, 0x4b, 0xd3, 0x0c, 0x72, 0xe8, 0xf6, 0x4a, 0x84, 0x56, 0x08, 0xad, 0x91, 0x41, - 0x2f, 0x86, 0x18, 0x4a, 0x80, 0xed, 0x4f, 0x15, 0x3b, 0xc0, 0x33, 0xb0, 0x06, 0x2c, 0x13, 0xdc, - 0xaa, 0xda, 0x36, 0x66, 0x33, 0xd0, 0x49, 0x95, 0x07, 0x5f, 0xc8, 0x6f, 0xdd, 0x95, 0xf2, 0xee, - 0x1b, 0xf2, 0xff, 0x0a, 0x2d, 0x23, 0xa3, 0x93, 0x48, 0xaa, 0x14, 0xac, 0xce, 0xfb, 0x68, 0x88, - 0x46, 0xbf, 0x4f, 0x8f, 0x68, 0x65, 0xa1, 0x7b, 0x4b, 0x3d, 0x70, 0x4c, 0xaf, 0x41, 0x27, 0x61, - 0xb8, 0x72, 0xc4, 0x2b, 0x1c, 0xe9, 0x84, 0x5a, 0x4e, 0x74, 0x72, 0x53, 0xf5, 0xb6, 0x8e, 0x34, - 0x55, 0x3b, 0x47, 0xfe, 0xbf, 0x72, 0xf3, 0x78, 0x19, 0x34, 0x82, 0x60, 0xda, 0x11, 0x87, 0xdd, - 0x2e, 0xf7, 0xff, 0x40, 0x26, 0x55, 0x16, 0x19, 0xbe, 0x8c, 0x84, 0x96, 0xb6, 0xff, 0x6b, 0x88, - 0x46, 0x9d, 0xf0, 0xaa, 0x70, 0xa4, 0x7d, 0xbb, 0x4f, 0x26, 0x7c, 0x19, 0x6a, 0x69, 0xb7, 0x8e, - 0x34, 0xc8, 0x9d, 0x23, 0xff, 0xaa, 0x21, 0x3f, 0xdf, 0x83, 0x69, 0x1b, 0x0e, 0x8a, 0xe1, 0xfd, - 0xaa, 0xc0, 0x68, 0x5d, 0x60, 0xf4, 0x59, 0x60, 0xf4, 0xbe, 0xc1, 0xde, 0x7a, 0x83, 0xbd, 0x8f, - 0x0d, 0xf6, 0x1e, 0x2e, 0x62, 0x9d, 0xcf, 0x9f, 0x04, 0x9d, 0x81, 0x61, 0xe5, 0x9a, 0x4f, 0x12, - 0x95, 0xbf, 0x40, 0xb6, 0xa8, 0x6f, 0x3c, 0xd5, 0x2c, 0x06, 0x96, 0x80, 0x54, 0x8d, 0x3f, 0x12, - 0xad, 0x72, 0xa3, 0x67, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x40, 0x96, 0xab, 0xc2, 0x01, + // 306 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x31, 0x4f, 0xf3, 0x30, + 0x10, 0x86, 0xe3, 0x6f, 0xe8, 0x90, 0xaf, 0x05, 0xa9, 0x2a, 0xa8, 0x74, 0xb0, 0xdb, 0x4c, 0x9d, + 0x6c, 0x15, 0xc4, 0x42, 0xb7, 0xc0, 0x5a, 0x81, 0x3a, 0xb2, 0x44, 0x97, 0x3a, 0x2a, 0x56, 0x48, + 0x2e, 0x8a, 0x23, 0x54, 0x7e, 0x00, 0x3b, 0x3f, 0xab, 0x63, 0x47, 0x26, 0x0b, 0xa5, 0x5b, 0xc7, + 0xf2, 0x07, 0x50, 0xe2, 0x0c, 0x25, 0x9b, 0xe5, 0xf7, 0x79, 0x9f, 0x93, 0xee, 0xdc, 0x09, 0xc4, + 0xa0, 0x5f, 0x44, 0x02, 0x79, 0x1c, 0x15, 0xe2, 0x6d, 0x16, 0x46, 0x05, 0xdc, 0x8a, 0x0c, 0x72, + 0x48, 0x34, 0xcf, 0x72, 0x2c, 0xb0, 0x3f, 0xa8, 0x11, 0x6e, 0x11, 0xde, 0x20, 0xa3, 0xc1, 0x1a, + 0xd7, 0x58, 0x03, 0xa2, 0x7a, 0x59, 0x76, 0x44, 0x57, 0xa8, 0x13, 0xd4, 0x22, 0x04, 0x1d, 0x35, + 0xb6, 0x99, 0x58, 0xa1, 0x4a, 0x6d, 0xee, 0xfd, 0x10, 0xb7, 0xf3, 0x54, 0xcb, 0xfb, 0x1f, 0xc4, + 0x3d, 0x0f, 0x95, 0x0c, 0x12, 0x95, 0x06, 0x32, 0xca, 0x50, 0xab, 0x62, 0x48, 0xc6, 0x64, 0xfa, + 0xff, 0xfa, 0x8a, 0x5b, 0x0b, 0xaf, 0x2c, 0xcd, 0xc0, 0x19, 0xbf, 0x47, 0x95, 0xfa, 0xfe, 0xd6, + 0x30, 0xa7, 0x34, 0xac, 0xe7, 0x2b, 0xb9, 0x50, 0xe9, 0x83, 0xed, 0x1d, 0x0c, 0x6b, 0xab, 0x8e, + 0x86, 0x5d, 0xbe, 0x43, 0xf2, 0x7a, 0xe7, 0xb5, 0x02, 0x6f, 0xd9, 0x0b, 0x4f, 0xbb, 0x7d, 0x70, + 0xcf, 0x30, 0x97, 0x51, 0x1e, 0x24, 0xb0, 0x09, 0x42, 0x25, 0xf5, 0xf0, 0xdf, 0x98, 0x4c, 0x7b, + 0xfe, 0xbc, 0x34, 0xac, 0xfb, 0x58, 0x25, 0x0b, 0xd8, 0xf8, 0x4a, 0xea, 0x83, 0x61, 0x2d, 0xf2, + 0x68, 0xd8, 0x85, 0x1d, 0xf2, 0xf7, 0xdf, 0x5b, 0x76, 0xf1, 0xa4, 0xe8, 0xcf, 0xb7, 0x25, 0x25, + 0xbb, 0x92, 0x92, 0xef, 0x92, 0x92, 0xcf, 0x3d, 0x75, 0x76, 0x7b, 0xea, 0x7c, 0xed, 0xa9, 0xf3, + 0x3c, 0xc9, 0xe2, 0x35, 0x87, 0xb8, 0xe0, 0xaa, 0x5a, 0xa3, 0x48, 0x51, 0x46, 0xad, 0x5b, 0x84, + 0x9d, 0x7a, 0x73, 0x37, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x12, 0x73, 0x32, 0xaa, 0x01, 0x00, 0x00, } diff --git a/go/node/market/v1beta5/query.pb.go b/go/node/market/v1beta5/query.pb.go index fc60e31a..4cf2d8e9 100644 --- a/go/node/market/v1beta5/query.pb.go +++ b/go/node/market/v1beta5/query.pb.go @@ -6,11 +6,10 @@ package v1beta5 import ( context "context" fmt "fmt" - v1beta3 "github.com/akash-network/akash-api/go/node/escrow/v1beta3" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -18,6 +17,8 @@ import ( io "io" math "math" math_bits "math/bits" + v11 "pkg.akt.io/go/node/escrow/v1" + v1 "pkg.akt.io/go/node/market/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -33,7 +34,7 @@ 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"` + Filters v1.OrderFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -70,11 +71,11 @@ func (m *QueryOrdersRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryOrdersRequest proto.InternalMessageInfo -func (m *QueryOrdersRequest) GetFilters() OrderFilters { +func (m *QueryOrdersRequest) GetFilters() v1.OrderFilters { if m != nil { return m.Filters } - return OrderFilters{} + return v1.OrderFilters{} } func (m *QueryOrdersRequest) GetPagination() *query.PageRequest { @@ -139,7 +140,7 @@ func (m *QueryOrdersResponse) GetPagination() *query.PageResponse { // QueryOrderRequest is request type for the Query/Order RPC method type QueryOrderRequest struct { - ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` + ID v1.OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` } func (m *QueryOrderRequest) Reset() { *m = QueryOrderRequest{} } @@ -175,11 +176,11 @@ func (m *QueryOrderRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryOrderRequest proto.InternalMessageInfo -func (m *QueryOrderRequest) GetID() OrderID { +func (m *QueryOrderRequest) GetID() v1.OrderID { if m != nil { return m.ID } - return OrderID{} + return v1.OrderID{} } // QueryOrderResponse is response type for the Query/Order RPC method @@ -229,7 +230,7 @@ func (m *QueryOrderResponse) GetOrder() 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"` + Filters v1.BidFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -266,11 +267,11 @@ func (m *QueryBidsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBidsRequest proto.InternalMessageInfo -func (m *QueryBidsRequest) GetFilters() BidFilters { +func (m *QueryBidsRequest) GetFilters() v1.BidFilters { if m != nil { return m.Filters } - return BidFilters{} + return v1.BidFilters{} } func (m *QueryBidsRequest) GetPagination() *query.PageRequest { @@ -335,7 +336,7 @@ func (m *QueryBidsResponse) GetPagination() *query.PageResponse { // QueryBidRequest is request type for the Query/Bid RPC method type QueryBidRequest struct { - ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` + ID v1.BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` } func (m *QueryBidRequest) Reset() { *m = QueryBidRequest{} } @@ -371,17 +372,17 @@ func (m *QueryBidRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBidRequest proto.InternalMessageInfo -func (m *QueryBidRequest) GetID() BidID { +func (m *QueryBidRequest) GetID() v1.BidID { if m != nil { return m.ID } - return BidID{} + return v1.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"` + Bid Bid `protobuf:"bytes,1,opt,name=bid,proto3" json:"bid"` + EscrowAccount v11.Account `protobuf:"bytes,2,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account"` } func (m *QueryBidResponse) Reset() { *m = QueryBidResponse{} } @@ -424,16 +425,16 @@ func (m *QueryBidResponse) GetBid() Bid { return Bid{} } -func (m *QueryBidResponse) GetEscrowAccount() v1beta3.Account { +func (m *QueryBidResponse) GetEscrowAccount() v11.Account { if m != nil { return m.EscrowAccount } - return v1beta3.Account{} + return v11.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"` + Filters v1.LeaseFilters `protobuf:"bytes,1,opt,name=filters,proto3" json:"filters"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -470,11 +471,11 @@ func (m *QueryLeasesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryLeasesRequest proto.InternalMessageInfo -func (m *QueryLeasesRequest) GetFilters() LeaseFilters { +func (m *QueryLeasesRequest) GetFilters() v1.LeaseFilters { if m != nil { return m.Filters } - return LeaseFilters{} + return v1.LeaseFilters{} } func (m *QueryLeasesRequest) GetPagination() *query.PageRequest { @@ -539,7 +540,7 @@ func (m *QueryLeasesResponse) GetPagination() *query.PageResponse { // QueryLeaseRequest is request type for the Query/Lease RPC method type QueryLeaseRequest struct { - ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` + ID v1.LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` } func (m *QueryLeaseRequest) Reset() { *m = QueryLeaseRequest{} } @@ -575,17 +576,17 @@ func (m *QueryLeaseRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryLeaseRequest proto.InternalMessageInfo -func (m *QueryLeaseRequest) GetID() LeaseID { +func (m *QueryLeaseRequest) GetID() v1.LeaseID { if m != nil { return m.ID } - return LeaseID{} + return v1.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"` + Lease v1.Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease"` + EscrowPayment v11.FractionalPayment `protobuf:"bytes,2,opt,name=escrow_payment,json=escrowPayment,proto3" json:"escrow_payment"` } func (m *QueryLeaseResponse) Reset() { *m = QueryLeaseResponse{} } @@ -621,18 +622,18 @@ func (m *QueryLeaseResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryLeaseResponse proto.InternalMessageInfo -func (m *QueryLeaseResponse) GetLease() Lease { +func (m *QueryLeaseResponse) GetLease() v1.Lease { if m != nil { return m.Lease } - return Lease{} + return v1.Lease{} } -func (m *QueryLeaseResponse) GetEscrowPayment() v1beta3.FractionalPayment { +func (m *QueryLeaseResponse) GetEscrowPayment() v11.FractionalPayment { if m != nil { return m.EscrowPayment } - return v1beta3.FractionalPayment{} + return v11.FractionalPayment{} } func init() { @@ -653,58 +654,58 @@ func init() { func init() { proto.RegisterFile("akash/market/v1beta5/query.proto", fileDescriptor_4fc8c96bdc37dc38) } var fileDescriptor_4fc8c96bdc37dc38 = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4f, 0x13, 0x4d, - 0x18, 0xee, 0x16, 0xe8, 0x97, 0x0c, 0xf9, 0xf8, 0xbe, 0x6f, 0x3e, 0x0e, 0x58, 0xb4, 0x85, 0x1a, - 0x69, 0x31, 0x71, 0x37, 0x40, 0x0c, 0xe1, 0x86, 0x2b, 0xa9, 0x81, 0xf8, 0x03, 0xab, 0x27, 0x2f, - 0x66, 0xda, 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, 0xcc, 0xbb, 0xfd, 0x95, 0xed, 0x6e, 0x49, 0xe0, 0x06, 0xdd, 0xe7, 0x7d, 0xe7, - 0x79, 0x9f, 0xf7, 0x99, 0x67, 0x17, 0xcd, 0x91, 0x3d, 0x22, 0x76, 0xad, 0x06, 0xf1, 0xf7, 0x68, - 0x60, 0xbd, 0x58, 0xaa, 0xd2, 0x80, 0xdc, 0xb6, 0xf6, 0x5b, 0xd4, 0x3f, 0x34, 0x9b, 0x3e, 0x0f, - 0x38, 0x9e, 0x56, 0x08, 0x53, 0x23, 0x4c, 0x40, 0x64, 0xa7, 0x5d, 0xee, 0x72, 0x05, 0xb0, 0xe4, - 0x5f, 0x1a, 0x9b, 0xbd, 0xea, 0x72, 0xee, 0xd6, 0xa9, 0x45, 0x9a, 0xcc, 0x22, 0x9e, 0xc7, 0x03, - 0x12, 0x30, 0xee, 0x09, 0x78, 0x7a, 0xb3, 0xc6, 0x45, 0x83, 0x0b, 0xab, 0x4a, 0x04, 0xd5, 0x47, - 0xc0, 0x81, 0x4b, 0x56, 0x93, 0xb8, 0xcc, 0x53, 0x60, 0xc0, 0x02, 0x2f, 0x2a, 0x6a, 0x3e, 0x3f, - 0x00, 0xd8, 0x8a, 0x15, 0x1c, 0x36, 0xa9, 0xe8, 0x47, 0x0c, 0x30, 0xe7, 0xbe, 0x43, 0x7d, 0x40, - 0xe4, 0x22, 0x11, 0x55, 0xe6, 0xc4, 0x76, 0xa8, 0x53, 0x22, 0xa8, 0x46, 0x14, 0x3e, 0x1b, 0x08, - 0x3f, 0x96, 0x44, 0x1f, 0xc9, 0xb6, 0xa2, 0x42, 0xf7, 0x5b, 0x54, 0x04, 0xd8, 0x46, 0x7f, 0xed, - 0xb0, 0x7a, 0x40, 0x7d, 0x31, 0x63, 0xcc, 0x19, 0xa5, 0xc9, 0xe5, 0x82, 0x19, 0x25, 0x92, 0xa9, - 0xaa, 0xca, 0x1a, 0x69, 0x8f, 0x1f, 0x9f, 0xe6, 0x53, 0x95, 0xb0, 0x10, 0x97, 0x11, 0xea, 0x0e, - 0x3d, 0x93, 0x56, 0x6d, 0x16, 0x4c, 0xad, 0x90, 0x29, 0x15, 0x32, 0xf5, 0x12, 0x40, 0x21, 0x73, - 0x9b, 0xb8, 0x14, 0xce, 0xaf, 0xf4, 0x54, 0x16, 0x8e, 0x0c, 0xf4, 0x7f, 0x1f, 0x45, 0xd1, 0xe4, - 0x9e, 0xa0, 0xf8, 0x2e, 0xca, 0x28, 0x2d, 0x24, 0xc5, 0xb1, 0xd2, 0xe4, 0xf2, 0x6c, 0x0c, 0x45, - 0x7b, 0x4a, 0x72, 0xfb, 0xfa, 0x33, 0x9f, 0x81, 0x26, 0x50, 0x8a, 0xef, 0x45, 0x90, 0x2c, 0x26, - 0x92, 0xd4, 0x0c, 0xfa, 0x58, 0x3e, 0x44, 0xff, 0x75, 0x49, 0x86, 0x32, 0xae, 0xa1, 0x34, 0x73, - 0x40, 0xc1, 0x6b, 0x31, 0xf4, 0x36, 0x37, 0x6c, 0x24, 0x09, 0xb6, 0x4f, 0xf3, 0xe9, 0xcd, 0x8d, - 0x4a, 0x9a, 0x39, 0x85, 0x07, 0xbd, 0x7b, 0xe9, 0xcc, 0xbc, 0x8a, 0x26, 0x14, 0x71, 0xe8, 0x19, - 0x3b, 0xb2, 0x5e, 0x87, 0xc6, 0x17, 0x3e, 0x1a, 0xe8, 0x5f, 0xd5, 0xcf, 0x66, 0x4e, 0x67, 0xcb, - 0xeb, 0x83, 0x5b, 0x9e, 0x8b, 0xee, 0x67, 0x33, 0xe7, 0x92, 0x77, 0xfc, 0xc9, 0x00, 0xf9, 0x34, - 0x3d, 0x98, 0x76, 0x1d, 0x8d, 0x57, 0x99, 0x13, 0xee, 0x77, 0x21, 0x9a, 0x5c, 0x58, 0x16, 0x56, - 0x01, 0x45, 0x55, 0x79, 0x71, 0xeb, 0xdd, 0x42, 0xff, 0x74, 0x0f, 0xd2, 0xea, 0xad, 0xf6, 0x2c, - 0x77, 0x76, 0xa8, 0x70, 0x11, 0xab, 0x7d, 0xdf, 0xb3, 0x8b, 0xce, 0xac, 0x4b, 0x68, 0xac, 0xda, - 0x69, 0x77, 0x65, 0x68, 0x3b, 0x98, 0x4e, 0x62, 0xf1, 0x16, 0x9a, 0xd2, 0xe9, 0xf1, 0x9c, 0xd4, - 0x6a, 0xbc, 0xe5, 0x05, 0x30, 0x60, 0xe8, 0x34, 0xfd, 0x10, 0xaa, 0x57, 0xcc, 0x3b, 0x1a, 0x04, - 0x1d, 0xfe, 0xd6, 0x4f, 0xe1, 0xc7, 0x6e, 0x0e, 0xdc, 0x97, 0xe1, 0x70, 0xee, 0x1c, 0x50, 0x55, - 0x97, 0xec, 0x91, 0x2f, 0x61, 0x0e, 0x84, 0x14, 0x41, 0xb9, 0x32, 0xca, 0xa8, 0x44, 0x0b, 0x7d, - 0x52, 0x8a, 0xf1, 0x89, 0x2a, 0x1d, 0x70, 0x0a, 0x54, 0x5f, 0x7c, 0x14, 0xc0, 0x61, 0x23, 0x47, - 0x81, 0xc2, 0x47, 0xf8, 0xe5, 0xa8, 0x6f, 0x37, 0xbd, 0x59, 0xa0, 0x98, 0xc7, 0x5b, 0x50, 0xd5, - 0x84, 0x59, 0xa0, 0xf0, 0xf8, 0x69, 0xc7, 0x37, 0x4d, 0x72, 0xd8, 0xa0, 0x1d, 0xdf, 0x14, 0xa3, - 0x7d, 0x53, 0xf6, 0x49, 0x4d, 0xce, 0x45, 0xea, 0xdb, 0x1a, 0xde, 0xef, 0x20, 0xf8, 0x71, 0xf9, - 0x5b, 0x06, 0x4d, 0x28, 0x96, 0xf8, 0xad, 0x81, 0x20, 0x66, 0x71, 0xdc, 0x2e, 0xfa, 0xde, 0x38, - 0xd9, 0xc5, 0x11, 0x90, 0x7a, 0xf0, 0xc2, 0xe2, 0xeb, 0xef, 0xbf, 0x3f, 0xa4, 0xaf, 0xe3, 0x79, - 0x6b, 0xf8, 0x0b, 0x52, 0x58, 0x75, 0x26, 0x02, 0xfc, 0xc6, 0x40, 0x13, 0xaa, 0x1a, 0x17, 0x93, - 0xfa, 0x87, 0x44, 0x4a, 0xc9, 0xc0, 0x73, 0xf1, 0x60, 0xde, 0x0e, 0xc7, 0xaf, 0x0c, 0x34, 0x2e, - 0xa3, 0x0d, 0x27, 0x84, 0x58, 0x47, 0x8e, 0x62, 0x22, 0x0e, 0x48, 0x14, 0x15, 0x89, 0x79, 0x9c, - 0xb7, 0x86, 0x7d, 0x0b, 0x80, 0x14, 0x2f, 0xd1, 0x98, 0xcd, 0x1c, 0x7c, 0x23, 0x29, 0x45, 0xf5, - 0xf9, 0x23, 0x86, 0xed, 0x48, 0xc7, 0x2b, 0x05, 0xa4, 0x29, 0xf4, 0xc5, 0xc5, 0x89, 0x17, 0x74, - 0x24, 0x53, 0xf4, 0xa7, 0x40, 0xd2, 0x32, 0xf4, 0x1d, 0xef, 0x9a, 0x42, 0x55, 0xc7, 0x9a, 0xa2, - 0xf7, 0xf6, 0x66, 0x47, 0xce, 0x94, 0x11, 0x79, 0x48, 0x49, 0xec, 0x27, 0xc7, 0xed, 0x9c, 0x71, - 0xd2, 0xce, 0x19, 0xbf, 0xda, 0x39, 0xe3, 0xdd, 0x59, 0x2e, 0x75, 0x72, 0x96, 0x4b, 0xfd, 0x38, - 0xcb, 0xa5, 0x9e, 0xad, 0xb9, 0x2c, 0xd8, 0x6d, 0x55, 0xcd, 0x1a, 0x6f, 0xe8, 0x36, 0xb7, 0x3c, - 0x1a, 0x1c, 0x70, 0x7f, 0x0f, 0xfe, 0x93, 0x5f, 0x9f, 0x2e, 0xb7, 0x3c, 0xee, 0xd0, 0x81, 0x03, - 0xaa, 0x19, 0xf5, 0x5d, 0xb7, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0x82, 0x5d, 0x67, 0x29, 0xf7, - 0x0a, 0x00, 0x00, + // 815 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6b, 0x13, 0x5b, + 0x14, 0xce, 0xa4, 0x4d, 0x1e, 0xdc, 0xf2, 0xfa, 0xde, 0xbb, 0xaf, 0x48, 0x9b, 0xda, 0xa4, 0x8d, + 0xd8, 0xa4, 0x2e, 0xe6, 0x92, 0xa8, 0xb8, 0x28, 0x82, 0x8e, 0x6d, 0xa4, 0xa0, 0xb4, 0x66, 0xe9, + 0x46, 0x6e, 0x32, 0xb7, 0xf1, 0x92, 0x74, 0x6e, 0x3a, 0x33, 0xad, 0x74, 0x21, 0x88, 0x20, 0xb8, + 0x70, 0x21, 0xb8, 0x10, 0x11, 0xdc, 0x08, 0x2e, 0xdc, 0xf8, 0x6f, 0x74, 0x59, 0x70, 0xe3, 0xaa, + 0x4a, 0xea, 0x1f, 0x22, 0xf7, 0xde, 0x33, 0x93, 0x1f, 0x9d, 0x64, 0x52, 0x68, 0x77, 0xa5, 0xe7, + 0x3b, 0xe7, 0x7e, 0xe7, 0x3b, 0xdf, 0x39, 0x13, 0xb4, 0x48, 0x9b, 0xd4, 0x7b, 0x4a, 0x76, 0xa8, + 0xdb, 0x64, 0x3e, 0xd9, 0x2f, 0xd5, 0x98, 0x4f, 0x6f, 0x92, 0xdd, 0x3d, 0xe6, 0x1e, 0x98, 0x6d, + 0x57, 0xf8, 0x02, 0xcf, 0x28, 0x84, 0xa9, 0x11, 0x26, 0x20, 0x32, 0x33, 0x0d, 0xd1, 0x10, 0x0a, + 0x40, 0xe4, 0x5f, 0x1a, 0x9b, 0xb9, 0xdc, 0x10, 0xa2, 0xd1, 0x62, 0x84, 0xb6, 0x39, 0xa1, 0x8e, + 0x23, 0x7c, 0xea, 0x73, 0xe1, 0x78, 0x10, 0xbd, 0x56, 0x17, 0xde, 0x8e, 0xf0, 0x48, 0x8d, 0x7a, + 0x4c, 0x3f, 0x01, 0x0f, 0x96, 0x48, 0x9b, 0x36, 0xb8, 0xa3, 0xc0, 0x80, 0x9d, 0xd7, 0xbc, 0x98, + 0x57, 0x77, 0xc5, 0x33, 0xb2, 0x5f, 0x22, 0xfe, 0x41, 0x9b, 0x79, 0xfd, 0xc1, 0x90, 0x34, 0x11, + 0xae, 0xcd, 0x5c, 0x08, 0xce, 0x0d, 0x06, 0x6b, 0xdc, 0x1e, 0x96, 0xd7, 0x62, 0xd4, 0x63, 0x10, + 0x8c, 0x56, 0xa2, 0xb7, 0x72, 0x36, 0x12, 0xd1, 0x2d, 0xbf, 0x30, 0x58, 0x7e, 0x9b, 0xb7, 0x7c, + 0xe6, 0x02, 0xeb, 0xfc, 0x47, 0x03, 0xe1, 0x47, 0xb2, 0xeb, 0x4d, 0x59, 0xd3, 0xab, 0xb2, 0xdd, + 0x3d, 0xe6, 0xf9, 0xf8, 0x36, 0xfa, 0x0b, 0x70, 0xb3, 0xc6, 0xa2, 0x51, 0x9c, 0x2a, 0x2f, 0x98, + 0x03, 0x8a, 0x9b, 0x2a, 0xa1, 0xa2, 0x41, 0xd6, 0xe4, 0xe1, 0x71, 0x2e, 0x51, 0x0d, 0x72, 0x70, + 0x05, 0xa1, 0xae, 0x78, 0xb3, 0x49, 0x55, 0x61, 0xd9, 0xd4, 0x4a, 0x9b, 0x52, 0x69, 0x53, 0x0f, + 0x13, 0x94, 0x36, 0xb7, 0x68, 0x83, 0xc1, 0xd3, 0xd5, 0x9e, 0xcc, 0xfc, 0x67, 0x03, 0xfd, 0xdf, + 0xc7, 0xce, 0x6b, 0x0b, 0xc7, 0x63, 0xf8, 0x1e, 0x4a, 0x2b, 0x0d, 0x24, 0xbb, 0x89, 0xe2, 0x54, + 0x79, 0xde, 0x8c, 0xf2, 0x83, 0xa6, 0x68, 0x4d, 0x4b, 0x6e, 0x5f, 0x7f, 0xe6, 0xd2, 0x50, 0x04, + 0x52, 0xf1, 0xfd, 0x08, 0x92, 0x85, 0x58, 0x92, 0x9a, 0x41, 0x1f, 0xcb, 0x0d, 0xf4, 0x5f, 0x97, + 0x64, 0xa0, 0xe0, 0x0d, 0x94, 0xe4, 0x36, 0x88, 0x37, 0x1b, 0x2d, 0xde, 0xc6, 0x9a, 0x85, 0x24, + 0xb7, 0xce, 0x71, 0x2e, 0xb9, 0xb1, 0x56, 0x4d, 0x72, 0x3b, 0xff, 0xb0, 0x77, 0x1a, 0x61, 0xbb, + 0xb7, 0x50, 0x4a, 0x71, 0x86, 0x72, 0x23, 0xbb, 0xd5, 0x93, 0xd0, 0xf8, 0xfc, 0x7b, 0x03, 0xfd, + 0xab, 0xea, 0x59, 0xdc, 0x0e, 0x67, 0xbb, 0x3a, 0x38, 0xdb, 0x53, 0xf5, 0x4c, 0x8b, 0xdb, 0x17, + 0x3c, 0xd9, 0x4f, 0x06, 0x88, 0xa6, 0x99, 0x41, 0xa3, 0x77, 0xd0, 0x64, 0x8d, 0xdb, 0xc1, 0x54, + 0x97, 0xa3, 0xfb, 0x0c, 0xd2, 0x82, 0x2c, 0xa0, 0xa8, 0x32, 0xcf, 0x6f, 0xa8, 0xeb, 0xe8, 0x9f, + 0xee, 0x43, 0x5a, 0xb8, 0x72, 0xcf, 0x48, 0x2f, 0x45, 0x69, 0x16, 0x31, 0xd0, 0x37, 0x3d, 0x13, + 0x08, 0xdb, 0x2c, 0xa1, 0x89, 0x5a, 0x58, 0x69, 0x2e, 0xba, 0x4b, 0x8b, 0xdb, 0xd0, 0x98, 0xc4, + 0xe2, 0x75, 0x34, 0xad, 0xcf, 0xce, 0x13, 0x5a, 0xaf, 0x8b, 0x3d, 0xc7, 0x87, 0xde, 0x02, 0x6b, + 0xe9, 0xa0, 0xe4, 0x71, 0x57, 0xc7, 0x21, 0xf9, 0x6f, 0x1d, 0x80, 0x7f, 0x76, 0xd7, 0xfd, 0x81, + 0x3c, 0x32, 0x67, 0x59, 0x77, 0x95, 0x70, 0xc1, 0xa6, 0xf8, 0x12, 0xac, 0x7b, 0xc0, 0x0e, 0xf4, + 0xaa, 0xa0, 0xb4, 0x3a, 0x8a, 0x81, 0x31, 0x8a, 0x23, 0x8c, 0xa1, 0x52, 0x07, 0xac, 0x01, 0xd9, + 0xe7, 0xbf, 0xf1, 0xf0, 0xd8, 0x38, 0x1b, 0xaf, 0xa0, 0x11, 0x06, 0xf9, 0xd0, 0x37, 0x91, 0xb0, + 0xe5, 0x32, 0x4a, 0x29, 0xd2, 0x43, 0xed, 0xa6, 0xe0, 0xc1, 0xb6, 0x2b, 0x28, 0xde, 0x0c, 0x3d, + 0xd2, 0xa6, 0x07, 0x3b, 0x2c, 0xf4, 0x48, 0xfe, 0x94, 0x47, 0x2a, 0x2e, 0xad, 0xcb, 0x46, 0x68, + 0x6b, 0x4b, 0x23, 0xfb, 0xdd, 0x02, 0xff, 0x2c, 0x7f, 0x4b, 0xa3, 0x94, 0xe2, 0x86, 0x5f, 0x1b, + 0x08, 0xce, 0x27, 0x1e, 0x25, 0x7e, 0xdf, 0x47, 0x24, 0xb3, 0x32, 0x06, 0x52, 0xb7, 0x9b, 0x5f, + 0x79, 0xf9, 0xfd, 0xf7, 0xbb, 0xe4, 0x15, 0xbc, 0x44, 0x86, 0x7f, 0xf0, 0x3c, 0xd2, 0xe2, 0x9e, + 0x8f, 0x5f, 0x19, 0x28, 0xa5, 0xb2, 0x71, 0x21, 0xae, 0x7e, 0x40, 0xa4, 0x18, 0x0f, 0x3c, 0x13, + 0x0f, 0xee, 0x6c, 0x0b, 0xfc, 0xc2, 0x40, 0x93, 0xf2, 0x78, 0xe1, 0x98, 0x33, 0x15, 0xca, 0x51, + 0x88, 0xc5, 0x01, 0x89, 0x82, 0x22, 0xb1, 0x84, 0x73, 0x64, 0xd8, 0xb7, 0x1d, 0xa4, 0x78, 0x8e, + 0x26, 0x2c, 0x6e, 0xe3, 0xab, 0x71, 0x77, 0x52, 0xbf, 0x3f, 0xe6, 0x39, 0x1d, 0xeb, 0x79, 0xa5, + 0x80, 0x34, 0x85, 0xde, 0x54, 0x1c, 0xbb, 0x91, 0x63, 0x99, 0xa2, 0x7f, 0xed, 0xe3, 0x86, 0xa1, + 0x97, 0xba, 0x6b, 0x0a, 0x95, 0x3d, 0xd2, 0x14, 0xbd, 0xeb, 0x9a, 0x19, 0xfb, 0x88, 0x8c, 0xc9, + 0x43, 0x4a, 0x62, 0xad, 0x1e, 0x76, 0xb2, 0xc6, 0x51, 0x27, 0x6b, 0xfc, 0xea, 0x64, 0x8d, 0xb7, + 0x27, 0xd9, 0xc4, 0xd1, 0x49, 0x36, 0xf1, 0xe3, 0x24, 0x9b, 0x78, 0xbc, 0xd4, 0x6e, 0x36, 0x4c, + 0xda, 0xf4, 0x4d, 0x2e, 0x7f, 0x9c, 0x12, 0x47, 0xd8, 0x6c, 0xa0, 0x50, 0x2d, 0xad, 0x7e, 0x92, + 0x5d, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x06, 0xad, 0x7b, 0x0a, 0xff, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/node/market/v1beta5/query.pb.gw.go b/go/node/market/v1beta5/query.pb.gw.go index 8dda8f4c..5c215e25 100644 --- a/go/node/market/v1beta5/query.pb.gw.go +++ b/go/node/market/v1beta5/query.pb.gw.go @@ -558,17 +558,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "orders", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "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", "v1beta5", "orders", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "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", "v1beta5", "bids", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "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", "v1beta5", "bids", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "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", "v1beta5", "leases", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "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", "v1beta5", "leases", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta5", "leases", "info"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/market/v1beta5/resourcesoffer.pb.go b/go/node/market/v1beta5/resourcesoffer.pb.go new file mode 100644 index 00000000..a12e285d --- /dev/null +++ b/go/node/market/v1beta5/resourcesoffer.pb.go @@ -0,0 +1,391 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/market/v1beta5/resourcesoffer.proto + +package v1beta5 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + v1beta4 "pkg.akt.io/go/node/types/resources/v1beta4" +) + +// 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 + +// ResourceOffer describes resources that provider is offering +// for deployment +type ResourceOffer struct { + Resources v1beta4.Resources `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources" yaml:"resources"` + Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count" yaml:"count"` +} + +func (m *ResourceOffer) Reset() { *m = ResourceOffer{} } +func (m *ResourceOffer) String() string { return proto.CompactTextString(m) } +func (*ResourceOffer) ProtoMessage() {} +func (*ResourceOffer) Descriptor() ([]byte, []int) { + return fileDescriptor_90a800b77898768f, []int{0} +} +func (m *ResourceOffer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceOffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceOffer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResourceOffer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceOffer.Merge(m, src) +} +func (m *ResourceOffer) XXX_Size() int { + return m.Size() +} +func (m *ResourceOffer) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceOffer.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceOffer proto.InternalMessageInfo + +func (m *ResourceOffer) GetResources() v1beta4.Resources { + if m != nil { + return m.Resources + } + return v1beta4.Resources{} +} + +func (m *ResourceOffer) GetCount() uint32 { + if m != nil { + return m.Count + } + return 0 +} + +func init() { + proto.RegisterType((*ResourceOffer)(nil), "akash.market.v1beta5.ResourceOffer") +} + +func init() { + proto.RegisterFile("akash/market/v1beta5/resourcesoffer.proto", fileDescriptor_90a800b77898768f) +} + +var fileDescriptor_90a800b77898768f = []byte{ + // 268 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4c, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0xcf, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, + 0xd5, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, 0xce, 0x4f, 0x4b, 0x4b, 0x2d, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x01, 0x2b, 0xd5, 0x83, 0x28, 0xd5, 0x83, 0x2a, 0x95, + 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x74, 0x20, 0xc6, + 0x26, 0x25, 0x16, 0xa7, 0x22, 0x0c, 0x83, 0x1a, 0x6f, 0x82, 0x10, 0x81, 0xa8, 0x56, 0xda, 0xc2, + 0xc8, 0xc5, 0x1b, 0x04, 0x15, 0xf3, 0x07, 0xd9, 0x28, 0x94, 0xc3, 0xc5, 0x09, 0x57, 0x24, 0xc1, + 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xae, 0x07, 0xb1, 0x1f, 0x64, 0xa6, 0x1e, 0xc2, 0x04, 0xa8, + 0x99, 0x7a, 0x30, 0xfd, 0xc5, 0x4e, 0xaa, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x8f, 0x30, + 0xe1, 0xd3, 0x3d, 0x79, 0x81, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, 0xb8, 0x90, 0x52, 0x10, 0x42, + 0x5a, 0x48, 0x9f, 0x8b, 0x35, 0x39, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x49, 0x81, 0x51, 0x83, 0xd7, + 0x49, 0xf2, 0xd5, 0x3d, 0x79, 0x88, 0xc0, 0xa7, 0x7b, 0xf2, 0x3c, 0x10, 0x8d, 0x60, 0xae, 0x52, + 0x10, 0x44, 0xd8, 0x8a, 0xe5, 0xc5, 0x02, 0x79, 0x46, 0x27, 0xeb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, + 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, + 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x2c, 0xc8, 0x4e, 0xd7, 0x4b, 0xcc, 0x2e, 0xd1, 0xcb, 0x04, + 0x85, 0x8a, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0x5a, 0x10, 0x27, 0xb1, 0x81, 0xbd, 0x6e, 0x0c, 0x08, + 0x00, 0x00, 0xff, 0xff, 0xd7, 0x65, 0x97, 0x33, 0x81, 0x01, 0x00, 0x00, +} + +func (this *ResourceOffer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceOffer) + if !ok { + that2, ok := that.(ResourceOffer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Resources.Equal(&that1.Resources) { + return false + } + if this.Count != that1.Count { + return false + } + return true +} +func (m *ResourceOffer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceOffer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceOffer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Count != 0 { + i = encodeVarintResourcesoffer(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 = encodeVarintResourcesoffer(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintResourcesoffer(dAtA []byte, offset int, v uint64) int { + offset -= sovResourcesoffer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourceOffer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resources.Size() + n += 1 + l + sovResourcesoffer(uint64(l)) + if m.Count != 0 { + n += 1 + sovResourcesoffer(uint64(m.Count)) + } + return n +} + +func sovResourcesoffer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResourcesoffer(x uint64) (n int) { + return sovResourcesoffer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ResourceOffer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResourcesoffer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceOffer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceOffer: 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 ErrIntOverflowResourcesoffer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResourcesoffer + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResourcesoffer + } + 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 ErrIntOverflowResourcesoffer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipResourcesoffer(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResourcesoffer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResourcesoffer(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, ErrIntOverflowResourcesoffer + } + 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, ErrIntOverflowResourcesoffer + } + 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, ErrIntOverflowResourcesoffer + } + 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, ErrInvalidLengthResourcesoffer + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResourcesoffer + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResourcesoffer + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResourcesoffer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResourcesoffer = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResourcesoffer = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/market/v1beta5/service.pb.go b/go/node/market/v1beta5/service.pb.go index ded31681..ca826059 100644 --- a/go/node/market/v1beta5/service.pb.go +++ b/go/node/market/v1beta5/service.pb.go @@ -6,8 +6,9 @@ package v1beta5 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + 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" @@ -30,26 +31,26 @@ func init() { } var fileDescriptor_f1203af46a0757a8 = []byte{ - // 292 bytes of a gzipped FileDescriptorProto + // 302 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, 0xd5, 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, 0x5e, 0x38, 0xfb, 0xfb, - 0xc4, 0x02, 0x00, 0x00, + 0x01, 0xab, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, + 0xd6, 0xcf, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x04, 0x51, 0x10, 0xe5, 0x52, 0x8a, 0x58, 0x8d, 0x4c, + 0xca, 0x4c, 0x41, 0x28, 0x51, 0xc6, 0xaa, 0x24, 0x27, 0x35, 0xb1, 0x38, 0x15, 0xae, 0xc8, 0xe8, + 0x3d, 0x33, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0x50, 0x34, 0x17, 0xa7, 0x73, 0x51, 0x6a, 0x62, 0x49, + 0xaa, 0x53, 0x66, 0x8a, 0x90, 0x92, 0x1e, 0x36, 0xc7, 0xe8, 0xf9, 0x16, 0xa7, 0xc3, 0xd5, 0x48, + 0x69, 0x11, 0x56, 0x13, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x14, 0xc1, 0xc5, 0xe1, + 0x9c, 0x93, 0x5f, 0x0c, 0x36, 0x5b, 0x11, 0xb7, 0x3e, 0xa8, 0x12, 0x29, 0x4d, 0x82, 0x4a, 0xe0, + 0x26, 0xa7, 0x73, 0xf1, 0x86, 0x67, 0x96, 0x64, 0xa4, 0x14, 0x25, 0x96, 0xfb, 0x80, 0x3c, 0x26, + 0xa4, 0x86, 0x53, 0x2f, 0x8a, 0x3a, 0x29, 0x3d, 0xe2, 0xd4, 0xc1, 0x2d, 0x4a, 0xe4, 0xe2, 0x86, + 0xf8, 0x0b, 0x62, 0x8d, 0x0a, 0x01, 0xdf, 0x43, 0x2c, 0xd1, 0x21, 0x46, 0x15, 0xdc, 0x8a, 0x38, + 0x2e, 0x2e, 0xb0, 0xff, 0x20, 0x36, 0x28, 0xe3, 0x0f, 0x04, 0x88, 0x05, 0xda, 0x44, 0x28, 0x82, + 0x99, 0x2f, 0xc5, 0xda, 0xf0, 0x7c, 0x83, 0x16, 0xa3, 0x93, 0xf5, 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, 0x29, 0x16, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0xe6, + 0xeb, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, 0xa7, 0xa4, 0xa2, 0xa5, 0x9e, 0x24, 0x36, 0x70, 0xaa, 0x31, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x95, 0x43, 0x0a, 0xd2, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/node/market/v1beta5/types.go b/go/node/market/v1beta5/types.go index e87eb274..08b402a6 100644 --- a/go/node/market/v1beta5/types.go +++ b/go/node/market/v1beta5/types.go @@ -1,238 +1,13 @@ package v1beta5 import ( - "strings" - - "gopkg.in/yaml.v3" - sdk "github.com/cosmos/cosmos-sdk/types" - - atypes "github.com/akash-network/akash-api/go/node/audit/v1beta4" - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1" ) const ( APIVersion = "v1beta5" ) -// 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 attr.Attributes) 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 attr.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) diff --git a/go/node/provider/v1beta1/codec.go b/go/node/provider/v1beta1/codec.go deleted file mode 100644 index d1f72bde..00000000 --- a/go/node/provider/v1beta1/codec.go +++ /dev/null @@ -1,45 +0,0 @@ -package v1beta1 - -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/v1beta1/errors.go b/go/node/provider/v1beta1/errors.go deleted file mode 100644 index f7674bbb..00000000 --- a/go/node/provider/v1beta1/errors.go +++ /dev/null @@ -1,16 +0,0 @@ -package v1beta1 - -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") - - // ErrInvalidInfoWebsite register error code for invalid info website - ErrInvalidInfoWebsite = errors.New("invalid provider: invalid info website") -) diff --git a/go/node/provider/v1beta1/event.go b/go/node/provider/v1beta1/event.go deleted file mode 100644 index a4e7425e..00000000 --- a/go/node/provider/v1beta1/event.go +++ /dev/null @@ -1,142 +0,0 @@ -package v1beta1 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta1/events_test.go b/go/node/provider/v1beta1/events_test.go deleted file mode 100644 index 469b5400..00000000 --- a/go/node/provider/v1beta1/events_test.go +++ /dev/null @@ -1,193 +0,0 @@ -package v1beta1 - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" - "github.com/stretchr/testify/require" - - "github.com/akash-network/akash-api/go/sdkutil" -) - -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 := 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: evActionProviderCreated, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", - }, - }, - }, - expErr: nil, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderCreated, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "hello", - }, - }, - }, - expErr: errWildcard, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderCreated, - Attributes: []sdk.Attribute{}, - }, - expErr: errWildcard, - }, - - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderUpdated, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", - }, - }, - }, - expErr: nil, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderUpdated, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "hello", - }, - }, - }, - expErr: errWildcard, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderUpdated, - Attributes: []sdk.Attribute{}, - }, - expErr: errWildcard, - }, - - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderDeleted, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "akash1qtqpdszzakz7ugkey7ka2cmss95z26ygar2mgr", - }, - }, - }, - expErr: nil, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: evActionProviderDeleted, - Attributes: []sdk.Attribute{ - { - Key: evOwnerKey, - Value: "hello", - }, - }, - }, - expErr: errWildcard, - }, - { - msg: sdkutil.Event{ - Type: sdkutil.EventTypeMessage, - Module: ModuleName, - Action: 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/v1beta1/key.go b/go/node/provider/v1beta1/key.go deleted file mode 100644 index c9229179..00000000 --- a/go/node/provider/v1beta1/key.go +++ /dev/null @@ -1,12 +0,0 @@ -package v1beta1 - -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/v1beta1/msgs.go b/go/node/provider/v1beta1/msgs.go deleted file mode 100644 index 91eaed39..00000000 --- a/go/node/provider/v1beta1/msgs.go +++ /dev/null @@ -1,190 +0,0 @@ -package v1beta1 - -import ( - "net/url" - - types "github.com/akash-network/akash-api/go/node/types/v1beta1" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/pkg/errors" -) - -const ( - MsgTypeCreateProvider = "create-provider" - MsgTypeUpdateProvider = "update-provider" - MsgTypeDeleteProvider = "delete-provider" -) - -var ( - _, _, _ sdk.Msg = &MsgCreateProvider{}, &MsgUpdateProvider{}, &MsgDeleteProvider{} -) - -var ( - ErrInvalidStorageClass = errors.New("provider: invalid storage class") - ErrUnsupportedAttribute = errors.New("provider: unsupported attribute") -) - -// 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 := validateProviderAttributes(msg.Attributes); 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 := validateProviderAttributes(msg.Attributes); 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 -} - -func validateProviderAttributes(_ types.Attributes) error { - return nil -} diff --git a/go/node/provider/v1beta1/msgs_test.go b/go/node/provider/v1beta1/msgs_test.go deleted file mode 100644 index 4fc08c25..00000000 --- a/go/node/provider/v1beta1/msgs_test.go +++ /dev/null @@ -1,241 +0,0 @@ -package v1beta1 - -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/v1beta1" -) - -func TestConfigPath(t *testing.T) { - type testConfigPath struct { - path string - expErr error - } - tests := []testConfigPath{ - { - 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/v1beta1/provider.pb.go b/go/node/provider/v1beta1/provider.pb.go deleted file mode 100644 index 22daa571..00000000 --- a/go/node/provider/v1beta1/provider.pb.go +++ /dev/null @@ -1,2102 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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/v1beta1/types.go b/go/node/provider/v1beta1/types.go deleted file mode 100644 index feaa0459..00000000 --- a/go/node/provider/v1beta1/types.go +++ /dev/null @@ -1,67 +0,0 @@ -package v1beta1 - -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/v1beta2/codec.go b/go/node/provider/v1beta2/codec.go deleted file mode 100644 index b1ea5f2a..00000000 --- a/go/node/provider/v1beta2/codec.go +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index e6c5c66b..00000000 --- a/go/node/provider/v1beta2/errors.go +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index f10635a7..00000000 --- a/go/node/provider/v1beta2/event.go +++ /dev/null @@ -1,142 +0,0 @@ -package v1beta2 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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/v1beta2/genesis.pb.go b/go/node/provider/v1beta2/genesis.pb.go deleted file mode 100644 index 6284492b..00000000 --- a/go/node/provider/v1beta2/genesis.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/provider/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 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 deleted file mode 100644 index 93b959b0..00000000 --- a/go/node/provider/v1beta2/key.go +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 5a6d4150..00000000 --- a/go/node/provider/v1beta2/msgs.go +++ /dev/null @@ -1,175 +0,0 @@ -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/akash-api/go/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 deleted file mode 100644 index 8e28d016..00000000 --- a/go/node/provider/v1beta2/provider.pb.go +++ /dev/null @@ -1,2101 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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 deleted file mode 100644 index 40c6e8eb..00000000 --- a/go/node/provider/v1beta2/query.pb.go +++ /dev/null @@ -1,1059 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index ded3e913..00000000 --- a/go/node/provider/v1beta2/query.pb.gw.go +++ /dev/null @@ -1,272 +0,0 @@ -// 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index fd76cee0..00000000 --- a/go/node/provider/v1beta2/types.go +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index ff85fe96..00000000 --- a/go/node/provider/v1beta3/codec.go +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 6732bd6d..00000000 --- a/go/node/provider/v1beta3/errors.go +++ /dev/null @@ -1,31 +0,0 @@ -package v1beta3 - -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/v1beta3/event.go b/go/node/provider/v1beta3/event.go deleted file mode 100644 index f41e6ca2..00000000 --- a/go/node/provider/v1beta3/event.go +++ /dev/null @@ -1,142 +0,0 @@ -package v1beta3 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 6adf7fa7..00000000 --- a/go/node/provider/v1beta3/events_test.go +++ /dev/null @@ -1,195 +0,0 @@ -package v1beta3_test - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pkg/errors" - "github.com/stretchr/testify/require" - - types "github.com/akash-network/akash-api/go/node/provider/v1beta3" - "github.com/akash-network/akash-api/go/sdkutil" - _ "github.com/akash-network/akash-api/go/testutil" -) - -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 deleted file mode 100644 index bcc68bdc..00000000 --- a/go/node/provider/v1beta3/genesis.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/provider/v1beta3/genesis.proto - -package v1beta3 - -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 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 deleted file mode 100644 index 0a39047b..00000000 --- a/go/node/provider/v1beta3/key.go +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index e4b638d5..00000000 --- a/go/node/provider/v1beta3/msgs.go +++ /dev/null @@ -1,177 +0,0 @@ -package v1beta3 - -import ( - "net/url" - "regexp" - - 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{} - attributeNameRegexp = regexp.MustCompile(types.AttributeNameRegexpString) -) - -// 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.ValidateWithRegex(attributeNameRegexp); 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.ValidateWithRegex(attributeNameRegexp); 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 deleted file mode 100644 index f20abea6..00000000 --- a/go/node/provider/v1beta3/msgs_test.go +++ /dev/null @@ -1,255 +0,0 @@ -package v1beta3 - -import ( - "fmt" - "net/url" - "testing" - - "github.com/pkg/errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/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: "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("hihi").String(), - HostURI: "https://localhost:3001", - Attributes: []types.Attribute{ - { - Key: "hihi*", - Value: "neh", - }, - }, - }, - expErr: types.ErrInvalidAttributeKey, - }, - { - 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 deleted file mode 100644 index 1f9c018a..00000000 --- a/go/node/provider/v1beta3/provider.pb.go +++ /dev/null @@ -1,2101 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - 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 deleted file mode 100644 index cb79652e..00000000 --- a/go/node/provider/v1beta3/query.pb.go +++ /dev/null @@ -1,1059 +0,0 @@ -// 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" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "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 deleted file mode 100644 index 443f15b6..00000000 --- a/go/node/provider/v1beta3/query.pb.gw.go +++ /dev/null @@ -1,272 +0,0 @@ -// 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(true))) - - 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(true))) -) - -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 deleted file mode 100644 index 28bc0352..00000000 --- a/go/node/provider/v1beta3/types.go +++ /dev/null @@ -1,67 +0,0 @@ -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/provider/v1beta4/codec.go b/go/node/provider/v1beta4/codec.go index 0f6c4e0d..91ded825 100644 --- a/go/node/provider/v1beta4/codec.go +++ b/go/node/provider/v1beta4/codec.go @@ -3,14 +3,11 @@ package v1beta4 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. @@ -20,13 +17,7 @@ var ( ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ) -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} - -// RegisterCodec register concrete types on codec +// RegisterLegacyAminoCodec register concrete types on codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateProvider{}, ModuleName+"/"+MsgTypeCreateProvider, nil) cdc.RegisterConcrete(&MsgUpdateProvider{}, ModuleName+"/"+MsgTypeUpdateProvider, nil) diff --git a/go/node/provider/v1beta4/errors.go b/go/node/provider/v1beta4/errors.go index d9231732..3ee857dd 100644 --- a/go/node/provider/v1beta4/errors.go +++ b/go/node/provider/v1beta4/errors.go @@ -1,7 +1,7 @@ package v1beta4 import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) const ( diff --git a/go/node/provider/v1beta4/event.go b/go/node/provider/v1beta4/event.go index 6a6a46b7..e8d6e34b 100644 --- a/go/node/provider/v1beta4/event.go +++ b/go/node/provider/v1beta4/event.go @@ -3,7 +3,7 @@ package v1beta4 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/akash-network/akash-api/go/sdkutil" + "pkg.akt.io/go/sdkutil" ) const ( diff --git a/go/node/provider/v1beta4/events_test.go b/go/node/provider/v1beta4/events_test.go index 35ed83a7..d18412e2 100644 --- a/go/node/provider/v1beta4/events_test.go +++ b/go/node/provider/v1beta4/events_test.go @@ -8,9 +8,9 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - types "github.com/akash-network/akash-api/go/node/provider/v1beta4" - "github.com/akash-network/akash-api/go/sdkutil" - _ "github.com/akash-network/akash-api/go/testutil" + types "pkg.akt.io/go/node/provider/v1beta4" + "pkg.akt.io/go/sdkutil" + _ "pkg.akt.io/go/testutil" ) var ( diff --git a/go/node/provider/v1beta4/genesis.pb.go b/go/node/provider/v1beta4/genesis.pb.go index f56eb97a..7683d61d 100644 --- a/go/node/provider/v1beta4/genesis.pb.go +++ b/go/node/provider/v1beta4/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,7 +25,7 @@ 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"` + Providers Providers `protobuf:"bytes,1,rep,name=providers,proto3,castrepeated=Providers" json:"providers" yaml:"providers"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -61,7 +61,7 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetProviders() []Provider { +func (m *GenesisState) GetProviders() Providers { if m != nil { return m.Providers } @@ -77,22 +77,21 @@ func init() { } var fileDescriptor_045bfc9d93eb382e = []byte{ - // 226 bytes of a gzipped FileDescriptorProto + // 217 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, 0xd1, 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, 0x45, 0x82, 0x89, 0xec, 0x51, 0x01, - 0x00, 0x00, + 0xd4, 0xc4, 0xc8, 0xc5, 0xe3, 0x0e, 0xb1, 0x26, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xa8, 0x88, 0x8b, + 0x13, 0xa6, 0xa4, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xbb, 0xcd, 0x7a, + 0x01, 0x50, 0x01, 0x27, 0xa3, 0x13, 0xf7, 0xe4, 0x19, 0x5e, 0xdd, 0x93, 0x47, 0x68, 0xfd, 0x74, + 0x4f, 0x5e, 0xa0, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x2e, 0xa4, 0xb4, 0xea, 0xbe, 0x3c, 0x27, + 0x4c, 0x4b, 0x71, 0x10, 0x42, 0xad, 0x93, 0xed, 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, 0x29, 0x17, 0x64, 0xa7, 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, 0x3c, 0xa7, 0x9f, + 0x97, 0x9f, 0x92, 0x8a, 0xe1, 0xa5, 0x24, 0x36, 0xb0, 0x57, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xad, 0xd0, 0x63, 0x35, 0x47, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/provider/v1beta4/migrate/v1beta3.go b/go/node/provider/v1beta4/migrate/v1beta3.go index 040c4c06..88a9c8e1 100644 --- a/go/node/provider/v1beta4/migrate/v1beta3.go +++ b/go/node/provider/v1beta4/migrate/v1beta3.go @@ -2,22 +2,23 @@ package migrate import ( "github.com/akash-network/akash-api/go/node/provider/v1beta3" - "github.com/akash-network/akash-api/go/node/provider/v1beta4" - amigrate "github.com/akash-network/akash-api/go/node/types/attributes/v1/migrate" + + "pkg.akt.io/go/node/provider/v1beta4" + amigrate "pkg.akt.io/go/node/types/attributes/v1/migrate" ) +func ProviderInfoFromV1beta3(from v1beta3.ProviderInfo) v1beta4.Info { + return v1beta4.Info{ + EMail: from.EMail, + Website: from.Website, + } +} + func ProviderFromV1beta3(from v1beta3.Provider) v1beta4.Provider { return v1beta4.Provider{ Owner: from.Owner, HostURI: from.HostURI, Attributes: amigrate.AttributesFromV1Beta3(from.Attributes), - Info: v1beta4.ProviderInfo{}, - } -} - -func ProviderInfoFromV1beta3(from v1beta3.ProviderInfo) v1beta4.ProviderInfo { - return v1beta4.ProviderInfo{ - EMail: from.EMail, - Website: from.Website, + Info: ProviderInfoFromV1beta3(from.Info), } } diff --git a/go/node/provider/v1beta4/msg.pb.go b/go/node/provider/v1beta4/msg.pb.go new file mode 100644 index 00000000..d616e8f3 --- /dev/null +++ b/go/node/provider/v1beta4/msg.pb.go @@ -0,0 +1,1375 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta4/msg.proto + +package v1beta4 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" +) + +// 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 + +// 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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.Attributes" json:"attributes" yaml:"attributes"` + Info Info `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_5c874c91147ead42, []int{0} +} +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() pkg_akt_io_go_node_types_attributes_v1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgCreateProvider) GetInfo() Info { + if m != nil { + return m.Info + } + return Info{} +} + +// 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_5c874c91147ead42, []int{1} +} +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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.Attributes" json:"attributes" yaml:"attributes"` + Info Info `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_5c874c91147ead42, []int{2} +} +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() pkg_akt_io_go_node_types_attributes_v1.Attributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *MsgUpdateProvider) GetInfo() Info { + if m != nil { + return m.Info + } + return Info{} +} + +// 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_5c874c91147ead42, []int{3} +} +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_5c874c91147ead42, []int{4} +} +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_5c874c91147ead42, []int{5} +} +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 + +func init() { + proto.RegisterType((*MsgCreateProvider)(nil), "akash.provider.v1beta4.MsgCreateProvider") + proto.RegisterType((*MsgCreateProviderResponse)(nil), "akash.provider.v1beta4.MsgCreateProviderResponse") + proto.RegisterType((*MsgUpdateProvider)(nil), "akash.provider.v1beta4.MsgUpdateProvider") + proto.RegisterType((*MsgUpdateProviderResponse)(nil), "akash.provider.v1beta4.MsgUpdateProviderResponse") + proto.RegisterType((*MsgDeleteProvider)(nil), "akash.provider.v1beta4.MsgDeleteProvider") + proto.RegisterType((*MsgDeleteProviderResponse)(nil), "akash.provider.v1beta4.MsgDeleteProviderResponse") +} + +func init() { proto.RegisterFile("akash/provider/v1beta4/msg.proto", fileDescriptor_5c874c91147ead42) } + +var fileDescriptor_5c874c91147ead42 = []byte{ + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcc, 0x4e, 0x2c, + 0xce, 0xd0, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, + 0x49, 0x34, 0xd1, 0xcf, 0x2d, 0x4e, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x03, 0xab, + 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, + 0xb1, 0x20, 0xaa, 0xa5, 0xc4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0x41, 0xfa, 0xf5, 0xcb, 0x0c, + 0x11, 0xc6, 0x48, 0x49, 0x42, 0x24, 0xe2, 0x21, 0x3a, 0x20, 0x1c, 0xa8, 0x94, 0x06, 0xc4, 0x0d, + 0x49, 0x89, 0xc5, 0xa9, 0xfa, 0x89, 0x25, 0x25, 0x45, 0x99, 0x49, 0xa5, 0x25, 0xa9, 0xc5, 0x20, + 0xed, 0x70, 0x1e, 0x54, 0xa5, 0x2a, 0x0e, 0xd7, 0xc2, 0x1d, 0x07, 0x56, 0xa6, 0xb4, 0x8c, 0x99, + 0x4b, 0xd0, 0xb7, 0x38, 0xdd, 0xb9, 0x28, 0x35, 0xb1, 0x24, 0x35, 0x00, 0x2a, 0x27, 0xe4, 0xce, + 0xc5, 0x9a, 0x5f, 0x9e, 0x97, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, 0x64, 0xf8, 0xea, + 0x9e, 0x3c, 0x44, 0xe0, 0xd3, 0x3d, 0x79, 0x9e, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, 0x30, 0x57, + 0xe9, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x03, 0x1d, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x83, 0x4b, + 0x8a, 0x32, 0xf3, 0xd2, 0x83, 0x20, 0xca, 0x85, 0x5c, 0xb9, 0x38, 0x32, 0xf2, 0x8b, 0x4b, 0xe2, + 0x4b, 0x8b, 0x32, 0x25, 0x98, 0xc0, 0x66, 0x69, 0x3d, 0xba, 0x27, 0xcf, 0xee, 0x91, 0x5f, 0x5c, + 0x12, 0x1a, 0xe4, 0xf9, 0xea, 0x9e, 0x3c, 0x5c, 0xfa, 0xd3, 0x3d, 0x79, 0x7e, 0x88, 0xc9, 0x30, + 0x11, 0xa5, 0x20, 0x76, 0x10, 0x33, 0xb4, 0x28, 0x53, 0x68, 0x21, 0x23, 0x17, 0x17, 0xc2, 0xbb, + 0x12, 0xcc, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xca, 0x7a, 0x90, 0xe0, 0x06, 0x05, 0x86, 0x1e, 0x42, + 0x56, 0xaf, 0xcc, 0x50, 0xcf, 0x11, 0xc6, 0x73, 0x8a, 0x39, 0x71, 0x4f, 0x9e, 0xe1, 0xd5, 0x3d, + 0x79, 0x24, 0xed, 0x9f, 0xee, 0xc9, 0x0b, 0x42, 0x6c, 0x42, 0x88, 0x29, 0xad, 0xba, 0x2f, 0x6f, + 0x58, 0x90, 0x9d, 0xae, 0x97, 0x98, 0x5d, 0xa2, 0x97, 0x09, 0x8a, 0x26, 0xfd, 0xbc, 0xfc, 0x94, + 0x54, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xd4, 0x90, 0x46, 0x18, 0x5e, 0x1c, 0x84, 0x64, 0xaa, + 0x90, 0x2f, 0x17, 0x4b, 0x66, 0x5e, 0x5a, 0xbe, 0x04, 0x8b, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x8c, + 0x1e, 0xf6, 0xb4, 0xa0, 0xe7, 0x99, 0x97, 0x96, 0xef, 0x24, 0x0d, 0x75, 0x15, 0x58, 0xc7, 0xa7, + 0x7b, 0xf2, 0xdc, 0x10, 0xf7, 0x80, 0x78, 0x4a, 0x41, 0x60, 0x41, 0x2b, 0xbe, 0x17, 0x0b, 0xe4, + 0x19, 0x9a, 0x9e, 0x6f, 0xd0, 0x82, 0x84, 0xa4, 0x92, 0x34, 0x97, 0x24, 0x46, 0x3c, 0x05, 0xa5, + 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0xc2, 0x62, 0x31, 0xb4, 0x20, 0x65, 0x34, 0x16, 0x87, 0x40, + 0x2c, 0xa2, 0xc6, 0x13, 0x3c, 0x16, 0x73, 0xc0, 0x91, 0xe8, 0x92, 0x9a, 0x93, 0x4a, 0x83, 0x48, + 0xc4, 0xe1, 0x14, 0x54, 0xdb, 0x60, 0x4e, 0x71, 0xb2, 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, 0x65, 0x2c, 0xe1, 0x8b, 0x5e, 0xc8, 0x24, 0xb1, 0x81, 0x0b, 0x17, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x1e, 0xc8, 0x49, 0x33, 0x05, 0x00, 0x00, +} + +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 = encodeVarintMsg(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 = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.HostURI) > 0 { + i -= len(m.HostURI) + copy(dAtA[i:], m.HostURI) + i = encodeVarintMsg(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 = encodeVarintMsg(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 = encodeVarintMsg(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 encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +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 + sovMsg(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMsg(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovMsg(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 + sovMsg(uint64(l)) + } + l = len(m.HostURI) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovMsg(uint64(l)) + } + } + l = m.Info.Size() + n += 1 + l + sovMsg(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 + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgDeleteProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1.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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v1.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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + 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 ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + 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 := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrIntOverflowMsg + } + 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, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go/node/provider/v1beta4/msgs.go b/go/node/provider/v1beta4/msgs.go index fa799e9d..af136e9e 100644 --- a/go/node/provider/v1beta4/msgs.go +++ b/go/node/provider/v1beta4/msgs.go @@ -4,11 +4,11 @@ import ( "net/url" "regexp" + cerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/pkg/errors" - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" ) const ( @@ -43,7 +43,7 @@ func (msg MsgCreateProvider) ValidateBasic() error { return err } if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Provider Address") + return cerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgCreate: Invalid Provider Address") } if err := msg.Attributes.ValidateWithRegex(attributeNameRegexp); err != nil { return err @@ -90,7 +90,7 @@ func (msg MsgUpdateProvider) ValidateBasic() error { return err } if _, err := sdk.AccAddressFromBech32(msg.Owner); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdate: Invalid Provider Address") + return cerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdate: Invalid Provider Address") } if err := msg.Attributes.ValidateWithRegex(attributeNameRegexp); err != nil { return err @@ -132,7 +132,7 @@ 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 cerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgDelete: Invalid Provider Address") } return nil } @@ -158,19 +158,19 @@ func validateProviderURI(val string) error { return ErrInvalidProviderURI } if !u.IsAbs() { - return errors.Wrapf(ErrNotAbsProviderURI, "validating %q for absolute URI", val) + return ErrNotAbsProviderURI.Wrapf("validating %q for absolute URI", val) } if u.Scheme != "https" { - return errors.Wrapf(ErrInvalidProviderURI, "scheme in %q should be https", val) + return ErrInvalidProviderURI.Wrapf("scheme in %q should be https", val) } if u.Host == "" { - return errors.Wrapf(ErrInvalidProviderURI, "validating %q for valid host", val) + return ErrInvalidProviderURI.Wrapf("validating %q for valid host", val) } if u.Path != "" { - return errors.Wrapf(ErrInvalidProviderURI, "path in %q should be empty", val) + return ErrInvalidProviderURI.Wrapf("path in %q should be empty", val) } return nil diff --git a/go/node/provider/v1beta4/msgs_test.go b/go/node/provider/v1beta4/msgs_test.go index 61ea9139..9710ca49 100644 --- a/go/node/provider/v1beta4/msgs_test.go +++ b/go/node/provider/v1beta4/msgs_test.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1" + attr "pkg.akt.io/go/node/types/attributes/v1" ) func TestConfigPath(t *testing.T) { @@ -177,7 +177,7 @@ var msgCreateTests = []providerTestParams{ Owner: sdk.AccAddress("hihi").String(), HostURI: "https://localhost:3001", Attributes: attr.Attributes{ - { + attr.Attribute{ Key: "hihi", Value: "neh", }, @@ -190,20 +190,20 @@ var msgCreateTests = []providerTestParams{ Owner: sdk.AccAddress("hihi").String(), HostURI: "https://localhost:3001", Attributes: attr.Attributes{ - { + attr.Attribute{ Key: "hihi*", Value: "neh", }, }, }, - expErr: types.ErrInvalidAttributeKey, + expErr: attr.ErrInvalidAttributeKey, }, { msg: Provider{ Owner: sdk.AccAddress("").String(), HostURI: "https://localhost:3001", Attributes: attr.Attributes{ - { + attr.Attribute{ Key: "hihi", Value: "neh", }, @@ -217,7 +217,7 @@ var msgCreateTests = []providerTestParams{ Owner: sdk.AccAddress("hihi").String(), HostURI: "ht tp://foo.com", Attributes: attr.Attributes{ - { + attr.Attribute{ Key: "hihi", Value: "neh", }, @@ -230,7 +230,7 @@ var msgCreateTests = []providerTestParams{ Owner: sdk.AccAddress("hihi").String(), HostURI: "", Attributes: attr.Attributes{ - { + attr.Attribute{ Key: "hihi", Value: "neh", }, diff --git a/go/node/provider/v1beta4/provider.pb.go b/go/node/provider/v1beta4/provider.pb.go index b8e01aa7..d4a8c3ae 100644 --- a/go/node/provider/v1beta4/provider.pb.go +++ b/go/node/provider/v1beta4/provider.pb.go @@ -4,19 +4,15 @@ package v1beta4 import ( - context "context" fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -30,24 +26,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ProviderInfo -type ProviderInfo struct { +// Info +type Info 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) { +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor_cbb1622664c70e47, []int{0} } -func (m *ProviderInfo) XXX_Unmarshal(b []byte) error { +func (m *Info) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ProviderInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_Info.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -57,338 +53,44 @@ func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *ProviderInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProviderInfo.Merge(m, src) +func (m *Info) XXX_Merge(src proto.Message) { + xxx_messageInfo_Info.Merge(m, src) } -func (m *ProviderInfo) XXX_Size() int { +func (m *Info) XXX_Size() int { return m.Size() } -func (m *ProviderInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ProviderInfo.DiscardUnknown(m) +func (m *Info) XXX_DiscardUnknown() { + xxx_messageInfo_Info.DiscardUnknown(m) } -var xxx_messageInfo_ProviderInfo proto.InternalMessageInfo +var xxx_messageInfo_Info proto.InternalMessageInfo -func (m *ProviderInfo) GetEMail() string { +func (m *Info) GetEMail() string { if m != nil { return m.EMail } return "" } -func (m *ProviderInfo) GetWebsite() string { +func (m *Info) 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_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_cbb1622664c70e47, []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_attributes_v1.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_cbb1622664c70e47, []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_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_cbb1622664c70e47, []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_attributes_v1.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_cbb1622664c70e47, []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_cbb1622664c70e47, []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_cbb1622664c70e47, []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_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes" json:"attributes" yaml:"attributes"` - Info ProviderInfo `protobuf:"bytes,4,opt,name=info,proto3" json:"info" yaml:"info"` + 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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.Attributes" json:"attributes" yaml:"attributes"` + Info Info `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_cbb1622664c70e47, []int{7} + return fileDescriptor_cbb1622664c70e47, []int{1} } func (m *Provider) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -431,28 +133,22 @@ func (m *Provider) GetHostURI() string { return "" } -func (m *Provider) GetAttributes() github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes { +func (m *Provider) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } return nil } -func (m *Provider) GetInfo() ProviderInfo { +func (m *Provider) GetInfo() Info { if m != nil { return m.Info } - return ProviderInfo{} + return Info{} } func init() { - proto.RegisterType((*ProviderInfo)(nil), "akash.provider.v1beta4.ProviderInfo") - proto.RegisterType((*MsgCreateProvider)(nil), "akash.provider.v1beta4.MsgCreateProvider") - proto.RegisterType((*MsgCreateProviderResponse)(nil), "akash.provider.v1beta4.MsgCreateProviderResponse") - proto.RegisterType((*MsgUpdateProvider)(nil), "akash.provider.v1beta4.MsgUpdateProvider") - proto.RegisterType((*MsgUpdateProviderResponse)(nil), "akash.provider.v1beta4.MsgUpdateProviderResponse") - proto.RegisterType((*MsgDeleteProvider)(nil), "akash.provider.v1beta4.MsgDeleteProvider") - proto.RegisterType((*MsgDeleteProviderResponse)(nil), "akash.provider.v1beta4.MsgDeleteProviderResponse") + proto.RegisterType((*Info)(nil), "akash.provider.v1beta4.Info") proto.RegisterType((*Provider)(nil), "akash.provider.v1beta4.Provider") } @@ -461,205 +157,40 @@ func init() { } var fileDescriptor_cbb1622664c70e47 = []byte{ - // 586 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8b, 0xd3, 0x4e, - 0x18, 0x4e, 0xb6, 0xed, 0xaf, 0xfd, 0x4d, 0x97, 0x95, 0x0d, 0x22, 0xdd, 0x2e, 0x66, 0x4a, 0x54, - 0xa8, 0x82, 0x09, 0xad, 0x82, 0xb2, 0x9e, 0xac, 0x2e, 0x58, 0xa1, 0x20, 0x81, 0x5e, 0xbc, 0x48, - 0x62, 0x67, 0xd3, 0xb0, 0x6d, 0x26, 0x64, 0xa6, 0x2d, 0x7b, 0xf4, 0x1b, 0x78, 0xf4, 0xe6, 0x1e, - 0x3c, 0xf9, 0x0d, 0xfc, 0x06, 0x7b, 0xdc, 0x8b, 0xe0, 0x69, 0x94, 0xf6, 0x22, 0x3d, 0xf6, 0x13, - 0x48, 0x66, 0xf2, 0xa7, 0xe9, 0xd6, 0xa2, 0x78, 0xd9, 0xc3, 0xde, 0xf2, 0x3e, 0xf3, 0xbc, 0xef, - 0xf3, 0x32, 0xcf, 0xc3, 0xb4, 0xe0, 0x8e, 0x75, 0x6c, 0x91, 0xbe, 0xe1, 0x07, 0x78, 0xec, 0xf6, - 0x50, 0x60, 0x8c, 0x1b, 0x36, 0xa2, 0xd6, 0xc3, 0x04, 0xd0, 0xfd, 0x00, 0x53, 0xac, 0xdc, 0xe0, - 0x34, 0x3d, 0x41, 0x23, 0x5a, 0xf5, 0xba, 0x83, 0x1d, 0xcc, 0x29, 0x46, 0xf8, 0x25, 0xd8, 0xd5, - 0xba, 0x18, 0x6a, 0x5b, 0x04, 0x19, 0x16, 0xa5, 0x81, 0x6b, 0x8f, 0x28, 0x22, 0xc6, 0xb8, 0x91, - 0x56, 0x82, 0xa9, 0xbd, 0x93, 0xc1, 0xf6, 0xab, 0x68, 0x68, 0xdb, 0x3b, 0xc2, 0xca, 0x63, 0x50, - 0x40, 0x43, 0xcb, 0x1d, 0x54, 0xe4, 0x9a, 0x5c, 0xff, 0xbf, 0xa5, 0x4d, 0x19, 0x2c, 0x1c, 0x76, - 0x2c, 0x77, 0x30, 0x67, 0x50, 0x9c, 0x2c, 0x18, 0xdc, 0x3e, 0xb1, 0x86, 0x83, 0x03, 0x8d, 0x97, - 0x9a, 0x29, 0x60, 0xe5, 0x11, 0x28, 0x4e, 0x90, 0x4d, 0x5c, 0x8a, 0x2a, 0x5b, 0xbc, 0xf7, 0xe6, - 0x9c, 0xc1, 0x18, 0x5a, 0x30, 0xb8, 0x23, 0x9a, 0x22, 0x40, 0x33, 0xe3, 0x23, 0xed, 0x53, 0x0e, - 0xec, 0x76, 0x88, 0xf3, 0x2c, 0x40, 0x16, 0x45, 0xf1, 0x32, 0x8a, 0x01, 0x0a, 0x78, 0xe2, 0xa1, - 0x20, 0x5a, 0x64, 0x2f, 0xd4, 0xe7, 0x40, 0xaa, 0xcf, 0x4b, 0xcd, 0x14, 0xb0, 0x72, 0x08, 0x4a, - 0x7d, 0x4c, 0xe8, 0x9b, 0x51, 0xe0, 0x46, 0x0b, 0xdc, 0x9b, 0x32, 0x58, 0x7c, 0x81, 0x09, 0xed, - 0x9a, 0xed, 0x39, 0x83, 0xc9, 0xf1, 0x82, 0xc1, 0x6b, 0x62, 0x42, 0x8c, 0x68, 0x66, 0x31, 0xfc, - 0xec, 0x06, 0xae, 0xf2, 0x45, 0x06, 0x20, 0xbd, 0xb3, 0x4a, 0xae, 0x96, 0xab, 0x97, 0x9b, 0xb7, - 0x74, 0x71, 0xff, 0xe1, 0x8d, 0xea, 0xe9, 0xa9, 0x3e, 0x6e, 0xe8, 0x4f, 0xe3, 0xaa, 0x45, 0xcf, - 0x18, 0x94, 0xe6, 0x0c, 0x2e, 0xb5, 0x2f, 0x18, 0xdc, 0x15, 0x4a, 0x29, 0xa6, 0x7d, 0xfe, 0x0e, - 0xdb, 0x8e, 0x4b, 0xfb, 0x23, 0x5b, 0x7f, 0x8b, 0x87, 0x06, 0x9f, 0x7c, 0xdf, 0x43, 0x74, 0x82, - 0x83, 0xe3, 0xa8, 0xb2, 0x7c, 0xd7, 0x70, 0xb0, 0xe1, 0xe1, 0x1e, 0x32, 0xe8, 0x89, 0x8f, 0x48, - 0xd6, 0xc6, 0x54, 0x94, 0x98, 0x4b, 0x6a, 0x4a, 0x17, 0xe4, 0x5d, 0xef, 0x08, 0x57, 0xf2, 0x35, - 0xb9, 0x5e, 0x6e, 0xde, 0xd6, 0xd7, 0x87, 0x46, 0x5f, 0x36, 0xbc, 0xb5, 0x1f, 0x6d, 0xcd, 0x3b, - 0x17, 0x0c, 0x96, 0xc5, 0xbe, 0x61, 0xa5, 0x99, 0x1c, 0x3c, 0xc8, 0xff, 0x3c, 0x85, 0x92, 0xb6, - 0x0f, 0xf6, 0x2e, 0xb8, 0x64, 0x22, 0xe2, 0x63, 0x8f, 0x24, 0x1e, 0x76, 0xfd, 0xde, 0x95, 0x87, - 0x97, 0xde, 0xc3, 0xac, 0x4b, 0x89, 0x87, 0x2f, 0xb9, 0x85, 0xcf, 0xd1, 0x00, 0xfd, 0x83, 0x85, - 0x19, 0xa1, 0xec, 0xac, 0x44, 0xe8, 0x63, 0x0e, 0x94, 0xae, 0x32, 0x72, 0xf9, 0x32, 0x52, 0xfa, - 0x70, 0x0a, 0xa5, 0xd0, 0xbe, 0xe6, 0xd7, 0x2d, 0x90, 0xeb, 0x10, 0x47, 0xf1, 0xc0, 0xce, 0xca, - 0xb3, 0x7c, 0xf7, 0x77, 0x62, 0x17, 0xde, 0x86, 0x6a, 0xe3, 0x8f, 0xa9, 0x71, 0x32, 0x42, 0xbd, - 0x95, 0x27, 0x64, 0x93, 0x5e, 0x96, 0xba, 0x51, 0x6f, 0x7d, 0xe4, 0x43, 0xbd, 0x95, 0xbc, 0x6f, - 0xd2, 0xcb, 0x52, 0x37, 0xea, 0xad, 0x4f, 0x7e, 0xab, 0x7b, 0x36, 0x55, 0xe5, 0xf3, 0xa9, 0x2a, - 0xff, 0x98, 0xaa, 0xf2, 0xfb, 0x99, 0x2a, 0x9d, 0xcf, 0x54, 0xe9, 0xdb, 0x4c, 0x95, 0x5e, 0x3f, - 0xf9, 0x8b, 0xa4, 0xac, 0xfe, 0x59, 0xb0, 0xff, 0xe3, 0x3f, 0xe6, 0x0f, 0x7e, 0x05, 0x00, 0x00, - 0xff, 0xff, 0xe7, 0xfa, 0xf6, 0x34, 0x4d, 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/provider.proto", -} - -func (m *ProviderInfo) Marshal() (dAtA []byte, err error) { + // 471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xdf, 0x35, 0x89, 0x89, 0x13, 0x51, 0x5c, 0x8a, 0xc4, 0xaa, 0x3b, 0x61, 0x8a, 0x10, 0x04, + 0x67, 0xd9, 0x2a, 0x28, 0x05, 0x0f, 0x0d, 0x14, 0xed, 0xa1, 0x20, 0x2b, 0xbd, 0x88, 0x50, 0x66, + 0xcd, 0x34, 0x1d, 0x92, 0xec, 0x84, 0x99, 0x69, 0x4a, 0xbe, 0x85, 0x37, 0x3d, 0xd6, 0xab, 0x67, + 0x3f, 0x44, 0x8f, 0xc5, 0x93, 0xa7, 0x51, 0x36, 0x17, 0xc9, 0x71, 0x3f, 0x81, 0xec, 0xcc, 0x6e, + 0xb6, 0x96, 0xdc, 0xe6, 0xf7, 0xe7, 0xcd, 0xef, 0xcd, 0xbc, 0x07, 0x9e, 0x90, 0x11, 0x91, 0x27, + 0xc1, 0x54, 0xf0, 0x19, 0x1b, 0x50, 0x11, 0xcc, 0xc2, 0x98, 0x2a, 0xf2, 0x62, 0x45, 0xe0, 0xa9, + 0xe0, 0x8a, 0x7b, 0xf7, 0x8d, 0x0d, 0xaf, 0xd8, 0xc2, 0xb6, 0xb9, 0x31, 0xe4, 0x43, 0x6e, 0x2c, + 0x41, 0x7e, 0xb2, 0xee, 0xcd, 0x07, 0x9f, 0xb8, 0x9c, 0x70, 0x79, 0x64, 0x05, 0x0b, 0x0a, 0xa9, + 0x67, 0xf3, 0x62, 0x22, 0x69, 0x40, 0x94, 0x12, 0x2c, 0x3e, 0x55, 0x54, 0x06, 0xb3, 0xb0, 0x42, + 0xd6, 0x89, 0xe6, 0xa0, 0xbe, 0x9f, 0x1c, 0x73, 0xef, 0x15, 0x68, 0xd0, 0x09, 0x61, 0xe3, 0x8e, + 0xdb, 0x75, 0x7b, 0xb7, 0xfa, 0x28, 0xd5, 0xb0, 0xb1, 0x77, 0x40, 0xd8, 0x78, 0xa9, 0xa1, 0x55, + 0x32, 0x0d, 0x6f, 0xcf, 0xc9, 0x64, 0xbc, 0x83, 0x0c, 0x44, 0x91, 0xa5, 0xbd, 0x97, 0xa0, 0x79, + 0x46, 0x63, 0xc9, 0x14, 0xed, 0xdc, 0x30, 0xb5, 0x8f, 0x97, 0x1a, 0x96, 0x54, 0xa6, 0xe1, 0x1d, + 0x5b, 0x54, 0x10, 0x28, 0x2a, 0x25, 0xf4, 0xa5, 0x06, 0x5a, 0xef, 0x8a, 0xa7, 0x7a, 0x6f, 0x40, + 0x83, 0x9f, 0x25, 0x54, 0x14, 0xf9, 0x61, 0x1e, 0x6b, 0x88, 0x2a, 0xd6, 0x40, 0xf4, 0xf3, 0xc7, + 0xb3, 0x8d, 0xe2, 0xad, 0xbb, 0x83, 0x81, 0xa0, 0x52, 0xbe, 0x57, 0x82, 0x25, 0xc3, 0xc8, 0xda, + 0xbd, 0x3d, 0xd0, 0x3a, 0xe1, 0x52, 0x1d, 0x9d, 0x0a, 0x56, 0xf4, 0xf3, 0x34, 0xd5, 0xb0, 0xf9, + 0x96, 0x4b, 0x75, 0x18, 0xed, 0x2f, 0x35, 0x5c, 0xc9, 0x99, 0x86, 0x77, 0xed, 0xcd, 0x25, 0x83, + 0xa2, 0x66, 0x7e, 0x3c, 0x14, 0xcc, 0xfb, 0xe6, 0x02, 0x50, 0xfd, 0x5c, 0xa7, 0xd6, 0xad, 0xf5, + 0xda, 0xdb, 0x5b, 0xd8, 0x0e, 0x28, 0xff, 0x57, 0x5c, 0xa9, 0x78, 0x16, 0xe2, 0xdd, 0x12, 0xf5, + 0x3f, 0x5e, 0x68, 0xe8, 0x2c, 0x35, 0xbc, 0x52, 0x9e, 0x69, 0x78, 0xcf, 0x26, 0x55, 0x1c, 0xfa, + 0xfe, 0x1b, 0x86, 0xd3, 0xd1, 0x10, 0x93, 0x91, 0xc2, 0x2c, 0x1f, 0x6c, 0x90, 0xf0, 0x01, 0x0d, + 0xd4, 0x7c, 0x4a, 0xe5, 0xff, 0x43, 0xab, 0x2e, 0x97, 0xd1, 0x95, 0x5b, 0xbd, 0x03, 0x50, 0x67, + 0xc9, 0x31, 0xef, 0xd4, 0xbb, 0x6e, 0xaf, 0xbd, 0xfd, 0x08, 0xaf, 0xdf, 0x1e, 0x9c, 0xcf, 0xb7, + 0xff, 0xb0, 0xe8, 0xca, 0x54, 0x64, 0x1a, 0xb6, 0x6d, 0x3f, 0x39, 0x42, 0x91, 0x21, 0x77, 0x5a, + 0x5f, 0xcf, 0xa1, 0xf3, 0xf7, 0x1c, 0x3a, 0xfd, 0xd7, 0x17, 0xa9, 0xef, 0x5e, 0xa6, 0xbe, 0xfb, + 0x27, 0xf5, 0xdd, 0xcf, 0x0b, 0xdf, 0xb9, 0x5c, 0xf8, 0xce, 0xaf, 0x85, 0xef, 0x7c, 0xd8, 0x5a, + 0xd3, 0xf1, 0xf5, 0xad, 0x8e, 0x6f, 0x9a, 0xd5, 0x7a, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x04, + 0xf1, 0x74, 0x67, 0xf6, 0x02, 0x00, 0x00, +} + +func (m *Info) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -669,12 +200,12 @@ func (m *ProviderInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProviderInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *Info) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -696,7 +227,7 @@ func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgCreateProvider) Marshal() (dAtA []byte, err error) { +func (m *Provider) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -706,12 +237,12 @@ func (m *MsgCreateProvider) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateProvider) MarshalTo(dAtA []byte) (int, error) { +func (m *Provider) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -757,239 +288,18 @@ func (m *MsgCreateProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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++ +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) { +func (m *Info) Size() (n int) { if m == nil { return 0 } @@ -1006,41 +316,7 @@ func (m *ProviderInfo) Size() (n int) { 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) { +func (m *Provider) Size() (n int) { if m == nil { return 0 } @@ -1062,417 +338,16 @@ func (m *MsgUpdateProvider) Size() (n int) { } 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, v1.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 + 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 *MsgUpdateProvider) Unmarshal(dAtA []byte) error { +func (m *Info) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1495,15 +370,15 @@ func (m *MsgUpdateProvider) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateProvider: wiretype end group for non-group") + return fmt.Errorf("proto: Info: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateProvider: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EMail", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1531,210 +406,11 @@ func (m *MsgUpdateProvider) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.EMail = 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, v1.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) + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1762,7 +438,7 @@ func (m *MsgDeleteProvider) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.Website = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1785,56 +461,6 @@ func (m *MsgDeleteProvider) Unmarshal(dAtA []byte) error { } 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 diff --git a/go/node/provider/v1beta4/query.pb.go b/go/node/provider/v1beta4/query.pb.go index 0b15271e..6358bf17 100644 --- a/go/node/provider/v1beta4/query.pb.go +++ b/go/node/provider/v1beta4/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -230,36 +230,35 @@ func init() { } var fileDescriptor_fc667e24f0c91e71 = []byte{ - // 450 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, 0x60, 0x63, 0xcb, 0x00, 0x6b, 0x6b, 0x89, 0x05, 0x06, 0x74, 0x6e, 0x4f, 0x57, - 0xab, 0xf4, 0x9e, 0xe3, 0x73, 0x12, 0x21, 0xc4, 0xc2, 0x27, 0x40, 0x42, 0x2c, 0x7c, 0x04, 0x66, - 0x46, 0x3e, 0x40, 0xc6, 0x48, 0x2c, 0x4c, 0x80, 0x12, 0x3e, 0x08, 0xf2, 0xdd, 0x39, 0x26, 0x69, - 0x22, 0x67, 0xf3, 0xd9, 0xff, 0xf7, 0x7f, 0xbf, 0xf7, 0x3f, 0x3f, 0x1c, 0xf0, 0x0b, 0xae, 0xcf, - 0x59, 0x92, 0xc2, 0x30, 0x3e, 0x13, 0x29, 0x1b, 0x76, 0x22, 0x91, 0xf1, 0x27, 0xac, 0x3f, 0x10, - 0xe9, 0x5b, 0x9a, 0xa4, 0x90, 0x01, 0xd9, 0x35, 0x1a, 0x5a, 0x68, 0xa8, 0xd3, 0x34, 0x1b, 0x12, - 0x24, 0x18, 0x09, 0xcb, 0x9f, 0xac, 0xba, 0x79, 0x5b, 0x02, 0xc8, 0x37, 0x82, 0xf1, 0x24, 0x66, - 0x5c, 0x29, 0xc8, 0x78, 0x16, 0x83, 0xd2, 0xee, 0xeb, 0xc3, 0x53, 0xd0, 0x97, 0xa0, 0x59, 0xc4, - 0xb5, 0xb0, 0x4d, 0x5c, 0xcb, 0x0e, 0x4b, 0xb8, 0x8c, 0x95, 0x11, 0x3b, 0xed, 0xbd, 0x35, 0x6c, - 0x73, 0x10, 0x23, 0x0b, 0x5e, 0xe3, 0x5b, 0x27, 0xb9, 0xd1, 0xb1, 0x7b, 0xad, 0x43, 0xd1, 0x1f, - 0x08, 0x9d, 0x91, 0x67, 0x18, 0x97, 0x9e, 0x7b, 0xa8, 0x85, 0x0e, 0x76, 0xba, 0xf7, 0xa9, 0x05, - 0xa0, 0x39, 0x00, 0xb5, 0x53, 0x3a, 0x00, 0x7a, 0xcc, 0xa5, 0x70, 0xb5, 0xe1, 0x7f, 0x95, 0xc1, - 0x37, 0x84, 0x77, 0x97, 0x3b, 0xe8, 0x04, 0x94, 0x16, 0xe4, 0x04, 0xd7, 0x0b, 0x1a, 0xbd, 0x87, - 0x5a, 0xd7, 0x0e, 0x76, 0xba, 0x2d, 0xba, 0x3a, 0x2e, 0x5a, 0x54, 0xf7, 0x6e, 0x8e, 0x7f, 0xed, - 0x7b, 0x5f, 0x7f, 0xef, 0xd7, 0x4b, 0xbf, 0xd2, 0x85, 0x3c, 0x5f, 0xa0, 0xae, 0x19, 0xea, 0x07, - 0x95, 0xd4, 0x96, 0x67, 0x01, 0xfb, 0x08, 0x37, 0x16, 0xa8, 0x8b, 0x58, 0x1a, 0x78, 0x0b, 0x46, - 0x4a, 0xa4, 0x26, 0x91, 0x7a, 0x68, 0x0f, 0xc1, 0xab, 0xa5, 0x14, 0xe7, 0x23, 0xf6, 0xf0, 0x76, - 0x01, 0xe7, 0x32, 0xac, 0x9e, 0xf0, 0x7a, 0x3e, 0x61, 0x38, 0xaf, 0xeb, 0x7e, 0xaf, 0xe1, 0x2d, - 0xe3, 0x4e, 0x3e, 0x23, 0x5c, 0x8e, 0x4d, 0xda, 0xeb, 0x9c, 0x56, 0x5e, 0x68, 0x93, 0x6e, 0x2a, - 0xb7, 0xe8, 0xc1, 0xe1, 0x87, 0x1f, 0x7f, 0x3f, 0xd5, 0xee, 0x92, 0x3b, 0xac, 0xe2, 0x4f, 0xd2, - 0xe4, 0x0b, 0xc2, 0xdb, 0x85, 0x01, 0x39, 0xda, 0xa8, 0x4f, 0x41, 0xd5, 0xde, 0x50, 0xed, 0xa0, - 0x3a, 0x06, 0xea, 0x11, 0x39, 0xac, 0x84, 0x62, 0xef, 0xcc, 0xd5, 0xbc, 0xef, 0xbd, 0x18, 0x4f, - 0x7d, 0x34, 0x99, 0xfa, 0xe8, 0xcf, 0xd4, 0x47, 0x1f, 0x67, 0xbe, 0x37, 0x99, 0xf9, 0xde, 0xcf, - 0x99, 0xef, 0xbd, 0x7c, 0x2a, 0xe3, 0xec, 0x7c, 0x10, 0xd1, 0x53, 0xb8, 0xb4, 0x76, 0x6d, 0x25, - 0xb2, 0x11, 0xa4, 0x17, 0xee, 0x94, 0x2f, 0xa1, 0x04, 0xa6, 0xe0, 0x4c, 0x5c, 0x69, 0x14, 0xdd, - 0x30, 0xfb, 0xf3, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x60, 0x15, 0x8e, 0x04, 0x04, - 0x00, 0x00, + // 435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xb1, 0x6e, 0xda, 0x40, + 0x18, 0xc7, 0x7d, 0xb4, 0x54, 0x70, 0x4c, 0x3d, 0x51, 0x84, 0x50, 0x65, 0xa8, 0x51, 0x5b, 0x68, + 0xe1, 0x4e, 0xd0, 0xae, 0x5d, 0x18, 0xda, 0x15, 0x3c, 0xb6, 0x43, 0x75, 0x94, 0x93, 0x6b, 0x91, + 0xf8, 0x8c, 0xcf, 0x10, 0x45, 0x51, 0x96, 0x3c, 0x41, 0xa4, 0x28, 0x4b, 0x1e, 0x21, 0x73, 0xc6, + 0x3c, 0x00, 0x23, 0x52, 0x96, 0x4c, 0x49, 0x04, 0x79, 0x90, 0xc8, 0xe7, 0x33, 0x0e, 0x04, 0x64, + 0x36, 0xb0, 0x7f, 0xdf, 0xff, 0xfb, 0x7d, 0xdf, 0xf9, 0xa0, 0x41, 0x87, 0x54, 0xfc, 0x27, 0xae, + 0xc7, 0x27, 0xf6, 0x80, 0x79, 0x64, 0xd2, 0xea, 0x33, 0x9f, 0x7e, 0x27, 0xa3, 0x31, 0xf3, 0x0e, + 0xb1, 0xeb, 0x71, 0x9f, 0xa3, 0x82, 0x64, 0x70, 0xc4, 0x60, 0xc5, 0x94, 0xf2, 0x16, 0xb7, 0xb8, + 0x44, 0x48, 0xf0, 0x2b, 0xa4, 0x4b, 0xef, 0x2d, 0xce, 0xad, 0x3d, 0x46, 0xa8, 0x6b, 0x13, 0xea, + 0x38, 0xdc, 0xa7, 0xbe, 0xcd, 0x1d, 0xa1, 0xde, 0x7e, 0xf9, 0xc7, 0xc5, 0x3e, 0x17, 0xa4, 0x4f, + 0x05, 0x0b, 0x9b, 0xa8, 0x96, 0x2d, 0xe2, 0x52, 0xcb, 0x76, 0x24, 0xac, 0xd8, 0x8f, 0x5b, 0xdc, + 0x96, 0x22, 0x12, 0x33, 0xfe, 0xc2, 0x77, 0xbd, 0x20, 0xa8, 0xab, 0x1e, 0x0b, 0x93, 0x8d, 0xc6, + 0x4c, 0xf8, 0xe8, 0x27, 0x84, 0x71, 0x66, 0x11, 0x54, 0x40, 0x2d, 0xd7, 0xfe, 0x84, 0x43, 0x01, + 0x1c, 0x08, 0xe0, 0x70, 0x4a, 0x25, 0x80, 0xbb, 0xd4, 0x62, 0xaa, 0xd6, 0x7c, 0x56, 0x69, 0x5c, + 0x01, 0x58, 0x58, 0xef, 0x20, 0x5c, 0xee, 0x08, 0x86, 0x7a, 0x30, 0x1b, 0xd9, 0x88, 0x22, 0xa8, + 0xbc, 0xaa, 0xe5, 0xda, 0x15, 0xbc, 0x79, 0x5d, 0x38, 0xaa, 0xee, 0xbc, 0x9d, 0xde, 0x95, 0xb5, + 0xcb, 0xfb, 0x72, 0x36, 0xce, 0x8b, 0x53, 0xd0, 0xaf, 0x15, 0xeb, 0x94, 0xb4, 0xfe, 0x9c, 0x68, + 0x1d, 0xfa, 0xac, 0x68, 0x37, 0x60, 0x7e, 0xc5, 0x3a, 0x5a, 0x4b, 0x1e, 0xa6, 0xf9, 0x81, 0xc3, + 0x3c, 0xb9, 0x91, 0xac, 0x19, 0xfe, 0x31, 0xfe, 0xac, 0x6d, 0x71, 0x39, 0x62, 0x07, 0x66, 0x22, + 0x39, 0xb5, 0xc3, 0xe4, 0x09, 0x5f, 0x07, 0x13, 0x9a, 0xcb, 0xba, 0xf6, 0x75, 0x0a, 0xa6, 0x65, + 0x3a, 0x3a, 0x07, 0x30, 0x1e, 0x1b, 0x35, 0xb7, 0x25, 0x6d, 0x3c, 0xd0, 0x12, 0xde, 0x15, 0x0f, + 0xd5, 0x8d, 0xfa, 0xc9, 0xcd, 0xe3, 0x59, 0xaa, 0x8a, 0x3e, 0x90, 0x84, 0x2f, 0x49, 0xa0, 0x0b, + 0x00, 0x33, 0x51, 0x00, 0x6a, 0xec, 0xd4, 0x27, 0xb2, 0x6a, 0xee, 0x48, 0x2b, 0xa9, 0x96, 0x94, + 0xfa, 0x8a, 0xea, 0x89, 0x52, 0xe4, 0x48, 0x1e, 0xcd, 0x71, 0xe7, 0xc7, 0x74, 0xae, 0x83, 0xd9, + 0x5c, 0x07, 0x0f, 0x73, 0x1d, 0x9c, 0x2e, 0x74, 0x6d, 0xb6, 0xd0, 0xb5, 0xdb, 0x85, 0xae, 0xfd, + 0xae, 0xba, 0x43, 0x0b, 0xd3, 0xa1, 0x8f, 0xed, 0xe0, 0x0e, 0x12, 0x87, 0x0f, 0xd8, 0x8b, 0xc0, + 0xfe, 0x1b, 0x79, 0x4f, 0xbe, 0x3d, 0x05, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xbb, 0x2d, 0x88, 0xec, + 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/node/provider/v1beta4/query.pb.gw.go b/go/node/provider/v1beta4/query.pb.gw.go index 51991e27..da67c303 100644 --- a/go/node/provider/v1beta4/query.pb.gw.go +++ b/go/node/provider/v1beta4/query.pb.gw.go @@ -260,9 +260,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta4", "providers"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta4", "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", "v1beta4", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + 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", "v1beta4", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/node/provider/v1beta4/service.pb.go b/go/node/provider/v1beta4/service.pb.go new file mode 100644 index 00000000..9a4ef64f --- /dev/null +++ b/go/node/provider/v1beta4/service.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: akash/provider/v1beta4/service.proto + +package v1beta4 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + 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/provider/v1beta4/service.proto", fileDescriptor_3b4eb524c9b29aec) +} + +var fileDescriptor_3b4eb524c9b29aec = []byte{ + // 236 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, 0xd1, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x03, 0xab, 0xd2, 0x83, 0xa9, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x4f, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0xcf, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x04, 0x51, 0x10, 0x0d, 0x52, 0x0a, 0x38, + 0x8c, 0x85, 0xab, 0x30, 0xba, 0xc3, 0xc4, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0x94, 0xc7, 0xc5, 0xe7, + 0x5c, 0x94, 0x9a, 0x58, 0x92, 0x1a, 0x00, 0x55, 0x2b, 0xa4, 0xa9, 0x87, 0xdd, 0x36, 0x3d, 0xdf, + 0xe2, 0x74, 0x54, 0xa5, 0x52, 0x86, 0x44, 0x2b, 0x0d, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, + 0x05, 0xd9, 0x17, 0x5a, 0x90, 0x42, 0xac, 0x7d, 0xa8, 0x4a, 0xf1, 0xda, 0x87, 0xaa, 0x14, 0xd9, + 0x3e, 0x97, 0xd4, 0x9c, 0x54, 0x22, 0xed, 0x43, 0x55, 0x8a, 0xd7, 0x3e, 0x54, 0xa5, 0x30, 0xfb, + 0xa4, 0x58, 0x1b, 0x9e, 0x6f, 0xd0, 0x62, 0x74, 0xb2, 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, 0xe5, 0x82, 0xec, 0x74, 0xbd, 0xc4, 0xec, 0x12, 0xbd, 0xcc, 0x7c, 0xfd, + 0xf4, 0x7c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0x8c, 0x78, 0x4a, 0x62, 0x03, 0x47, 0x92, 0x31, 0x20, + 0x00, 0x00, 0xff, 0xff, 0x21, 0x12, 0x02, 0x4f, 0x1f, 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 { + // 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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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.v1beta4.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/v1beta4/service.proto", +} diff --git a/go/node/provider/v1beta4/types.go b/go/node/provider/v1beta4/types.go index a0589864..a5c28743 100644 --- a/go/node/provider/v1beta4/types.go +++ b/go/node/provider/v1beta4/types.go @@ -53,11 +53,11 @@ func (p *Provider) Address() sdk.AccAddress { return owner } -func (m ProviderInfo) IsEmpty() bool { +func (m Info) IsEmpty() bool { return m.EMail == "" && m.Website == "" } -func (m ProviderInfo) Validate() error { +func (m Info) Validate() error { if m.Website != "" { if _, err := url.Parse(m.Website); err != nil { return ErrInvalidInfoWebsite diff --git a/go/node/staking/v1beta3/codec.go b/go/node/staking/v1beta3/codec.go deleted file mode 100644 index cb3f6e09..00000000 --- a/go/node/staking/v1beta3/codec.go +++ /dev/null @@ -1,24 +0,0 @@ -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" -) - -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() { - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} diff --git a/go/node/staking/v1beta3/genesis.pb.go b/go/node/staking/v1beta3/genesis.pb.go index f9addbca..09a49098 100644 --- a/go/node/staking/v1beta3/genesis.pb.go +++ b/go/node/staking/v1beta3/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -77,7 +77,7 @@ func init() { } var fileDescriptor_b23589504e747952 = []byte{ - // 227 bytes of a gzipped FileDescriptorProto + // 209 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x2f, 0x2e, 0x49, 0xcc, 0xce, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, @@ -86,13 +86,12 @@ var fileDescriptor_b23589504e747952 = []byte{ 0x35, 0x50, 0x29, 0x8d, 0x8b, 0xc7, 0x1d, 0x62, 0x43, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x50, 0x18, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x56, 0x0f, 0xab, 0x8d, 0x7a, 0x01, 0x60, 0x45, 0x4e, 0xf2, 0x27, 0xee, 0xc9, 0x33, 0xbc, 0xba, 0x27, 0x0f, 0xd5, 0xf4, 0xe9, - 0x9e, 0x3c, 0x6f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x84, 0xaf, 0x14, 0x04, 0x95, 0x70, 0x0a, + 0x9e, 0x3c, 0x6f, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0x84, 0xaf, 0x14, 0x04, 0x95, 0x70, 0xb2, 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, 0xab, 0xf4, 0xcc, 0x92, 0x8c, - 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xb0, 0x5d, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, - 0xd9, 0x50, 0x5e, 0x62, 0x41, 0xa6, 0x7e, 0x7a, 0xbe, 0x7e, 0x5e, 0x7e, 0x4a, 0x2a, 0xba, 0x57, - 0x92, 0xd8, 0xc0, 0x9e, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xe1, 0x9e, 0x3e, 0x3c, - 0x01, 0x00, 0x00, + 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa5, 0x82, 0xec, 0x74, 0xbd, + 0xc4, 0xec, 0x12, 0xbd, 0x4c, 0x90, 0xe3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0xd1, 0x9d, 0x9c, 0xc4, + 0x06, 0x76, 0xac, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xea, 0xcd, 0x19, 0x14, 0x24, 0x01, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/staking/v1beta3/key.go b/go/node/staking/v1beta3/key.go deleted file mode 100644 index 068ca446..00000000 --- a/go/node/staking/v1beta3/key.go +++ /dev/null @@ -1,15 +0,0 @@ -package v1beta3 - -const ( - // ModuleName is the name of the module - ModuleName = "astaking" - - // StoreKey is the store key string for gov - StoreKey = ModuleName - - // RouterKey is the message route for gov - RouterKey = ModuleName - - // QuerierRoute is the querier route for gov - QuerierRoute = ModuleName -) diff --git a/go/node/staking/v1beta3/params.go b/go/node/staking/v1beta3/params.go deleted file mode 100644 index 2e815882..00000000 --- a/go/node/staking/v1beta3/params.go +++ /dev/null @@ -1,83 +0,0 @@ -package v1beta3 - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -) - -var _ paramtypes.ParamSet = (*Params)(nil) - -var ( - DefaultMinCommissionRate = sdk.NewDecWithPrec(5, 2) -) - -var ( - KeyMinCommissionRate = []byte("MinCommissionRate") -) - -func NewParams(minCommissionRate sdk.Dec) Params { - return Params{ - MinCommissionRate: minCommissionRate, - } -} - -func DefaultParams() Params { - return NewParams(DefaultMinCommissionRate) -} - -// MustUnmarshalParams the current staking params value from store key or panic -func MustUnmarshalParams(cdc *codec.LegacyAmino, value []byte) Params { - params, err := UnmarshalParams(cdc, value) - if err != nil { - panic(err) - } - - return params -} - -// UnmarshalParams the current staking params value from store key -func UnmarshalParams(cdc *codec.LegacyAmino, value []byte) (params Params, err error) { - err = cdc.Unmarshal(value, ¶ms) - if err != nil { - return - } - - return -} - -func (p Params) Validate() error { - if err := validateMinCommissionRate(p.MinCommissionRate); err != nil { - return err - } - - return nil -} - -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeyMinCommissionRate, &p.MinCommissionRate, validateMinCommissionRate), - } -} - -func validateMinCommissionRate(i interface{}) error { - v, ok := i.(sdk.Dec) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if v.IsNegative() { - return fmt.Errorf("min commission rate cannot be negative: %s", v) - } - if v.GT(sdk.OneDec()) { - return fmt.Errorf("min commission rate is too large: %s", v) - } - - return nil -} diff --git a/go/node/staking/v1beta3/params.pb.go b/go/node/staking/v1beta3/params.pb.go index bdb72055..5bf39306 100644 --- a/go/node/staking/v1beta3/params.pb.go +++ b/go/node/staking/v1beta3/params.pb.go @@ -6,8 +6,8 @@ package v1beta3 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -72,7 +72,7 @@ func init() { } var fileDescriptor_2132d2a1c0a6f259 = []byte{ - // 251 bytes of a gzipped FileDescriptorProto + // 242 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x2f, 0x2e, 0x49, 0xcc, 0xce, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, @@ -83,12 +83,12 @@ var fileDescriptor_2132d2a1c0a6f259 = []byte{ 0xb8, 0x75, 0x4f, 0x5e, 0x2d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x18, 0x4a, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xb9, 0xa4, 0x26, 0x7f, 0xba, 0x27, 0x2f, 0x55, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x84, - 0xc5, 0x48, 0xa5, 0x20, 0xc1, 0xdc, 0xcc, 0x3c, 0x67, 0xb8, 0x60, 0x50, 0x62, 0x49, 0xaa, 0x53, - 0xc8, 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, 0x59, 0x21, 0x59, 0x09, 0xf6, - 0x9a, 0x6e, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, 0x58, 0x90, 0xa9, 0x9f, 0x9e, - 0xaf, 0x9f, 0x97, 0x9f, 0x92, 0x8a, 0x1e, 0x30, 0x49, 0x6c, 0x60, 0x5f, 0x1a, 0x03, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xf0, 0x3d, 0xdb, 0x62, 0x38, 0x01, 0x00, 0x00, + 0xc5, 0x48, 0xa5, 0x20, 0xc1, 0xdc, 0xcc, 0x3c, 0x67, 0xb8, 0x60, 0x50, 0x62, 0x49, 0xaa, 0x93, + 0xcd, 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, 0x29, 0x15, 0x64, 0xa7, 0xeb, + 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, 0x5c, 0xae, 0x9f, 0x97, 0x9f, 0x92, 0x8a, 0x1e, 0x00, 0x49, + 0x6c, 0x60, 0xdf, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x24, 0xdf, 0x56, 0x20, 0x01, + 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/go/node/take/v1beta3/errors.go b/go/node/take/v1beta3/errors.go index 61da271a..1b2f621d 100644 --- a/go/node/take/v1beta3/errors.go +++ b/go/node/take/v1beta3/errors.go @@ -1,7 +1,7 @@ package v1beta3 import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdkerrors "cosmossdk.io/errors" ) const ( diff --git a/go/node/take/v1beta3/genesis.pb.go b/go/node/take/v1beta3/genesis.pb.go index 5b110f14..932a7e56 100644 --- a/go/node/take/v1beta3/genesis.pb.go +++ b/go/node/take/v1beta3/genesis.pb.go @@ -5,8 +5,8 @@ package v1beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("akash/take/v1beta3/genesis.proto", fileDescriptor_58ffc0750201d0e9) } var fileDescriptor_58ffc0750201d0e9 = []byte{ - // 224 bytes of a gzipped FileDescriptorProto + // 206 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x2f, 0x49, 0xcc, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xab, @@ -84,12 +84,11 @@ var fileDescriptor_58ffc0750201d0e9 = []byte{ 0xcc, 0xc5, 0xe3, 0x0e, 0x31, 0x3b, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x28, 0x98, 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa5, 0x87, 0x69, 0x97, 0x5e, 0x00, 0x58, 0x85, 0x93, 0xfc, 0x89, 0x7b, 0xf2, 0x0c, 0xaf, 0xee, 0xc9, 0x43, 0x75, 0x7c, 0xba, 0x27, 0xcf, 0x5b, - 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x04, 0xe1, 0x2b, 0x05, 0x41, 0x25, 0x9c, 0x02, 0x4f, 0x3c, 0x92, + 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x04, 0xe1, 0x2b, 0x05, 0x41, 0x25, 0x9c, 0x2c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, - 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x3c, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, - 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0x91, 0x6e, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, - 0x58, 0x90, 0xa9, 0x9f, 0x9e, 0xaf, 0x9f, 0x97, 0x9f, 0x92, 0x8a, 0xe2, 0x89, 0x24, 0x36, 0xb0, - 0xf3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xf9, 0x7d, 0xe7, 0x2d, 0x01, 0x00, 0x00, + 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0xbe, 0x20, 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, + 0x2f, 0x13, 0xe4, 0x6c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, 0x14, 0xc7, 0x26, 0xb1, 0x81, 0x9d, 0x69, + 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xe0, 0xe3, 0x5f, 0x15, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/go/node/take/v1beta3/params.go b/go/node/take/v1beta3/params.go index 9928c9c9..10082a58 100644 --- a/go/node/take/v1beta3/params.go +++ b/go/node/take/v1beta3/params.go @@ -4,7 +4,6 @@ import ( "fmt" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/pkg/errors" ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -51,7 +50,7 @@ func (p Params) Validate() error { func validateTakeRate(i interface{}) error { val, ok := i.(uint32) if !ok { - return errors.Wrapf(ErrInvalidParam, "%T", i) + return ErrInvalidParam.Wrapf("%T", i) } if val > 100 { return fmt.Errorf("invalid Take Rate (%#v)", val) @@ -62,7 +61,7 @@ func validateTakeRate(i interface{}) error { func validateDenomTakeRates(i interface{}) error { takeRates, ok := i.(DenomTakeRates) if !ok { - return errors.Wrapf(ErrInvalidParam, "%T", i) + return ErrInvalidParam.Wrapf("%T", i) } check := make(map[string]uint32) diff --git a/go/node/take/v1beta3/params.pb.go b/go/node/take/v1beta3/params.pb.go index b43aa0f0..261c07a5 100644 --- a/go/node/take/v1beta3/params.pb.go +++ b/go/node/take/v1beta3/params.pb.go @@ -5,8 +5,8 @@ package v1beta3 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -138,30 +138,29 @@ func init() { func init() { proto.RegisterFile("akash/take/v1beta3/params.proto", fileDescriptor_4c72a477131e48ec) } var fileDescriptor_4c72a477131e48ec = []byte{ - // 362 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0x3f, 0x4f, 0xfa, 0x40, - 0x18, 0xee, 0xf1, 0x03, 0x92, 0x5f, 0x11, 0xd0, 0xc6, 0xc4, 0xc6, 0xa1, 0x2f, 0xde, 0xc4, 0x62, - 0x1b, 0x65, 0xd0, 0x38, 0x36, 0x7c, 0x00, 0x6d, 0x4c, 0x4c, 0x5c, 0xc8, 0x61, 0xcf, 0x42, 0x4a, - 0xb9, 0xa6, 0x3d, 0x34, 0x2e, 0x7e, 0x06, 0xbf, 0x82, 0x89, 0x93, 0x9f, 0x84, 0x91, 0xd1, 0xe9, - 0x34, 0x65, 0xeb, 0xd8, 0x4f, 0x60, 0x7a, 0x85, 0x48, 0x61, 0xbb, 0xe7, 0xcf, 0xfb, 0xe4, 0x79, - 0xef, 0x4e, 0x05, 0xe2, 0x93, 0x78, 0x64, 0x71, 0xe2, 0x53, 0xeb, 0xe9, 0x6c, 0x48, 0x39, 0xe9, - 0x59, 0x21, 0x89, 0x48, 0x10, 0x9b, 0x61, 0xc4, 0x38, 0xd3, 0x34, 0x69, 0x30, 0x73, 0x83, 0xb9, - 0x32, 0x1c, 0x1f, 0x7a, 0xcc, 0x63, 0x52, 0xb6, 0xf2, 0x53, 0xe1, 0xc4, 0xaf, 0x6a, 0xb3, 0x4f, - 0xa7, 0x2c, 0xb8, 0x25, 0x3e, 0x75, 0x08, 0xa7, 0xda, 0xa5, 0x5a, 0x73, 0x73, 0x42, 0x47, 0x1d, - 0xd4, 0xfd, 0x6f, 0xe3, 0x44, 0x40, 0x4d, 0x3a, 0x52, 0x01, 0x85, 0x92, 0x09, 0xd8, 0x7b, 0x21, - 0xc1, 0xe4, 0x0a, 0x4b, 0x88, 0x9d, 0x82, 0xd6, 0x7a, 0x6a, 0x35, 0x22, 0x9c, 0xea, 0x95, 0x0e, - 0xea, 0x36, 0x6d, 0x48, 0x04, 0x54, 0xf3, 0xc4, 0x54, 0x80, 0xe4, 0x33, 0x01, 0x8d, 0x62, 0x2c, - 0x47, 0xd8, 0x91, 0x24, 0x7e, 0xaf, 0xa8, 0xf5, 0x6b, 0x59, 0x5d, 0xfb, 0x40, 0xea, 0xbe, 0x4c, - 0x1a, 0xe4, 0xbd, 0x07, 0xb9, 0x1c, 0xeb, 0xa8, 0xf3, 0xaf, 0xdb, 0x38, 0x3f, 0x31, 0x77, 0x17, - 0x32, 0x4b, 0xbd, 0xed, 0xbb, 0xb9, 0x00, 0x25, 0x11, 0xd0, 0x2a, 0xd1, 0x71, 0x2a, 0x60, 0x27, - 0x34, 0x13, 0x70, 0xb4, 0xb1, 0xc0, 0x86, 0x82, 0x3f, 0xbf, 0xb7, 0x03, 0x9c, 0x96, 0x5b, 0xc2, - 0x5a, 0xa8, 0x1e, 0xb8, 0xf4, 0x91, 0xcc, 0x26, 0xfc, 0x6f, 0x70, 0xb5, 0x73, 0x3f, 0x11, 0xd0, - 0xee, 0x17, 0xe2, 0x7a, 0x20, 0x15, 0xb0, 0xeb, 0xcf, 0x04, 0xe8, 0xeb, 0x06, 0x5b, 0x12, 0x76, - 0xda, 0x6e, 0x39, 0xc1, 0xbe, 0x99, 0x27, 0x06, 0x5a, 0x24, 0x06, 0xfa, 0x49, 0x0c, 0xf4, 0xb6, - 0x34, 0x94, 0xc5, 0xd2, 0x50, 0xbe, 0x96, 0x86, 0x72, 0x7f, 0xe1, 0x8d, 0xf9, 0x68, 0x36, 0x34, - 0x1f, 0x58, 0x60, 0xc9, 0x1b, 0x3a, 0x9d, 0x52, 0xfe, 0xcc, 0x22, 0x7f, 0x85, 0x48, 0x38, 0xb6, - 0x3c, 0x66, 0x4d, 0x99, 0x4b, 0x4b, 0xbf, 0x65, 0x58, 0x97, 0xaf, 0xdf, 0xfb, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0x64, 0x93, 0x15, 0xab, 0x4a, 0x02, 0x00, 0x00, + // 345 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xc1, 0x4e, 0xc2, 0x40, + 0x14, 0xec, 0x22, 0x90, 0xb8, 0x08, 0x68, 0x63, 0x62, 0xe3, 0xa1, 0x0f, 0xf7, 0xc4, 0x69, 0x1b, + 0xe5, 0xa2, 0x1e, 0x1b, 0x3e, 0xc0, 0x34, 0x26, 0x26, 0x5e, 0xc8, 0x92, 0xae, 0x68, 0x0a, 0xb4, + 0xa1, 0xab, 0x89, 0x17, 0xbf, 0xc1, 0x5f, 0x30, 0xf1, 0xe4, 0x97, 0x70, 0xe4, 0xe8, 0x69, 0x35, + 0xcb, 0xad, 0xc7, 0x7e, 0x81, 0xd9, 0x2d, 0x44, 0x0a, 0xb7, 0x7d, 0x33, 0xf3, 0x26, 0x33, 0x79, + 0x8b, 0x81, 0x45, 0x2c, 0x7d, 0xf4, 0x04, 0x8b, 0xb8, 0xf7, 0x72, 0x3e, 0xe4, 0x82, 0xf5, 0xbc, + 0x84, 0xcd, 0xd8, 0x24, 0xa5, 0xc9, 0x2c, 0x16, 0xb1, 0x6d, 0x1b, 0x01, 0xd5, 0x02, 0xba, 0x12, + 0x9c, 0x1e, 0x8f, 0xe2, 0x51, 0x6c, 0x68, 0x4f, 0xbf, 0x0a, 0x25, 0x79, 0xc3, 0xcd, 0x3e, 0x9f, + 0xc6, 0x93, 0x5b, 0x16, 0xf1, 0x80, 0x09, 0x6e, 0x5f, 0xe2, 0x5a, 0xa8, 0x01, 0x07, 0x75, 0x50, + 0x77, 0xdf, 0x27, 0x4a, 0x42, 0xcd, 0x28, 0x32, 0x09, 0x05, 0x93, 0x4b, 0x38, 0x78, 0x65, 0x93, + 0xf1, 0x35, 0x31, 0x23, 0x09, 0x0a, 0xd8, 0xee, 0xe1, 0xea, 0x8c, 0x09, 0xee, 0x54, 0x3a, 0xa8, + 0xdb, 0xf4, 0x41, 0x49, 0xa8, 0x6a, 0xc7, 0x4c, 0x82, 0xc1, 0x73, 0x09, 0x8d, 0x62, 0x4d, 0x4f, + 0x24, 0x30, 0x20, 0xf9, 0xa8, 0xe0, 0xfa, 0x8d, 0x89, 0x6e, 0x7f, 0x22, 0x7c, 0x68, 0x9c, 0x06, + 0x3a, 0xf7, 0x40, 0xd3, 0xa9, 0x83, 0x3a, 0x7b, 0xdd, 0xc6, 0xc5, 0x19, 0xdd, 0x2d, 0x44, 0x4b, + 0xb9, 0xfd, 0xbb, 0xb9, 0x04, 0x4b, 0x49, 0x68, 0x95, 0xe0, 0x34, 0x93, 0xb0, 0x63, 0x9a, 0x4b, + 0x38, 0xd9, 0x28, 0xb0, 0xc1, 0x90, 0xaf, 0x9f, 0x6d, 0x83, 0xa0, 0x15, 0x96, 0x66, 0x3b, 0xc1, + 0x47, 0x21, 0x7f, 0x60, 0xcf, 0x63, 0xf1, 0xbf, 0xb8, 0xea, 0xdc, 0x57, 0x12, 0xda, 0xfd, 0x82, + 0x5c, 0x2f, 0x64, 0x12, 0x76, 0xf5, 0xb9, 0x04, 0x67, 0x9d, 0x60, 0x8b, 0x22, 0x41, 0x3b, 0x2c, + 0x3b, 0xf8, 0x57, 0x73, 0xe5, 0xa2, 0x85, 0x72, 0xd1, 0xaf, 0x72, 0xd1, 0xfb, 0xd2, 0xb5, 0x16, + 0x4b, 0xd7, 0xfa, 0x5e, 0xba, 0xd6, 0x3d, 0x24, 0xd1, 0x88, 0xb2, 0x48, 0xd0, 0x27, 0x7d, 0x54, + 0x6f, 0x1a, 0x87, 0xbc, 0xf4, 0x2b, 0x86, 0x75, 0x73, 0xe5, 0xde, 0x5f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x0c, 0x3c, 0xce, 0x02, 0x32, 0x02, 0x00, 0x00, } func (m *DenomTakeRate) Marshal() (dAtA []byte, err error) { diff --git a/go/node/take/v1beta3/query.pb.go b/go/node/take/v1beta3/query.pb.go index e290d25f..9d0456b9 100644 --- a/go/node/take/v1beta3/query.pb.go +++ b/go/node/take/v1beta3/query.pb.go @@ -6,8 +6,8 @@ package v1beta3 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" math "math" ) @@ -26,16 +26,15 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("akash/take/v1beta3/query.proto", fileDescriptor_d53d30cc323d5fb3) } var fileDescriptor_d53d30cc323d5fb3 = []byte{ - // 143 bytes of a gzipped FileDescriptorProto + // 128 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x2f, 0x49, 0xcc, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd6, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xcb, 0xeb, 0x81, - 0xe4, 0xf5, 0xa0, 0xf2, 0x46, 0xec, 0x5c, 0xac, 0x81, 0x20, 0x25, 0x4e, 0x81, 0x27, 0x1e, 0xc9, + 0xe4, 0xf5, 0xa0, 0xf2, 0x46, 0xec, 0x5c, 0xac, 0x81, 0x20, 0x25, 0x4e, 0x96, 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, 0x9e, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, - 0x9c, 0x9f, 0xab, 0x0f, 0x36, 0x41, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0x4b, - 0x2c, 0xc8, 0xd4, 0x4f, 0xcf, 0xd7, 0xcf, 0xcb, 0x4f, 0x49, 0x45, 0xb1, 0x3b, 0x89, 0x0d, 0x6c, - 0xad, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x98, 0x8b, 0xe8, 0x98, 0x00, 0x00, 0x00, + 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x5f, 0x90, 0x9d, 0xae, 0x97, 0x98, 0x5d, 0xa2, + 0x97, 0x99, 0xaf, 0x9f, 0x9e, 0xaf, 0x9f, 0x97, 0x9f, 0x92, 0x8a, 0x62, 0x47, 0x12, 0x1b, 0xd8, + 0x78, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x59, 0xd7, 0x7f, 0x80, 0x00, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/node/types/attributes/v1/attribute.go b/go/node/types/attributes/v1/attribute.go index 275a63a9..be0330b5 100644 --- a/go/node/types/attributes/v1/attribute.go +++ b/go/node/types/attributes/v1/attribute.go @@ -10,7 +10,7 @@ import ( "gopkg.in/yaml.v3" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + cerrors "cosmossdk.io/errors" ) const ( @@ -25,8 +25,8 @@ const ( ) var ( - ErrAttributesDuplicateKeys = sdkerrors.Register(moduleName, errAttributesDuplicateKeys, "attributes cannot have duplicate keys") - ErrInvalidAttributeKey = sdkerrors.Register(moduleName, errInvalidAttributeKey, "attribute key does not match regexp") + ErrAttributesDuplicateKeys = cerrors.Register(moduleName, errAttributesDuplicateKeys, "attributes cannot have duplicate keys") + ErrInvalidAttributeKey = cerrors.Register(moduleName, errInvalidAttributeKey, "attribute key does not match regexp") ) var ( @@ -100,11 +100,9 @@ func (m *Attribute) Equal(rhs *Attribute) bool { } func (m Attribute) SubsetOf(rhs Attribute) bool { - if match, _ := filepath.Match(m.Key, rhs.Key); match && (m.Value == rhs.Value) { - return true - } + match, _ := filepath.Match(m.Key, rhs.Key) - return false + return match && (m.Value == rhs.Value) } func (attr Attributes) Len() int { diff --git a/go/node/types/attributes/v1/attribute.pb.go b/go/node/types/attributes/v1/attribute.pb.go index 711fa831..1342bdbc 100644 --- a/go/node/types/attributes/v1/attribute.pb.go +++ b/go/node/types/attributes/v1/attribute.pb.go @@ -5,8 +5,8 @@ package v1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -155,33 +155,33 @@ func init() { } var fileDescriptor_44d6ae5d18e0c0a3 = []byte{ - // 415 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xb1, 0x8e, 0xd3, 0x30, - 0x1c, 0xc6, 0x93, 0x1e, 0x77, 0xba, 0xf8, 0x10, 0x3a, 0x22, 0x90, 0xa2, 0x1b, 0xec, 0xca, 0x08, - 0xd4, 0x85, 0x58, 0x3d, 0xc4, 0x72, 0x03, 0x12, 0x79, 0x01, 0x50, 0xd8, 0x60, 0x38, 0x9c, 0xab, - 0x9b, 0x46, 0x49, 0xe3, 0x12, 0x3b, 0x41, 0x61, 0x82, 0x8d, 0x91, 0x47, 0x60, 0xe6, 0x49, 0x3a, - 0x76, 0xec, 0x14, 0x20, 0xdd, 0x3a, 0xe6, 0x09, 0x50, 0x9c, 0x34, 0x09, 0x43, 0x27, 0xdb, 0x9f, - 0x7f, 0x9f, 0xff, 0xdf, 0xdf, 0x36, 0x98, 0xd0, 0x90, 0x8a, 0x05, 0xf1, 0xa8, 0x60, 0x84, 0x4a, - 0x99, 0x04, 0x5e, 0x2a, 0x99, 0x20, 0xd9, 0xb4, 0x5f, 0xd9, 0xab, 0x84, 0x4b, 0x6e, 0x5a, 0x8a, - 0xb4, 0x6b, 0xd2, 0xee, 0x49, 0x3b, 0x9b, 0x5e, 0x3d, 0xf2, 0xb9, 0xcf, 0x15, 0x44, 0xea, 0x59, - 0xc3, 0xe3, 0x0f, 0xc0, 0x78, 0x7d, 0xc0, 0xcc, 0x31, 0x38, 0x09, 0x59, 0x6e, 0xe9, 0x63, 0x7d, - 0x62, 0x38, 0x0f, 0xaa, 0x02, 0x81, 0x9c, 0x2e, 0xa3, 0x1b, 0x1c, 0xb2, 0x1c, 0xbb, 0xf5, 0x96, - 0xf9, 0x0c, 0x9c, 0x66, 0x34, 0x4a, 0x99, 0x35, 0x52, 0xcc, 0x65, 0x55, 0xa0, 0xfb, 0x0d, 0xa3, - 0x64, 0xec, 0x36, 0xdb, 0x37, 0xf7, 0xbe, 0xff, 0x44, 0x1a, 0xce, 0xc0, 0xf9, 0xbb, 0xc0, 0x8f, - 0xd9, 0xcc, 0xc9, 0xcd, 0x29, 0x38, 0xa3, 0x51, 0x74, 0xcb, 0xe7, 0x96, 0x3e, 0x3e, 0x99, 0x18, - 0xce, 0xd5, 0xbe, 0x40, 0xad, 0xd2, 0x1f, 0x42, 0xa3, 0xe8, 0xcd, 0x1c, 0xbb, 0xa7, 0x6a, 0x54, - 0x96, 0x38, 0xaf, 0x2d, 0xa3, 0x81, 0x45, 0x29, 0x03, 0x4b, 0x9c, 0x37, 0x96, 0x7a, 0x6c, 0xeb, - 0x7e, 0x1b, 0x81, 0xc7, 0x6f, 0x23, 0x7a, 0xc7, 0x96, 0x2c, 0x96, 0x2e, 0xfb, 0x94, 0x06, 0x89, - 0x9a, 0x0a, 0x73, 0x0e, 0x0c, 0xa1, 0x12, 0xdd, 0x7a, 0x4d, 0x9f, 0x17, 0xd7, 0xd8, 0x3e, 0x76, - 0x65, 0xf6, 0x21, 0xbc, 0xf3, 0x74, 0x5d, 0x20, 0x6d, 0x5f, 0xa0, 0xde, 0x5c, 0x15, 0xe8, 0xb2, - 0x09, 0xd0, 0x49, 0xd8, 0x3d, 0x17, 0x87, 0x6e, 0xbf, 0x00, 0xd0, 0x1f, 0xa5, 0xe2, 0x5f, 0x5c, - 0x3f, 0x39, 0x5e, 0xa8, 0x7b, 0x02, 0xe7, 0x65, 0x5b, 0x69, 0x60, 0xaf, 0x0a, 0xf4, 0xb0, 0xed, - 0xb5, 0xd3, 0xf0, 0xaf, 0xdf, 0x08, 0x74, 0x2e, 0xe1, 0x0e, 0xf0, 0xe6, 0x0e, 0x9c, 0x8f, 0xdb, - 0xbf, 0x50, 0xfb, 0x5a, 0x42, 0x6d, 0x5d, 0x42, 0x7d, 0x53, 0x42, 0xfd, 0x4f, 0x09, 0xf5, 0x1f, - 0x3b, 0xa8, 0x6d, 0x76, 0x50, 0xdb, 0xee, 0xa0, 0xf6, 0xfe, 0x95, 0x1f, 0xc8, 0x45, 0xea, 0xd9, - 0x77, 0x7c, 0x49, 0x54, 0xb2, 0xe7, 0x31, 0x93, 0x9f, 0x79, 0x12, 0xb6, 0x2b, 0xba, 0x0a, 0x88, - 0xcf, 0x49, 0xcc, 0x67, 0x8c, 0xc8, 0x7c, 0xc5, 0xc4, 0xff, 0x5f, 0xcf, 0x3b, 0x53, 0x3f, 0xe8, - 0xc5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xc3, 0xa9, 0xd1, 0x9d, 0x02, 0x00, 0x00, + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x31, 0xcf, 0xd2, 0x40, + 0x18, 0xc7, 0xaf, 0xbc, 0xbe, 0x84, 0x1e, 0xc6, 0x60, 0xa3, 0x49, 0xc3, 0x70, 0xd7, 0x9c, 0x91, + 0x30, 0x5d, 0x03, 0xc6, 0x85, 0xcd, 0x4e, 0x6e, 0x9a, 0xba, 0xe9, 0x40, 0xae, 0x72, 0xd4, 0xa6, + 0xa5, 0x45, 0xae, 0x90, 0x94, 0x89, 0xc5, 0xc4, 0xd1, 0x8f, 0xe0, 0xec, 0x27, 0x61, 0x64, 0x64, + 0x30, 0x55, 0xcb, 0xc6, 0xd8, 0x4f, 0x60, 0x7a, 0x85, 0xb6, 0xef, 0xc0, 0x74, 0xd7, 0xff, 0xfd, + 0xfe, 0xf7, 0xdc, 0xff, 0xe9, 0x03, 0x87, 0xcc, 0x67, 0xe2, 0x8b, 0xe9, 0x30, 0xc1, 0x4d, 0x16, + 0xc7, 0x2b, 0xcf, 0x59, 0xc7, 0x5c, 0x98, 0x9b, 0x51, 0xfd, 0x45, 0x97, 0xab, 0x28, 0x8e, 0x34, + 0x5d, 0x92, 0xb4, 0x20, 0x69, 0x4d, 0xd2, 0xcd, 0xa8, 0xff, 0xcc, 0x8d, 0xdc, 0x48, 0x42, 0x66, + 0xb1, 0x2b, 0x79, 0xf2, 0x09, 0xaa, 0x6f, 0xae, 0x98, 0x66, 0xc0, 0x3b, 0x9f, 0x27, 0xba, 0x62, + 0x28, 0x43, 0xd5, 0x7a, 0x92, 0xa7, 0x18, 0x26, 0x6c, 0x11, 0x4c, 0x88, 0xcf, 0x13, 0x62, 0x17, + 0x47, 0xda, 0x00, 0xde, 0x6f, 0x58, 0xb0, 0xe6, 0x7a, 0x4b, 0x32, 0xbd, 0x3c, 0xc5, 0x8f, 0x4b, + 0x46, 0xca, 0xc4, 0x2e, 0x8f, 0x27, 0x8f, 0xbe, 0xff, 0xc4, 0x80, 0x6c, 0x61, 0xe7, 0x83, 0xe7, + 0x86, 0x7c, 0x66, 0x25, 0xda, 0x08, 0xb6, 0x59, 0x10, 0x4c, 0xa3, 0xb9, 0xae, 0x18, 0x77, 0x43, + 0xd5, 0xea, 0x9f, 0x53, 0x7c, 0x51, 0xea, 0x4b, 0x58, 0x10, 0xbc, 0x9b, 0x13, 0xfb, 0x5e, 0xae, + 0xd2, 0x12, 0x26, 0x85, 0xa5, 0xd5, 0xb0, 0x48, 0xa5, 0x61, 0x09, 0x93, 0xd2, 0x52, 0xac, 0x93, + 0x4e, 0x51, 0x77, 0xf7, 0xdb, 0x00, 0xe4, 0x5b, 0x0b, 0x3e, 0x7f, 0x1f, 0xb0, 0xcf, 0x7c, 0xc1, + 0xc3, 0xd8, 0xe6, 0x5f, 0xd7, 0xde, 0x4a, 0x6e, 0x85, 0x36, 0x87, 0xaa, 0x90, 0xaf, 0x9a, 0x3a, + 0x65, 0xd6, 0xee, 0x98, 0xd0, 0x5b, 0x6d, 0xa3, 0xd7, 0x00, 0xd6, 0xcb, 0x7d, 0x8a, 0xc1, 0x39, + 0xc5, 0xb5, 0x39, 0x4f, 0x71, 0xaf, 0x7c, 0x44, 0x25, 0x11, 0xbb, 0x23, 0xae, 0x89, 0xb7, 0x10, + 0xd6, 0x57, 0xc9, 0x08, 0xdd, 0xf1, 0x8b, 0xdb, 0x85, 0xaa, 0xdf, 0x60, 0xbd, 0xbe, 0x54, 0x6a, + 0xd8, 0xf3, 0x14, 0x3f, 0xbd, 0xe4, 0xad, 0x34, 0xf2, 0xeb, 0x0f, 0x86, 0x95, 0x4b, 0xd8, 0x0d, + 0xbc, 0xee, 0x83, 0xf5, 0xf6, 0xf8, 0x0f, 0x81, 0x5d, 0x86, 0xc0, 0x3e, 0x43, 0xca, 0x21, 0x43, + 0xca, 0xdf, 0x0c, 0x29, 0x3f, 0x4e, 0x08, 0x1c, 0x4e, 0x08, 0x1c, 0x4f, 0x08, 0x7c, 0x1c, 0x2c, + 0x7d, 0x97, 0x32, 0x3f, 0xa6, 0x5e, 0x31, 0x19, 0x66, 0x18, 0xcd, 0xb8, 0x19, 0x27, 0x4b, 0x2e, + 0x1e, 0x8e, 0x9a, 0xd3, 0x96, 0x13, 0xf3, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x32, + 0x72, 0x05, 0x8d, 0x02, 0x00, 0x00, } func (m *Attribute) Marshal() (dAtA []byte, err error) { diff --git a/go/node/types/attributes/v1/migrate/v1beta3.go b/go/node/types/attributes/v1/migrate/v1beta3.go index 23aea01e..ea03086e 100644 --- a/go/node/types/attributes/v1/migrate/v1beta3.go +++ b/go/node/types/attributes/v1/migrate/v1beta3.go @@ -1,8 +1,9 @@ package migrate import ( - "github.com/akash-network/akash-api/go/node/types/attributes/v1" "github.com/akash-network/akash-api/go/node/types/v1beta3" + + "pkg.akt.io/go/node/types/attributes/v1" ) func AttributesFromV1Beta3(from v1beta3.Attributes) v1.Attributes { diff --git a/go/node/types/resources/v1/requirements.go b/go/node/types/attributes/v1/requirements.go similarity index 100% rename from go/node/types/resources/v1/requirements.go rename to go/node/types/attributes/v1/requirements.go diff --git a/go/node/types/resources/v1/cpu.pb.go b/go/node/types/resources/v1/cpu.pb.go deleted file mode 100644 index 3439b7a1..00000000 --- a/go/node/types/resources/v1/cpu.pb.go +++ /dev/null @@ -1,424 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/cpu.proto - -package v1 - -import ( - fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "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 - -// CPU stores resource units and cpu config attributes -type CPU struct { - Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` - Attributes github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.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_6eb24b6af655c62d, []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() github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes { - if m != nil { - return m.Attributes - } - return nil -} - -func init() { - proto.RegisterType((*CPU)(nil), "akash.base.resources.v1.CPU") -} - -func init() { proto.RegisterFile("akash/base/resources/v1/cpu.proto", fileDescriptor_6eb24b6af655c62d) } - -var fileDescriptor_6eb24b6af655c62d = []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, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x2e, 0x28, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x07, - 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2b, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x34, 0x90, 0x4c, 0x4c, 0x2c, 0x29, 0x29, 0xca, - 0x4c, 0x2a, 0x2d, 0x81, 0x18, 0x09, 0xe7, 0x41, 0x55, 0x6a, 0xe3, 0xb2, 0x1b, 0xc6, 0x29, 0x4b, - 0xcc, 0x29, 0x85, 0x2a, 0x56, 0x5a, 0xc0, 0xc4, 0xc5, 0xec, 0x1c, 0x10, 0x2a, 0xe4, 0xc4, 0xc5, - 0x5a, 0x9a, 0x97, 0x59, 0x52, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xa6, 0x87, 0xc3, - 0x75, 0x7a, 0x41, 0x50, 0x4e, 0x18, 0xc8, 0x10, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0x20, - 0x5a, 0x85, 0xce, 0x31, 0x72, 0x71, 0x21, 0x9c, 0x26, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, - 0x8c, 0x6c, 0x12, 0x42, 0x16, 0x64, 0x94, 0x23, 0x8c, 0xe7, 0xd4, 0xc1, 0x08, 0x32, 0xe7, 0xd5, - 0x3d, 0x79, 0x11, 0x84, 0x0a, 0x9d, 0xfc, 0xdc, 0xcc, 0x92, 0xd4, 0xdc, 0x82, 0x92, 0xca, 0x4f, - 0xf7, 0xe4, 0xa5, 0x2b, 0x13, 0x73, 0x73, 0xac, 0x94, 0xb0, 0xc9, 0x2a, 0xad, 0xba, 0x2f, 0xef, - 0x99, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xb6, 0x4e, 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, 0x46, 0x0d, 0x42, 0x84, 0x4b, 0x8a, 0x83, 0x90, - 0x7c, 0x60, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, 0x53, 0xf8, 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, 0x92, 0x6c, 0x2d, 0x72, 0x7c, 0x24, 0xb1, 0x81, 0xa3, 0xc0, 0x18, - 0x10, 0x00, 0x00, 0xff, 0xff, 0x20, 0x2f, 0xd6, 0x22, 0x2d, 0x02, 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, v1.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/resources/v1/resources_test.go b/go/node/types/resources/v1/resources_test.go deleted file mode 100644 index e52c1422..00000000 --- a/go/node/types/resources/v1/resources_test.go +++ /dev/null @@ -1,143 +0,0 @@ -package v1 - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestVolumes_Dup(t *testing.T) { - volumes := Volumes{ - Storage{ - Name: "default", - Quantity: NewResourceValue(100), - Attributes: Attributes{}, - }, - } - - dVolumes := volumes.Dup() - - require.Equal(t, volumes, dVolumes) -} - -func TestVolumes_Equal(t *testing.T) { - volumes := Volumes{ - Storage{ - Name: "default", - Quantity: NewResourceValue(100), - Attributes: Attributes{}, - }, - } - - dVolumes := volumes.Dup() - - require.True(t, volumes.Equal(dVolumes)) - - dVolumes[0].Name = "class2" - require.False(t, volumes.Equal(dVolumes)) -} - -func TestResources_ValidateID(t *testing.T) { - res := Resources{} - - err := res.Validate() - require.ErrorContains(t, err, "resources ID must be > 0") -} - -func TestResources_ValidateCPU(t *testing.T) { - res := Resources{ - ID: 1, - } - - err := res.Validate() - require.ErrorContains(t, err, "CPU must not be nil") -} - -func TestResources_ValidateGPU(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - } - - err := res.Validate() - require.ErrorContains(t, err, "GPU must not be nil") -} - -func TestResources_ValidateMemory(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - GPU: &GPU{}, - } - - err := res.Validate() - require.ErrorContains(t, err, "memory must not be nil") -} - -func TestResources_ValidateStorage(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - GPU: &GPU{}, - Memory: &Memory{}, - } - - err := res.Validate() - require.ErrorContains(t, err, "storage must not be nil") -} - -func TestResources_ValidateEndpoints(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - GPU: &GPU{}, - Memory: &Memory{}, - Storage: make(Volumes, 0), - } - - err := res.Validate() - require.ErrorContains(t, err, "endpoints must not be nil") -} - -func TestResources_Validate(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - GPU: &GPU{}, - Memory: &Memory{}, - Storage: make(Volumes, 0), - Endpoints: make(Endpoints, 0), - } - - err := res.Validate() - require.NoError(t, err) -} - -func TestResources_DupInvalidID(t *testing.T) { - res := Resources{ - CPU: &CPU{}, - GPU: &GPU{}, - Memory: &Memory{}, - Storage: make(Volumes, 0), - Endpoints: make(Endpoints, 0), - } - - dup := res.Dup() - err := dup.Validate() - require.ErrorContains(t, err, "resources ID must be > 0") -} - -func TestResources_DupValid(t *testing.T) { - res := Resources{ - ID: 1, - CPU: &CPU{}, - GPU: &GPU{}, - Memory: &Memory{}, - Storage: make(Volumes, 0), - Endpoints: make(Endpoints, 0), - } - - dup := res.Dup() - err := dup.Validate() - require.NoError(t, err) -} diff --git a/go/node/types/resources/v1/resourcevalue.go b/go/node/types/resources/v1/resourcevalue.go deleted file mode 100644 index 8595e39d..00000000 --- a/go/node/types/resources/v1/resourcevalue.go +++ /dev/null @@ -1,57 +0,0 @@ -package v1 - -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/cpu.pb.go b/go/node/types/resources/v1beta4/cpu.pb.go similarity index 73% rename from go/node/types/v1beta3/cpu.pb.go rename to go/node/types/resources/v1beta4/cpu.pb.go index da52dc21..a22c54ff 100644 --- a/go/node/types/v1beta3/cpu.pb.go +++ b/go/node/types/resources/v1beta4/cpu.pb.go @@ -1,15 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/cpu.proto +// source: akash/base/resources/v1beta4/cpu.proto -package v1beta3 +package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,15 +27,15 @@ 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"` + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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} + return fileDescriptor_a01a52020c12431a, []int{0} } func (m *CPU) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -69,7 +71,7 @@ func (m *CPU) GetUnits() ResourceValue { return ResourceValue{} } -func (m *CPU) GetAttributes() Attributes { +func (m *CPU) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } @@ -77,32 +79,35 @@ func (m *CPU) GetAttributes() Attributes { } func init() { - proto.RegisterType((*CPU)(nil), "akash.base.v1beta3.CPU") + proto.RegisterType((*CPU)(nil), "akash.base.resources.v1beta4.CPU") } -func init() { proto.RegisterFile("akash/base/v1beta3/cpu.proto", fileDescriptor_80ab47749737c9d3) } +func init() { + proto.RegisterFile("akash/base/resources/v1beta4/cpu.proto", fileDescriptor_a01a52020c12431a) +} -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, +var fileDescriptor_a01a52020c12431a = []byte{ + // 306 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, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd1, 0x4f, 0x2e, 0x28, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x92, 0x01, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xab, 0xd3, 0x83, 0xaa, 0x93, + 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd4, 0x07, 0xb1, 0x20, 0x7a, 0xa4, 0x34, 0x90, 0xcc, + 0x4e, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x01, 0x1b, 0x8e, 0xe0, 0x41, 0x55, 0x1a, 0xe0, + 0x75, 0x05, 0x4c, 0xa4, 0x2c, 0x31, 0xa7, 0x14, 0xaa, 0x43, 0xa9, 0x87, 0x89, 0x8b, 0xd9, 0x39, + 0x20, 0x54, 0xc8, 0x9d, 0x8b, 0xb5, 0x34, 0x2f, 0xb3, 0xa4, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, + 0xdb, 0x48, 0x5b, 0x0f, 0x9f, 0x3b, 0xf5, 0x82, 0xa0, 0x22, 0x61, 0x20, 0x93, 0x9c, 0x58, 0x4e, + 0xdc, 0x93, 0x67, 0x08, 0x82, 0xe8, 0x17, 0xda, 0xca, 0xc8, 0xc5, 0x85, 0x70, 0xa4, 0x04, 0x93, + 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x32, 0xb2, 0x71, 0x08, 0x59, 0xbd, 0x32, 0x43, 0x3d, 0x47, 0x18, + 0xcf, 0xa9, 0x00, 0x64, 0xcc, 0xab, 0x7b, 0xf2, 0x22, 0x08, 0x05, 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, 0xde, 0xb0, 0x20, 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x13, + 0x14, 0x78, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0xa8, 0x61, 0x86, + 0xb0, 0xb0, 0x38, 0x08, 0xc9, 0xa1, 0x56, 0x2c, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0xb9, 0x9c, 0x78, + 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, + 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x16, 0x4e, 0xe3, 0x31, 0x02, 0x3a, 0x89, + 0x0d, 0x1c, 0xb6, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x89, 0x60, 0x4d, 0x15, 0x02, + 0x00, 0x00, } func (this *CPU) Equal(that interface{}) bool { @@ -309,7 +314,7 @@ func (m *CPU) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, Attribute{}) + m.Attributes = append(m.Attributes, v1.Attribute{}) if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/go/node/types/resources/v1/endpoint.go b/go/node/types/resources/v1beta4/endpoint.go similarity index 96% rename from go/node/types/resources/v1/endpoint.go rename to go/node/types/resources/v1beta4/endpoint.go index 81434b44..1192d166 100644 --- a/go/node/types/resources/v1/endpoint.go +++ b/go/node/types/resources/v1beta4/endpoint.go @@ -1,4 +1,4 @@ -package v1 +package v1beta4 import ( "sort" diff --git a/go/node/types/resources/v1/endpoint.pb.go b/go/node/types/resources/v1beta4/endpoint.pb.go similarity index 76% rename from go/node/types/resources/v1/endpoint.pb.go rename to go/node/types/resources/v1beta4/endpoint.pb.go index 4cb76894..2fcb1864 100644 --- a/go/node/types/resources/v1/endpoint.pb.go +++ b/go/node/types/resources/v1beta4/endpoint.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/endpoint.proto +// source: akash/base/resources/v1beta4/endpoint.proto -package v1 +package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -52,12 +52,12 @@ func (x Endpoint_Kind) String() string { } func (Endpoint_Kind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b997d618e77e1ab4, []int{0, 0} + return fileDescriptor_7476b67ee95ddefb, []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.resources.v1.Endpoint_Kind" json:"kind,omitempty"` + Kind Endpoint_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=akash.base.resources.v1beta4.Endpoint_Kind" json:"kind,omitempty"` SequenceNumber uint32 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number" yaml:"sequence_number"` } @@ -65,7 +65,7 @@ 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_b997d618e77e1ab4, []int{0} + return fileDescriptor_7476b67ee95ddefb, []int{0} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -109,37 +109,36 @@ func (m *Endpoint) GetSequenceNumber() uint32 { } func init() { - proto.RegisterEnum("akash.base.resources.v1.Endpoint_Kind", Endpoint_Kind_name, Endpoint_Kind_value) - proto.RegisterType((*Endpoint)(nil), "akash.base.resources.v1.Endpoint") + proto.RegisterEnum("akash.base.resources.v1beta4.Endpoint_Kind", Endpoint_Kind_name, Endpoint_Kind_value) + proto.RegisterType((*Endpoint)(nil), "akash.base.resources.v1beta4.Endpoint") } func init() { - proto.RegisterFile("akash/base/resources/v1/endpoint.proto", fileDescriptor_b997d618e77e1ab4) + proto.RegisterFile("akash/base/resources/v1beta4/endpoint.proto", fileDescriptor_7476b67ee95ddefb) } -var fileDescriptor_b997d618e77e1ab4 = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcc, 0x4e, 0x2c, +var fileDescriptor_7476b67ee95ddefb = []byte{ + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0xd1, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x12, 0x07, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xab, 0xd3, 0x2b, 0x33, 0x94, - 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0x95, 0xde, 0x33, 0x72, - 0x71, 0xb8, 0x42, 0x4d, 0x10, 0xb2, 0xe2, 0x62, 0xc9, 0xce, 0xcc, 0x4b, 0x91, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x33, 0x52, 0xd3, 0xc3, 0x61, 0x94, 0x1e, 0x4c, 0x83, 0x9e, 0x77, 0x66, 0x5e, 0x4a, - 0x10, 0x58, 0x8f, 0x50, 0x06, 0x17, 0x7f, 0x71, 0x6a, 0x61, 0x69, 0x6a, 0x5e, 0x72, 0x6a, 0x7c, - 0x5e, 0x69, 0x6e, 0x52, 0x6a, 0x91, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xaf, 0x93, 0xfd, 0xa3, 0x7b, - 0xf2, 0x7c, 0xc1, 0x50, 0x29, 0x3f, 0xb0, 0xcc, 0xab, 0x7b, 0xf2, 0xe8, 0x8a, 0x3f, 0xdd, 0x93, - 0x17, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, 0x93, 0x50, 0x0a, 0xe2, 0x2b, 0x46, 0xd1, 0xac, - 0x64, 0xce, 0xc5, 0x02, 0xb2, 0x57, 0x88, 0x9f, 0x8b, 0x3b, 0xd8, 0xc3, 0x31, 0xc8, 0xd5, 0x25, - 0xde, 0x23, 0x24, 0x24, 0x40, 0x80, 0x01, 0x24, 0x10, 0xe4, 0xe8, 0xe7, 0xe2, 0xef, 0x1b, 0x1f, - 0xe0, 0x1f, 0x14, 0x22, 0xc0, 0x28, 0xc4, 0xcb, 0xc5, 0xe9, 0xe3, 0xea, 0x18, 0xec, 0xea, 0x12, - 0xef, 0x19, 0x20, 0xc0, 0x64, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, 0x53, 0xf8, 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, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, - 0xe7, 0xe7, 0xea, 0x83, 0xbd, 0xae, 0x9b, 0x97, 0x5a, 0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0x25, - 0x16, 0x64, 0xea, 0xa7, 0xe7, 0xeb, 0xe7, 0xe5, 0xa7, 0xa4, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, - 0xa3, 0x44, 0x44, 0x12, 0x1b, 0x38, 0x44, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x63, - 0xc6, 0xf2, 0xaa, 0x01, 0x00, 0x00, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd1, 0x4f, 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, + 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x01, 0x2b, 0xd6, 0x03, 0x29, 0xd6, 0x83, + 0x2b, 0xd6, 0x83, 0x2a, 0x96, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd4, 0x07, 0xb1, 0x20, + 0x7a, 0x94, 0xbe, 0x30, 0x72, 0x71, 0xb8, 0x42, 0x8d, 0x11, 0xb2, 0xe7, 0x62, 0xc9, 0xce, 0xcc, + 0x4b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0xd2, 0xd6, 0xc3, 0x67, 0x9e, 0x1e, 0x4c, 0x97, + 0x9e, 0x77, 0x66, 0x5e, 0x4a, 0x10, 0x58, 0xa3, 0x50, 0x06, 0x17, 0x7f, 0x71, 0x6a, 0x61, 0x69, + 0x6a, 0x5e, 0x72, 0x6a, 0x7c, 0x5e, 0x69, 0x6e, 0x52, 0x6a, 0x91, 0x04, 0x93, 0x02, 0xa3, 0x06, + 0xaf, 0x93, 0xfd, 0xa3, 0x7b, 0xf2, 0x7c, 0xc1, 0x50, 0x29, 0x3f, 0xb0, 0xcc, 0xab, 0x7b, 0xf2, + 0xe8, 0x8a, 0x3f, 0xdd, 0x93, 0x17, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, 0x93, 0x50, 0x0a, + 0xe2, 0x2b, 0x46, 0xd1, 0xac, 0x64, 0xce, 0xc5, 0x02, 0xb2, 0x57, 0x88, 0x9f, 0x8b, 0x3b, 0xd8, + 0xc3, 0x31, 0xc8, 0xd5, 0x25, 0xde, 0x23, 0x24, 0x24, 0x40, 0x80, 0x01, 0x24, 0x10, 0xe4, 0xe8, + 0xe7, 0xe2, 0xef, 0x1b, 0x1f, 0xe0, 0x1f, 0x14, 0x22, 0xc0, 0x28, 0xc4, 0xcb, 0xc5, 0xe9, 0xe3, + 0xea, 0x18, 0xec, 0xea, 0x12, 0xef, 0x19, 0x20, 0xc0, 0x64, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, + 0x93, 0xcb, 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, 0x69, 0x15, 0x64, 0xa7, + 0xeb, 0x25, 0x66, 0x97, 0xe8, 0x65, 0x82, 0xc2, 0x49, 0x3f, 0x2f, 0x3f, 0x25, 0x55, 0xbf, 0xa4, + 0xb2, 0x20, 0xb5, 0x18, 0x33, 0xfc, 0x93, 0xd8, 0xc0, 0x61, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0xb1, 0x58, 0x9e, 0x43, 0xa6, 0x01, 0x00, 0x00, } func (this *Endpoint) Equal(that interface{}) bool { diff --git a/go/node/types/resources/v1/gpu.pb.go b/go/node/types/resources/v1beta4/gpu.pb.go similarity index 73% rename from go/node/types/resources/v1/gpu.pb.go rename to go/node/types/resources/v1beta4/gpu.pb.go index beb083b7..5ce5346b 100644 --- a/go/node/types/resources/v1/gpu.pb.go +++ b/go/node/types/resources/v1beta4/gpu.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/gpu.proto +// source: akash/base/resources/v1beta4/gpu.proto -package v1 +package v1beta4 import ( fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,15 +27,15 @@ 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 github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` + Units ResourceValue `protobuf:"bytes,1,opt,name=units,proto3" json:"units"` + Attributes pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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_c4d2da51015d61b2, []int{0} + return fileDescriptor_9da7ea6b7073ef21, []int{0} } func (m *GPU) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -71,7 +71,7 @@ func (m *GPU) GetUnits() ResourceValue { return ResourceValue{} } -func (m *GPU) GetAttributes() github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes { +func (m *GPU) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } @@ -79,33 +79,35 @@ func (m *GPU) GetAttributes() github_com_akash_network_akash_api_go_node_types_a } func init() { - proto.RegisterType((*GPU)(nil), "akash.base.resources.v1.GPU") + proto.RegisterType((*GPU)(nil), "akash.base.resources.v1beta4.GPU") } -func init() { proto.RegisterFile("akash/base/resources/v1/gpu.proto", fileDescriptor_c4d2da51015d61b2) } +func init() { + proto.RegisterFile("akash/base/resources/v1beta4/gpu.proto", fileDescriptor_9da7ea6b7073ef21) +} -var fileDescriptor_c4d2da51015d61b2 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xcc, 0x4e, 0x2c, +var fileDescriptor_9da7ea6b7073ef21 = []byte{ + // 306 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, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x2f, 0x28, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x07, - 0x2b, 0xd1, 0x03, 0x29, 0xd1, 0x83, 0x2b, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x34, 0x90, 0x4c, 0x4c, 0x2c, 0x29, 0x29, 0xca, - 0x4c, 0x2a, 0x2d, 0x81, 0x18, 0x09, 0xe7, 0x41, 0x55, 0x6a, 0xe3, 0xb2, 0x1b, 0xc6, 0x29, 0x4b, - 0xcc, 0x29, 0x85, 0x2a, 0x56, 0x5a, 0xc0, 0xc4, 0xc5, 0xec, 0x1e, 0x10, 0x2a, 0xe4, 0xc4, 0xc5, - 0x5a, 0x9a, 0x97, 0x59, 0x52, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xa6, 0x87, 0xc3, - 0x75, 0x7a, 0x41, 0x50, 0x4e, 0x18, 0xc8, 0x10, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0x20, - 0x5a, 0x85, 0xce, 0x31, 0x72, 0x71, 0x21, 0x9c, 0x26, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, - 0x8c, 0x6c, 0x12, 0x42, 0x16, 0x64, 0x94, 0x23, 0x8c, 0xe7, 0xd4, 0xc1, 0x08, 0x32, 0xe7, 0xd5, - 0x3d, 0x79, 0x11, 0x84, 0x0a, 0x9d, 0xfc, 0xdc, 0xcc, 0x92, 0xd4, 0xdc, 0x82, 0x92, 0xca, 0x4f, - 0xf7, 0xe4, 0xa5, 0x2b, 0x13, 0x73, 0x73, 0xac, 0x94, 0xb0, 0xc9, 0x2a, 0xad, 0xba, 0x2f, 0xef, - 0x99, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xb6, 0x4e, 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, 0x46, 0x0d, 0x42, 0x84, 0x4b, 0x8a, 0x83, 0x90, - 0x7c, 0x60, 0xc5, 0xf2, 0x62, 0x81, 0x3c, 0xa3, 0x53, 0xf8, 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, 0x92, 0x6c, 0x2d, 0x72, 0x7c, 0x24, 0xb1, 0x81, 0xa3, 0xc0, 0x18, - 0x10, 0x00, 0x00, 0xff, 0xff, 0xab, 0x07, 0xd2, 0x41, 0x2d, 0x02, 0x00, 0x00, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd1, 0x4f, 0x2f, 0x28, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0x92, 0x01, 0xab, 0xd3, 0x03, 0xa9, 0xd3, 0x83, 0xab, 0xd3, 0x83, 0xaa, 0x93, + 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd4, 0x07, 0xb1, 0x20, 0x7a, 0xa4, 0x34, 0x90, 0xcc, + 0x4e, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x01, 0x1b, 0x8e, 0xe0, 0x41, 0x55, 0x1a, 0xe0, + 0x75, 0x05, 0x4c, 0xa4, 0x2c, 0x31, 0xa7, 0x14, 0xaa, 0x43, 0xa9, 0x87, 0x89, 0x8b, 0xd9, 0x3d, + 0x20, 0x54, 0xc8, 0x9d, 0x8b, 0xb5, 0x34, 0x2f, 0xb3, 0xa4, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, + 0xdb, 0x48, 0x5b, 0x0f, 0x9f, 0x3b, 0xf5, 0x82, 0xa0, 0x22, 0x61, 0x20, 0x93, 0x9c, 0x58, 0x4e, + 0xdc, 0x93, 0x67, 0x08, 0x82, 0xe8, 0x17, 0xda, 0xca, 0xc8, 0xc5, 0x85, 0x70, 0xa4, 0x04, 0x93, + 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x32, 0xb2, 0x71, 0x08, 0x59, 0xbd, 0x32, 0x43, 0x3d, 0x47, 0x18, + 0xcf, 0xa9, 0x00, 0x64, 0xcc, 0xab, 0x7b, 0xf2, 0x22, 0x08, 0x05, 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, 0xde, 0xb0, 0x20, 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x13, + 0x14, 0x78, 0xfa, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0xa8, 0x61, 0x86, + 0xb0, 0xb0, 0x38, 0x08, 0xc9, 0xa1, 0x56, 0x2c, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0xb9, 0x9c, 0x78, + 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, + 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x16, 0x4e, 0xe3, 0x31, 0x02, 0x3a, 0x89, + 0x0d, 0x1c, 0xb6, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xe6, 0x51, 0xca, 0x15, 0x02, + 0x00, 0x00, } func (this *GPU) Equal(that interface{}) bool { diff --git a/go/node/types/resources/v1/memory.pb.go b/go/node/types/resources/v1beta4/memory.pb.go similarity index 72% rename from go/node/types/resources/v1/memory.pb.go rename to go/node/types/resources/v1beta4/memory.pb.go index 1185101a..68edb4f1 100644 --- a/go/node/types/resources/v1/memory.pb.go +++ b/go/node/types/resources/v1beta4/memory.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/memory.proto +// source: akash/base/resources/v1beta4/memory.proto -package v1 +package v1beta4 import ( fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,15 +27,15 @@ 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 github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` + Quantity ResourceValue `protobuf:"bytes,1,opt,name=quantity,proto3" json:"size" yaml:"size"` + Attributes pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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_3b893af85ee36ef5, []int{0} + return fileDescriptor_69cf709b8b3b1702, []int{0} } func (m *Memory) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -71,7 +71,7 @@ func (m *Memory) GetQuantity() ResourceValue { return ResourceValue{} } -func (m *Memory) GetAttributes() github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes { +func (m *Memory) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } @@ -79,37 +79,36 @@ func (m *Memory) GetAttributes() github_com_akash_network_akash_api_go_node_type } func init() { - proto.RegisterType((*Memory)(nil), "akash.base.resources.v1.Memory") + proto.RegisterType((*Memory)(nil), "akash.base.resources.v1beta4.Memory") } func init() { - proto.RegisterFile("akash/base/resources/v1/memory.proto", fileDescriptor_3b893af85ee36ef5) + proto.RegisterFile("akash/base/resources/v1beta4/memory.proto", fileDescriptor_69cf709b8b3b1702) } -var fileDescriptor_3b893af85ee36ef5 = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcc, 0x4e, 0x2c, +var fileDescriptor_69cf709b8b3b1702 = []byte{ + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4c, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0xd4, 0xcf, 0x4d, 0xcd, 0xcd, 0x2f, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x12, 0x07, 0xab, 0xd2, 0x03, 0xa9, 0xd2, 0x83, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, - 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x34, 0x90, 0x0c, 0x4d, 0x2c, - 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x81, 0x98, 0x0a, 0xe7, 0x41, 0x55, 0x6a, 0xe3, 0xb2, 0x1e, - 0xc6, 0x29, 0x4b, 0xcc, 0x29, 0x85, 0x2a, 0x56, 0x3a, 0xc0, 0xc4, 0xc5, 0xe6, 0x0b, 0x76, 0x96, - 0x50, 0x3c, 0x17, 0x47, 0x61, 0x69, 0x62, 0x5e, 0x49, 0x66, 0x49, 0xa5, 0x04, 0xa3, 0x02, 0xa3, - 0x06, 0xb7, 0x91, 0x9a, 0x1e, 0x0e, 0x37, 0xea, 0x05, 0x41, 0x39, 0x61, 0x20, 0xa3, 0x9c, 0xa4, - 0x4f, 0xdc, 0x93, 0x67, 0x78, 0x75, 0x4f, 0x9e, 0xa5, 0x38, 0xb3, 0x2a, 0xf5, 0xd3, 0x3d, 0x79, - 0xee, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, 0x10, 0x4f, 0x29, 0x08, 0x6e, 0xa8, 0xd0, 0x39, 0x46, - 0x2e, 0x2e, 0x84, 0xd3, 0x25, 0x98, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0x94, 0x91, 0xed, 0x40, 0xc8, - 0x82, 0x2c, 0x71, 0x84, 0xf1, 0x9c, 0x3a, 0x18, 0xa1, 0x36, 0x88, 0x20, 0x54, 0xe8, 0xe4, 0xe7, - 0x66, 0x96, 0xa4, 0xe6, 0x16, 0x94, 0x54, 0x7e, 0xba, 0x27, 0x2f, 0x0d, 0xb1, 0x11, 0x9b, 0xac, - 0xd2, 0xaa, 0xfb, 0xf2, 0x9e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, - 0x60, 0xeb, 0x74, 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, 0xd4, 0x20, 0x46, - 0xb8, 0xa4, 0x38, 0x08, 0xc9, 0x07, 0x56, 0x2c, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0x85, 0x9f, 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, 0x2d, 0xc9, 0xd6, 0x22, 0xc7, 0x57, 0x12, - 0x1b, 0x38, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xbc, 0x92, 0x7a, 0x50, 0x02, - 0x00, 0x00, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd1, 0xcf, 0x4d, 0xcd, 0xcd, 0x2f, 0xaa, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x01, 0x2b, 0xd5, 0x03, 0x29, 0xd5, 0x83, 0x2b, 0xd5, + 0x83, 0x2a, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd4, 0x07, 0xb1, 0x20, 0x7a, 0xa4, + 0x34, 0x90, 0x8c, 0x4f, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x01, 0x9b, 0x8f, 0xe0, 0x41, + 0x55, 0x1a, 0xe0, 0x75, 0x08, 0x4c, 0xa4, 0x2c, 0x31, 0xa7, 0x14, 0xaa, 0x43, 0x69, 0x0d, 0x13, + 0x17, 0x9b, 0x2f, 0xd8, 0x81, 0x42, 0x29, 0x5c, 0x1c, 0x85, 0xa5, 0x89, 0x79, 0x25, 0x99, 0x25, + 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0xda, 0x7a, 0xf8, 0x5c, 0xab, 0x17, 0x04, 0x15, + 0x09, 0x03, 0x99, 0xe7, 0x24, 0x7d, 0xe2, 0x9e, 0x3c, 0xc3, 0xab, 0x7b, 0xf2, 0x2c, 0xc5, 0x99, + 0x55, 0xa9, 0x9f, 0xee, 0xc9, 0x73, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x81, 0x78, 0x4a, 0x41, + 0x70, 0x93, 0x85, 0xb6, 0x32, 0x72, 0x71, 0x21, 0x3c, 0x21, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, + 0xa4, 0x8c, 0x6c, 0x11, 0x42, 0x56, 0xaf, 0xcc, 0x50, 0xcf, 0x11, 0xc6, 0x73, 0x2a, 0x80, 0x5a, + 0x20, 0x82, 0x50, 0xa0, 0x93, 0x9f, 0x9b, 0x59, 0x92, 0x9a, 0x5b, 0x50, 0x52, 0xf9, 0xe9, 0x9e, + 0xbc, 0x34, 0xc4, 0x42, 0x6c, 0xb2, 0x4a, 0xab, 0xee, 0xcb, 0x1b, 0x16, 0x64, 0xa7, 0xeb, 0x25, + 0x66, 0x97, 0xe8, 0x65, 0x82, 0x02, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0x55, 0xbf, 0xa4, 0xb2, 0x20, + 0xb5, 0x18, 0x35, 0x4c, 0x11, 0x16, 0x16, 0x07, 0x21, 0x39, 0xd4, 0x8a, 0xe5, 0xc5, 0x02, 0x79, + 0x46, 0x27, 0x97, 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, 0xd2, 0xc2, 0x69, + 0x3c, 0x46, 0x44, 0x24, 0xb1, 0x81, 0xc3, 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x29, 0x83, + 0x92, 0x31, 0x38, 0x02, 0x00, 0x00, } func (this *Memory) Equal(that interface{}) bool { diff --git a/go/node/types/resources/v1/migrate/v1beta3.go b/go/node/types/resources/v1beta4/migrate/v1beta3.go similarity index 54% rename from go/node/types/resources/v1/migrate/v1beta3.go rename to go/node/types/resources/v1beta4/migrate/v1beta3.go index bf14ea20..5cf517ff 100644 --- a/go/node/types/resources/v1/migrate/v1beta3.go +++ b/go/node/types/resources/v1beta4/migrate/v1beta3.go @@ -1,53 +1,54 @@ package migrate import ( - attr "github.com/akash-network/akash-api/go/node/types/attributes/v1/migrate" - "github.com/akash-network/akash-api/go/node/types/resources/v1" "github.com/akash-network/akash-api/go/node/types/v1beta3" + + attr "pkg.akt.io/go/node/types/attributes/v1/migrate" + "pkg.akt.io/go/node/types/resources/v1beta4" ) -func ResourceValueFromV1Beta3(from v1beta3.ResourceValue) v1.ResourceValue { - return v1.NewResourceValue(from.Value()) +func ResourceValueFromV1Beta3(from v1beta3.ResourceValue) v1beta4.ResourceValue { + return v1beta4.NewResourceValue(from.Value()) } -func CPUFromV1Beta3(from *v1beta3.CPU) *v1.CPU { +func CPUFromV1Beta3(from *v1beta3.CPU) *v1beta4.CPU { if from == nil { return nil } - return &v1.CPU{ + return &v1beta4.CPU{ Units: ResourceValueFromV1Beta3(from.Units), Attributes: attr.AttributesFromV1Beta3(from.Attributes), } } -func GPUFromV1Beta3(from *v1beta3.GPU) *v1.GPU { +func GPUFromV1Beta3(from *v1beta3.GPU) *v1beta4.GPU { if from == nil { return nil } - return &v1.GPU{ + return &v1beta4.GPU{ Units: ResourceValueFromV1Beta3(from.Units), Attributes: attr.AttributesFromV1Beta3(from.Attributes), } } -func MemoryFromV1Beta3(from *v1beta3.Memory) *v1.Memory { +func MemoryFromV1Beta3(from *v1beta3.Memory) *v1beta4.Memory { if from == nil { return nil } - return &v1.Memory{ + return &v1beta4.Memory{ Quantity: ResourceValueFromV1Beta3(from.Quantity), Attributes: attr.AttributesFromV1Beta3(from.Attributes), } } -func VolumesFromV1Beta3(from v1beta3.Volumes) v1.Volumes { - res := make(v1.Volumes, 0, len(from)) +func VolumesFromV1Beta3(from v1beta3.Volumes) v1beta4.Volumes { + res := make(v1beta4.Volumes, 0, len(from)) for _, storage := range from { - res = append(res, v1.Storage{ + res = append(res, v1beta4.Storage{ Name: "default", Quantity: ResourceValueFromV1Beta3(storage.Quantity), Attributes: attr.AttributesFromV1Beta3(storage.Attributes), @@ -57,12 +58,12 @@ func VolumesFromV1Beta3(from v1beta3.Volumes) v1.Volumes { return res } -func EndpointsFromV1Beta3(from []v1beta3.Endpoint) []v1.Endpoint { - res := make([]v1.Endpoint, 0, len(from)) +func EndpointsFromV1Beta3(from []v1beta3.Endpoint) []v1beta4.Endpoint { + res := make([]v1beta4.Endpoint, 0, len(from)) for _, endpoint := range from { - res = append(res, v1.Endpoint{ - Kind: v1.Endpoint_Kind(endpoint.Kind), + res = append(res, v1beta4.Endpoint{ + Kind: v1beta4.Endpoint_Kind(endpoint.Kind), SequenceNumber: endpoint.SequenceNumber, }) } @@ -70,8 +71,8 @@ func EndpointsFromV1Beta3(from []v1beta3.Endpoint) []v1.Endpoint { return res } -func ResourcesFromV1Beta3(id uint32, from v1beta3.Resources) v1.Resources { - return v1.Resources{ +func ResourcesFromV1Beta3(id uint32, from v1beta3.Resources) v1beta4.Resources { + return v1beta4.Resources{ ID: id, CPU: CPUFromV1Beta3(from.CPU), GPU: GPUFromV1Beta3(from.GPU), diff --git a/go/node/types/resources/v1/resources.go b/go/node/types/resources/v1beta4/resources.go similarity index 99% rename from go/node/types/resources/v1/resources.go rename to go/node/types/resources/v1beta4/resources.go index ad85ea47..27c5381d 100644 --- a/go/node/types/resources/v1/resources.go +++ b/go/node/types/resources/v1beta4/resources.go @@ -1,4 +1,4 @@ -package v1 +package v1beta4 import ( "fmt" diff --git a/go/node/types/resources/v1/resources.pb.go b/go/node/types/resources/v1beta4/resources.pb.go similarity index 80% rename from go/node/types/resources/v1/resources.pb.go rename to go/node/types/resources/v1beta4/resources.pb.go index e1c999fe..82e4f7e6 100644 --- a/go/node/types/resources/v1/resources.pb.go +++ b/go/node/types/resources/v1beta4/resources.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/resources.proto +// source: akash/base/resources/v1beta4/resources.proto -package v1 +package v1beta4 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -38,7 +38,7 @@ func (m *Resources) Reset() { *m = Resources{} } func (m *Resources) String() string { return proto.CompactTextString(m) } func (*Resources) ProtoMessage() {} func (*Resources) Descriptor() ([]byte, []int) { - return fileDescriptor_e333f38b73a40dee, []int{0} + return fileDescriptor_77fa11db58d9f9a3, []int{0} } func (m *Resources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -110,46 +110,45 @@ func (m *Resources) GetEndpoints() Endpoints { } func init() { - proto.RegisterType((*Resources)(nil), "akash.base.resources.v1.Resources") + proto.RegisterType((*Resources)(nil), "akash.base.resources.v1beta4.Resources") } func init() { - proto.RegisterFile("akash/base/resources/v1/resources.proto", fileDescriptor_e333f38b73a40dee) + proto.RegisterFile("akash/base/resources/v1beta4/resources.proto", fileDescriptor_77fa11db58d9f9a3) } -var fileDescriptor_e333f38b73a40dee = []byte{ - // 485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6b, 0xd4, 0x40, - 0x14, 0xc7, 0x77, 0xb2, 0xeb, 0x96, 0x4d, 0x29, 0x68, 0x2c, 0x34, 0x2e, 0x92, 0xd9, 0x06, 0x7f, - 0xac, 0xa0, 0x09, 0x6d, 0x3d, 0x15, 0x04, 0x49, 0xd5, 0xe2, 0x41, 0x28, 0x91, 0x2a, 0x78, 0xcb, - 0x26, 0xc3, 0x34, 0x74, 0xb3, 0x33, 0x64, 0x92, 0xca, 0x82, 0x77, 0xaf, 0xfe, 0x09, 0x9e, 0xfd, - 0x4b, 0xf6, 0xd8, 0xa3, 0xa7, 0x51, 0xb2, 0x17, 0xd9, 0x63, 0xff, 0x00, 0x91, 0x64, 0x26, 0x5d, - 0xd3, 0x76, 0xd8, 0xdb, 0xce, 0xbe, 0xcf, 0x7b, 0x9f, 0xbc, 0x2f, 0x4f, 0x7f, 0x1c, 0x9c, 0x06, - 0xec, 0xc4, 0x1d, 0x05, 0x0c, 0xb9, 0x29, 0x62, 0x24, 0x4f, 0x43, 0xc4, 0xdc, 0xb3, 0x9d, 0xe5, - 0xc3, 0xa1, 0x29, 0xc9, 0x88, 0xb1, 0x55, 0x81, 0x4e, 0x09, 0x3a, 0xcb, 0xda, 0xd9, 0x4e, 0x7f, - 0x13, 0x13, 0x4c, 0x2a, 0xc6, 0x2d, 0x7f, 0x09, 0xbc, 0xbf, 0xad, 0x9a, 0x1b, 0xd2, 0x7c, 0x15, - 0x82, 0x2f, 0x91, 0x07, 0x2a, 0x24, 0x41, 0x09, 0x49, 0xa7, 0x92, 0x7a, 0xa8, 0xa2, 0x58, 0x46, - 0xd2, 0x00, 0x23, 0x89, 0x3d, 0x52, 0x61, 0x68, 0x12, 0x51, 0x12, 0x4f, 0x32, 0xc1, 0xd9, 0x7f, - 0x3b, 0x7a, 0xcf, 0xaf, 0xeb, 0xc6, 0x13, 0x5d, 0x8b, 0x23, 0x13, 0x0c, 0xc0, 0x70, 0xc3, 0xbb, - 0x57, 0x70, 0xa8, 0xbd, 0x7d, 0xb5, 0xe0, 0x50, 0x8b, 0xa3, 0x0b, 0x0e, 0x7b, 0xd3, 0x20, 0x19, - 0xef, 0xdb, 0x71, 0x64, 0xfb, 0x5a, 0x1c, 0x19, 0x91, 0xde, 0x0e, 0x69, 0x6e, 0x6a, 0x03, 0x30, - 0x5c, 0xdf, 0xbd, 0xef, 0x28, 0x02, 0x73, 0x0e, 0x8e, 0x8e, 0xbd, 0xe7, 0x33, 0x0e, 0x41, 0xc1, - 0x61, 0xfb, 0xe0, 0xe8, 0x78, 0xc1, 0xe1, 0x46, 0x48, 0xf3, 0xa7, 0x24, 0x89, 0x33, 0x94, 0xd0, - 0x6c, 0x7a, 0xc1, 0xe1, 0xa6, 0x98, 0xdc, 0xf8, 0xdb, 0xf6, 0xcb, 0xf1, 0xc6, 0x58, 0xef, 0x8a, - 0xed, 0xcd, 0x76, 0x25, 0x82, 0x4a, 0xd1, 0xbb, 0x0a, 0xf3, 0xf6, 0x4a, 0xd7, 0x82, 0xc3, 0xdb, - 0xa2, 0xad, 0xe1, 0xd9, 0x12, 0x9e, 0xab, 0x15, 0xdb, 0x97, 0x0e, 0xe3, 0x8b, 0xbe, 0x26, 0x53, - 0x34, 0x3b, 0x83, 0xf6, 0x70, 0x7d, 0x77, 0xa0, 0xd4, 0xbd, 0x17, 0x9c, 0xf7, 0x72, 0xc6, 0x61, - 0x6b, 0xc1, 0xe1, 0x1d, 0xd9, 0xd8, 0x10, 0x9a, 0x42, 0x78, 0xad, 0x64, 0xff, 0xf8, 0x05, 0xd7, - 0x3e, 0x90, 0x71, 0x9e, 0x20, 0xe6, 0xd7, 0xca, 0x32, 0x51, 0x4c, 0x73, 0xf3, 0xd6, 0x8a, 0x44, - 0x0f, 0xff, 0x4f, 0xf4, 0x50, 0x24, 0x8a, 0x6f, 0x4e, 0x14, 0x5f, 0x49, 0x14, 0xd3, 0xdc, 0xf8, - 0x0a, 0xf4, 0x5e, 0x7d, 0x03, 0xcc, 0xec, 0x56, 0x6b, 0x6e, 0x2b, 0x65, 0xaf, 0x25, 0xe9, 0xbd, - 0x91, 0x7b, 0xde, 0xbd, 0xec, 0x6d, 0x08, 0xfb, 0x42, 0x78, 0x43, 0xb1, 0xdc, 0xb5, 0x57, 0x8f, - 0x61, 0xfe, 0xd2, 0xbd, 0xdf, 0xf9, 0xf3, 0x1d, 0x02, 0xef, 0xe3, 0xac, 0xb0, 0xc0, 0x79, 0x61, - 0x81, 0xdf, 0x85, 0x05, 0xbe, 0xcd, 0xad, 0xd6, 0xf9, 0xdc, 0x6a, 0xfd, 0x9c, 0x5b, 0xad, 0x4f, - 0x2f, 0x70, 0x9c, 0x9d, 0xe4, 0x23, 0x27, 0x24, 0x89, 0x5b, 0x7d, 0xdf, 0xb3, 0x09, 0xca, 0x3e, - 0x93, 0xf4, 0x54, 0xbe, 0x02, 0x1a, 0xbb, 0x98, 0xb8, 0x13, 0x12, 0x21, 0x37, 0x9b, 0x52, 0xc4, - 0x1a, 0x87, 0x3e, 0xea, 0x56, 0x07, 0xbe, 0xf7, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x1d, 0x2c, - 0x21, 0xf5, 0x03, 0x00, 0x00, +var fileDescriptor_77fa11db58d9f9a3 = []byte{ + // 476 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0x4e, 0x9b, 0x2a, 0xae, 0x2a, 0x81, 0xa9, 0x84, 0x89, 0x90, 0x2f, 0x58, 0x50, + 0xa5, 0xa5, 0xb2, 0x45, 0xdb, 0xa9, 0x13, 0x72, 0x0b, 0x15, 0x03, 0x52, 0x65, 0x54, 0x06, 0x36, + 0x27, 0x3e, 0x1d, 0xa7, 0xd4, 0xb9, 0xc3, 0x77, 0x46, 0xca, 0xc8, 0xce, 0xc0, 0xc8, 0xc8, 0xcc, + 0x27, 0xc9, 0xd8, 0x91, 0xe9, 0x40, 0xce, 0x82, 0x32, 0xf6, 0x13, 0x20, 0xfb, 0x2e, 0x0d, 0x69, + 0xab, 0x53, 0xb7, 0xe8, 0xde, 0xef, 0xbd, 0x5f, 0xde, 0x5f, 0xcf, 0xf6, 0x6e, 0x32, 0x4c, 0xf8, + 0xc7, 0xb0, 0x9f, 0x70, 0x14, 0xe6, 0x88, 0xd3, 0x22, 0x1f, 0x20, 0x1e, 0x7e, 0x7e, 0xd1, 0x47, + 0x22, 0x39, 0x58, 0xbc, 0x04, 0x2c, 0xa7, 0x82, 0x3a, 0x8f, 0x6b, 0x3a, 0xa8, 0xe8, 0x60, 0x51, + 0xd3, 0x74, 0x67, 0x13, 0x53, 0x4c, 0x6b, 0x30, 0xac, 0x7e, 0xa9, 0x9e, 0xce, 0x96, 0xd1, 0x30, + 0x60, 0xc5, 0x9d, 0x38, 0x7c, 0xc5, 0x6d, 0x1b, 0xb9, 0x0c, 0x65, 0x34, 0x1f, 0x6b, 0x74, 0xc7, + 0x88, 0x72, 0x41, 0xf3, 0x04, 0x23, 0xcd, 0x3e, 0x37, 0xb2, 0x68, 0x94, 0x32, 0x4a, 0x46, 0x42, + 0xc1, 0xfe, 0xf7, 0x55, 0xbb, 0x1d, 0xcf, 0x21, 0x67, 0xdb, 0xb6, 0x48, 0xea, 0x82, 0x2e, 0xe8, + 0x6d, 0x44, 0x8f, 0x4a, 0x09, 0xad, 0x37, 0xc7, 0x33, 0x09, 0x2d, 0x92, 0x5e, 0x4a, 0xd8, 0x1e, + 0x27, 0xd9, 0xf9, 0xa1, 0x4f, 0x52, 0x3f, 0xb6, 0x48, 0xea, 0x10, 0xbb, 0x39, 0x60, 0x85, 0x6b, + 0x75, 0x41, 0x6f, 0x7d, 0xef, 0x49, 0x60, 0x8a, 0x33, 0x38, 0x3a, 0x3d, 0x8b, 0x0e, 0x26, 0x12, + 0x82, 0x52, 0xc2, 0xe6, 0xd1, 0xe9, 0xd9, 0x4c, 0xc2, 0x8d, 0x01, 0x2b, 0x76, 0x69, 0x46, 0x04, + 0xca, 0x98, 0x18, 0x5f, 0x4a, 0xb8, 0xa9, 0xc6, 0x2f, 0x3d, 0xfb, 0x71, 0xe5, 0x70, 0x3e, 0xd9, + 0x2d, 0x15, 0x86, 0xdb, 0xac, 0x6d, 0x4f, 0xcd, 0xb6, 0xb7, 0x35, 0x1b, 0xed, 0x57, 0xc2, 0x99, + 0x84, 0xf7, 0x54, 0xef, 0x92, 0xec, 0xa1, 0x92, 0x5d, 0xaf, 0xf8, 0xb1, 0x16, 0x39, 0x5f, 0x80, + 0xbd, 0xa6, 0x53, 0x75, 0x57, 0xba, 0xcd, 0xde, 0xfa, 0xde, 0x33, 0xb3, 0xf4, 0x9d, 0x82, 0xa3, + 0x97, 0x13, 0x09, 0x1b, 0x33, 0x09, 0xef, 0xeb, 0xee, 0x25, 0xad, 0xab, 0xb4, 0x37, 0x4a, 0xfe, + 0xcf, 0xdf, 0x70, 0xed, 0x3d, 0x3d, 0x2f, 0x32, 0xc4, 0xe3, 0xb9, 0xb7, 0x4a, 0x18, 0xb3, 0xc2, + 0x5d, 0xbd, 0x4b, 0xc2, 0x27, 0xff, 0x27, 0x7c, 0xa2, 0x12, 0xc6, 0xb7, 0x27, 0x8c, 0xaf, 0x25, + 0x8c, 0x59, 0xe1, 0x7c, 0x05, 0x76, 0x7b, 0x7e, 0x18, 0xdc, 0x6d, 0xd5, 0x0b, 0x6f, 0x99, 0x8d, + 0xaf, 0x34, 0x1e, 0xbd, 0xd6, 0x1b, 0x3f, 0xb8, 0x1a, 0xb0, 0x64, 0xed, 0x28, 0xeb, 0x2d, 0xc5, + 0x6a, 0xeb, 0xf6, 0x7c, 0x0c, 0x8f, 0x17, 0x7f, 0xe0, 0x70, 0xe5, 0xef, 0x0f, 0x08, 0xa2, 0xe3, + 0x49, 0xe9, 0x81, 0x8b, 0xd2, 0x03, 0x7f, 0x4a, 0x0f, 0x7c, 0x9b, 0x7a, 0x8d, 0x8b, 0xa9, 0xd7, + 0xf8, 0x35, 0xf5, 0x1a, 0x1f, 0x76, 0xd8, 0x10, 0x07, 0xc9, 0x50, 0x04, 0xa4, 0xfa, 0x3e, 0xc3, + 0x11, 0x4d, 0x51, 0x28, 0xc6, 0x0c, 0xf1, 0x9b, 0xf7, 0xde, 0x6f, 0xd5, 0x77, 0xbe, 0xff, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0xbe, 0x50, 0xca, 0x8a, 0x1f, 0x04, 0x00, 0x00, } func (this *Resources) Equal(that interface{}) bool { diff --git a/go/node/types/v1beta3/resources_test.go b/go/node/types/resources/v1beta4/resources_test.go similarity index 95% rename from go/node/types/v1beta3/resources_test.go rename to go/node/types/resources/v1beta4/resources_test.go index f9a15ab9..98aec86f 100644 --- a/go/node/types/v1beta3/resources_test.go +++ b/go/node/types/resources/v1beta4/resources_test.go @@ -1,9 +1,11 @@ -package v1beta3 +package v1beta4 import ( "testing" "github.com/stretchr/testify/require" + + attr "pkg.akt.io/go/node/types/attributes/v1" ) func TestVolumes_Dup(t *testing.T) { @@ -11,7 +13,7 @@ func TestVolumes_Dup(t *testing.T) { Storage{ Name: "default", Quantity: NewResourceValue(100), - Attributes: Attributes{}, + Attributes: attr.Attributes{}, }, } @@ -25,7 +27,7 @@ func TestVolumes_Equal(t *testing.T) { Storage{ Name: "default", Quantity: NewResourceValue(100), - Attributes: Attributes{}, + Attributes: attr.Attributes{}, }, } diff --git a/go/node/types/v1beta2/resourcevalue.go b/go/node/types/resources/v1beta4/resourcevalue.go similarity index 98% rename from go/node/types/v1beta2/resourcevalue.go rename to go/node/types/resources/v1beta4/resourcevalue.go index c9eb9d94..ee9c107c 100644 --- a/go/node/types/v1beta2/resourcevalue.go +++ b/go/node/types/resources/v1beta4/resourcevalue.go @@ -1,4 +1,4 @@ -package v1beta2 +package v1beta4 import ( sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/go/node/types/resources/v1/resourcevalue.pb.go b/go/node/types/resources/v1beta4/resourcevalue.pb.go similarity index 81% rename from go/node/types/resources/v1/resourcevalue.pb.go rename to go/node/types/resources/v1beta4/resourcevalue.pb.go index ec257e34..0802a5a0 100644 --- a/go/node/types/resources/v1/resourcevalue.pb.go +++ b/go/node/types/resources/v1beta4/resourcevalue.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/resourcevalue.proto +// source: akash/base/resources/v1beta4/resourcevalue.proto -package v1 +package v1beta4 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -33,7 +33,7 @@ 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_3f765cba700bf328, []int{0} + return fileDescriptor_ba63ba8298019f93, []int{0} } func (m *ResourceValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -63,30 +63,29 @@ func (m *ResourceValue) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceValue proto.InternalMessageInfo func init() { - proto.RegisterType((*ResourceValue)(nil), "akash.base.resources.v1.ResourceValue") + proto.RegisterType((*ResourceValue)(nil), "akash.base.resources.v1beta4.ResourceValue") } func init() { - proto.RegisterFile("akash/base/resources/v1/resourcevalue.proto", fileDescriptor_3f765cba700bf328) + proto.RegisterFile("akash/base/resources/v1beta4/resourcevalue.proto", fileDescriptor_ba63ba8298019f93) } -var fileDescriptor_3f765cba700bf328 = []byte{ - // 228 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0xcc, 0x4e, 0x2c, +var fileDescriptor_ba63ba8298019f93 = []byte{ + // 224 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x48, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0x84, 0x73, 0xca, 0x12, 0x73, 0x4a, 0x53, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, - 0x85, 0xc4, 0xc1, 0x8a, 0xf5, 0x40, 0x8a, 0xf5, 0xe0, 0x8a, 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, - 0xf3, 0xd3, 0xf3, 0xc1, 0x6a, 0xf4, 0x41, 0x2c, 0x88, 0x72, 0xa5, 0x70, 0x2e, 0xde, 0x20, 0xa8, - 0xaa, 0x30, 0x90, 0x29, 0x42, 0x0e, 0x5c, 0xcc, 0x65, 0x89, 0x39, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, - 0x3c, 0x4e, 0x7a, 0x27, 0xee, 0xc9, 0x33, 0xdc, 0xba, 0x27, 0xaf, 0x96, 0x9e, 0x59, 0x92, 0x51, - 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x0c, 0xa5, 0x74, 0x8b, - 0x53, 0xb2, 0xf5, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0xf5, 0x3c, 0xf3, 0x4a, 0x82, 0x40, 0x5a, 0xad, - 0x58, 0x5e, 0x2c, 0x90, 0x67, 0x74, 0x0a, 0x3f, 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, 0x5b, 0x24, 0xc3, 0xc0, 0x8e, 0xd5, 0xcd, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0x86, - 0xf2, 0x12, 0x0b, 0x32, 0xf5, 0xd3, 0xf3, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x21, 0x46, 0xa3, 0x78, - 0x3a, 0x89, 0x0d, 0xec, 0x70, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x18, 0xc0, 0x86, - 0x16, 0x01, 0x00, 0x00, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x81, 0x8b, 0x94, 0x25, 0xe6, 0x94, 0xa6, 0xea, + 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0x80, 0x75, 0xe8, 0x81, 0x74, 0xe8, 0xc1, 0x75, 0xe8, + 0x41, 0x75, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x15, 0xea, 0x83, 0x58, 0x10, 0x3d, 0x4a, + 0xe1, 0x5c, 0xbc, 0x41, 0x50, 0xa5, 0x61, 0x20, 0xa3, 0x84, 0x1c, 0xb8, 0x98, 0xcb, 0x12, 0x73, + 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x9c, 0xf4, 0x4e, 0xdc, 0x93, 0x67, 0xb8, 0x75, 0x4f, 0x5e, + 0x2d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x39, 0xbf, 0x38, 0x37, + 0xbf, 0x18, 0x4a, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x79, 0xe6, + 0x95, 0x04, 0x81, 0xb4, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xe8, 0xe4, 0x72, 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, 0x5a, 0x05, 0xd9, 0xe9, 0x7a, 0x89, 0xd9, 0x25, 0x7a, + 0x99, 0x20, 0x97, 0xe8, 0xe7, 0xe5, 0xa7, 0xa4, 0x42, 0x8c, 0xc0, 0xf4, 0x66, 0x12, 0x1b, 0xd8, + 0x95, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0x12, 0x61, 0x49, 0x0d, 0x01, 0x00, 0x00, } func (this *ResourceValue) Equal(that interface{}) bool { diff --git a/go/node/types/resources/v1/storage.pb.go b/go/node/types/resources/v1beta4/storage.pb.go similarity index 73% rename from go/node/types/resources/v1/storage.pb.go rename to go/node/types/resources/v1beta4/storage.pb.go index 496afd03..d0ef0ed5 100644 --- a/go/node/types/resources/v1/storage.pb.go +++ b/go/node/types/resources/v1beta4/storage.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/resources/v1/storage.proto +// source: akash/base/resources/v1beta4/storage.proto -package v1 +package v1beta4 import ( fmt "fmt" - github_com_akash_network_akash_api_go_node_types_attributes_v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - v1 "github.com/akash-network/akash-api/go/node/types/attributes/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_node_types_attributes_v1 "pkg.akt.io/go/node/types/attributes/v1" + v1 "pkg.akt.io/go/node/types/attributes/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,16 +27,16 @@ 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 github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes" json:"attributes,omitempty" yaml:"attributes,omitempty"` + 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 pkg_akt_io_go_node_types_attributes_v1.Attributes `protobuf:"bytes,3,rep,name=attributes,proto3,castrepeated=pkg.akt.io/go/node/types/attributes/v1.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_3700e07ed3ea303d, []int{0} + return fileDescriptor_b74847f898008a0e, []int{0} } func (m *Storage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ func (m *Storage) GetQuantity() ResourceValue { return ResourceValue{} } -func (m *Storage) GetAttributes() github_com_akash_network_akash_api_go_node_types_attributes_v1.Attributes { +func (m *Storage) GetAttributes() pkg_akt_io_go_node_types_attributes_v1.Attributes { if m != nil { return m.Attributes } @@ -87,38 +87,38 @@ func (m *Storage) GetAttributes() github_com_akash_network_akash_api_go_node_typ } func init() { - proto.RegisterType((*Storage)(nil), "akash.base.resources.v1.Storage") + proto.RegisterType((*Storage)(nil), "akash.base.resources.v1beta4.Storage") } func init() { - proto.RegisterFile("akash/base/resources/v1/storage.proto", fileDescriptor_3700e07ed3ea303d) + proto.RegisterFile("akash/base/resources/v1beta4/storage.proto", fileDescriptor_b74847f898008a0e) } -var fileDescriptor_3700e07ed3ea303d = []byte{ - // 365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xcc, 0x4e, 0x2c, +var fileDescriptor_b74847f898008a0e = []byte{ + // 353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4a, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x4a, 0x2d, 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0x2d, - 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0xc9, 0x2f, 0x4a, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x12, 0x07, 0x2b, 0xd3, 0x03, 0x29, 0xd3, 0x83, 0x2b, 0xd3, 0x2b, 0x33, 0x94, 0x12, - 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 0xb1, 0x20, 0xca, 0xa5, 0x34, 0x90, 0x4c, 0x4d, - 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x81, 0x18, 0x0b, 0xe7, 0x41, 0x55, 0x6a, 0xe3, 0xb2, - 0x1f, 0xc6, 0x29, 0x4b, 0xcc, 0x29, 0x85, 0x2a, 0x56, 0x7a, 0xc7, 0xc4, 0xc5, 0x1e, 0x0c, 0x71, - 0x97, 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, 0x9e, 0x8b, 0xa3, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, - 0xa4, 0x52, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x4d, 0x0f, 0x87, 0x8f, 0xf4, 0x82, 0xa0, - 0x9c, 0x30, 0x90, 0xc5, 0x4e, 0xd2, 0x27, 0xee, 0xc9, 0x33, 0x80, 0x0c, 0x2f, 0xce, 0xac, 0x42, - 0x32, 0x1c, 0xc4, 0x53, 0x0a, 0x82, 0x1b, 0x2a, 0x74, 0x8e, 0x91, 0x8b, 0x0b, 0xe1, 0x51, 0x09, - 0x66, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x65, 0x64, 0x3b, 0x10, 0xb2, 0x20, 0x4b, 0x1c, 0x61, 0x3c, - 0xa7, 0x0e, 0x46, 0xa8, 0x0d, 0x22, 0x08, 0x15, 0x3a, 0xf9, 0xb9, 0x99, 0x25, 0xa9, 0xb9, 0x05, - 0x25, 0x95, 0x9f, 0xee, 0xc9, 0x4b, 0x43, 0x6c, 0xc4, 0x26, 0xab, 0xb4, 0xea, 0xbe, 0xbc, 0x67, - 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd8, 0x3a, 0xdd, 0xbc, 0xd4, - 0x92, 0xf2, 0xfc, 0xa2, 0x6c, 0x28, 0x2f, 0xb1, 0x20, 0x53, 0x3f, 0x3d, 0x5f, 0x3f, 0x2f, 0x3f, - 0x25, 0x55, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x18, 0x35, 0x42, 0x10, 0x2e, 0x29, 0x0e, 0x42, 0xf2, - 0x81, 0x15, 0xcb, 0x8b, 0x05, 0xf2, 0x8c, 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, 0x4b, 0xb2, 0xb5, 0xc8, 0xb1, 0x9b, 0xc4, 0x06, 0x8e, 0x50, 0x63, 0x40, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x38, 0xde, 0x87, 0x7f, 0x02, 0x00, 0x00, + 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd1, 0x2f, 0x2e, 0xc9, 0x2f, 0x4a, 0x4c, 0x4f, + 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x01, 0xab, 0xd5, 0x03, 0xa9, 0xd5, 0x83, 0xab, + 0xd5, 0x83, 0xaa, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd4, 0x07, 0xb1, 0x20, 0x7a, + 0xa4, 0x34, 0x90, 0xcc, 0x4f, 0x2c, 0x29, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x01, 0x5b, 0x80, 0xe0, + 0x41, 0x55, 0x1a, 0xe0, 0x75, 0x09, 0x4c, 0xa4, 0x2c, 0x31, 0xa7, 0x14, 0xaa, 0x43, 0xe9, 0x16, + 0x13, 0x17, 0x7b, 0x30, 0xc4, 0x85, 0x42, 0xda, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, + 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0xe2, 0xaf, 0xee, 0xc9, 0x83, 0xf9, 0x9f, 0xee, 0xc9, 0x73, 0x57, + 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x81, 0x78, 0x4a, 0x41, 0x60, 0x41, 0xa1, 0x14, 0x2e, 0x8e, 0xc2, + 0xd2, 0xc4, 0xbc, 0x92, 0xcc, 0x92, 0x4a, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x6d, 0x3d, + 0x7c, 0x7e, 0xd3, 0x0b, 0x82, 0x8a, 0x84, 0x81, 0x6c, 0x77, 0x92, 0x3e, 0x71, 0x4f, 0x9e, 0x01, + 0x64, 0x43, 0x71, 0x66, 0x15, 0x92, 0x0d, 0x20, 0x9e, 0x52, 0x10, 0xdc, 0x64, 0xa1, 0xad, 0x8c, + 0x5c, 0x5c, 0x08, 0x2f, 0x4b, 0x30, 0x2b, 0x30, 0x6b, 0x70, 0x1b, 0x29, 0x23, 0x5b, 0x84, 0x90, + 0xd5, 0x2b, 0x33, 0xd4, 0x73, 0x84, 0xf1, 0x9c, 0x0a, 0xa0, 0x16, 0x88, 0x20, 0x14, 0xe8, 0xe4, + 0xe7, 0x66, 0x96, 0xa4, 0xe6, 0x16, 0x94, 0x54, 0x7e, 0xba, 0x27, 0x2f, 0x0d, 0xb1, 0x10, 0x9b, + 0xac, 0xd2, 0xaa, 0xfb, 0xf2, 0x86, 0x05, 0xd9, 0xe9, 0x7a, 0x89, 0xd9, 0x25, 0x7a, 0x99, 0xa0, + 0xa8, 0xd0, 0xcf, 0xcb, 0x4f, 0x49, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x46, 0x8d, 0x01, 0x84, + 0x85, 0xc5, 0x41, 0x48, 0x0e, 0xb5, 0x62, 0x79, 0xb1, 0x40, 0x9e, 0xd1, 0xc9, 0xe5, 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, 0xb4, 0x70, 0x1a, 0x8f, 0x11, 0x6d, 0x49, 0x6c, + 0xe0, 0x98, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x7d, 0x1e, 0x17, 0x67, 0x02, 0x00, + 0x00, } func (this *Storage) Equal(that interface{}) bool { diff --git a/go/node/types/v1beta1/attribute.go b/go/node/types/v1beta1/attribute.go deleted file mode 100644 index 98aace15..00000000 --- a/go/node/types/v1beta1/attribute.go +++ /dev/null @@ -1,138 +0,0 @@ -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 deleted file mode 100644 index 955ea105..00000000 --- a/go/node/types/v1beta1/attribute.pb.go +++ /dev/null @@ -1,812 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta1/attribute.proto - -package v1beta1 - -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 - -// 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 deleted file mode 100644 index dc76b893..00000000 --- a/go/node/types/v1beta1/attribute_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package v1beta1_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - types "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 3df47cd7..00000000 --- a/go/node/types/v1beta1/endpoint.pb.go +++ /dev/null @@ -1,358 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta1/endpoint.proto - -package v1beta1 - -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 - -// 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 deleted file mode 100644 index 1e463bd0..00000000 --- a/go/node/types/v1beta1/requirements.go +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 6e8aac92..00000000 --- a/go/node/types/v1beta1/resource.go +++ /dev/null @@ -1,303 +0,0 @@ -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 deleted file mode 100644 index 36c995a4..00000000 --- a/go/node/types/v1beta1/resource.pb.go +++ /dev/null @@ -1,1370 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta1/resource.proto - -package v1beta1 - -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 - -// 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 deleted file mode 100644 index dcb58fd4..00000000 --- a/go/node/types/v1beta1/resourcevalue.go +++ /dev/null @@ -1,80 +0,0 @@ -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 deleted file mode 100644 index 0809fce8..00000000 --- a/go/node/types/v1beta1/resourcevalue.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index 3f5f73ea..00000000 --- a/go/node/types/v1beta1/resourcevalue_test.go +++ /dev/null @@ -1,55 +0,0 @@ -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 deleted file mode 100644 index a61b2859..00000000 --- a/go/node/types/v1beta2/attribute.go +++ /dev/null @@ -1,285 +0,0 @@ -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 deleted file mode 100644 index 5adc36ce..00000000 --- a/go/node/types/v1beta2/attribute.pb.go +++ /dev/null @@ -1,812 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta2/attribute.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 - -// 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 deleted file mode 100644 index 5d7a9e6e..00000000 --- a/go/node/types/v1beta2/endpoint.go +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index edd3c9e6..00000000 --- a/go/node/types/v1beta2/endpoint.pb.go +++ /dev/null @@ -1,405 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta2/endpoint.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 - -// 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 deleted file mode 100644 index 0ea820a8..00000000 --- a/go/node/types/v1beta2/migrate/v1beta1.go +++ /dev/null @@ -1,96 +0,0 @@ -package migrate - -import ( - "github.com/akash-network/akash-api/go/node/types/v1beta1" - "github.com/akash-network/akash-api/go/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 deleted file mode 100644 index 625abcaf..00000000 --- a/go/node/types/v1beta2/requirements.go +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index ba5b317a..00000000 --- a/go/node/types/v1beta2/resource.go +++ /dev/null @@ -1,82 +0,0 @@ -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 deleted file mode 100644 index 1badbcd0..00000000 --- a/go/node/types/v1beta2/resource.pb.go +++ /dev/null @@ -1,1015 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta2/resource.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 - -// 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 deleted file mode 100644 index 7e8ffab5..00000000 --- a/go/node/types/v1beta2/resourceunits.pb.go +++ /dev/null @@ -1,571 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta2/resourceunits.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 - -// 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.pb.go b/go/node/types/v1beta2/resourcevalue.pb.go deleted file mode 100644 index 9a0f0b10..00000000 --- a/go/node/types/v1beta2/resourcevalue.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// 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" - _ "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 - -// 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 deleted file mode 100644 index fa9038ac..00000000 --- a/go/node/types/v1beta3/attribute.go +++ /dev/null @@ -1,375 +0,0 @@ -package v1beta3 - -import ( - "errors" - "path/filepath" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - - "gopkg.in/yaml.v3" -) - -const ( - moduleName = "akash" - AttributeNameRegexpStringWildcard = `^([a-zA-Z][\w\/\.\-]{1,126}[\w\*]?)$` - AttributeNameRegexpString = `^([a-zA-Z][\w\/\.\-]{1,126})$` -) - -var ( - ErrAttributesDuplicateKeys = errors.New("attributes cannot have duplicate keys") - ErrInvalidAttributeKey = errors.New("attribute key does not match regexp") -) - -var ( - attributeNameRegexpWildcard = regexp.MustCompile(AttributeNameRegexpStringWildcard) -) - -/* -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 - -var _ sort.Interface = (*Attributes)(nil) - -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 (m PlacementRequirements) Dup() PlacementRequirements { - return PlacementRequirements{ - SignedBy: m.SignedBy, - Attributes: m.Attributes.Dup(), - } -} - -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 match, _ := filepath.Match(m.Key, rhs.Key); match && (m.Value == rhs.Value) { - return true - } - - return false -} - -func (attr Attributes) Len() int { - return len(attr) -} - -func (attr Attributes) Swap(i, j int) { - attr[i], attr[j] = attr[j], attr[i] -} - -func (attr Attributes) Less(i, j int) bool { - return attr[i].Key < attr[j].Key -} - -func (attr Attributes) Validate() error { - return attr.ValidateWithRegex(attributeNameRegexpWildcard) -} - -func (attr Attributes) ValidateWithRegex(r *regexp.Regexp) error { - store := make(map[string]bool) - - for i := range attr { - if !r.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 { - if attr == nil { - return nil - } - - res := make(Attributes, 0, 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 AttributesAnyOf(a, b Attributes) bool { - for _, req := range a { - for _, attr := range b { - if req.SubsetOf(attr) { - return true - } - } - } - - return false -} - -func (attr Attributes) SubsetOf(b Attributes) bool { - return AttributesSubsetOf(attr, b) -} - -func (attr Attributes) AnyOf(b Attributes) bool { - return AttributesAnyOf(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 -} - -func (attr Attributes) GetCapabilitiesMap(prefix string) AttributesGroup { - res := make(AttributesGroup, 0, 1) - groups := make(Attributes, 0, len(attr)) - - for _, item := range attr { - if !strings.HasPrefix(item.Key, "capabilities/"+prefix) { - continue - } - - tokens := strings.Split(strings.TrimPrefix(item.Key, "capabilities/"), "/") - // skip malformed attributes - if len(tokens) < 3 { - continue - } - - // filter out prefix name - tokens = tokens[1:] - - var key string - for i, token := range tokens { - if i == 0 { - key = token - } else { - key += "/" + token - } - } - - groups = append(groups, Attribute{ - Key: key, - Value: item.Value, - }) - } - - res = append(res, groups) - - 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 -} - -func (attr Attributes) AnyIN(group AttributesGroup) bool { - for _, group := range group { - if attr.AnyOf(group) { - return true - } - } - return false -} diff --git a/go/node/types/v1beta3/attribute.pb.go b/go/node/types/v1beta3/attribute.pb.go deleted file mode 100644 index 7c418f4e..00000000 --- a/go/node/types/v1beta3/attribute.pb.go +++ /dev/null @@ -1,812 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/attribute.proto - -package v1beta3 - -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 - -// 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 Attributes `protobuf:"bytes,2,rep,name=attributes,proto3,castrepeated=Attributes" 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{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x3f, 0x8f, 0xd3, 0x30, - 0x18, 0xc6, 0x93, 0x3b, 0xee, 0x74, 0xf1, 0x21, 0x74, 0x44, 0x20, 0x55, 0x27, 0xb0, 0x2b, 0x4b, - 0xa0, 0x5b, 0x88, 0xd5, 0x56, 0x48, 0xa8, 0x1b, 0xf9, 0x02, 0xa0, 0xb0, 0x95, 0xa1, 0x38, 0xad, - 0x9b, 0x46, 0x49, 0xe3, 0x12, 0x3b, 0x45, 0xd9, 0x18, 0x19, 0xf9, 0x08, 0xcc, 0x7c, 0x92, 0x8e, - 0x1d, 0x3b, 0x05, 0x48, 0xb7, 0x8e, 0x91, 0xd8, 0x51, 0x9c, 0x3f, 0x8d, 0xc4, 0x4d, 0x76, 0x9e, - 0xf7, 0xf9, 0xe5, 0x7d, 0x1f, 0xdb, 0x00, 0xd3, 0x80, 0x8a, 0x25, 0x71, 0xa9, 0x60, 0x64, 0x33, - 0x70, 0x99, 0xa4, 0x23, 0x42, 0xa5, 0x8c, 0x7d, 0x37, 0x91, 0xcc, 0x5a, 0xc7, 0x5c, 0x72, 0xd3, - 0x54, 0x1e, 0xab, 0xf4, 0x58, 0xb5, 0xe7, 0xf6, 0x89, 0xc7, 0x3d, 0xae, 0xca, 0xa4, 0xdc, 0x55, - 0x4e, 0xfc, 0x11, 0x18, 0x6f, 0x1b, 0xd8, 0xec, 0x83, 0xf3, 0x80, 0xa5, 0x3d, 0xbd, 0xaf, 0xdf, - 0x19, 0xf6, 0xa3, 0x22, 0x43, 0x20, 0xa5, 0xab, 0x70, 0x8c, 0x03, 0x96, 0x62, 0xa7, 0x2c, 0x99, - 0x2f, 0xc1, 0xc5, 0x86, 0x86, 0x09, 0xeb, 0x9d, 0x29, 0xcf, 0x4d, 0x91, 0xa1, 0x87, 0x95, 0x47, - 0xc9, 0xd8, 0xa9, 0xca, 0xe3, 0x07, 0xdf, 0x7e, 0x20, 0x0d, 0x6f, 0xc0, 0xd5, 0x07, 0xdf, 0x8b, - 0xd8, 0xdc, 0x4e, 0xcd, 0x01, 0xb8, 0xa4, 0x61, 0x38, 0xe5, 0x8b, 0x9e, 0xde, 0x3f, 0xbf, 0x33, - 0xec, 0xdb, 0x63, 0x86, 0x6a, 0xe5, 0xf4, 0x13, 0x1a, 0x86, 0xef, 0x16, 0xd8, 0xb9, 0x50, 0xab, - 0x42, 0xa2, 0xb4, 0x44, 0xce, 0x3a, 0x88, 0x52, 0x3a, 0x48, 0x94, 0x56, 0x48, 0xb9, 0xd6, 0x7d, - 0xff, 0xea, 0xe0, 0xe9, 0xfb, 0x90, 0xce, 0xd8, 0x8a, 0x45, 0xd2, 0x61, 0x9f, 0x13, 0x3f, 0x56, - 0x5b, 0x61, 0x7e, 0x02, 0x86, 0x50, 0x13, 0x4d, 0xdd, 0x2a, 0xe7, 0xf5, 0xf0, 0x99, 0xf5, 0xff, - 0x61, 0x59, 0xcd, 0xd8, 0xf6, 0x8b, 0x6d, 0x86, 0xb4, 0x63, 0x86, 0x4e, 0x58, 0x91, 0xa1, 0x9b, - 0xaa, 0x75, 0x2b, 0x61, 0xe7, 0x4a, 0x34, 0x39, 0x25, 0x00, 0xed, 0x6d, 0x08, 0x35, 0xf8, 0xf5, - 0xf0, 0xf9, 0x7d, 0x2d, 0xda, 0x63, 0xb7, 0x5f, 0xd7, 0x3d, 0x3a, 0x60, 0x91, 0xa1, 0xc7, 0x75, - 0xbe, 0x56, 0xc3, 0x3f, 0x7f, 0x21, 0xd0, 0x52, 0xc2, 0xe9, 0xd8, 0xab, 0xdc, 0xf6, 0x64, 0xff, - 0x07, 0x6a, 0x5f, 0x73, 0xa8, 0x6d, 0x73, 0xa8, 0xef, 0x72, 0xa8, 0xff, 0xce, 0xa1, 0xfe, 0xfd, - 0x00, 0xb5, 0xdd, 0x01, 0x6a, 0xfb, 0x03, 0xd4, 0x26, 0x6f, 0x3c, 0x5f, 0x2e, 0x13, 0xd7, 0x9a, - 0xf1, 0x15, 0x51, 0x33, 0xbd, 0x8a, 0x98, 0xfc, 0xc2, 0xe3, 0xa0, 0xfe, 0xa2, 0x6b, 0x9f, 0x78, - 0x9c, 0x44, 0x7c, 0xce, 0x88, 0x4c, 0xd7, 0x4c, 0x34, 0x4f, 0xcc, 0xbd, 0x54, 0xef, 0x65, 0xf4, - 0x2f, 0x00, 0x00, 0xff, 0xff, 0xce, 0xbe, 0x99, 0x37, 0x7f, 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 deleted file mode 100644 index 17894962..00000000 --- a/go/node/types/v1beta3/attribute_test.go +++ /dev/null @@ -1,182 +0,0 @@ -package v1beta3 - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -type regexTest struct { - runName string - key string - shouldPass bool -} - -func TestAttributes_Validate(t *testing.T) { - attr := Attributes{ - {Key: "key"}, - {Key: "key"}, - } - - require.EqualError(t, attr.Validate(), ErrAttributesDuplicateKeys.Error()) - - // unsupported key symbol - attr = Attributes{ - {Key: "$"}, - } - - require.EqualError(t, attr.Validate(), ErrInvalidAttributeKey.Error()) - - // empty key - attr = Attributes{ - {Key: ""}, - } - - require.EqualError(t, attr.Validate(), ErrInvalidAttributeKey.Error()) - // to long key - attr = Attributes{ - {Key: "sdgkhaeirugaeroigheirghseiargfs3ssdgkhaeirugaeroigheirghseiargfs3sdgkhaeirugaeroigheirghseiargfs3ssdgkhaeirugaeroigheirghseiargfs3"}, - } - - require.EqualError(t, attr.Validate(), ErrInvalidAttributeKey.Error()) -} - -func TestAttribute_Equal(t *testing.T) { - attr1 := &Attribute{Key: "key1", Value: "val1"} - attr2 := &Attribute{Key: "key1", Value: "val1"} - attr3 := &Attribute{Key: "key1", Value: "val2"} - - require.True(t, attr1.Equal(attr2)) - require.False(t, attr1.Equal(attr3)) -} - -func TestAttribute_SubsetOf(t *testing.T) { - attr1 := Attribute{Key: "key1", Value: "val1"} - attr2 := Attribute{Key: "key1", Value: "val1"} - attr3 := Attribute{Key: "key1", Value: "val2"} - - require.True(t, attr1.SubsetOf(attr2)) - require.False(t, attr1.SubsetOf(attr3)) -} - -func TestAttribute_AnyOf(t *testing.T) { - attr1 := Attribute{Key: "key1", Value: "val1"} - attr2 := Attribute{Key: "key1", Value: "val1"} - attr3 := Attribute{Key: "key1", Value: "val2"} - - require.True(t, attr1.SubsetOf(attr2)) - require.False(t, attr1.SubsetOf(attr3)) -} - -func TestAttributes_SubsetOf(t *testing.T) { - attr1 := Attributes{ - {Key: "key1", Value: "val1"}, - } - - attr2 := Attributes{ - {Key: "key1", Value: "val1"}, - {Key: "key2", Value: "val2"}, - } - - attr3 := Attributes{ - {Key: "key1", Value: "val1"}, - {Key: "key2", Value: "val2"}, - {Key: "key3", Value: "val3"}, - {Key: "key4", Value: "val4"}, - } - - attr4 := 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)) -} - -func TestAttributes_AnyOf(t *testing.T) { - attr1 := Attributes{ - {Key: "key1", Value: "val1"}, - } - - attr2 := Attributes{ - {Key: "key1", Value: "val1"}, - {Key: "key2", Value: "val2"}, - } - - attr3 := Attributes{ - {Key: "key1", Value: "val1"}, - {Key: "key2", Value: "val2"}, - {Key: "key3", Value: "val3"}, - {Key: "key4", Value: "val4"}, - } - - attr4 := Attributes{ - {Key: "key3", Value: "val3"}, - {Key: "key4", Value: "val4"}, - } - - require.True(t, attr1.AnyOf(attr2)) - require.True(t, attr2.AnyOf(attr1)) - require.True(t, attr2.AnyOf(attr3)) - require.False(t, attr1.AnyOf(attr4)) -} - -func TestAttributeRegex(t *testing.T) { - tests := []regexTest{ - { - "arbitrary key", - "key1", - true, - }, - { - "allow trailing wildcard", - "key1*", - true, - }, - { - "allow trailing wildcard", - "key1/*", - true, - }, - { - "leading wildcard is not allowed", - "*key1", - false, - }, - { - "multiple wildcards are not allowed", - "key1**", - false, - }, - { - "wildcards in the middle of key are not allowed", - "key1*/", - false, - }, - { - "wildcards in the middle of key are not allowed", - "key1/*/", - false, - }, - } - - for _, test := range tests { - t.Run(test.runName, func(t *testing.T) { - require.Equal(t, test.shouldPass, attributeNameRegexpWildcard.MatchString(test.key)) - }) - } -} - -func TestAttributes_Dup(t *testing.T) { - attrs := Attributes{ - Attribute{ - Key: "key", - Value: "val", - }, - } - - dAttrs := attrs.Dup() - require.Equal(t, attrs, dAttrs) -} diff --git a/go/node/types/v1beta3/endpoint.go b/go/node/types/v1beta3/endpoint.go deleted file mode 100644 index fcb63a29..00000000 --- a/go/node/types/v1beta3/endpoint.go +++ /dev/null @@ -1,29 +0,0 @@ -package v1beta3 - -import ( - "sort" -) - -type Endpoints []Endpoint - -var _ sort.Interface = (*Endpoints)(nil) - -func (u Endpoints) Dup() Endpoints { - res := make(Endpoints, len(u)) - - copy(res, u) - - return res -} - -func (u Endpoints) Len() int { - return len(u) -} - -func (u Endpoints) Swap(i, j int) { - u[i], u[j] = u[j], u[i] -} - -func (u Endpoints) Less(i, j int) bool { - return u[i].SequenceNumber < u[j].SequenceNumber -} diff --git a/go/node/types/v1beta3/endpoint.pb.go b/go/node/types/v1beta3/endpoint.pb.go deleted file mode 100644 index 7e307ee0..00000000 --- a/go/node/types/v1beta3/endpoint.pb.go +++ /dev/null @@ -1,405 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/endpoint.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index 56d77d01..00000000 --- a/go/node/types/v1beta3/gpu.pb.go +++ /dev/null @@ -1,421 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/gpu.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index ab8c16a9..00000000 --- a/go/node/types/v1beta3/memory.pb.go +++ /dev/null @@ -1,423 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/memory.proto - -package v1beta3 - -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 - -// 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 deleted file mode 100644 index 65da1e11..00000000 --- a/go/node/types/v1beta3/migrate/v1beta2.go +++ /dev/null @@ -1,107 +0,0 @@ -package migrate - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "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 ResourcesFromV1Beta2(id uint32, from v1beta2.ResourceUnits) v1beta3.Resources { - return v1beta3.Resources{ - ID: id, - CPU: CPUFromV1Beta2(from.CPU), - Memory: MemoryFromV1Beta2(from.Memory), - Storage: VolumesFromV1Beta2(from.Storage), - Endpoints: EndpointsFromV1Beta2(from.Endpoints), - // v1beta2 version does not have GPU, so setting default value to 0 - GPU: &v1beta3.GPU{ - Units: v1beta3.ResourceValue{ - Val: sdk.NewInt(0), - }, - Attributes: nil, - }, - } -} diff --git a/go/node/types/v1beta3/requirements.go b/go/node/types/v1beta3/requirements.go deleted file mode 100644 index bc2ebeaf..00000000 --- a/go/node/types/v1beta3/requirements.go +++ /dev/null @@ -1,15 +0,0 @@ -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/resources.go b/go/node/types/v1beta3/resources.go deleted file mode 100644 index c782c2e2..00000000 --- a/go/node/types/v1beta3/resources.go +++ /dev/null @@ -1,194 +0,0 @@ -package v1beta3 - -import ( - "fmt" -) - -type UnitType int - -type Unit interface { - String() string -} - -type ResUnit interface { - Equals(ResUnit) bool - Add(unit ResUnit) bool -} - -type Volumes []Storage - -var _ Unit = (*CPU)(nil) -var _ Unit = (*Memory)(nil) -var _ Unit = (*Storage)(nil) -var _ Unit = (*GPU)(nil) - -func (m Resources) Validate() error { - if m.ID == 0 { - return fmt.Errorf("resources ID must be > 0") - } - - if m.CPU == nil { - return fmt.Errorf("CPU must not be nil") - } - - if m.GPU == nil { - return fmt.Errorf("GPU must not be nil") - } - - if m.Memory == nil { - return fmt.Errorf("memory must not be nil") - } - - if m.Storage == nil { - return fmt.Errorf("storage must not be nil") - } - - if m.Endpoints == nil { - return fmt.Errorf("endpoints must not be nil") - } - - return nil -} - -func (m Resources) Dup() Resources { - res := Resources{ - ID: m.ID, - CPU: m.CPU.Dup(), - GPU: m.GPU.Dup(), - Memory: m.Memory.Dup(), - Storage: m.Storage.Dup(), - Endpoints: m.Endpoints.Dup(), - } - - return res -} - -func (m Resources) In(rhs Resources) bool { - if !m.CPU.Equal(rhs.CPU) || !m.GPU.Equal(rhs.GPU) || - !m.Memory.Equal(rhs.Memory) || !m.Storage.Equal(rhs.Storage) { - return false - } - -loop: - for _, ep := range m.Endpoints { - for _, rep := range rhs.Endpoints { - if ep.Equal(rep) { - continue loop - } - } - - return false - } - - return true -} - -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{ - Name: m.Name, - 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, 0, len(m)) - - for _, storage := range m { - res = append(res, *storage.Dup()) - } - - return res -} - -func (m *CPU) EqualUnits(that *CPU) bool { - if that == nil { - return m == nil - } else if m == nil { - return false - } - - if !m.Units.Equal(&that.Units) { - return false - } - - return true -} - -func (m *GPU) EqualUnits(that *GPU) bool { - if that == nil { - return m == nil - } else if m == nil { - return false - } - - if !m.Units.Equal(&that.Units) { - return false - } - - return true -} - -func (m *Memory) EqualUnits(that *Memory) bool { - if that == nil { - return m == nil - } else if m == nil { - return false - } - - if !m.Quantity.Equal(&that.Quantity) { - return false - } - - return true -} - -func (m Volumes) EqualUnits(that Volumes) bool { - if len(m) != len(that) { - return false - } - - for idx, vol := range m { - if vol.Name != that[idx].Name { - return false - } - - if !vol.Quantity.Equal(&that[idx].Quantity) { - return false - } - - } - - return true -} diff --git a/go/node/types/v1beta3/resources.pb.go b/go/node/types/v1beta3/resources.pb.go deleted file mode 100644 index 81ab82d0..00000000 --- a/go/node/types/v1beta3/resources.pb.go +++ /dev/null @@ -1,676 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/resources.proto - -package v1beta3 - -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 - -// Resources describes all available resources types for deployment/node etc -// if field is nil resource is not present in the given data-structure -type Resources struct { - ID uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"` - CPU *CPU `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty" yaml:"cpu,omitempty"` - Memory *Memory `protobuf:"bytes,3,opt,name=memory,proto3" json:"memory,omitempty" yaml:"memory,omitempty"` - Storage Volumes `protobuf:"bytes,4,rep,name=storage,proto3,castrepeated=Volumes" json:"storage,omitempty" yaml:"storage,omitempty"` - GPU *GPU `protobuf:"bytes,5,opt,name=gpu,proto3" json:"gpu,omitempty" yaml:"gpu,omitempty"` - Endpoints Endpoints `protobuf:"bytes,6,rep,name=endpoints,proto3,castrepeated=Endpoints" json:"endpoints" yaml:"endpoints"` -} - -func (m *Resources) Reset() { *m = Resources{} } -func (m *Resources) String() string { return proto.CompactTextString(m) } -func (*Resources) ProtoMessage() {} -func (*Resources) Descriptor() ([]byte, []int) { - return fileDescriptor_4e8008eb7299c34f, []int{0} -} -func (m *Resources) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Resources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Resources.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Resources) XXX_Merge(src proto.Message) { - xxx_messageInfo_Resources.Merge(m, src) -} -func (m *Resources) XXX_Size() int { - return m.Size() -} -func (m *Resources) XXX_DiscardUnknown() { - xxx_messageInfo_Resources.DiscardUnknown(m) -} - -var xxx_messageInfo_Resources proto.InternalMessageInfo - -func (m *Resources) GetID() uint32 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *Resources) GetCPU() *CPU { - if m != nil { - return m.CPU - } - return nil -} - -func (m *Resources) GetMemory() *Memory { - if m != nil { - return m.Memory - } - return nil -} - -func (m *Resources) GetStorage() Volumes { - if m != nil { - return m.Storage - } - return nil -} - -func (m *Resources) GetGPU() *GPU { - if m != nil { - return m.GPU - } - return nil -} - -func (m *Resources) GetEndpoints() Endpoints { - if m != nil { - return m.Endpoints - } - return nil -} - -func init() { - proto.RegisterType((*Resources)(nil), "akash.base.v1beta3.Resources") -} - -func init() { - proto.RegisterFile("akash/base/v1beta3/resources.proto", fileDescriptor_4e8008eb7299c34f) -} - -var fileDescriptor_4e8008eb7299c34f = []byte{ - // 478 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0xb4, 0x74, 0x6a, 0xa6, 0x49, 0x23, 0x9a, 0xb4, 0x50, 0xa6, 0xb8, 0xe4, 0x54, - 0x24, 0x48, 0x44, 0xcb, 0x01, 0xed, 0x84, 0x32, 0xd0, 0xc4, 0x01, 0x69, 0x0a, 0x1a, 0x07, 0x2e, - 0x28, 0x4d, 0x2c, 0x2f, 0xda, 0x12, 0x5b, 0xb1, 0xcd, 0xd4, 0xb7, 0xe0, 0x11, 0x38, 0xf3, 0x24, - 0x3d, 0xf6, 0xc8, 0xc9, 0xa0, 0xf4, 0x82, 0x7a, 0xec, 0x13, 0xa0, 0xc4, 0xce, 0x46, 0x37, 0xc3, - 0x2d, 0xf1, 0xf7, 0xfb, 0xbe, 0x5f, 0xbe, 0x7f, 0x6c, 0x79, 0xf1, 0x65, 0x4c, 0x2f, 0x82, 0x59, - 0x4c, 0x61, 0xf0, 0xe5, 0xc5, 0x0c, 0xb2, 0x78, 0x1a, 0x94, 0x90, 0x62, 0x5e, 0x26, 0x90, 0xfa, - 0xa4, 0xc4, 0x0c, 0xdb, 0x76, 0xc3, 0xf8, 0x35, 0xe3, 0x2b, 0x66, 0x78, 0x80, 0x30, 0xc2, 0x4d, - 0x39, 0xa8, 0x9f, 0x24, 0x39, 0x3c, 0xd2, 0x4c, 0x4b, 0x08, 0xff, 0x4f, 0x15, 0xdd, 0x54, 0x81, - 0xa6, 0x9a, 0xc3, 0x1c, 0x97, 0x73, 0x05, 0x8c, 0x34, 0x00, 0x65, 0xb8, 0x8c, 0x11, 0x54, 0xc4, - 0x13, 0x0d, 0x01, 0x8b, 0x94, 0xe0, 0xac, 0x60, 0x12, 0xf1, 0x96, 0x3d, 0x6b, 0x10, 0xb5, 0xfb, - 0xd9, 0x4f, 0x2d, 0x33, 0x4b, 0x1d, 0x63, 0x64, 0x8c, 0xf7, 0xc2, 0x47, 0x95, 0x00, 0xe6, 0xbb, - 0x37, 0x6b, 0x01, 0xcc, 0x2c, 0xdd, 0x08, 0x30, 0x98, 0xc7, 0xf9, 0xd5, 0xb1, 0x97, 0xa5, 0x5e, - 0x64, 0x66, 0xa9, 0xfd, 0xd9, 0xea, 0x26, 0x84, 0x3b, 0xe6, 0xc8, 0x18, 0xef, 0x4e, 0x0e, 0xfd, - 0xfb, 0x91, 0xf8, 0x27, 0x67, 0xe7, 0xe1, 0xcb, 0x85, 0x00, 0x46, 0x25, 0x40, 0xf7, 0xe4, 0xec, - 0x7c, 0x2d, 0xc0, 0x5e, 0x42, 0xf8, 0x33, 0x9c, 0x67, 0x0c, 0xe6, 0x84, 0xcd, 0x37, 0x02, 0x1c, - 0xc8, 0xa1, 0x5b, 0xc7, 0x5e, 0x54, 0x4f, 0xb6, 0x91, 0xd5, 0x97, 0xeb, 0x3a, 0xdd, 0xc6, 0x31, - 0xd4, 0x39, 0xde, 0x37, 0x44, 0x38, 0xad, 0x35, 0x6b, 0x01, 0xf6, 0x65, 0xc7, 0x96, 0xe2, 0x50, - 0x2a, 0xee, 0x56, 0xbc, 0x48, 0x8d, 0xb7, 0xaf, 0xad, 0x1d, 0x15, 0x9b, 0xd3, 0x1b, 0x75, 0xc7, - 0xbb, 0x93, 0xc7, 0x3a, 0xd3, 0x07, 0x89, 0x84, 0xaf, 0x17, 0x02, 0x74, 0xd6, 0x02, 0x3c, 0x54, - 0x3d, 0x5b, 0x2e, 0x47, 0xba, 0xee, 0x95, 0xbc, 0xef, 0x3f, 0xc1, 0xce, 0x47, 0x7c, 0xc5, 0x73, - 0x48, 0xa3, 0xd6, 0x56, 0x47, 0x88, 0x08, 0x77, 0x1e, 0xfc, 0x3b, 0xc2, 0xd3, 0xbf, 0x23, 0x3c, - 0x95, 0x11, 0x22, 0x7d, 0x84, 0xe8, 0x4e, 0x84, 0x88, 0x70, 0xbb, 0xb0, 0x06, 0xed, 0xef, 0xa6, - 0x4e, 0xbf, 0xd9, 0xed, 0x48, 0xa7, 0x79, 0xab, 0xa0, 0x70, 0xa2, 0x96, 0xbb, 0x6d, 0xdb, 0x08, - 0xb0, 0x2f, 0x05, 0x37, 0x47, 0xf5, 0x32, 0x83, 0xb6, 0x85, 0x46, 0xb7, 0xec, 0x71, 0xef, 0xf7, - 0x37, 0x60, 0x84, 0xd1, 0xa2, 0x72, 0x8d, 0x65, 0xe5, 0x1a, 0xbf, 0x2a, 0xd7, 0xf8, 0xba, 0x72, - 0x3b, 0xcb, 0x95, 0xdb, 0xf9, 0xb1, 0x72, 0x3b, 0x9f, 0x5e, 0xa1, 0x8c, 0x5d, 0xf0, 0x99, 0x9f, - 0xe0, 0x3c, 0x68, 0x3e, 0xe3, 0x79, 0x01, 0xd9, 0x35, 0x2e, 0x2f, 0xd5, 0x5b, 0x4c, 0xb2, 0x00, - 0xe1, 0xa0, 0xc0, 0x29, 0x0c, 0xd8, 0x9c, 0x40, 0xda, 0xde, 0xda, 0x59, 0xbf, 0xb9, 0xad, 0xd3, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0xb7, 0x7c, 0x65, 0x9f, 0x03, 0x00, 0x00, -} - -func (this *Resources) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Resources) - if !ok { - that2, ok := that.(Resources) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ID != that1.ID { - 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 *Resources) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resources) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Resources) 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 = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.GPU != nil { - { - size, err := m.GPU.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - 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 = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.Memory != nil { - { - size, err := m.Memory.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CPU != nil { - { - size, err := m.CPU.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResources(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ID != 0 { - i = encodeVarintResources(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintResources(dAtA []byte, offset int, v uint64) int { - offset -= sovResources(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Resources) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovResources(uint64(m.ID)) - } - if m.CPU != nil { - l = m.CPU.Size() - n += 1 + l + sovResources(uint64(l)) - } - if m.Memory != nil { - l = m.Memory.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Storage) > 0 { - for _, e := range m.Storage { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - if m.GPU != nil { - l = m.GPU.Size() - n += 1 + l + sovResources(uint64(l)) - } - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovResources(uint64(l)) - } - } - return n -} - -func sovResources(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResources(x uint64) (n int) { - return sovResources(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Resources) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - 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 3: - 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 ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - 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 4: - 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 ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - 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 5: - 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 ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - 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 6: - 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 ErrIntOverflowResources - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResources - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResources - } - 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 := skipResources(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResources - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResources(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, ErrIntOverflowResources - } - 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, ErrIntOverflowResources - } - 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, ErrIntOverflowResources - } - 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, ErrInvalidLengthResources - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResources - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResources - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResources = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResources = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResources = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go/node/types/v1beta3/resourcevalue.go b/go/node/types/v1beta3/resourcevalue.go deleted file mode 100644 index 0d96f8c3..00000000 --- a/go/node/types/v1beta3/resourcevalue.go +++ /dev/null @@ -1,57 +0,0 @@ -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 deleted file mode 100644 index 1a6b63f0..00000000 --- a/go/node/types/v1beta3/resourcevalue.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// 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" - _ "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 - -// 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/storage.pb.go b/go/node/types/v1beta3/storage.pb.go deleted file mode 100644 index 9202a1e0..00000000 --- a/go/node/types/v1beta3/storage.pb.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: akash/base/v1beta3/storage.proto - -package v1beta3 - -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 - -// 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/go/provider/lease/v1/service.pb.go b/go/provider/lease/v1/service.pb.go index 9d5dbc28..463eedee 100644 --- a/go/provider/lease/v1/service.pb.go +++ b/go/provider/lease/v1/service.pb.go @@ -6,18 +6,18 @@ package v1 import ( context "context" fmt "fmt" - github_com_akash_network_akash_api_go_manifest_v2beta2 "github.com/akash-network/akash-api/go/manifest/v2beta2" - v2beta2 "github.com/akash-network/akash-api/go/manifest/v2beta2" - v1beta4 "github.com/akash-network/akash-api/go/node/market/v1beta4" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + 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" io "io" math "math" math_bits "math/bits" + pkg_akt_io_go_manifest_v2beta3 "pkg.akt.io/go/manifest/v2beta3" + v2beta3 "pkg.akt.io/go/manifest/v2beta3" + v1 "pkg.akt.io/go/node/market/v1" ) // Reference imports to suppress errors if they are not otherwise used. @@ -349,8 +349,8 @@ func (m *ServiceStatus) GetIps() []LeaseIPStatus { // SendManifestRequest is request type for the SendManifest Providers RPC method type SendManifestRequest struct { - LeaseId v1beta4.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` - Manifest github_com_akash_network_akash_api_go_manifest_v2beta2.Manifest `protobuf:"bytes,2,rep,name=manifest,proto3,castrepeated=github.com/akash-network/akash-api/go/manifest/v2beta2.Manifest" json:"manifest" yaml:"manifest"` + LeaseId v1.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` + Manifest pkg_akt_io_go_manifest_v2beta3.Manifest `protobuf:"bytes,2,rep,name=manifest,proto3,castrepeated=pkg.akt.io/go/manifest/v2beta3.Manifest" json:"manifest" yaml:"manifest"` } func (m *SendManifestRequest) Reset() { *m = SendManifestRequest{} } @@ -386,14 +386,14 @@ func (m *SendManifestRequest) XXX_DiscardUnknown() { var xxx_messageInfo_SendManifestRequest proto.InternalMessageInfo -func (m *SendManifestRequest) GetLeaseId() v1beta4.LeaseID { +func (m *SendManifestRequest) GetLeaseId() v1.LeaseID { if m != nil { return m.LeaseId } - return v1beta4.LeaseID{} + return v1.LeaseID{} } -func (m *SendManifestRequest) GetManifest() github_com_akash_network_akash_api_go_manifest_v2beta2.Manifest { +func (m *SendManifestRequest) GetManifest() pkg_akt_io_go_manifest_v2beta3.Manifest { if m != nil { return m.Manifest } @@ -439,8 +439,8 @@ var xxx_messageInfo_SendManifestResponse proto.InternalMessageInfo // ServiceLogsRequest type ServiceLogsRequest struct { - LeaseId v1beta4.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` - Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` + LeaseId v1.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` + Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` } func (m *ServiceLogsRequest) Reset() { *m = ServiceLogsRequest{} } @@ -476,11 +476,11 @@ func (m *ServiceLogsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceLogsRequest proto.InternalMessageInfo -func (m *ServiceLogsRequest) GetLeaseId() v1beta4.LeaseID { +func (m *ServiceLogsRequest) GetLeaseId() v1.LeaseID { if m != nil { return m.LeaseId } - return v1beta4.LeaseID{} + return v1.LeaseID{} } func (m *ServiceLogsRequest) GetServices() []string { @@ -590,7 +590,7 @@ func (m *ServiceLogsResponse) GetServices() []*ServiceLogs { // ShellRequest type ShellRequest struct { - LeaseId v1beta4.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` + LeaseId v1.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` } func (m *ShellRequest) Reset() { *m = ShellRequest{} } @@ -626,17 +626,17 @@ func (m *ShellRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ShellRequest proto.InternalMessageInfo -func (m *ShellRequest) GetLeaseId() v1beta4.LeaseID { +func (m *ShellRequest) GetLeaseId() v1.LeaseID { if m != nil { return m.LeaseId } - return v1beta4.LeaseID{} + return v1.LeaseID{} } // ServiceStatusRequest type ServiceStatusRequest struct { - LeaseId v1beta4.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` - Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` + LeaseId v1.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` + Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` } func (m *ServiceStatusRequest) Reset() { *m = ServiceStatusRequest{} } @@ -672,11 +672,11 @@ func (m *ServiceStatusRequest) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceStatusRequest proto.InternalMessageInfo -func (m *ServiceStatusRequest) GetLeaseId() v1beta4.LeaseID { +func (m *ServiceStatusRequest) GetLeaseId() v1.LeaseID { if m != nil { return m.LeaseId } - return v1beta4.LeaseID{} + return v1.LeaseID{} } func (m *ServiceStatusRequest) GetServices() []string { @@ -751,71 +751,70 @@ func init() { } var fileDescriptor_3a2116fc700fbddb = []byte{ - // 1017 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xae, 0xed, 0xc4, 0x1e, 0xc7, 0x2d, 0x9d, 0x04, 0x62, 0x22, 0xe2, 0x31, 0x53, 0x5a, - 0xa5, 0x4a, 0xb2, 0xdb, 0x18, 0x24, 0x24, 0x7a, 0x40, 0x5a, 0x10, 0x55, 0xa5, 0x82, 0xd2, 0xcd, - 0x0d, 0x0e, 0xd6, 0x38, 0x3b, 0xac, 0x57, 0x59, 0x7b, 0x96, 0xd9, 0xb5, 0x4b, 0x6f, 0xfc, 0x04, - 0xfe, 0x00, 0x17, 0x8e, 0x95, 0x40, 0xdc, 0xf9, 0x03, 0x3d, 0xf6, 0xd8, 0xd3, 0x82, 0x92, 0x9b, - 0x0f, 0x1c, 0xfc, 0x0b, 0xd0, 0x7c, 0xec, 0xae, 0x1d, 0x93, 0x60, 0x40, 0x44, 0x3d, 0x75, 0xdf, - 0x67, 0x9e, 0xf7, 0xeb, 0x99, 0x79, 0x5f, 0x37, 0xe0, 0x0e, 0x39, 0x25, 0x71, 0xdf, 0x8e, 0x38, - 0x1b, 0x07, 0x1e, 0xe5, 0x76, 0x48, 0x49, 0x4c, 0xed, 0xf1, 0xa1, 0x1d, 0x53, 0x3e, 0x0e, 0x4e, - 0xa8, 0x15, 0x71, 0x96, 0x30, 0xb8, 0x25, 0x69, 0x56, 0x46, 0xb3, 0x24, 0xcd, 0x1a, 0x1f, 0x6e, - 0x63, 0xe5, 0x3f, 0x20, 0xc3, 0xe0, 0x6b, 0x1a, 0x27, 0xf6, 0xb8, 0xd3, 0xa3, 0x09, 0xe9, 0xd8, - 0x3e, 0x67, 0xa3, 0x48, 0x39, 0x6f, 0xb7, 0x33, 0x0e, 0x3f, 0xa5, 0x89, 0x3d, 0x3e, 0x14, 0x8c, - 0x0f, 0x54, 0x26, 0xcd, 0xd8, 0xf4, 0x99, 0xcf, 0xe4, 0xa7, 0x2d, 0xbe, 0x14, 0x8a, 0x9f, 0x9b, - 0x00, 0x3e, 0x16, 0xac, 0x63, 0x55, 0xcb, 0x71, 0x42, 0x92, 0x51, 0x0c, 0xdf, 0x01, 0x35, 0x32, - 0x26, 0x41, 0x48, 0x7a, 0x21, 0x6d, 0x1a, 0x6d, 0x63, 0xb7, 0xe2, 0x16, 0x00, 0xdc, 0x04, 0x95, - 0x84, 0x25, 0x24, 0x6c, 0x9a, 0xf2, 0x44, 0x19, 0x10, 0x82, 0xf2, 0x88, 0x07, 0x71, 0xb3, 0xd4, - 0x2e, 0xed, 0xd6, 0x5c, 0xf9, 0x0d, 0x6d, 0xb0, 0xc1, 0x7a, 0xa2, 0x4d, 0xea, 0x75, 0x7d, 0x3a, - 0xa4, 0x9c, 0x24, 0x01, 0x1b, 0x36, 0xcb, 0x6d, 0x63, 0xb7, 0xe4, 0xc2, 0xec, 0xe8, 0x61, 0x7e, - 0x02, 0xb7, 0x41, 0x95, 0xd3, 0x28, 0x0c, 0x4e, 0x48, 0xdc, 0xac, 0xc8, 0xe8, 0xb9, 0x0d, 0xef, - 0x81, 0x37, 0x46, 0x91, 0x47, 0x12, 0xea, 0x75, 0x73, 0xce, 0xaa, 0xe4, 0xdc, 0xd4, 0xb8, 0x9b, - 0x51, 0xef, 0x80, 0x1b, 0x9c, 0x12, 0xef, 0x59, 0x41, 0x5c, 0x93, 0xc4, 0x86, 0x44, 0x73, 0xda, - 0x01, 0x80, 0x79, 0x57, 0x05, 0xb5, 0x2a, 0xa9, 0xb7, 0xf2, 0x93, 0x8c, 0x8e, 0xff, 0x30, 0x40, - 0x43, 0x8a, 0xf5, 0xe8, 0x48, 0xeb, 0xb4, 0x07, 0xca, 0x11, 0xe3, 0x89, 0x94, 0xa8, 0xe1, 0x6c, - 0x4d, 0x52, 0x24, 0xed, 0x69, 0x8a, 0xea, 0xcf, 0xc8, 0x20, 0xfc, 0x08, 0x0b, 0x0b, 0xbb, 0x12, - 0x84, 0x5f, 0x80, 0x06, 0xfd, 0x36, 0xa1, 0x7c, 0x48, 0xc2, 0xae, 0xf4, 0x32, 0xa5, 0xd7, 0xbd, - 0x49, 0x8a, 0xe6, 0x0f, 0xa6, 0x29, 0xda, 0x54, 0xee, 0x73, 0x30, 0x76, 0xd7, 0x33, 0xfb, 0x48, - 0xc4, 0x7b, 0x00, 0xaa, 0xf2, 0x12, 0x4f, 0x58, 0xd8, 0x2c, 0xb5, 0x8d, 0xdd, 0x9a, 0x83, 0x26, - 0x29, 0xca, 0xb1, 0x69, 0x8a, 0x6e, 0xea, 0x22, 0x34, 0x82, 0xdd, 0xfc, 0x10, 0xde, 0x06, 0x66, - 0x10, 0xc9, 0x8b, 0xa8, 0x39, 0x1b, 0x93, 0x14, 0x99, 0x41, 0x34, 0x4d, 0x51, 0x4d, 0x39, 0x04, - 0x11, 0x76, 0xcd, 0x20, 0xc2, 0x3f, 0x98, 0x60, 0xe3, 0x33, 0xc6, 0x9f, 0x12, 0xee, 0x51, 0x2e, - 0x72, 0x16, 0x6d, 0xf7, 0x59, 0xac, 0xda, 0xae, 0xa9, 0xb6, 0x85, 0x5d, 0xb4, 0x2d, 0x2c, 0xec, - 0x4a, 0x30, 0xd7, 0xc8, 0xfc, 0x57, 0x1a, 0x95, 0xfe, 0x9b, 0x46, 0x36, 0xa8, 0xc8, 0x96, 0x75, - 0xa7, 0x6f, 0x4f, 0x52, 0xa4, 0x80, 0x69, 0x8a, 0xd6, 0x67, 0xd4, 0xc1, 0xae, 0x82, 0x45, 0xb5, - 0x43, 0x32, 0xa0, 0xf2, 0xf1, 0xe9, 0xd6, 0x84, 0x5d, 0x54, 0x2b, 0x2c, 0xec, 0x4a, 0x10, 0xbf, - 0x32, 0x41, 0x63, 0x7e, 0x70, 0x32, 0x77, 0x63, 0x09, 0x77, 0xe8, 0x81, 0xd5, 0x58, 0xba, 0x49, - 0x6d, 0xea, 0x9d, 0x3d, 0xeb, 0x92, 0x15, 0x60, 0x2d, 0x8e, 0xa8, 0x83, 0x5e, 0xa4, 0x68, 0x65, - 0x92, 0x22, 0x1d, 0x62, 0x9a, 0xa2, 0x86, 0xca, 0xa0, 0x6c, 0xec, 0xea, 0x03, 0x48, 0x40, 0x45, - 0x28, 0xa3, 0x06, 0xb3, 0xde, 0xd9, 0xbf, 0x34, 0xc9, 0x5f, 0xdc, 0xb4, 0xb3, 0xa3, 0xb3, 0xa8, - 0x10, 0x33, 0xa2, 0x09, 0x53, 0x88, 0x26, 0xfe, 0x85, 0x4f, 0x40, 0x29, 0x88, 0xe2, 0x66, 0x59, - 0x26, 0xb8, 0x7b, 0x75, 0x17, 0xd9, 0xec, 0x38, 0x5b, 0x3a, 0xf4, 0xc2, 0xcb, 0x13, 0xb1, 0xf0, - 0x8f, 0x26, 0xd8, 0x38, 0xa6, 0x43, 0xef, 0x73, 0xbd, 0xf5, 0x5c, 0xfa, 0xcd, 0x88, 0xc6, 0x09, - 0xfc, 0x0a, 0x54, 0x65, 0xbc, 0x6e, 0xe0, 0x49, 0x91, 0xeb, 0x9d, 0x1d, 0x9d, 0x4f, 0xed, 0x3e, - 0x4b, 0xef, 0x3e, 0x9d, 0xec, 0x53, 0xe7, 0x5d, 0x9d, 0x66, 0x4d, 0x03, 0xd3, 0x14, 0xdd, 0x50, - 0xb9, 0x34, 0x80, 0xdd, 0x35, 0x19, 0xf1, 0x91, 0x07, 0x7f, 0x32, 0x40, 0x35, 0x5b, 0xb3, 0x4d, - 0x53, 0x76, 0x53, 0x44, 0x57, 0xb0, 0xa5, 0xb7, 0xaf, 0xf5, 0x50, 0x6c, 0x5f, 0x87, 0x8b, 0xe8, - 0x67, 0x29, 0xaa, 0x66, 0x75, 0x8a, 0x09, 0xcc, 0xb8, 0xc5, 0x04, 0x66, 0x08, 0x7e, 0xfe, 0x1b, - 0xfa, 0xd8, 0x0f, 0x92, 0xfe, 0xa8, 0x67, 0x9d, 0xb0, 0x81, 0x2d, 0x63, 0x1f, 0x0c, 0x69, 0xf2, - 0x94, 0xf1, 0x53, 0x6d, 0x91, 0x28, 0xb0, 0x7d, 0xb6, 0xb0, 0xee, 0xad, 0x5c, 0x89, 0x3c, 0x3e, - 0x7e, 0x0b, 0x6c, 0xce, 0x6b, 0x14, 0x47, 0x6c, 0x18, 0x53, 0xfc, 0xb3, 0x01, 0xa0, 0x7e, 0x2d, - 0x8f, 0x99, 0x1f, 0x5f, 0x8b, 0x76, 0x0f, 0x40, 0x55, 0xff, 0x9e, 0xc5, 0x52, 0x3a, 0xbd, 0x8d, - 0x32, 0xac, 0xd0, 0x22, 0x43, 0xb0, 0x9b, 0x1f, 0x62, 0x1f, 0xd4, 0x67, 0xea, 0xfd, 0x67, 0x53, - 0xb4, 0x07, 0xca, 0x21, 0xf3, 0xd5, 0x0c, 0xad, 0x2b, 0xb2, 0xb0, 0x0b, 0xb2, 0xb0, 0xb0, 0x2b, - 0x41, 0x3c, 0x16, 0xaf, 0x6a, 0x46, 0x18, 0x25, 0x18, 0xec, 0xce, 0x14, 0x6f, 0xc8, 0x7b, 0x7f, - 0xef, 0xd2, 0x57, 0x3c, 0xe3, 0xef, 0xec, 0x5c, 0x2d, 0x4e, 0xd1, 0xe0, 0x29, 0x58, 0x3f, 0xee, - 0xd3, 0x30, 0xbc, 0x8e, 0xab, 0xc0, 0xbf, 0x18, 0xe2, 0x5d, 0xcc, 0x2c, 0x8b, 0xd7, 0xff, 0x01, - 0x7c, 0x67, 0x80, 0x37, 0x2f, 0x94, 0xac, 0xaf, 0xc6, 0x5f, 0xb8, 0x9a, 0xbb, 0x7f, 0x77, 0x35, - 0x7a, 0xc1, 0xdc, 0xd6, 0xc5, 0x2f, 0x57, 0x42, 0xe7, 0xd7, 0x32, 0xa8, 0xca, 0xae, 0xdc, 0xa3, - 0x4f, 0xa0, 0xb8, 0xaf, 0x99, 0xc9, 0x82, 0xfb, 0x57, 0xe4, 0x5c, 0x58, 0x52, 0xdb, 0x07, 0x4b, - 0xb2, 0x75, 0x8b, 0xc3, 0x8b, 0xbf, 0x22, 0x07, 0xcb, 0x75, 0x98, 0xa5, 0xb3, 0x96, 0xa5, 0xeb, - 0x7c, 0x62, 0x08, 0x12, 0x4e, 0xc9, 0xe0, 0x3a, 0xb3, 0xde, 0x37, 0x60, 0xff, 0xc2, 0x94, 0x2f, - 0x33, 0x62, 0x59, 0xb6, 0xfd, 0xe5, 0xc8, 0xba, 0xc3, 0x08, 0xdc, 0x9a, 0xeb, 0xf0, 0x7f, 0xce, - 0x77, 0xdf, 0x70, 0x9e, 0xbc, 0x38, 0x6b, 0x19, 0x2f, 0xcf, 0x5a, 0xc6, 0xef, 0x67, 0x2d, 0xe3, - 0xfb, 0xf3, 0xd6, 0xca, 0xcb, 0xf3, 0xd6, 0xca, 0xab, 0xf3, 0xd6, 0xca, 0x97, 0x1f, 0x2e, 0xb7, - 0xef, 0x17, 0xfe, 0x3c, 0xe8, 0xad, 0xca, 0xff, 0x91, 0xbc, 0xff, 0x67, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x3d, 0x85, 0x37, 0x23, 0x40, 0x0c, 0x00, 0x00, + // 996 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0x8e, 0x64, 0x3b, 0xb1, 0xd7, 0x76, 0x4b, 0x37, 0x81, 0x88, 0x40, 0xbc, 0x61, 0x4b, 0x4b, + 0x3a, 0x49, 0xa4, 0xd6, 0x3d, 0x41, 0x6f, 0x82, 0xa1, 0xd3, 0x99, 0xc2, 0x04, 0x65, 0x86, 0x43, + 0x2f, 0x9e, 0x4d, 0xb4, 0x55, 0x34, 0x56, 0x2c, 0x21, 0xc9, 0x86, 0xde, 0xb8, 0x70, 0xe7, 0xc2, + 0x91, 0x1f, 0x40, 0xf9, 0x09, 0xfc, 0x81, 0x1e, 0x7b, 0xcc, 0x49, 0x30, 0xc9, 0xcd, 0x07, 0x0e, + 0xfe, 0x05, 0xcc, 0xbe, 0x5d, 0x49, 0x76, 0x4c, 0x82, 0x81, 0x09, 0xc3, 0xc9, 0x7e, 0x6f, 0xbf, + 0x7d, 0xef, 0x7d, 0xdf, 0xdb, 0xf7, 0x6c, 0x74, 0x87, 0xf5, 0x59, 0x72, 0x6c, 0x45, 0x71, 0x38, + 0xf2, 0x5d, 0x1e, 0x5b, 0x01, 0x67, 0x09, 0xb7, 0x46, 0x0f, 0xac, 0x84, 0xc7, 0x23, 0xff, 0x88, + 0x9b, 0x51, 0x1c, 0xa6, 0x21, 0x5e, 0x07, 0x98, 0x99, 0xc3, 0x4c, 0x80, 0x99, 0xa3, 0x07, 0x1b, + 0x6b, 0x5e, 0xe8, 0x85, 0x80, 0xb1, 0xc4, 0x37, 0x09, 0xdf, 0xa0, 0x32, 0xea, 0x09, 0x1b, 0xf8, + 0xcf, 0x79, 0x92, 0x5a, 0xa3, 0xee, 0x21, 0x4f, 0xd9, 0x43, 0xcb, 0x8b, 0xc3, 0x61, 0xa4, 0x30, + 0xef, 0xe4, 0x98, 0xb8, 0xcf, 0x53, 0x91, 0x51, 0xc6, 0x84, 0x43, 0xfa, 0x52, 0x47, 0xf8, 0xa9, + 0xb0, 0x0f, 0x64, 0x19, 0x07, 0x29, 0x4b, 0x87, 0x09, 0x7e, 0x17, 0x35, 0xd8, 0x88, 0xf9, 0x01, + 0x3b, 0x0c, 0xb8, 0xa1, 0x6d, 0x69, 0xdb, 0x35, 0xa7, 0x74, 0xe0, 0x35, 0x54, 0x4b, 0xc3, 0x94, + 0x05, 0x86, 0x0e, 0x27, 0xd2, 0xc0, 0x18, 0x55, 0x87, 0xb1, 0x9f, 0x18, 0x95, 0xad, 0xca, 0x76, + 0xc3, 0x81, 0xef, 0xd8, 0x42, 0xab, 0xe1, 0xa1, 0x60, 0xc8, 0xdd, 0x9e, 0xc7, 0x07, 0x3c, 0x66, + 0xa9, 0x1f, 0x0e, 0x8c, 0xea, 0x96, 0xb6, 0x5d, 0x71, 0x70, 0x7e, 0xf4, 0xb8, 0x38, 0xc1, 0x1b, + 0xa8, 0x1e, 0xf3, 0x28, 0xf0, 0x8f, 0x58, 0x62, 0xd4, 0x20, 0x7a, 0x61, 0xe3, 0x7b, 0xe8, 0x8d, + 0x61, 0xe4, 0xb2, 0x94, 0xbb, 0xbd, 0x02, 0xb3, 0x0c, 0x98, 0x9b, 0xca, 0xef, 0xe4, 0xd0, 0x3b, + 0xe8, 0x46, 0xcc, 0x99, 0xfb, 0xa2, 0x04, 0xae, 0x00, 0xb0, 0x0d, 0xde, 0x02, 0xb6, 0x87, 0x70, + 0xc1, 0xaa, 0x84, 0xd6, 0x01, 0x7a, 0xab, 0x38, 0xc9, 0xe1, 0xf4, 0x77, 0x0d, 0xb5, 0x41, 0xac, + 0x27, 0xfb, 0x4a, 0xa7, 0x1d, 0x54, 0x8d, 0xc2, 0x38, 0x05, 0x89, 0xda, 0xf6, 0xfa, 0x38, 0x23, + 0x60, 0x4f, 0x32, 0xd2, 0x7c, 0xc1, 0x4e, 0x82, 0x8f, 0xa8, 0xb0, 0xa8, 0x03, 0x4e, 0xfc, 0x39, + 0x6a, 0xf3, 0x6f, 0x52, 0x1e, 0x0f, 0x58, 0xd0, 0x83, 0x5b, 0x3a, 0xdc, 0xba, 0x37, 0xce, 0xc8, + 0xec, 0xc1, 0x24, 0x23, 0x6b, 0xf2, 0xfa, 0x8c, 0x9b, 0x3a, 0xad, 0xdc, 0xde, 0x17, 0xf1, 0x1e, + 0xa1, 0x3a, 0x34, 0xf1, 0x28, 0x0c, 0x8c, 0xca, 0x96, 0xb6, 0xdd, 0xb0, 0xc9, 0x38, 0x23, 0x85, + 0x6f, 0x92, 0x91, 0x9b, 0xaa, 0x08, 0xe5, 0xa1, 0x4e, 0x71, 0x88, 0x6f, 0x23, 0xdd, 0x8f, 0xa0, + 0x11, 0x0d, 0x7b, 0x75, 0x9c, 0x11, 0xdd, 0x8f, 0x26, 0x19, 0x69, 0xc8, 0x0b, 0x7e, 0x44, 0x1d, + 0xdd, 0x8f, 0xe8, 0x8f, 0x3a, 0x5a, 0xfd, 0x34, 0x8c, 0xbf, 0x66, 0xb1, 0xcb, 0x63, 0x91, 0xb3, + 0xa4, 0x7d, 0x1c, 0x26, 0x92, 0x76, 0x43, 0xd2, 0x16, 0x76, 0x49, 0x5b, 0x58, 0xd4, 0x01, 0x67, + 0xa1, 0x91, 0xfe, 0x8f, 0x34, 0xaa, 0xfc, 0x3b, 0x8d, 0x2c, 0x54, 0x03, 0xca, 0x8a, 0xe9, 0xdb, + 0xe3, 0x8c, 0x48, 0xc7, 0x24, 0x23, 0xad, 0x29, 0x75, 0xa8, 0x23, 0xdd, 0xa2, 0xda, 0x01, 0x3b, + 0xe1, 0xf0, 0xf8, 0x14, 0x35, 0x61, 0x97, 0xd5, 0x0a, 0x8b, 0x3a, 0xe0, 0xa4, 0xa7, 0x3a, 0x6a, + 0xcf, 0x0e, 0x4e, 0x7e, 0x5d, 0x5b, 0xe0, 0x3a, 0x76, 0xd1, 0x72, 0x02, 0xd7, 0x40, 0x9b, 0x66, + 0x77, 0xc7, 0xbc, 0x64, 0xfa, 0xcd, 0xf9, 0x11, 0xb5, 0xc9, 0xab, 0x8c, 0x2c, 0x8d, 0x33, 0xa2, + 0x42, 0x4c, 0x32, 0xd2, 0x96, 0x19, 0xa4, 0x4d, 0x1d, 0x75, 0x80, 0x19, 0xaa, 0x09, 0x65, 0xe4, + 0x60, 0x36, 0xbb, 0xbb, 0x97, 0x26, 0xf9, 0x93, 0x4e, 0xdb, 0x9b, 0x2a, 0x8b, 0x0c, 0x31, 0x25, + 0x9a, 0x30, 0x85, 0x68, 0xe2, 0x13, 0x7f, 0x81, 0x2a, 0x7e, 0x94, 0x18, 0x55, 0x48, 0x70, 0xf7, + 0x6a, 0x16, 0xf9, 0xec, 0xd8, 0xeb, 0x2a, 0xf4, 0xdc, 0xcb, 0x13, 0xb1, 0xe8, 0x77, 0x3a, 0x5a, + 0x3d, 0xe0, 0x03, 0xf7, 0x33, 0xb5, 0xda, 0x1c, 0xfe, 0xd5, 0x90, 0x27, 0x29, 0xfe, 0x12, 0xd5, + 0x21, 0x5e, 0xcf, 0x77, 0x41, 0xe4, 0x66, 0xd7, 0x50, 0xf9, 0xe4, 0x82, 0x2b, 0xf3, 0x7c, 0x62, + 0xbf, 0xa7, 0x32, 0xac, 0x28, 0xc7, 0x24, 0x23, 0x37, 0x64, 0x1a, 0xe5, 0xa0, 0xce, 0x0a, 0x04, + 0x7b, 0xe2, 0xe2, 0x1f, 0x34, 0x54, 0xcf, 0xd7, 0xa8, 0xa1, 0x03, 0x91, 0xcd, 0x22, 0xb0, 0x74, + 0x9b, 0x6a, 0xbb, 0x9a, 0x8f, 0xc5, 0x76, 0xb5, 0x9f, 0x89, 0xe8, 0x67, 0x19, 0xa9, 0xe7, 0x25, + 0x8a, 0xe1, 0xcb, 0xb1, 0xe5, 0xf0, 0xe5, 0x1e, 0xfa, 0xf2, 0x57, 0xf2, 0x41, 0xd4, 0xf7, 0x4c, + 0xd6, 0x4f, 0x4d, 0x5f, 0x6c, 0xf1, 0xb9, 0xb5, 0x6d, 0x16, 0x64, 0x8b, 0x38, 0xf4, 0x2d, 0xb4, + 0x36, 0x2b, 0x43, 0x12, 0x85, 0x83, 0x84, 0xd3, 0x9f, 0x34, 0x84, 0xd5, 0x83, 0x78, 0x1a, 0x7a, + 0xc9, 0x75, 0xcb, 0xf3, 0x08, 0xd5, 0xd5, 0x0f, 0x55, 0x02, 0xea, 0xa8, 0x5d, 0x93, 0xfb, 0x4a, + 0xba, 0xb9, 0x87, 0x3a, 0xc5, 0x21, 0xf5, 0x50, 0x73, 0xaa, 0xd4, 0xbf, 0x37, 0x23, 0x3b, 0xa8, + 0x1a, 0x84, 0x9e, 0x9c, 0x90, 0x96, 0x04, 0x0b, 0xbb, 0x04, 0x0b, 0x8b, 0x3a, 0xe0, 0xa4, 0x23, + 0xf1, 0x66, 0xa6, 0x34, 0x91, 0x5a, 0xe1, 0xde, 0x54, 0xf1, 0x1a, 0xb4, 0xf6, 0xfd, 0x4b, 0xdf, + 0xe8, 0xd4, 0x7d, 0x7b, 0xf3, 0x6a, 0x71, 0x4a, 0x82, 0xcf, 0x51, 0xeb, 0xe0, 0x98, 0x07, 0xc1, + 0x35, 0x77, 0x81, 0xfe, 0xac, 0x89, 0xd7, 0x30, 0xb5, 0x05, 0xfe, 0xd7, 0x6d, 0xff, 0x56, 0x43, + 0x6f, 0x5e, 0xa8, 0x56, 0x35, 0xc4, 0x9b, 0x6b, 0xc8, 0xdd, 0xbf, 0x6a, 0x88, 0x5a, 0x1a, 0xb7, + 0x55, 0xf1, 0x8b, 0x95, 0xd0, 0xfd, 0xa5, 0x8a, 0xea, 0xc0, 0xca, 0xd9, 0xff, 0x18, 0xf7, 0x51, + 0x6b, 0x7a, 0x94, 0xf0, 0xee, 0x15, 0x39, 0xe7, 0x16, 0xcf, 0xc6, 0xde, 0x82, 0x68, 0x45, 0x71, + 0x70, 0xf1, 0x97, 0x61, 0x6f, 0x31, 0x86, 0x79, 0x3a, 0x73, 0x51, 0xb8, 0xca, 0x27, 0x9e, 0x7e, + 0x1a, 0x73, 0x76, 0xf2, 0x5f, 0x66, 0xbd, 0xaf, 0xe1, 0xe3, 0x0b, 0xb3, 0xbd, 0xc8, 0x60, 0xe5, + 0xd9, 0x76, 0x17, 0x03, 0x2b, 0x86, 0x11, 0xba, 0x35, 0xc3, 0xf0, 0x9a, 0xf3, 0xdd, 0xd7, 0xec, + 0x0f, 0x5f, 0x9d, 0x75, 0xb4, 0xd7, 0x67, 0x1d, 0xed, 0xb7, 0xb3, 0x8e, 0xf6, 0xfd, 0x79, 0x67, + 0xe9, 0xf5, 0x79, 0x67, 0xe9, 0xf4, 0xbc, 0xb3, 0xf4, 0x8c, 0xcc, 0x2e, 0xf2, 0xb9, 0x7f, 0xf5, + 0x87, 0xcb, 0xf0, 0x6f, 0xe2, 0xe1, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x25, 0x55, 0x6d, 0x0c, + 0xf7, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2730,7 +2729,7 @@ func (m *SendManifestRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Manifest = append(m.Manifest, v2beta2.Group{}) + m.Manifest = append(m.Manifest, v2beta3.Group{}) if err := m.Manifest[len(m.Manifest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/go/provider/v1/metrics.go b/go/provider/v1/metrics.go index 7764e5c0..d0f611cd 100644 --- a/go/provider/v1/metrics.go +++ b/go/provider/v1/metrics.go @@ -3,8 +3,8 @@ package v1 import ( "k8s.io/apimachinery/pkg/api/resource" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + rtypes "pkg.akt.io/go/node/types/resources/v1beta4" ) func NewResourcesMetric() ResourcesMetric { @@ -16,7 +16,7 @@ func NewResourcesMetric() ResourcesMetric { Storage: make(Storage), } } -func (inv *ResourcesMetric) AddResources(res types.Resources) { +func (inv *ResourcesMetric) AddResources(res rtypes.Resources) { if res.CPU != nil { qcpu := *resource.NewMilliQuantity(res.CPU.Units.Val.Int64(), resource.DecimalSI) inv.CPU.Add(qcpu) diff --git a/go/provider/v1/service.pb.go b/go/provider/v1/service.pb.go index af0766e8..b106bcd0 100644 --- a/go/provider/v1/service.pb.go +++ b/go/provider/v1/service.pb.go @@ -6,8 +6,8 @@ package v1 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("akash/provider/v1/service.proto", fileDescriptor_518d1307e7e58072) } var fileDescriptor_518d1307e7e58072 = []byte{ - // 255 bytes of a gzipped FileDescriptorProto + // 241 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcc, 0x4e, 0x2c, 0xce, 0xd0, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x04, 0x2b, 0xd0, @@ -40,13 +40,13 @@ var fileDescriptor_518d1307e7e58072 = []byte{ 0xe5, 0xb0, 0x58, 0x57, 0x92, 0x58, 0x52, 0x0a, 0x95, 0x37, 0x5a, 0xc9, 0xc8, 0xc5, 0x1d, 0x00, 0x95, 0x0c, 0x0a, 0x70, 0x16, 0x0a, 0xe5, 0xe2, 0x74, 0x4f, 0x2d, 0x09, 0x06, 0x2b, 0x11, 0x12, 0xd3, 0x83, 0x98, 0xad, 0x07, 0xb3, 0x58, 0xcf, 0x15, 0x64, 0xb1, 0x94, 0xa4, 0x1e, 0x86, 0x1b, - 0xf5, 0x20, 0x5a, 0x94, 0x44, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0xc4, 0x2f, 0xc4, 0x85, 0xb0, 0x29, - 0x89, 0x51, 0x4b, 0xc8, 0x99, 0x8b, 0x27, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x97, 0x6c, 0x93, 0x0d, - 0x18, 0x9d, 0xbc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, - 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x30, 0x3d, - 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0x80, 0x6e, 0x5e, 0x6a, 0x49, - 0x79, 0x7e, 0x51, 0x36, 0x94, 0x07, 0x0a, 0x9b, 0xf4, 0x7c, 0xe4, 0x50, 0x48, 0x62, 0x03, 0xdb, - 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xc2, 0xd5, 0x1b, 0x90, 0x01, 0x00, 0x00, + 0xf5, 0x20, 0x5a, 0x94, 0x44, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0xc4, 0x9f, 0xc4, 0xa8, 0x25, 0xc4, + 0x85, 0xb0, 0x4c, 0xc8, 0x99, 0x8b, 0x27, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0x97, 0x6c, 0x93, 0x0d, + 0x18, 0x9d, 0x8c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, + 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0xb2, 0x20, + 0x3b, 0x5d, 0x2f, 0x31, 0xbb, 0x44, 0x2f, 0x33, 0x5f, 0x3f, 0x3d, 0x1f, 0xd9, 0xb7, 0x49, 0x6c, + 0x60, 0x1b, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0xd9, 0xba, 0x06, 0x78, 0x01, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/go/provider/v1/service.pb.gw.go b/go/provider/v1/service.pb.gw.go index 3a891120..90914aa5 100644 --- a/go/provider/v1/service.pb.gw.go +++ b/go/provider/v1/service.pb.gw.go @@ -146,7 +146,7 @@ func RegisterProviderRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_ProviderRPC_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ProviderRPC_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/go/provider/v1/status.pb.go b/go/provider/v1/status.pb.go index 58c7929b..27d87675 100644 --- a/go/provider/v1/status.pb.go +++ b/go/provider/v1/status.pb.go @@ -5,23 +5,19 @@ package v1 import ( fmt "fmt" - v1 "github.com/akash-network/akash-api/go/inventory/v1" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "google.golang.org/protobuf/types/known/timestamppb" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" resource "k8s.io/apimachinery/pkg/api/resource" math "math" math_bits "math/bits" - time "time" + v1 "pkg.akt.io/go/inventory/v1" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -460,7 +456,6 @@ type Status struct { BidEngine *BidEngineStatus `protobuf:"bytes,3,opt,name=bid_engine,json=bidEngine,proto3" json:"bid_engine,omitempty" yaml:"bid_engine,omitempty"` Manifest *ManifestStatus `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty" yaml:"manifest,omitempty"` PublicHostnames []string `protobuf:"bytes,5,rep,name=public_hostnames,json=publicHostnames,proto3" json:"public_hostnames" yaml:"public_hostnames"` - Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp" yaml:"timestamp"` } func (m *Status) Reset() { *m = Status{} } @@ -531,13 +526,6 @@ func (m *Status) GetPublicHostnames() []string { return nil } -func (m *Status) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - func init() { proto.RegisterType((*ResourcesMetric)(nil), "akash.provider.v1.ResourcesMetric") proto.RegisterMapType((Storage)(nil), "akash.provider.v1.ResourcesMetric.StorageEntry") @@ -554,80 +542,75 @@ func init() { func init() { proto.RegisterFile("akash/provider/v1/status.proto", fileDescriptor_1ba712d181b7fc9b) } var fileDescriptor_1ba712d181b7fc9b = []byte{ - // 1160 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd6, 0xb5, 0x5d, 0x4f, 0xd2, 0xc6, 0x19, 0x2a, 0xe1, 0xa6, 0xc8, 0x13, 0x46, 0xaa, - 0x94, 0x4a, 0x65, 0x57, 0x49, 0x2b, 0x14, 0x8a, 0x2a, 0xc1, 0xa6, 0x51, 0x5a, 0x41, 0x44, 0x3a, - 0xa5, 0x1c, 0x10, 0x52, 0xb4, 0xb6, 0xa7, 0xeb, 0xad, 0xbd, 0x3b, 0xcb, 0xee, 0xac, 0x91, 0x25, - 0x84, 0x10, 0x57, 0x2e, 0xfd, 0x2b, 0x38, 0xf0, 0x77, 0x70, 0xc8, 0x05, 0xa9, 0x47, 0x2e, 0x4c, - 0x91, 0x73, 0x40, 0xf8, 0x68, 0x6e, 0x9c, 0xd0, 0xec, 0xcc, 0xfe, 0xb0, 0x63, 0xa9, 0x6a, 0x6e, - 0x3b, 0xdf, 0xf7, 0xe6, 0xfb, 0xde, 0xdb, 0xf7, 0x66, 0x77, 0x40, 0xdb, 0x19, 0x38, 0x71, 0xdf, - 0x0a, 0x23, 0x36, 0xf2, 0x7a, 0x34, 0xb2, 0x46, 0x3b, 0x56, 0xcc, 0x1d, 0x9e, 0xc4, 0x66, 0x18, - 0x31, 0xce, 0xe0, 0x46, 0xca, 0x9b, 0x19, 0x6f, 0x8e, 0x76, 0x36, 0x91, 0xcb, 0x98, 0x3b, 0xa4, - 0x56, 0x1a, 0xd0, 0x49, 0x9e, 0x5b, 0xdc, 0xf3, 0x69, 0xcc, 0x1d, 0x3f, 0x54, 0x7b, 0x36, 0xaf, - 0xbb, 0xcc, 0x65, 0xe9, 0xa3, 0x25, 0x9f, 0x34, 0xba, 0xa5, 0x9c, 0xbc, 0x60, 0x44, 0x03, 0xce, - 0xa2, 0xb1, 0xb4, 0xea, 0x0e, 0x93, 0x98, 0xd3, 0x48, 0x47, 0xdc, 0x1b, 0xec, 0xc5, 0xa6, 0xc7, - 0x2c, 0x27, 0xf4, 0x7c, 0xa7, 0xdb, 0xf7, 0x02, 0x1a, 0x8d, 0xad, 0x70, 0xe0, 0x4a, 0xc0, 0x8a, - 0x68, 0xcc, 0x92, 0xa8, 0x4b, 0x2d, 0x97, 0x06, 0x34, 0x72, 0x38, 0xed, 0xa9, 0x5d, 0xf8, 0x9f, - 0x2a, 0x58, 0x27, 0x9a, 0x8c, 0x8f, 0x28, 0x8f, 0xbc, 0x2e, 0xec, 0x80, 0x4a, 0x37, 0x4c, 0x5a, - 0xc6, 0x96, 0xb1, 0xbd, 0xba, 0x6b, 0x9a, 0x4a, 0xd7, 0x2c, 0xeb, 0x9a, 0xe1, 0xc0, 0x95, 0x80, - 0x99, 0xe9, 0x9a, 0x4f, 0x12, 0x27, 0xe0, 0x1e, 0x1f, 0xdb, 0x5b, 0xa7, 0x02, 0x19, 0x13, 0x81, - 0x2a, 0xfb, 0xc7, 0xcf, 0xa6, 0x02, 0x49, 0xa5, 0x99, 0x40, 0x60, 0xec, 0xf8, 0xc3, 0xfb, 0xb8, - 0x1b, 0x26, 0x98, 0x48, 0x08, 0x7e, 0x0b, 0x6a, 0x3e, 0xf5, 0x59, 0x34, 0x6e, 0x5d, 0xba, 0x90, - 0xcd, 0x6d, 0x6d, 0x53, 0x3b, 0x4a, 0x55, 0xa6, 0x02, 0x69, 0xbd, 0x99, 0x40, 0x57, 0x95, 0x99, - 0x5a, 0x63, 0xa2, 0x09, 0xf8, 0x02, 0x54, 0xdc, 0x30, 0x69, 0x55, 0x2e, 0xe4, 0xb7, 0x9d, 0x95, - 0x75, 0xa8, 0xca, 0x72, 0xcb, 0x65, 0xb9, 0x61, 0x82, 0x7f, 0x7d, 0x8d, 0x2e, 0x1f, 0x1e, 0x3f, - 0x8b, 0x89, 0xa4, 0xe0, 0x2f, 0x06, 0xd8, 0xa0, 0x61, 0x9f, 0xfa, 0x34, 0x72, 0x86, 0x27, 0x31, - 0x67, 0x91, 0xe3, 0xd2, 0xd6, 0xe5, 0x0b, 0x59, 0x3f, 0xd6, 0xd6, 0xcd, 0x83, 0x4c, 0xf0, 0xa9, - 0xd2, 0x9b, 0x0a, 0x74, 0xde, 0x64, 0x26, 0x50, 0x4b, 0x65, 0x75, 0x8e, 0xc2, 0xa4, 0x49, 0x17, - 0x24, 0xe0, 0x0f, 0xa0, 0x9e, 0x65, 0x57, 0xdd, 0xaa, 0x6c, 0xaf, 0xee, 0x5a, 0xe6, 0xb9, 0x99, - 0x35, 0x17, 0x06, 0xc4, 0xd4, 0x9b, 0x0f, 0x02, 0x1e, 0x8d, 0xed, 0xbb, 0x13, 0x81, 0xea, 0x45, - 0x46, 0xf5, 0x22, 0x8f, 0x6b, 0x2a, 0x8f, 0xcc, 0xfd, 0xbf, 0x22, 0x8e, 0x64, 0x51, 0x9b, 0x2f, - 0xc0, 0x5a, 0x59, 0x0d, 0x36, 0x41, 0x65, 0x40, 0xc7, 0xe9, 0xec, 0x35, 0x88, 0x7c, 0x84, 0x0f, - 0x41, 0x75, 0xe4, 0x0c, 0x13, 0x7a, 0xb1, 0x41, 0x21, 0x6a, 0xf3, 0xfd, 0x4b, 0x7b, 0x06, 0x3e, - 0x04, 0xb5, 0xcf, 0xa9, 0x13, 0xd3, 0x18, 0x3e, 0x00, 0x35, 0xa7, 0xcb, 0xbd, 0x11, 0x4d, 0x8d, - 0xae, 0xda, 0xb7, 0xe4, 0x24, 0x7d, 0x9a, 0x22, 0x72, 0x92, 0x14, 0x57, 0x4c, 0x92, 0x5a, 0x63, - 0xa2, 0x09, 0xfc, 0x9b, 0x01, 0x20, 0xa1, 0x31, 0x8d, 0x46, 0x0e, 0xf7, 0x58, 0x90, 0x9d, 0x9b, - 0x3d, 0x50, 0xed, 0xb2, 0x24, 0xe0, 0x5a, 0x14, 0x4f, 0x04, 0xaa, 0xee, 0x4b, 0x60, 0x2a, 0x90, - 0x62, 0x66, 0x02, 0xad, 0xe9, 0x93, 0x20, 0x97, 0x98, 0x28, 0x18, 0x72, 0xd0, 0xc8, 0x32, 0x8f, - 0x75, 0x9d, 0xf8, 0xcd, 0x7d, 0xb0, 0x77, 0x4f, 0x05, 0x5a, 0x99, 0x08, 0xd4, 0xc8, 0x89, 0xa9, - 0x40, 0x85, 0xd2, 0x4c, 0xa0, 0xa6, 0x72, 0xcb, 0x21, 0x4c, 0x0a, 0x1a, 0xff, 0x6d, 0x80, 0xb5, - 0x72, 0x19, 0xd0, 0x07, 0xf5, 0x90, 0x06, 0x3d, 0x2f, 0x70, 0xf5, 0xe1, 0xbf, 0xb5, 0x3c, 0x89, - 0x85, 0xc2, 0xed, 0x3b, 0x3a, 0x8f, 0xfa, 0xb1, 0xda, 0x2d, 0xc7, 0x40, 0x0b, 0x15, 0x63, 0xa0, - 0x01, 0x4c, 0x32, 0x0a, 0xf6, 0xf3, 0x2e, 0x5c, 0x7a, 0x1b, 0xb7, 0xdb, 0xda, 0xed, 0x2d, 0x1a, - 0xf6, 0xaf, 0x01, 0x1a, 0x8f, 0xb3, 0x4f, 0x27, 0xec, 0x82, 0xba, 0xfe, 0x74, 0xea, 0x32, 0x6f, - 0x6a, 0xe3, 0xfc, 0xeb, 0x2a, 0x9d, 0xf7, 0x55, 0x48, 0x51, 0x9c, 0x06, 0x64, 0x71, 0x7a, 0x7b, - 0x51, 0x9c, 0x06, 0x30, 0xc9, 0x28, 0xf8, 0xa3, 0x01, 0xd6, 0xa2, 0x52, 0xf2, 0xba, 0x46, 0xf4, - 0x86, 0x1a, 0xed, 0x8f, 0xb5, 0xdd, 0x5c, 0x67, 0xa6, 0x02, 0xcd, 0x89, 0xcd, 0x04, 0x7a, 0x27, - 0xef, 0x6c, 0x8e, 0x62, 0x32, 0x17, 0x84, 0xff, 0x34, 0xc0, 0x55, 0x9d, 0xf4, 0xd3, 0xf4, 0xaf, - 0x04, 0xbf, 0x01, 0xb5, 0x61, 0x7a, 0x02, 0x74, 0xe1, 0x37, 0x96, 0x64, 0xa3, 0x8e, 0x48, 0xf1, - 0x96, 0xd5, 0x5a, 0xbe, 0x65, 0xb5, 0xb5, 0x78, 0xcb, 0x6a, 0x8d, 0x89, 0x26, 0x60, 0x00, 0x1a, - 0xf9, 0x1b, 0xd4, 0xe5, 0xbe, 0xb7, 0xc4, 0x20, 0x6f, 0x44, 0x31, 0xbf, 0x39, 0x24, 0xe7, 0x37, - 0xd7, 0x28, 0xe6, 0x37, 0x87, 0x30, 0x29, 0x68, 0x7c, 0x0c, 0xd6, 0x6d, 0xaf, 0x77, 0x10, 0xb8, - 0x5e, 0x40, 0x75, 0x81, 0x0f, 0x40, 0x8d, 0x45, 0x3d, 0x1a, 0xc5, 0xe5, 0x83, 0xfd, 0x45, 0x8a, - 0xc8, 0x0a, 0x14, 0x57, 0x54, 0xa0, 0xd6, 0x98, 0x68, 0x02, 0xf7, 0xc1, 0xb5, 0x23, 0x27, 0xf0, - 0x9e, 0xd3, 0x98, 0x6b, 0xc1, 0xaf, 0xc0, 0x6a, 0x8f, 0x86, 0x43, 0x36, 0xf6, 0x69, 0xc0, 0x33, - 0xd5, 0x7b, 0x13, 0x81, 0x56, 0x1f, 0x16, 0xf0, 0x54, 0xa0, 0x72, 0xd4, 0x4c, 0x20, 0xa8, 0xf4, - 0x4b, 0x20, 0x26, 0xe5, 0x10, 0xfc, 0x7b, 0x15, 0xd4, 0xb4, 0xc5, 0x13, 0x50, 0xa3, 0x51, 0xc4, - 0xd2, 0x9c, 0x2b, 0xdb, 0x0d, 0xfb, 0x23, 0x99, 0xf3, 0x41, 0x8a, 0x4c, 0x05, 0x6a, 0x2a, 0xee, - 0x0e, 0xf3, 0x3d, 0x4e, 0xfd, 0x90, 0xcb, 0xb7, 0xf2, 0xae, 0xfe, 0xc0, 0x2f, 0x30, 0x98, 0x68, - 0x21, 0xf8, 0x7d, 0x31, 0xe1, 0xaa, 0x0f, 0x5b, 0x4b, 0xfa, 0x30, 0x37, 0x1a, 0xf6, 0x27, 0xfa, - 0x2f, 0x53, 0x1a, 0xf3, 0x0d, 0xad, 0x31, 0xe7, 0xdd, 0x9a, 0x1b, 0xf8, 0xb2, 0x79, 0x3e, 0xfa, - 0x3f, 0x1b, 0x00, 0x74, 0xbc, 0xde, 0x09, 0x4d, 0x3b, 0xa3, 0x7f, 0xb8, 0xcb, 0xbe, 0x67, 0x0b, - 0xdd, 0xb3, 0x1f, 0xe9, 0x1c, 0x1a, 0x39, 0x31, 0x15, 0xe8, 0x7a, 0x21, 0x35, 0x97, 0xc8, 0x4d, - 0x95, 0xc8, 0x32, 0x16, 0x93, 0x46, 0x27, 0x53, 0x80, 0x3f, 0x19, 0xe0, 0x8a, 0xaf, 0x9b, 0xaa, - 0xff, 0xc0, 0xef, 0x2f, 0xc9, 0x65, 0xbe, 0xef, 0xf6, 0xbe, 0x4e, 0xe5, 0x4a, 0x86, 0x4f, 0x05, - 0x82, 0x99, 0xcc, 0x5c, 0x1e, 0x37, 0xf4, 0x6d, 0xe3, 0x1c, 0x87, 0x49, 0xee, 0x0b, 0x7d, 0xd0, - 0x0c, 0x93, 0xce, 0xd0, 0xeb, 0x9e, 0xf4, 0x59, 0xcc, 0x03, 0xc7, 0xa7, 0x71, 0xfa, 0xbf, 0x6d, - 0xd8, 0xf6, 0x44, 0xa0, 0xf5, 0xe3, 0x94, 0x7b, 0x94, 0x51, 0xb2, 0xed, 0x8b, 0xe1, 0x45, 0xdb, - 0x17, 0x19, 0x4c, 0xd6, 0xc3, 0xf9, 0xfd, 0x30, 0x04, 0x8d, 0xfc, 0x5a, 0xd9, 0xaa, 0xa5, 0x35, - 0x6f, 0x9a, 0xea, 0xe2, 0x69, 0x66, 0x17, 0x4f, 0xf3, 0xcb, 0x2c, 0xc2, 0xfe, 0x30, 0x3b, 0x87, - 0x39, 0x24, 0xcf, 0x61, 0xae, 0x50, 0x9c, 0xc3, 0x1c, 0xc2, 0x2f, 0x5f, 0x23, 0x83, 0x14, 0x21, - 0xf6, 0x67, 0xa7, 0x93, 0xb6, 0xf1, 0x6a, 0xd2, 0x36, 0xfe, 0x9a, 0xb4, 0x8d, 0x97, 0x67, 0xed, - 0x95, 0x57, 0x67, 0xed, 0x95, 0x3f, 0xce, 0xda, 0x2b, 0x5f, 0xef, 0xb8, 0x1e, 0xef, 0x27, 0x1d, - 0xb3, 0xcb, 0x7c, 0x2b, 0x7d, 0xed, 0x1f, 0x04, 0x94, 0x7f, 0xc7, 0xa2, 0x81, 0x5e, 0xc9, 0xeb, - 0xa9, 0xcb, 0xca, 0x77, 0xe8, 0x4e, 0x2d, 0xcd, 0xf1, 0xee, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xa8, 0x57, 0xf0, 0x94, 0x5f, 0x0b, 0x00, 0x00, + // 1085 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6b, 0x1b, 0x47, + 0x14, 0xf6, 0x5a, 0xb6, 0x14, 0x8d, 0xed, 0x58, 0x9e, 0x06, 0x2a, 0x3b, 0x45, 0xe3, 0x0e, 0x04, + 0x1c, 0x08, 0x2b, 0x62, 0xe7, 0xe0, 0xa6, 0x04, 0xda, 0x75, 0x8c, 0x13, 0xa8, 0xa9, 0x33, 0x21, + 0x3d, 0x94, 0x82, 0x59, 0x4b, 0xd3, 0xd5, 0x46, 0xda, 0x1f, 0xdd, 0x9d, 0x15, 0x08, 0x4a, 0x29, + 0xbd, 0xf6, 0xd2, 0xbf, 0xa2, 0x87, 0xfe, 0x1d, 0x3d, 0xf8, 0x98, 0x63, 0xa1, 0x74, 0x5a, 0xe4, + 0x43, 0xa9, 0x8e, 0xea, 0xad, 0xa7, 0x32, 0x3b, 0x6f, 0x7f, 0x48, 0x16, 0x84, 0xf8, 0xb6, 0xf3, + 0xbe, 0x99, 0xef, 0xfb, 0xde, 0xbc, 0x37, 0x33, 0x8b, 0x5a, 0x76, 0xdf, 0x8e, 0x7b, 0xed, 0x30, + 0x0a, 0x86, 0x6e, 0x97, 0x47, 0xed, 0xe1, 0xc3, 0x76, 0x2c, 0x6c, 0x91, 0xc4, 0x66, 0x18, 0x05, + 0x22, 0xc0, 0x5b, 0x29, 0x6e, 0x66, 0xb8, 0x39, 0x7c, 0xb8, 0x73, 0xc7, 0x09, 0x9c, 0x20, 0x45, + 0xdb, 0xea, 0x4b, 0x4f, 0xdc, 0xd9, 0xd5, 0x44, 0xae, 0x3f, 0xe4, 0xbe, 0x08, 0xa2, 0x91, 0x62, + 0xea, 0x0c, 0x92, 0x58, 0xf0, 0x08, 0x66, 0x3c, 0xea, 0x1f, 0xc6, 0x6d, 0x37, 0x68, 0xdb, 0xa1, + 0xeb, 0xd9, 0x9d, 0x9e, 0xeb, 0xf3, 0x68, 0xd4, 0x0e, 0xfb, 0x8e, 0x0a, 0xb4, 0x23, 0x1e, 0x07, + 0x49, 0xd4, 0xe1, 0x6d, 0x87, 0xfb, 0x3c, 0xb2, 0x05, 0xef, 0xea, 0x55, 0xf4, 0x9f, 0x55, 0xb4, + 0xc9, 0x00, 0x8c, 0x4f, 0xb9, 0x88, 0xdc, 0x0e, 0xbe, 0x40, 0x95, 0x4e, 0x98, 0x34, 0x8d, 0x5d, + 0x63, 0x6f, 0x6d, 0xdf, 0x34, 0xfb, 0x87, 0xb1, 0xe9, 0x06, 0x66, 0x99, 0xd7, 0x0c, 0xfb, 0x8e, + 0x0a, 0x98, 0x19, 0xaf, 0xf9, 0x22, 0xb1, 0x7d, 0xe1, 0x8a, 0x91, 0xb5, 0x7b, 0x29, 0x89, 0x31, + 0x96, 0xa4, 0x72, 0x74, 0xf6, 0x6a, 0x22, 0x89, 0x62, 0x9a, 0x4a, 0x82, 0x46, 0xb6, 0x37, 0x78, + 0x4c, 0x3b, 0x61, 0x42, 0x99, 0x0a, 0xe1, 0x6f, 0x50, 0xd5, 0xe3, 0x5e, 0x10, 0x8d, 0x9a, 0xcb, + 0x37, 0x92, 0xb9, 0x0f, 0x32, 0xd5, 0xd3, 0x94, 0x65, 0x22, 0x09, 0xf0, 0x4d, 0x25, 0xd9, 0xd0, + 0x62, 0x7a, 0x4c, 0x19, 0x00, 0xf8, 0x35, 0xaa, 0x38, 0x61, 0xd2, 0xac, 0xdc, 0x48, 0x6f, 0x2f, + 0x4b, 0xeb, 0x44, 0xa7, 0xe5, 0x94, 0xd3, 0x72, 0xc2, 0x84, 0xfe, 0xf2, 0x27, 0x59, 0x39, 0x39, + 0x7b, 0x15, 0x33, 0x05, 0xe1, 0x9f, 0x0d, 0xb4, 0xc5, 0xc3, 0x1e, 0xf7, 0x78, 0x64, 0x0f, 0xce, + 0x63, 0x11, 0x44, 0xb6, 0xc3, 0x9b, 0x2b, 0x37, 0x92, 0x7e, 0x0e, 0xd2, 0x8d, 0xe3, 0x8c, 0xf0, + 0xa5, 0xe6, 0x9b, 0x48, 0x72, 0x5d, 0x64, 0x2a, 0x49, 0x53, 0xbb, 0xba, 0x06, 0x51, 0xd6, 0xe0, + 0x73, 0x14, 0xf8, 0x3b, 0x54, 0xcb, 0xdc, 0xad, 0xee, 0x56, 0xf6, 0xd6, 0xf6, 0xdb, 0xe6, 0xb5, + 0x96, 0x34, 0xe7, 0x1a, 0xc4, 0x84, 0xc5, 0xc7, 0xbe, 0x88, 0x46, 0xd6, 0xc1, 0x58, 0x92, 0x5a, + 0xe1, 0xa8, 0x56, 0xf8, 0xb8, 0xad, 0x7d, 0x64, 0xea, 0xff, 0x15, 0xf3, 0x58, 0x36, 0x6b, 0xe7, + 0x35, 0x5a, 0x2f, 0xb3, 0xe1, 0x06, 0xaa, 0xf4, 0xf9, 0x28, 0xed, 0xbd, 0x3a, 0x53, 0x9f, 0xf8, + 0x29, 0x5a, 0x1d, 0xda, 0x83, 0x84, 0xdf, 0xac, 0x51, 0x98, 0x5e, 0xfc, 0x78, 0xf9, 0xd0, 0xa0, + 0x27, 0xa8, 0xfa, 0x19, 0xb7, 0x63, 0x1e, 0xe3, 0x27, 0xa8, 0x6a, 0x77, 0x84, 0x3b, 0xe4, 0xa9, + 0xd0, 0x86, 0x75, 0x4f, 0x75, 0xd2, 0xa7, 0x69, 0x44, 0x75, 0x92, 0xc6, 0x8a, 0x4e, 0xd2, 0x63, + 0xca, 0x00, 0xa0, 0xbf, 0x1a, 0x08, 0x33, 0x1e, 0xf3, 0x68, 0x68, 0x0b, 0x37, 0xf0, 0xb3, 0x73, + 0x73, 0x88, 0x56, 0x3b, 0x41, 0xe2, 0x0b, 0x20, 0xa5, 0x63, 0x49, 0x56, 0x8f, 0x54, 0x60, 0x22, + 0x89, 0x46, 0xa6, 0x92, 0xac, 0xc3, 0x49, 0x50, 0x43, 0xca, 0x74, 0x18, 0x0b, 0x54, 0xcf, 0x9c, + 0xc7, 0x90, 0x27, 0x7d, 0x7b, 0x1d, 0xac, 0xfd, 0x4b, 0x49, 0x96, 0xc6, 0x92, 0xd4, 0x73, 0x60, + 0x22, 0x49, 0xc1, 0x34, 0x95, 0xa4, 0xa1, 0xd5, 0xf2, 0x10, 0x65, 0x05, 0x4c, 0xff, 0x36, 0xd0, + 0x7a, 0x39, 0x0d, 0xec, 0xa1, 0x5a, 0xc8, 0xfd, 0xae, 0xeb, 0x3b, 0x70, 0xf8, 0xef, 0x2d, 0x36, + 0x31, 0x97, 0xb8, 0xf5, 0x00, 0x7c, 0xd4, 0xce, 0xf4, 0x6a, 0xd5, 0x06, 0x40, 0x54, 0xb4, 0x01, + 0x04, 0x28, 0xcb, 0x20, 0xdc, 0xcb, 0xab, 0xb0, 0xfc, 0x2e, 0x6a, 0xf7, 0x41, 0xed, 0x1d, 0x0a, + 0xf6, 0xaf, 0x81, 0xea, 0xcf, 0xb3, 0xab, 0x13, 0x77, 0x50, 0x0d, 0xae, 0x4e, 0x48, 0xf3, 0x2e, + 0x08, 0xe7, 0xb7, 0xab, 0x52, 0x3e, 0xd2, 0x53, 0x8a, 0xe4, 0x20, 0xa0, 0x92, 0x83, 0xe5, 0x45, + 0x72, 0x10, 0xa0, 0x2c, 0x83, 0xf0, 0xf7, 0x06, 0x5a, 0x8f, 0x4a, 0xe6, 0x21, 0x47, 0xf2, 0x96, + 0x1c, 0xad, 0x8f, 0x41, 0x6e, 0xa6, 0x32, 0x13, 0x49, 0x66, 0xc8, 0xa6, 0x92, 0xbc, 0x97, 0x57, + 0x36, 0x8f, 0x52, 0x36, 0x33, 0x89, 0xfe, 0x61, 0xa0, 0x0d, 0x30, 0xfd, 0x32, 0x7d, 0x74, 0xf0, + 0x57, 0xa8, 0x3a, 0x48, 0x4f, 0x00, 0x24, 0xbe, 0xbd, 0xc0, 0x8d, 0x3e, 0x22, 0xc5, 0x2e, 0xeb, + 0xb1, 0xda, 0x65, 0xbd, 0xb4, 0xd8, 0x65, 0x3d, 0xa6, 0x0c, 0x00, 0xec, 0xa3, 0x7a, 0xbe, 0x83, + 0x90, 0xee, 0x07, 0x0b, 0x04, 0xf2, 0x42, 0x14, 0xfd, 0x9b, 0x87, 0x54, 0xff, 0xe6, 0x1c, 0x45, + 0xff, 0xe6, 0x21, 0xca, 0x0a, 0x98, 0x9e, 0xa1, 0x4d, 0xcb, 0xed, 0x1e, 0xfb, 0x8e, 0xeb, 0x73, + 0x48, 0xf0, 0x09, 0xaa, 0x06, 0x51, 0x97, 0x47, 0x71, 0xf9, 0x60, 0x7f, 0x9e, 0x46, 0x54, 0x06, + 0x1a, 0x2b, 0x32, 0xd0, 0x63, 0xca, 0x00, 0xa0, 0x3d, 0x74, 0xfb, 0xd4, 0xf6, 0xdd, 0xaf, 0x79, + 0x2c, 0x80, 0xf0, 0x0b, 0xb4, 0xd6, 0xe5, 0xe1, 0x20, 0x18, 0x79, 0xdc, 0x17, 0x19, 0xeb, 0xa3, + 0xb1, 0x24, 0x6b, 0x4f, 0x8b, 0xf0, 0x44, 0x92, 0xf2, 0xac, 0xa9, 0x24, 0x58, 0xf3, 0x97, 0x82, + 0x94, 0x95, 0xa7, 0xd0, 0xdf, 0x57, 0x50, 0x15, 0x24, 0x5e, 0xa0, 0x2a, 0x8f, 0xa2, 0x20, 0xf5, + 0x5c, 0xd9, 0xab, 0x5b, 0x1f, 0x29, 0xcf, 0xc7, 0x69, 0x64, 0x22, 0x49, 0x43, 0x63, 0x0f, 0x02, + 0xcf, 0x15, 0xdc, 0x0b, 0x85, 0xda, 0x95, 0xf7, 0xe1, 0x82, 0x9f, 0x43, 0x28, 0x03, 0x22, 0xfc, + 0x6d, 0xd1, 0xe1, 0xba, 0x0e, 0xbb, 0x0b, 0xea, 0x30, 0xd3, 0x1a, 0xd6, 0x27, 0xf0, 0xca, 0x94, + 0xda, 0x7c, 0x0b, 0x38, 0x66, 0xb4, 0x9b, 0x33, 0x0d, 0x5f, 0x16, 0xcf, 0x5b, 0xff, 0x47, 0x03, + 0xa1, 0x0b, 0xb7, 0x7b, 0xce, 0xd3, 0xca, 0xc0, 0x83, 0xbb, 0xe8, 0x3e, 0x9b, 0xab, 0x9e, 0xf5, + 0x0c, 0x3c, 0xd4, 0x73, 0x60, 0x22, 0xc9, 0x9d, 0x82, 0x6a, 0xc6, 0xc8, 0x5d, 0x6d, 0x64, 0x11, + 0x4a, 0x59, 0xfd, 0x22, 0x63, 0xc0, 0x3f, 0x18, 0xe8, 0x96, 0x07, 0x45, 0x85, 0x17, 0xf8, 0xc3, + 0x05, 0x5e, 0x66, 0xeb, 0x6e, 0x1d, 0x81, 0x95, 0x5b, 0x59, 0x7c, 0x22, 0x09, 0xce, 0x68, 0x66, + 0x7c, 0x6c, 0xc3, 0xdf, 0xc6, 0x35, 0x8c, 0xb2, 0x5c, 0x17, 0x7b, 0xa8, 0x11, 0x26, 0x17, 0x03, + 0xb7, 0x73, 0xde, 0x0b, 0x62, 0xe1, 0xdb, 0x1e, 0x8f, 0xd3, 0xf7, 0xb6, 0x6e, 0x59, 0x63, 0x49, + 0x36, 0xcf, 0x52, 0xec, 0x59, 0x06, 0xa9, 0xb2, 0xcf, 0x4f, 0x2f, 0xca, 0x3e, 0x8f, 0x50, 0xb6, + 0x19, 0xce, 0xae, 0xb7, 0x0e, 0x2e, 0xc7, 0x2d, 0xe3, 0xcd, 0xb8, 0x65, 0xfc, 0x35, 0x6e, 0x19, + 0x3f, 0x5d, 0xb5, 0x96, 0xde, 0x5c, 0xb5, 0x96, 0x7e, 0xbb, 0x6a, 0x2d, 0x7d, 0xb9, 0x9d, 0xbe, + 0x94, 0x7d, 0x61, 0xba, 0xea, 0xf7, 0xb2, 0xfc, 0x63, 0x7a, 0x51, 0x4d, 0xff, 0x08, 0x0f, 0xfe, + 0x0f, 0x00, 0x00, 0xff, 0xff, 0x29, 0x5d, 0x6c, 0xba, 0xb4, 0x0a, 0x00, 0x00, } func (m *ResourcesMetric) Marshal() (dAtA []byte, err error) { @@ -998,14 +981,6 @@ func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err13 != nil { - return 0, err13 - } - i -= n13 - i = encodeVarintStatus(dAtA, i, uint64(n13)) - i-- - dAtA[i] = 0x32 if len(m.PublicHostnames) > 0 { for iNdEx := len(m.PublicHostnames) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PublicHostnames[iNdEx]) @@ -1231,8 +1206,6 @@ func (m *Status) Size() (n int) { n += 1 + l + sovStatus(uint64(l)) } } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovStatus(uint64(l)) return n } @@ -2423,39 +2396,6 @@ func (m *Status) Unmarshal(dAtA []byte) error { } m.PublicHostnames = append(m.PublicHostnames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStatus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStatus(dAtA[iNdEx:]) diff --git a/go/testutil/base.go b/go/testutil/base.go index d1d5c3be..80ad23fb 100644 --- a/go/testutil/base.go +++ b/go/testutil/base.go @@ -4,14 +4,15 @@ import ( "fmt" "testing" + "github.com/cometbft/cometbft/libs/rand" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/rand" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + attr "pkg.akt.io/go/node/types/attributes/v1" + types "pkg.akt.io/go/node/types/resources/v1beta4" // ensure sdkutil.init() to seal SDK config for the tests - _ "github.com/akash-network/akash-api/go/sdkutil" + _ "pkg.akt.io/go/sdkutil" ) // CoinDenom provides ability to create coins in test functions and @@ -36,17 +37,17 @@ func ProviderHostname(t testing.TB) string { } // Attribute generates a random sdk.Attribute -func Attribute(t testing.TB) types.Attribute { +func Attribute(t testing.TB) attr.Attribute { t.Helper() - return types.NewStringAttribute(Name(t, "attr-key"), Name(t, "attr-value")) + return attr.NewStringAttribute(Name(t, "attr-key"), Name(t, "attr-value")) } // Attributes generates a set of sdk.Attribute -func Attributes(t testing.TB) []types.Attribute { +func Attributes(t testing.TB) []attr.Attribute { t.Helper() count := rand.Intn(10) + 1 - vals := make([]types.Attribute, 0, count) + vals := make(attr.Attributes, 0, count) for i := 0; i < count; i++ { vals = append(vals, Attribute(t)) } @@ -54,8 +55,8 @@ func Attributes(t testing.TB) []types.Attribute { } // PlacementRequirements generates placement requirements -func PlacementRequirements(t testing.TB) types.PlacementRequirements { - return types.PlacementRequirements{ +func PlacementRequirements(t testing.TB) attr.PlacementRequirements { + return attr.PlacementRequirements{ Attributes: Attributes(t), } } diff --git a/go/testutil/cert.go b/go/testutil/cert.go index b767fb02..6caac181 100644 --- a/go/testutil/cert.go +++ b/go/testutil/cert.go @@ -17,9 +17,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - types "github.com/akash-network/akash-api/go/node/cert/v1beta3" - certutils "github.com/akash-network/akash-api/go/node/cert/v1beta3/utils" - clientmocks "github.com/akash-network/akash-api/go/node/client/v1beta2/mocks" + types "pkg.akt.io/go/node/cert/v1" + certutils "pkg.akt.io/go/node/cert/v1/utils" + clientmocks "pkg.akt.io/go/node/client/v1beta3/mocks" ) type TestCertificate struct { @@ -183,7 +183,7 @@ func Certificate(t testing.TB, addr sdk.Address, opts ...CertificateOption) Test Filter: types.CertificateFilter{ Owner: addr.String(), Serial: res.Serial.String(), - State: "valid", + State: types.CertificateValid, }, }). Return(&types.QueryCertificatesResponse{ @@ -202,7 +202,7 @@ func Certificate(t testing.TB, addr sdk.Address, opts ...CertificateOption) Test return res } -func CertificateRequireEqualResponse(t *testing.T, cert TestCertificate, resp types.CertificateResponse, state types.Certificate_State) { +func CertificateRequireEqualResponse(t *testing.T, cert TestCertificate, resp types.CertificateResponse, state types.State) { t.Helper() require.Equal(t, state, resp.Certificate.State) diff --git a/go/testutil/deployment.go b/go/testutil/deployment.go index 9e12036a..b96b6ce9 100644 --- a/go/testutil/deployment.go +++ b/go/testutil/deployment.go @@ -5,33 +5,34 @@ import ( "math/rand" "testing" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" + dtypes "pkg.akt.io/go/node/deployment/v1" + dtypesv1beta4 "pkg.akt.io/go/node/deployment/v1beta4" ) // sum256Seed provides a consistent sha256 value for initial Deployment.Version const sum256Seed = "hihi" -// DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version -var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed)) +// DefaultDeploymentHash provides consistent sha256 sum for initial Deployment.Version +var DefaultDeploymentHash = sha256.Sum256([]byte(sum256Seed)) // Deployment generates a dtype.Deployment in state `DeploymentActive` func Deployment(t testing.TB) dtypes.Deployment { t.Helper() return dtypes.Deployment{ - DeploymentID: DeploymentID(t), - State: dtypes.DeploymentActive, - Version: DefaultDeploymentVersion[:], + ID: DeploymentID(t), + State: dtypes.DeploymentActive, + Hash: DefaultDeploymentHash[:], } } // DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` // with a set of random required attributes -func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group { +func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypesv1beta4.Group { t.Helper() - return dtypes.Group{ - GroupID: dtypes.MakeGroupID(did, gseq), - State: dtypes.GroupOpen, - GroupSpec: dtypes.GroupSpec{ + return dtypesv1beta4.Group{ + ID: dtypes.MakeGroupID(did, gseq), + State: dtypesv1beta4.GroupOpen, + GroupSpec: dtypesv1beta4.GroupSpec{ Name: Name(t, "dgroup"), Requirements: PlacementRequirements(t), Resources: Resources(t), @@ -40,9 +41,9 @@ func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes. } // GroupSpec generator -func GroupSpec(t testing.TB) dtypes.GroupSpec { +func GroupSpec(t testing.TB) dtypesv1beta4.GroupSpec { t.Helper() - return dtypes.GroupSpec{ + return dtypesv1beta4.GroupSpec{ Name: Name(t, "dgroup"), Requirements: PlacementRequirements(t), Resources: Resources(t), @@ -50,10 +51,10 @@ func GroupSpec(t testing.TB) dtypes.GroupSpec { } // DeploymentGroups returns a set of deployment groups generated by DeploymentGroup -func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group { +func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypesv1beta4.Groups { t.Helper() count := rand.Intn(5) + 5 // nolint:gosec - vals := make([]dtypes.Group, 0, count) + vals := make(dtypesv1beta4.Groups, 0, count) for i := 0; i < count; i++ { vals = append(vals, DeploymentGroup(t, did, gseq+uint32(i))) } diff --git a/go/testutil/ids.go b/go/testutil/ids.go index 6ed7fa10..e1c84a13 100644 --- a/go/testutil/ids.go +++ b/go/testutil/ids.go @@ -6,17 +6,18 @@ import ( "math/rand" "testing" + "github.com/cometbft/cometbft/crypto/ed25519" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto/ed25519" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta4" + dtypes "pkg.akt.io/go/node/deployment/v1" + mtypes "pkg.akt.io/go/node/market/v1" ) -func Keyring(t testing.TB) keyring.Keyring { +func Keyring(t testing.TB, cdc codec.Codec) keyring.Keyring { t.Helper() - obj := keyring.NewInMemory() + obj := keyring.NewInMemory(cdc) return obj } diff --git a/go/testutil/log.go b/go/testutil/log.go index 3935d5e0..294aeaa8 100644 --- a/go/testutil/log.go +++ b/go/testutil/log.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" ) func Logger(t testing.TB) log.Logger { diff --git a/go/testutil/v1beta1/base.go b/go/testutil/v1beta1/base.go deleted file mode 100644 index 79fe5ff2..00000000 --- a/go/testutil/v1beta1/base.go +++ /dev/null @@ -1,88 +0,0 @@ -package testutil - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/rand" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - types "github.com/akash-network/akash-api/go/node/types/v1beta1" - "github.com/akash-network/akash-api/go/testutil" -) - -func ProviderHostname(t testing.TB) string { - return "https://" + testutil.Hostname(t) -} - -// Attribute generates a random sdk.Attribute -func Attribute(t testing.TB) types.Attribute { - t.Helper() - return types.NewStringAttribute(testutil.Name(t, "attr-key"), testutil.Name(t, "attr-value")) -} - -// Attributes generates a set of sdk.Attribute -func Attributes(t testing.TB) []types.Attribute { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make([]types.Attribute, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, Attribute(t)) - } - return vals -} - -// PlacementRequirements generates placement requirements -func PlacementRequirements(t testing.TB) types.PlacementRequirements { - return types.PlacementRequirements{ - Attributes: Attributes(t), - } -} - -func RandCPUUnits() uint { - return testutil.RandRangeUint( - dtypes.GetValidationConfig().MinUnitCPU, - dtypes.GetValidationConfig().MaxUnitCPU) -} - -func RandMemoryQuantity() uint64 { - return testutil.RandRangeUint64( - dtypes.GetValidationConfig().MinUnitMemory, - dtypes.GetValidationConfig().MaxUnitMemory) -} - -func RandStorageQuantity() uint64 { - return testutil.RandRangeUint64( - dtypes.GetValidationConfig().MinUnitStorage, - dtypes.GetValidationConfig().MaxUnitStorage) -} - -// Resources produces an attribute list for populating a Group's -// 'Resources' fields. -func Resources(t testing.TB) []dtypes.Resource { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make([]dtypes.Resource, 0, count) - for i := 0; i < count; i++ { - coin := sdk.NewCoin(testutil.CoinDenom, sdk.NewInt(rand.Int63n(9999)+1)) - res := dtypes.Resource{ - Resources: types.ResourceUnits{ - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().MinUnitCPU)), - }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().MinUnitMemory), - }, - Storage: &types.Storage{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().MinUnitStorage), - }, - }, - Count: 1, - Price: coin, - } - vals = append(vals, res) - } - return vals -} diff --git a/go/testutil/v1beta1/deployment.go b/go/testutil/v1beta1/deployment.go deleted file mode 100644 index f70bd0f7..00000000 --- a/go/testutil/v1beta1/deployment.go +++ /dev/null @@ -1,62 +0,0 @@ -package testutil - -import ( - "crypto/sha256" - "math/rand" - "testing" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - "github.com/akash-network/akash-api/go/testutil" -) - -// sum256Seed provides a consistent sha256 value for initial Deployment.Version -const sum256Seed = "hihi" - -// DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version -var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed)) - -// Deployment generates a dtype.Deployment in state `DeploymentActive` -func Deployment(t testing.TB) dtypes.Deployment { - t.Helper() - return dtypes.Deployment{ - DeploymentID: DeploymentID(t), - State: dtypes.DeploymentActive, - Version: DefaultDeploymentVersion[:], - } -} - -// DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` -// with a set of random required attributes -func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group { - t.Helper() - return dtypes.Group{ - GroupID: dtypes.MakeGroupID(did, gseq), - State: dtypes.GroupOpen, - GroupSpec: dtypes.GroupSpec{ - Name: testutil.Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - }, - } -} - -// GroupSpec generator -func GroupSpec(t testing.TB) dtypes.GroupSpec { - t.Helper() - return dtypes.GroupSpec{ - Name: testutil.Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - } -} - -// DeploymentGroups returns a set of deployment groups generated by DeploymentGroup -func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group { - t.Helper() - count := rand.Intn(5) + 5 // nolint:gosec - vals := make([]dtypes.Group, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, DeploymentGroup(t, did, gseq+uint32(i))) - } - return vals -} diff --git a/go/testutil/v1beta1/event.go b/go/testutil/v1beta1/event.go deleted file mode 100644 index 805d36f7..00000000 --- a/go/testutil/v1beta1/event.go +++ /dev/null @@ -1,48 +0,0 @@ -package testutil - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta1" - "github.com/akash-network/akash-api/go/sdkutil" -) - -func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event { - t.Helper() - - require.Equal(t, 1, len(events)) - - sev := sdk.StringifyEvent(events[0]) - ev, err := sdkutil.ParseEvent(sev) - - require.NoError(t, err) - - return ev -} - -func ParseDeploymentEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent { - t.Helper() - - uev := ParseEvent(t, events) - - iev, err := dtypes.ParseEvent(uev) - require.NoError(t, err) - - return iev -} - -func ParseProviderEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent { - t.Helper() - - uev := ParseEvent(t, events) - - iev, err := ptypes.ParseEvent(uev) - require.NoError(t, err) - - return iev -} diff --git a/go/testutil/v1beta1/ids.go b/go/testutil/v1beta1/ids.go deleted file mode 100644 index 454bb295..00000000 --- a/go/testutil/v1beta1/ids.go +++ /dev/null @@ -1,96 +0,0 @@ -package testutil - -import ( - cryptorand "crypto/rand" - "crypto/sha256" - "math/rand" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto/ed25519" - - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta1" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta1" -) - -// AccAddress provides an Account's Address bytes from a ed25519 generated -// private key. -func AccAddress(t testing.TB) sdk.AccAddress { - t.Helper() - privKey := ed25519.GenPrivKey() - return sdk.AccAddress(privKey.PubKey().Address()) -} - -func Key(t testing.TB) ed25519.PrivKey { - t.Helper() - return ed25519.GenPrivKey() -} - -func DeploymentID(t testing.TB) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: AccAddress(t).String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -func DeploymentIDForAccount(t testing.TB, addr sdk.Address) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: addr.String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -// DeploymentVersion provides a random sha256 sum for simulating Deployments. -func DeploymentVersion(t testing.TB) []byte { - t.Helper() - src := make([]byte, 128) - _, err := cryptorand.Read(src) - if err != nil { - t.Fatal(err) - } - sum := sha256.Sum256(src) - return sum[:] -} - -func GroupID(t testing.TB) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentID(t), rand.Uint32()) // nolint: gosec -} - -func GroupIDForAccount(t testing.TB, addr sdk.Address) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func OrderID(t testing.TB) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupID(t), rand.Uint32()) // nolint: gosec -} - -func OrderIDForAccount(t testing.TB, addr sdk.Address) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func BidID(t testing.TB) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderID(t), AccAddress(t)) -} - -func BidIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderIDForAccount(t, owner), provider.Bytes()) -} - -func LeaseID(t testing.TB) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidID(t)) -} - -func LeaseIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidIDForAccount(t, owner, provider)) -} diff --git a/go/testutil/v1beta1/provider.go b/go/testutil/v1beta1/provider.go deleted file mode 100644 index 8ac77863..00000000 --- a/go/testutil/v1beta1/provider.go +++ /dev/null @@ -1,22 +0,0 @@ -package testutil - -import ( - "testing" - - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta1" - "github.com/akash-network/akash-api/go/testutil" -) - -func Provider(t testing.TB) ptypes.Provider { - t.Helper() - - return ptypes.Provider{ - Owner: AccAddress(t).String(), - HostURI: testutil.Hostname(t), - Attributes: Attributes(t), - Info: ptypes.ProviderInfo{ - EMail: "test@example.com", - Website: ProviderHostname(t), - }, - } -} diff --git a/go/testutil/v1beta1/types.go b/go/testutil/v1beta1/types.go deleted file mode 100644 index 319954ec..00000000 --- a/go/testutil/v1beta1/types.go +++ /dev/null @@ -1,21 +0,0 @@ -package testutil - -import ( - "testing" - - types "github.com/akash-network/akash-api/go/node/types/v1beta1" -) - -func ResourceUnits(_ testing.TB) types.ResourceUnits { - return types.ResourceUnits{ - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(RandCPUUnits())), - }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(RandMemoryQuantity()), - }, - Storage: &types.Storage{ - Quantity: types.NewResourceValue(RandStorageQuantity()), - }, - } -} diff --git a/go/testutil/v1beta2/base.go b/go/testutil/v1beta2/base.go deleted file mode 100644 index ab84b0f6..00000000 --- a/go/testutil/v1beta2/base.go +++ /dev/null @@ -1,90 +0,0 @@ -package testutil - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/rand" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - types "github.com/akash-network/akash-api/go/node/types/v1beta2" - "github.com/akash-network/akash-api/go/testutil" -) - -func ProviderHostname(t testing.TB) string { - return "https://" + testutil.Hostname(t) -} - -// Attribute generates a random sdk.Attribute -func Attribute(t testing.TB) types.Attribute { - t.Helper() - return types.NewStringAttribute(testutil.Name(t, "attr-key"), testutil.Name(t, "attr-value")) -} - -// Attributes generates a set of sdk.Attribute -func Attributes(t testing.TB) []types.Attribute { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make([]types.Attribute, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, Attribute(t)) - } - return vals -} - -// PlacementRequirements generates placement requirements -func PlacementRequirements(t testing.TB) types.PlacementRequirements { - return types.PlacementRequirements{ - Attributes: Attributes(t), - } -} - -func RandCPUUnits() uint { - return testutil.RandRangeUint( - dtypes.GetValidationConfig().MinUnitCPU, - dtypes.GetValidationConfig().MaxUnitCPU) -} - -func RandMemoryQuantity() uint64 { - return testutil.RandRangeUint64( - dtypes.GetValidationConfig().MinUnitMemory, - dtypes.GetValidationConfig().MaxUnitMemory) -} - -func RandStorageQuantity() uint64 { - return testutil.RandRangeUint64( - dtypes.GetValidationConfig().MinUnitStorage, - dtypes.GetValidationConfig().MaxUnitStorage) -} - -// Resources produces an attribute list for populating a Group's -// 'Resources' fields. -func Resources(t testing.TB) []dtypes.Resource { - t.Helper() - count := rand.Intn(10) + 1 - - vals := make([]dtypes.Resource, 0, count) - for i := 0; i < count; i++ { - coin := sdk.NewDecCoin(testutil.CoinDenom, sdk.NewInt(rand.Int63n(9999)+1)) - res := dtypes.Resource{ - Resources: types.ResourceUnits{ - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().MinUnitCPU)), - }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().MinUnitMemory), - }, - Storage: types.Volumes{ - types.Storage{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().MinUnitStorage), - }, - }, - }, - Count: 1, - Price: coin, - } - vals = append(vals, res) - } - return vals -} diff --git a/go/testutil/v1beta2/deployment.go b/go/testutil/v1beta2/deployment.go deleted file mode 100644 index 3271225a..00000000 --- a/go/testutil/v1beta2/deployment.go +++ /dev/null @@ -1,62 +0,0 @@ -package testutil - -import ( - "crypto/sha256" - "math/rand" - "testing" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - "github.com/akash-network/akash-api/go/testutil" -) - -// sum256Seed provides a consistent sha256 value for initial Deployment.Version -const sum256Seed = "hihi" - -// DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version -var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed)) - -// Deployment generates a dtype.Deployment in state `DeploymentActive` -func Deployment(t testing.TB) dtypes.Deployment { - t.Helper() - return dtypes.Deployment{ - DeploymentID: DeploymentID(t), - State: dtypes.DeploymentActive, - Version: DefaultDeploymentVersion[:], - } -} - -// DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` -// with a set of random required attributes -func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group { - t.Helper() - return dtypes.Group{ - GroupID: dtypes.MakeGroupID(did, gseq), - State: dtypes.GroupOpen, - GroupSpec: dtypes.GroupSpec{ - Name: testutil.Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - }, - } -} - -// GroupSpec generator -func GroupSpec(t testing.TB) dtypes.GroupSpec { - t.Helper() - return dtypes.GroupSpec{ - Name: testutil.Name(t, "dgroup"), - Requirements: PlacementRequirements(t), - Resources: Resources(t), - } -} - -// DeploymentGroups returns a set of deployment groups generated by DeploymentGroup -func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group { - t.Helper() - count := rand.Intn(5) + 5 // nolint:gosec - vals := make([]dtypes.Group, 0, count) - for i := 0; i < count; i++ { - vals = append(vals, DeploymentGroup(t, did, gseq+uint32(i))) - } - return vals -} diff --git a/go/testutil/v1beta2/event.go b/go/testutil/v1beta2/event.go deleted file mode 100644 index d48b3e73..00000000 --- a/go/testutil/v1beta2/event.go +++ /dev/null @@ -1,60 +0,0 @@ -package testutil - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta2" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta2" - "github.com/akash-network/akash-api/go/sdkutil" -) - -func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event { - t.Helper() - - require.Equal(t, 1, len(events)) - - sev := sdk.StringifyEvent(events[0]) - ev, err := sdkutil.ParseEvent(sev) - - require.NoError(t, err) - - return ev -} - -func ParseDeploymentEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent { - t.Helper() - - uev := ParseEvent(t, events) - - iev, err := dtypes.ParseEvent(uev) - require.NoError(t, err) - - return iev -} - -func ParseMarketEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent { - t.Helper() - - uev := ParseEvent(t, events) - - iev, err := mtypes.ParseEvent(uev) - require.NoError(t, err) - - return iev -} - -func ParseProviderEvent(t testing.TB, events []abci.Event) sdkutil.ModuleEvent { - t.Helper() - - uev := ParseEvent(t, events) - - iev, err := ptypes.ParseEvent(uev) - require.NoError(t, err) - - return iev -} diff --git a/go/testutil/v1beta2/ids.go b/go/testutil/v1beta2/ids.go deleted file mode 100644 index 4d55ccb0..00000000 --- a/go/testutil/v1beta2/ids.go +++ /dev/null @@ -1,95 +0,0 @@ -package testutil - -import ( - cryptorand "crypto/rand" - "crypto/sha256" - "math/rand" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto/ed25519" - - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta2" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta2" -) - -// AccAddress provides an Account's Address bytes from a ed25519 generated -// private key. -func AccAddress(t testing.TB) sdk.AccAddress { - t.Helper() - privKey := ed25519.GenPrivKey() - return sdk.AccAddress(privKey.PubKey().Address()) -} - -func Key(t testing.TB) ed25519.PrivKey { - t.Helper() - return ed25519.GenPrivKey() -} - -func DeploymentID(t testing.TB) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: AccAddress(t).String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -func DeploymentIDForAccount(t testing.TB, addr sdk.Address) dtypes.DeploymentID { - t.Helper() - return dtypes.DeploymentID{ - Owner: addr.String(), - DSeq: uint64(rand.Uint32()), // nolint: gosec - } -} - -// DeploymentVersion provides a random sha256 sum for simulating Deployments. -func DeploymentVersion(t testing.TB) []byte { - t.Helper() - src := make([]byte, 128) - _, err := cryptorand.Read(src) - if err != nil { - t.Fatal(err) - } - sum := sha256.Sum256(src) - return sum[:] -} - -func GroupID(t testing.TB) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentID(t), rand.Uint32()) // nolint: gosec -} - -func GroupIDForAccount(t testing.TB, addr sdk.Address) dtypes.GroupID { - t.Helper() - return dtypes.MakeGroupID(DeploymentIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func OrderID(t testing.TB) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupID(t), rand.Uint32()) // nolint: gosec -} - -func OrderIDForAccount(t testing.TB, addr sdk.Address) mtypes.OrderID { - t.Helper() - return mtypes.MakeOrderID(GroupIDForAccount(t, addr), rand.Uint32()) // nolint: gosec -} - -func BidID(t testing.TB) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderID(t), AccAddress(t)) -} - -func BidIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.BidID { - t.Helper() - return mtypes.MakeBidID(OrderIDForAccount(t, owner), provider.Bytes()) -} - -func LeaseID(t testing.TB) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidID(t)) -} - -func LeaseIDForAccount(t testing.TB, owner, provider sdk.Address) mtypes.LeaseID { - t.Helper() - return mtypes.MakeLeaseID(BidIDForAccount(t, owner, provider)) -} diff --git a/go/testutil/v1beta2/provider.go b/go/testutil/v1beta2/provider.go deleted file mode 100644 index 5759cca9..00000000 --- a/go/testutil/v1beta2/provider.go +++ /dev/null @@ -1,22 +0,0 @@ -package testutil - -import ( - "testing" - - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta2" - "github.com/akash-network/akash-api/go/testutil" -) - -func Provider(t testing.TB) ptypes.Provider { - t.Helper() - - return ptypes.Provider{ - Owner: AccAddress(t).String(), - HostURI: testutil.Hostname(t), - Attributes: Attributes(t), - Info: ptypes.ProviderInfo{ - EMail: "test@example.com", - Website: ProviderHostname(t), - }, - } -} diff --git a/go/testutil/v1beta2/types.go b/go/testutil/v1beta2/types.go deleted file mode 100644 index 265d3306..00000000 --- a/go/testutil/v1beta2/types.go +++ /dev/null @@ -1,23 +0,0 @@ -package testutil - -import ( - "testing" - - types "github.com/akash-network/akash-api/go/node/types/v1beta2" -) - -func ResourceUnits(_ testing.TB) types.ResourceUnits { - return types.ResourceUnits{ - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(RandCPUUnits())), - }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(RandMemoryQuantity()), - }, - Storage: types.Volumes{ - types.Storage{ - Quantity: types.NewResourceValue(RandStorageQuantity()), - }, - }, - } -} diff --git a/go/testutil/v1beta3/base.go b/go/testutil/v1beta3/base.go index abb75d7d..2cacee8e 100644 --- a/go/testutil/v1beta3/base.go +++ b/go/testutil/v1beta3/base.go @@ -3,13 +3,15 @@ package testutil import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/rand" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" - "github.com/akash-network/akash-api/go/testutil" + "github.com/cometbft/cometbft/libs/rand" + sdk "github.com/cosmos/cosmos-sdk/types" + + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + attr "pkg.akt.io/go/node/types/attributes/v1" + rtypes "pkg.akt.io/go/node/types/resources/v1beta4" + "pkg.akt.io/go/testutil" ) func ProviderHostname(t testing.TB) string { @@ -17,17 +19,17 @@ func ProviderHostname(t testing.TB) string { } // Attribute generates a random sdk.Attribute -func Attribute(t testing.TB) types.Attribute { +func Attribute(t testing.TB) attr.Attribute { t.Helper() - return types.NewStringAttribute(testutil.Name(t, "attr-key"), testutil.Name(t, "attr-value")) + return attr.NewStringAttribute(testutil.Name(t, "attr-key"), testutil.Name(t, "attr-value")) } // Attributes generates a set of sdk.Attribute -func Attributes(t testing.TB) []types.Attribute { +func Attributes(t testing.TB) attr.Attributes { t.Helper() count := rand.Intn(10) + 1 - vals := make([]types.Attribute, 0, count) + vals := make(attr.Attributes, 0, count) for i := 0; i < count; i++ { vals = append(vals, Attribute(t)) } @@ -35,8 +37,8 @@ func Attributes(t testing.TB) []types.Attribute { } // PlacementRequirements generates placement requirements -func PlacementRequirements(t testing.TB) types.PlacementRequirements { - return types.PlacementRequirements{ +func PlacementRequirements(t testing.TB) attr.PlacementRequirements { + return attr.PlacementRequirements{ Attributes: Attributes(t), } } @@ -76,23 +78,23 @@ func ResourcesList(t testing.TB, startID uint32) dtypes.ResourceUnits { for i := uint32(0); i < count; i++ { coin := sdk.NewDecCoin(testutil.CoinDenom, sdk.NewInt(rand.Int63n(9999)+1)) res := dtypes.ResourceUnit{ - Resources: types.Resources{ + Resources: rtypes.Resources{ ID: i + startID, - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.CPU)), + CPU: &rtypes.CPU{ + Units: rtypes.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.CPU)), }, - GPU: &types.GPU{ - Units: types.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.GPU) + 1), + GPU: &rtypes.GPU{ + Units: rtypes.NewResourceValue(uint64(dtypes.GetValidationConfig().Unit.Min.GPU) + 1), }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Memory), + Memory: &rtypes.Memory{ + Quantity: rtypes.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Memory), }, - Storage: types.Volumes{ - types.Storage{ - Quantity: types.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Storage), + Storage: rtypes.Volumes{ + rtypes.Storage{ + Quantity: rtypes.NewResourceValue(dtypes.GetValidationConfig().Unit.Min.Storage), }, }, - Endpoints: types.Endpoints{}, + Endpoints: rtypes.Endpoints{}, }, Count: 1, Price: coin, diff --git a/go/testutil/v1beta3/deployment.go b/go/testutil/v1beta3/deployment.go index cda6ee27..c9f3b670 100644 --- a/go/testutil/v1beta3/deployment.go +++ b/go/testutil/v1beta3/deployment.go @@ -5,34 +5,35 @@ import ( "math/rand" "testing" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - "github.com/akash-network/akash-api/go/testutil" + dtypes "pkg.akt.io/go/node/deployment/v1" + dtypesv1beta4 "pkg.akt.io/go/node/deployment/v1beta4" + "pkg.akt.io/go/testutil" ) // sum256Seed provides a consistent sha256 value for initial Deployment.Version const sum256Seed = "hihi" -// DefaultDeploymentVersion provides consistent sha256 sum for initial Deployment.Version -var DefaultDeploymentVersion = sha256.Sum256([]byte(sum256Seed)) +// DefaultDeploymentHash provides consistent sha256 sum for initial Deployment.Version +var DefaultDeploymentHash = sha256.Sum256([]byte(sum256Seed)) // Deployment generates a dtype.Deployment in state `DeploymentActive` func Deployment(t testing.TB) dtypes.Deployment { t.Helper() return dtypes.Deployment{ - DeploymentID: DeploymentID(t), - State: dtypes.DeploymentActive, - Version: DefaultDeploymentVersion[:], + ID: DeploymentID(t), + State: dtypes.DeploymentActive, + Hash: DefaultDeploymentHash[:], } } // DeploymentGroup generates a dtype.DepDeploymentGroup in state `GroupOpen` // with a set of random required attributes -func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes.Group { +func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypesv1beta4.Group { t.Helper() - return dtypes.Group{ - GroupID: dtypes.MakeGroupID(did, gseq), - State: dtypes.GroupOpen, - GroupSpec: dtypes.GroupSpec{ + return dtypesv1beta4.Group{ + ID: dtypes.MakeGroupID(did, gseq), + State: dtypesv1beta4.GroupOpen, + GroupSpec: dtypesv1beta4.GroupSpec{ Name: testutil.Name(t, "dgroup"), Requirements: PlacementRequirements(t), Resources: ResourcesList(t, 1), @@ -41,9 +42,9 @@ func DeploymentGroup(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypes. } // GroupSpec generator -func GroupSpec(t testing.TB) dtypes.GroupSpec { +func GroupSpec(t testing.TB) dtypesv1beta4.GroupSpec { t.Helper() - return dtypes.GroupSpec{ + return dtypesv1beta4.GroupSpec{ Name: testutil.Name(t, "dgroup"), Requirements: PlacementRequirements(t), Resources: ResourcesList(t, 1), @@ -51,10 +52,10 @@ func GroupSpec(t testing.TB) dtypes.GroupSpec { } // DeploymentGroups returns a set of deployment groups generated by DeploymentGroup -func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) []dtypes.Group { +func DeploymentGroups(t testing.TB, did dtypes.DeploymentID, gseq uint32) dtypesv1beta4.Groups { t.Helper() count := rand.Intn(5) + 5 // nolint:gosec - vals := make([]dtypes.Group, 0, count) + vals := make(dtypesv1beta4.Groups, 0, count) for i := 0; i < count; i++ { vals = append(vals, DeploymentGroup(t, did, gseq+uint32(i))) } diff --git a/go/testutil/v1beta3/event.go b/go/testutil/v1beta3/event.go index 32e694c7..54ac3f96 100644 --- a/go/testutil/v1beta3/event.go +++ b/go/testutil/v1beta3/event.go @@ -3,14 +3,15 @@ package testutil import ( "testing" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta3" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" - "github.com/akash-network/akash-api/go/sdkutil" + dtypes "pkg.akt.io/go/node/deployment/v1beta4" + mtypes "pkg.akt.io/go/node/market/v1beta5" + ptypes "pkg.akt.io/go/node/provider/v1beta4" + + "pkg.akt.io/go/sdkutil" ) func ParseEvent(t testing.TB, events []abci.Event) sdkutil.Event { diff --git a/go/testutil/v1beta3/ids.go b/go/testutil/v1beta3/ids.go index 570426de..062d67ff 100644 --- a/go/testutil/v1beta3/ids.go +++ b/go/testutil/v1beta3/ids.go @@ -6,11 +6,11 @@ import ( "math/rand" "testing" + "github.com/cometbft/cometbft/crypto/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto/ed25519" - dtypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" - mtypes "github.com/akash-network/akash-api/go/node/market/v1beta3" + dtypes "pkg.akt.io/go/node/deployment/v1" + mtypes "pkg.akt.io/go/node/market/v1" ) // AccAddress provides an Account's Address bytes from a ed25519 generated diff --git a/go/testutil/v1beta3/provider.go b/go/testutil/v1beta3/provider.go index e1a53c23..d9d3a761 100644 --- a/go/testutil/v1beta3/provider.go +++ b/go/testutil/v1beta3/provider.go @@ -3,8 +3,8 @@ package testutil import ( "testing" - ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" - "github.com/akash-network/akash-api/go/testutil" + ptypes "pkg.akt.io/go/node/provider/v1beta4" + "pkg.akt.io/go/testutil" ) func Provider(t testing.TB) ptypes.Provider { @@ -14,7 +14,7 @@ func Provider(t testing.TB) ptypes.Provider { Owner: AccAddress(t).String(), HostURI: testutil.Hostname(t), Attributes: Attributes(t), - Info: ptypes.ProviderInfo{ + Info: ptypes.Info{ EMail: "test@example.com", Website: ProviderHostname(t), }, diff --git a/go/testutil/v1beta3/types.go b/go/testutil/v1beta3/types.go index 63ea3a58..68834180 100644 --- a/go/testutil/v1beta3/types.go +++ b/go/testutil/v1beta3/types.go @@ -3,24 +3,24 @@ package testutil import ( "testing" - types "github.com/akash-network/akash-api/go/node/types/v1beta3" + rtypes "pkg.akt.io/go/node/types/resources/v1beta4" ) -func Resources(_ testing.TB) types.Resources { - return types.Resources{ +func Resources(_ testing.TB) rtypes.Resources { + return rtypes.Resources{ ID: 1, - CPU: &types.CPU{ - Units: types.NewResourceValue(uint64(RandCPUUnits())), + CPU: &rtypes.CPU{ + Units: rtypes.NewResourceValue(uint64(RandCPUUnits())), }, - Memory: &types.Memory{ - Quantity: types.NewResourceValue(RandMemoryQuantity()), + Memory: &rtypes.Memory{ + Quantity: rtypes.NewResourceValue(RandMemoryQuantity()), }, - GPU: &types.GPU{ - Units: types.NewResourceValue(uint64(RandGPUUnits())), + GPU: &rtypes.GPU{ + Units: rtypes.NewResourceValue(uint64(RandGPUUnits())), }, - Storage: types.Volumes{ - types.Storage{ - Quantity: types.NewResourceValue(RandStorageQuantity()), + Storage: rtypes.Volumes{ + rtypes.Storage{ + Quantity: rtypes.NewResourceValue(RandStorageQuantity()), }, }, } diff --git a/go/tools.go b/go/tools.go new file mode 100644 index 00000000..16251ed7 --- /dev/null +++ b/go/tools.go @@ -0,0 +1,29 @@ +//go:build tools +// +build tools + +package _go + +import ( + _ "github.com/99designs/keyring" + _ "github.com/grpc-ecosystem/grpc-gateway/runtime" + _ "google.golang.org/grpc" + + _ "github.com/btcsuite/btcd/chaincfg/chainhash" + + _ "github.com/pseudomuto/protoc-gen-doc" + + _ "github.com/cosmos/gogoproto/gogoproto" + _ "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" + + _ "k8s.io/api" + _ "k8s.io/apimachinery" +) diff --git a/go/util/ctxlog/ctxlog.go b/go/util/ctxlog/ctxlog.go index 09b25062..085f6003 100644 --- a/go/util/ctxlog/ctxlog.go +++ b/go/util/ctxlog/ctxlog.go @@ -3,7 +3,7 @@ package ctxlog import ( "context" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" ) type ctxKey string diff --git a/go/util/tls/verify.go b/go/util/tls/verify.go index 30fb5008..dfc3b138 100644 --- a/go/util/tls/verify.go +++ b/go/util/tls/verify.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - ctypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" + ctypes "pkg.akt.io/go/node/cert/v1" ) type InvalidReason int @@ -86,7 +86,7 @@ func ValidatePeerCertificates(ctx context.Context, cquery ctypes.QueryClient, ce Filter: ctypes.CertificateFilter{ Owner: owner.String(), Serial: cert.SerialNumber.String(), - State: ctypes.CertificateValid.String(), + State: ctypes.CertificateValid, }, }, ) diff --git a/go/util/units/units.go b/go/util/units/units.go index e74ab695..7b27faca 100644 --- a/go/util/units/units.go +++ b/go/util/units/units.go @@ -9,7 +9,7 @@ import ( "gopkg.in/yaml.v3" - "github.com/akash-network/akash-api/go/node/types/unit" + "pkg.akt.io/go/node/types/unit" ) type ByteQuantity uint64 diff --git a/go/util/units/units_test.go b/go/util/units/units_test.go index c21943cf..e541cd01 100644 --- a/go/util/units/units_test.go +++ b/go/util/units/units_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" - "github.com/akash-network/akash-api/go/node/types/unit" + "pkg.akt.io/go/node/types/unit" ) func TestByteQuantity(t *testing.T) { diff --git a/make/codegen.mk b/make/codegen.mk index 234bc851..4b1aade8 100644 --- a/make/codegen.mk +++ b/make/codegen.mk @@ -1,24 +1,29 @@ +PROTO_GEN_MODS ?= go \ +ts \ +doc + .PHONY: proto-gen -ifeq ($(PROTO_LEGACY), true) -proto-gen: modvendor $(PROTOC) $(PROTOC_GEN_GOCOSMOS) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_DOC) $(AKASH_TS_NODE_MODULES) - ./script/protocgen-legacy.sh -else -proto-gen: modvendor gogoproto $(BUF) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) - ./script/protocgen.sh -endif +proto-gen: $(patsubst %, proto-gen-%,$(PROTO_GEN_MODS)) + +.PHONY: proto-gen-go +proto-gen-go: $(BUF) $(GOGOPROTO) $(PROTOC_GEN_GOCOSMOS) $(PROTOC_GEN_GRPC_GATEWAY) $(PROTOC_GEN_GO) + ./script/protocgen.sh go $(GO_MOD_NAME) $(GO_PKG) -.PHONY: proto-gen-swagger -proto-gen-swagger: modvendor $(BUF) $(PROTOC_GEN_SWAGGER) $(SWAGGER_COMBINE) - ./script/protoc-gen-swagger.sh +.PHONY: proto-gen-ts +proto-gen-ts: $(BUF) $(AKASH_TS_NODE_MODULES) + ./script/protocgen.sh ts $(GO_MOD_NAME) + +.PHONY: proto-gen-doc +proto-gen-doc: $(BUF) $(SWAGGER_COMBINE) $(PROTOC_GEN_DOC) $(PROTOC_GEN_SWAGGER) + ./script/protocgen.sh doc $(GO_MOD_NAME) mocks: $(MOCKERY) - $(GO) generate ./... + (cd $(GO_PKG); $(GO) generate ./...) .PHONY: codegen -codegen: proto-gen proto-gen-swagger mocks +codegen: proto-gen mocks .PHONY: changelog changelog: $(GIT_CHGLOG) @echo "generating changelog to changelog" ./script/changelog.sh $(shell git describe --tags --abbrev=0) changelog.md - diff --git a/make/lint.mk b/make/lint.mk index e6695d11..6bcf8fa8 100644 --- a/make/lint.mk +++ b/make/lint.mk @@ -8,11 +8,11 @@ node .PHONY: lint-go lint-go: $(GOLANGCI_LINT) - $(GOLANGCI_LINT_RUN) ./... --issues-exit-code=0 --deadline=20m + (cd $(GO_PKG); $(GOLANGCI_LINT_RUN) ./... --issues-exit-code=0) .PHONY: lint-go-% lint-go-%: $(GOLANGCI_LINT) - $(GOLINT) $* + (cd $(GO_PKG); $(GOLINT) $*) .PHONY: lint-proto-% lint-proto-%: diff --git a/make/mod.mk b/make/mod.mk index a1668340..9c47c3b8 100644 --- a/make/mod.mk +++ b/make/mod.mk @@ -18,26 +18,23 @@ endef .PHONY: deps-tidy deps-tidy: - $(GO) mod tidy + (cd $(GO_PKG); $(GO) mod tidy) .PHONY: deps-vendor deps-vendor: - go mod vendor + (cd $(GO_PKG); go mod vendor) .PHONY: modsensure modsensure: deps-tidy deps-vendor .PHONY: modvendor modvendor: export VENDOR_BUF:=$(VENDOR_BUF) -modvendor: $(MODVENDOR) $(PROTOC) modsensure +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 - $(MODVENDOR) -copy="**/*.proto" -include=k8s.io/apimachinery - @ln -snf ../../vendor/k8s.io .cache/include/k8s.io - @echo "$${VENDOR_BUF}" > vendor/k8s.io/buf.yaml - @echo "$${VENDOR_BUF}" > .cache/include/google/buf.yaml - @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 + @(cd $(GO_PKG); \ + $(MODVENDOR) -copy="**/*.proto" -include=k8s.io/apimachinery \ + $(MODVENDOR) -copy="**/swagger.yaml" -include=github.com/cosmos/cosmos-sdk/client/docs/swagger-ui \ + ) + @mkdir -p .cache/include/k8s + ln -snf ../../../$(GO_PKG)/vendor/k8s.io .cache/include/k8s/io + echo "$${VENDOR_BUF}" > $(GO_PKG)/vendor/k8s.io/buf.yaml diff --git a/make/setup-cache.mk b/make/setup-cache.mk index 6c04189b..d518b553 100644 --- a/make/setup-cache.mk +++ b/make/setup-cache.mk @@ -16,7 +16,6 @@ $(AKASH_DEVCACHE): @echo "creating .cache dir structure..." mkdir -p $@ mkdir -p $(AKASH_DEVCACHE_BIN) - mkdir -p $(AKASH_DEVCACHE_BIN)/legacy mkdir -p $(AKASH_DEVCACHE_INCLUDE) mkdir -p $(AKASH_DEVCACHE_VERSIONS) mkdir -p $(AKASH_DEVCACHE_NODE_MODULES) @@ -27,7 +26,7 @@ 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) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/bufbuild/buf/cmd/buf@v$(BUF_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ @@ -39,43 +38,34 @@ $(PROTOC_VERSION_FILE): $(AKASH_DEVCACHE) (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/google/protobuf/descriptor.proto' \ - 'include/google/protobuf/struct.proto' \ - 'include/google/protobuf/empty.proto' \ - 'include/google/protobuf/timestamp.proto'; \ rm -f ${PROTOC_ZIP}) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ - # TODO https://github.com/akash-network/support/issues/77 - cp -rf $(PROTOC) $(AKASH_DEVCACHE_BIN)/legacy/ $(PROTOC): $(PROTOC_VERSION_FILE) -# TODO https://github.com/akash-network/support/issues/77 - $(PROTOC_GEN_GOCOSMOS_VERSION_FILE): $(AKASH_DEVCACHE) @echo "installing protoc-gen-gocosmos $(PROTOC_GEN_GOCOSMOS_VERSION) ..." rm -f $(PROTOC_GEN_GOCOSMOS) - GOBIN=$(AKASH_DEVCACHE_BIN)/legacy $(GO) install $(ROOT_DIR)/vendor/github.com/regen-network/cosmos-proto/protoc-gen-gocosmos + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/cosmos/gogoproto/protoc-gen-gocosmos) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ -$(PROTOC_GEN_GOCOSMOS): $(PROTOC_GEN_GOCOSMOS_VERSION_FILE) modvendor +$(PROTOC_GEN_GOCOSMOS): $(PROTOC_GEN_GOCOSMOS_VERSION_FILE) #modvendor $(GOGOPROTO_VERSION_FILE): $(AKASH_DEVCACHE) - @echo "installing gogoproto binaries $(GOGOPROTO_VERSION) ..." + @echo "installing gogoproto $(GOGOPROTO_VERSION) ..." rm -f $(BUF) - GOBIN=$(AKASH_DEVCACHE_BIN) make -C vendor/github.com/cosmos/gogoproto install + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/cosmos/gogoproto/gogoproto) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ -gogoproto: $(GOGOPROTO_VERSION_FILE) +$(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) + (cd $(GO_PKG); 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 $@ @@ -84,7 +74,7 @@ $(PROTOC_GEN_GO_PULSAR): $(PROTOC_GEN_GO_PULSAR_VERSION_FILE) $(PROTOC_GEN_GO_VERSION_FILE): $(AKASH_DEVCACHE) @echo "installing protoc-gen-go $(PROTOC_GEN_GO_VERSION) ..." rm -f $(PROTOC_GEN_GO) - GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GEN_GO_VERSION) + (cd $(GO_PKG); 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 $@ @@ -93,7 +83,7 @@ $(PROTOC_GEN_GO): $(PROTOC_GEN_GO_VERSION_FILE) $(PROTOC_GEN_DOC_VERSION_FILE): $(AKASH_DEVCACHE) @echo "installing protoc-gen-doc $(PROTOC_GEN_DOC_VERSION) ..." rm -f $(PROTOC_GEN_DOC) - GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@$(PROTOC_GEN_DOC_VERSION) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@$(PROTOC_GEN_DOC_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ @@ -102,7 +92,7 @@ $(PROTOC_GEN_DOC): $(PROTOC_GEN_DOC_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) + (cd $(GO_PKG); 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 $@ @@ -111,7 +101,7 @@ $(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) + (cd $(GO_PKG); 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 $@ @@ -120,7 +110,7 @@ $(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) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/goware/modvendor@$(MODVENDOR_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ @@ -129,7 +119,7 @@ $(MODVENDOR): $(MODVENDOR_VERSION_FILE) $(GIT_CHGLOG_VERSION_FILE): $(AKASH_DEVCACHE) @echo "installing git-chglog $(GIT_CHGLOG_VERSION) ..." rm -f $(GIT_CHGLOG) - GOBIN=$(AKASH_DEVCACHE_BIN) go install github.com/git-chglog/git-chglog/cmd/git-chglog@$(GIT_CHGLOG_VERSION) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) go install github.com/git-chglog/git-chglog/cmd/git-chglog@$(GIT_CHGLOG_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ @@ -138,7 +128,7 @@ $(GIT_CHGLOG): $(GIT_CHGLOG_VERSION_FILE) $(MOCKERY_VERSION_FILE): $(AKASH_DEVCACHE) @echo "installing mockery $(MOCKERY_VERSION) ..." rm -f $(MOCKERY) - GOBIN=$(AKASH_DEVCACHE_BIN) go install -ldflags '-s -w -X github.com/vektra/mockery/v2/pkg/config.SemVer=$(MOCKERY_VERSION)' github.com/vektra/mockery/v2@v$(MOCKERY_VERSION) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) go install -ldflags '-s -w -X github.com/vektra/mockery/v2/pkg/config.SemVer=$(MOCKERY_VERSION)' github.com/vektra/mockery/v2@v$(MOCKERY_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ @@ -147,7 +137,7 @@ $(MOCKERY): $(MOCKERY_VERSION_FILE) $(GOLANGCI_LINT_VERSION_FILE): $(AP_DEVCACHE) @echo "installing golangci-lint $(GOLANGCI_LINT_VERSION) ..." rm -f $(MOCKERY) - GOBIN=$(AKASH_DEVCACHE_BIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) + (cd $(GO_PKG); GOBIN=$(AKASH_DEVCACHE_BIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)) rm -rf "$(dir $@)" mkdir -p "$(dir $@)" touch $@ diff --git a/make/test.mk b/make/test.mk index 87ad400b..e0dc1d11 100644 --- a/make/test.mk +++ b/make/test.mk @@ -1,26 +1,25 @@ -TEST_MODULE ?= ./... -SUB_TESTS ?= go \ +TEST_GO_MODULES ?= ./... + +SUB_TESTS ?= go \ ts -COVER_PACKAGES = $(shell go list ./... | grep -v mock | paste -sd, -) +COVER_GO_PACKAGES = $(shell cd $(GO_PKG); go list ./... | grep -v mock | paste -sd, -) -TEST_TIMEOUT ?= 300 -TEST_RACE ?= 0 -TEST_NOCACHE ?= 0 -TEST_VERBOSE ?= 0 +TEST_GO_OPTS ?= +TEST_GO_TIMEOUT ?= 300 -test_flags := -timeout $(TEST_TIMEOUT)s +test_go_flags := -timeout $(TEST_GO_TIMEOUT)s -ifeq ($(TEST_NOCACHE), 1) -test_flags += -count=1 +ifneq (,$(findstring nocache,$(TEST_GO_OPTS))) +test_go_flags += -count=1 endif -ifeq ($(TEST_RACE), 1) -test_flags += -race +ifneq (,$(findstring race,$(TEST_GO_OPTS))) +test_go_flags += -race endif -ifeq ($(TEST_VERBOSE), 1) -test_flags += -v +ifneq (,$(findstring verbose,$(TEST_GO_OPTS))) +test_go_flags += -v endif .PHONY: test @@ -39,15 +38,15 @@ test-coverage-ts: $(AKASH_TS_NODE_MODULES) .PHONY: test-go test-go: - $(GO) test $(test_flags) $(TEST_MODULE) + cd $(GO_PKG) && $(GO) test $(test_go_flags) $(TEST_GO_MODULES) .PHONY: test-coverage-go test-coverage-go: - $(GO) test -coverprofile=coverage.txt \ + cd $(GO_PKG) && $(GO) test -coverprofile=coverage.txt \ -covermode=count \ - -coverpkg="$(COVER_PACKAGES)" \ - $(TEST_MODULE) + -coverpkg="$(COVER_GO_PACKAGES)" \ + $(TEST_GO_MODULES) .PHONY: test-go-vet test-go-vet: - $(GO) vet $(TEST_MODULE) + cd $(GO_PKG) && $(GO) vet $(TEST_GO_MODULES) diff --git a/proto/node/akash/audit/v1/audit.proto b/proto/node/akash/audit/v1/audit.proto new file mode 100644 index 00000000..e889a8b6 --- /dev/null +++ b/proto/node/akash/audit/v1/audit.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; +package akash.audit.v1; + +import "gogoproto/gogo.proto"; +import "akash/base/attributes/v1/attribute.proto"; + +option go_package = "pkg.akt.io/go/node/audit/v1"; + +// 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.attributes.v1.Attribute attributes = 4 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; +} + +// Attributes +message AuditedAttributes { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + string owner = 1 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.attributes.v1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.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) = false; + + 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) = false; + + repeated string auditors = 1 [ + (gogoproto.jsontag) = "auditors", + (gogoproto.moretags) = "yaml:\"auditors\"" + ]; + repeated string owners = 2 [ + (gogoproto.jsontag) = "owners", + (gogoproto.moretags) = "yaml:\"owners\"" + ]; +} diff --git a/proto/node/akash/audit/v1/event.proto b/proto/node/akash/audit/v1/event.proto new file mode 100644 index 00000000..a97e7f35 --- /dev/null +++ b/proto/node/akash/audit/v1/event.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +package akash.audit.v1; + +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; + +option go_package = "pkg.akt.io/go/node/audit/v1"; + +// EventTrustedAuditorCreated defines an SDK message for signing a provider attributes +message EventTrustedAuditorCreated { + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; +} + +// EventTrustedAuditorCreated defines an SDK message for signing a provider attributes +message EventTrustedAuditorDeleted { + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; +} diff --git a/proto/node/akash/audit/v1beta4/genesis.proto b/proto/node/akash/audit/v1/genesis.proto similarity index 58% rename from proto/node/akash/audit/v1beta4/genesis.proto rename to proto/node/akash/audit/v1/genesis.proto index 2babda9d..689b45cb 100644 --- a/proto/node/akash/audit/v1beta4/genesis.proto +++ b/proto/node/akash/audit/v1/genesis.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package akash.audit.v1beta4; +package akash.audit.v1; import "gogoproto/gogo.proto"; -import "akash/audit/v1beta4/audit.proto"; +import "akash/audit/v1/audit.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta4"; +option go_package = "pkg.akt.io/go/node/audit/v1"; // GenesisState defines the basic genesis state used by audit module message GenesisState { - repeated AuditedAttributes attributes = 1 [ + repeated akash.audit.v1.AuditedAttributes attributes = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\"" diff --git a/proto/node/akash/audit/v1/msg.proto b/proto/node/akash/audit/v1/msg.proto new file mode 100644 index 00000000..713e734d --- /dev/null +++ b/proto/node/akash/audit/v1/msg.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; +package akash.audit.v1; + +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; + +import "akash/base/attributes/v1/attribute.proto"; + +option go_package = "pkg.akt.io/go/node/audit/v1"; + +// MsgSignProviderAttributes defines an SDK message for signing a provider attributes +message MsgSignProviderAttributes { + option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "auditor", + (gogoproto.moretags) = "yaml:\"auditor\"" + ]; + repeated akash.base.attributes.v1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.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; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + string auditor = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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/query.proto b/proto/node/akash/audit/v1/query.proto similarity index 81% rename from proto/node/akash/audit/v1beta3/query.proto rename to proto/node/akash/audit/v1/query.proto index 9991acb4..1514817e 100644 --- a/proto/node/akash/audit/v1beta3/query.proto +++ b/proto/node/akash/audit/v1/query.proto @@ -2,14 +2,15 @@ syntax = "proto3"; // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME -package akash.audit.v1beta3; +package akash.audit.v1; 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"; +import "akash/audit/v1/audit.proto"; + +option go_package = "pkg.akt.io/go/node/audit/v1"; // Query defines the gRPC querier service service Query { @@ -17,35 +18,35 @@ service Query { // 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"; + option (google.api.http).get = "/akash/audit/v1/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"; + option (google.api.http).get = "/akash/audit/v1/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}"; + option (google.api.http).get = "/akash/audit/v1/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"; + option (google.api.http).get = "/akash/provider/v1/auditor/{auditor}/list"; } } // QueryProvidersResponse is response type for the Query/Providers RPC method message QueryProvidersResponse { - repeated Provider providers = 1 [ - (gogoproto.nullable) = false, + repeated akash.audit.v1.Provider providers = 1 [ + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Providers" ]; diff --git a/proto/node/akash/audit/v1/service.proto b/proto/node/akash/audit/v1/service.proto new file mode 100644 index 00000000..9e197b34 --- /dev/null +++ b/proto/node/akash/audit/v1/service.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package akash.audit.v1; + +import "cosmos/msg/v1/msg.proto"; + +import "akash/audit/v1/msg.proto"; + +option go_package = "pkg.akt.io/go/node/audit/v1"; + +// Msg defines the provider Msg service +service Msg { + option (cosmos.msg.v1.service) = true; + + // 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); +} diff --git a/proto/node/akash/audit/v1beta1/audit.proto b/proto/node/akash/audit/v1beta1/audit.proto deleted file mode 100644 index 0443e341..00000000 --- a/proto/node/akash/audit/v1beta1/audit.proto +++ /dev/null @@ -1,126 +0,0 @@ -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 deleted file mode 100644 index ca3fc86e..00000000 --- a/proto/node/akash/audit/v1beta2/audit.proto +++ /dev/null @@ -1,99 +0,0 @@ -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 deleted file mode 100644 index 04cb43c9..00000000 --- a/proto/node/akash/audit/v1beta2/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index bd29153b..00000000 --- a/proto/node/akash/audit/v1beta2/query.proto +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index ebe5c4ce..00000000 --- a/proto/node/akash/audit/v1beta3/audit.proto +++ /dev/null @@ -1,124 +0,0 @@ -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 deleted file mode 100644 index c176f1a7..00000000 --- a/proto/node/akash/audit/v1beta3/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -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/v1beta4/audit.proto b/proto/node/akash/audit/v1beta4/audit.proto deleted file mode 100644 index ca4daa40..00000000 --- a/proto/node/akash/audit/v1beta4/audit.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax = "proto3"; -package akash.audit.v1beta4; - -import "gogoproto/gogo.proto"; -import "akash/base/attributes/v1/attribute.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta4"; - -// 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.attributes.v1.Attribute attributes = 4 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.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.attributes.v1.Attribute attributes = 3 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.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.attributes.v1.Attribute attributes = 3 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.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/v1beta4/query.proto b/proto/node/akash/audit/v1beta4/query.proto deleted file mode 100644 index a13baae0..00000000 --- a/proto/node/akash/audit/v1beta4/query.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME - -package akash.audit.v1beta4; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "akash/audit/v1beta4/audit.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/audit/v1beta4"; - -// 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/v1beta4/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/v1beta4/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/v1beta4/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/v1beta4/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/attributes/v1/attribute.proto b/proto/node/akash/base/attributes/v1/attribute.proto index e3270d91..83b9bace 100644 --- a/proto/node/akash/base/attributes/v1/attribute.proto +++ b/proto/node/akash/base/attributes/v1/attribute.proto @@ -6,7 +6,7 @@ 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/attributes/v1"; +option go_package = "pkg.akt.io/go/node/types/attributes/v1"; // Attribute represents key value pair message Attribute { @@ -21,6 +21,8 @@ message Attribute { // this behaviour to be discussed message SignedBy { option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; + // all_of all keys in this list must have signed attributes repeated string all_of = 1 [ (gogoproto.jsontag) = "all_of", @@ -36,6 +38,7 @@ message SignedBy { // PlacementRequirements message PlacementRequirements { option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; // SignedBy list of keys that tenants expect to have signatures from SignedBy signed_by = 1 [ diff --git a/proto/node/akash/base/resources/v1/endpoint.proto b/proto/node/akash/base/resources/v1/endpoint.proto deleted file mode 100644 index 00572136..00000000 --- a/proto/node/akash/base/resources/v1/endpoint.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package akash.base.resources.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; - -// 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/resources/v1/resourcevalue.proto b/proto/node/akash/base/resources/v1/resourcevalue.proto deleted file mode 100644 index e88b6dab..00000000 --- a/proto/node/akash/base/resources/v1/resourcevalue.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package akash.base.resources.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; - -// 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/resources/v1/cpu.proto b/proto/node/akash/base/resources/v1beta4/cpu.proto similarity index 64% rename from proto/node/akash/base/resources/v1/cpu.proto rename to proto/node/akash/base/resources/v1beta4/cpu.proto index 6d1821a2..50f624d3 100644 --- a/proto/node/akash/base/resources/v1/cpu.proto +++ b/proto/node/akash/base/resources/v1beta4/cpu.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package akash.base.resources.v1; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; import "akash/base/attributes/v1/attribute.proto"; -import "akash/base/resources/v1/resourcevalue.proto"; +import "akash/base/resources/v1beta4/resourcevalue.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // CPU stores resource units and cpu config attributes message CPU { @@ -16,7 +16,7 @@ message CPU { ]; repeated akash.base.attributes.v1.Attribute attributes = 2 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.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/resources/v1beta4/endpoint.proto similarity index 86% rename from proto/node/akash/base/v1beta3/endpoint.proto rename to proto/node/akash/base/resources/v1beta4/endpoint.proto index 59db93c6..5bc6baa5 100644 --- a/proto/node/akash/base/v1beta3/endpoint.proto +++ b/proto/node/akash/base/resources/v1beta4/endpoint.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package akash.base.v1beta3; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // Endpoint describes a publicly accessible IP service message Endpoint { diff --git a/proto/node/akash/base/resources/v1/gpu.proto b/proto/node/akash/base/resources/v1beta4/gpu.proto similarity index 64% rename from proto/node/akash/base/resources/v1/gpu.proto rename to proto/node/akash/base/resources/v1beta4/gpu.proto index b36f1c99..d4099322 100644 --- a/proto/node/akash/base/resources/v1/gpu.proto +++ b/proto/node/akash/base/resources/v1beta4/gpu.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package akash.base.resources.v1; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; import "akash/base/attributes/v1/attribute.proto"; -import "akash/base/resources/v1/resourcevalue.proto"; +import "akash/base/resources/v1beta4/resourcevalue.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // GPU stores resource units and cpu config attributes message GPU { @@ -15,7 +15,7 @@ message GPU { ]; repeated akash.base.attributes.v1.Attribute attributes = 2 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", (gogoproto.jsontag) = "attributes,omitempty", (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" ]; diff --git a/proto/node/akash/base/resources/v1/memory.proto b/proto/node/akash/base/resources/v1beta4/memory.proto similarity index 67% rename from proto/node/akash/base/resources/v1/memory.proto rename to proto/node/akash/base/resources/v1beta4/memory.proto index 91e11aa5..2ae57f2e 100644 --- a/proto/node/akash/base/resources/v1/memory.proto +++ b/proto/node/akash/base/resources/v1beta4/memory.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package akash.base.resources.v1; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; import "akash/base/attributes/v1/attribute.proto"; -import "akash/base/resources/v1/resourcevalue.proto"; +import "akash/base/resources/v1beta4/resourcevalue.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // Memory stores resource quantity and memory attributes message Memory { @@ -18,7 +18,7 @@ message Memory { ]; repeated akash.base.attributes.v1.Attribute attributes = 2 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", (gogoproto.jsontag) = "attributes,omitempty", (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" ]; diff --git a/proto/node/akash/base/resources/v1/resources.proto b/proto/node/akash/base/resources/v1beta4/resources.proto similarity index 79% rename from proto/node/akash/base/resources/v1/resources.proto rename to proto/node/akash/base/resources/v1beta4/resources.proto index b6e89b4b..6c5b784d 100644 --- a/proto/node/akash/base/resources/v1/resources.proto +++ b/proto/node/akash/base/resources/v1beta4/resources.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package akash.base.resources.v1; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; -import "akash/base/resources/v1/cpu.proto"; -import "akash/base/resources/v1/gpu.proto"; -import "akash/base/resources/v1/memory.proto"; -import "akash/base/resources/v1/storage.proto"; -import "akash/base/resources/v1/endpoint.proto"; +import "akash/base/resources/v1beta4/cpu.proto"; +import "akash/base/resources/v1beta4/gpu.proto"; +import "akash/base/resources/v1beta4/memory.proto"; +import "akash/base/resources/v1beta4/storage.proto"; +import "akash/base/resources/v1beta4/endpoint.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // Resources describes all available resources types for deployment/node etc // if field is nil resource is not present in the given data-structure diff --git a/proto/node/akash/base/v1beta3/resourcevalue.proto b/proto/node/akash/base/resources/v1beta4/resourcevalue.proto similarity index 72% rename from proto/node/akash/base/v1beta3/resourcevalue.proto rename to proto/node/akash/base/resources/v1beta4/resourcevalue.proto index 9b4a1e91..a00eb562 100644 --- a/proto/node/akash/base/v1beta3/resourcevalue.proto +++ b/proto/node/akash/base/resources/v1beta4/resourcevalue.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package akash.base.v1beta3; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/v1beta3"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // Unit stores cpu, memory and storage metrics message ResourceValue { diff --git a/proto/node/akash/base/resources/v1/storage.proto b/proto/node/akash/base/resources/v1beta4/storage.proto similarity index 71% rename from proto/node/akash/base/resources/v1/storage.proto rename to proto/node/akash/base/resources/v1beta4/storage.proto index f0014935..b6211668 100644 --- a/proto/node/akash/base/resources/v1/storage.proto +++ b/proto/node/akash/base/resources/v1beta4/storage.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package akash.base.resources.v1; +package akash.base.resources.v1beta4; import "gogoproto/gogo.proto"; import "akash/base/attributes/v1/attribute.proto"; -import "akash/base/resources/v1/resourcevalue.proto"; +import "akash/base/resources/v1beta4/resourcevalue.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/types/resources/v1"; +option go_package = "pkg.akt.io/go/node/types/resources/v1beta4"; // Storage stores resource quantity and storage attributes message Storage { @@ -21,7 +21,7 @@ message Storage { ]; repeated akash.base.attributes.v1.Attribute attributes = 3 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", (gogoproto.jsontag) = "attributes,omitempty", (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" ]; diff --git a/proto/node/akash/base/v1beta1/attribute.proto b/proto/node/akash/base/v1beta1/attribute.proto deleted file mode 100644 index f2a40fe5..00000000 --- a/proto/node/akash/base/v1beta1/attribute.proto +++ /dev/null @@ -1,41 +0,0 @@ -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 deleted file mode 100644 index f06c8161..00000000 --- a/proto/node/akash/base/v1beta1/endpoint.proto +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index 9a969391..00000000 --- a/proto/node/akash/base/v1beta1/resource.proto +++ /dev/null @@ -1,68 +0,0 @@ -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 deleted file mode 100644 index 7333afd2..00000000 --- a/proto/node/akash/base/v1beta1/resourcevalue.proto +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index b8bc9ad4..00000000 --- a/proto/node/akash/base/v1beta2/attribute.proto +++ /dev/null @@ -1,41 +0,0 @@ -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 deleted file mode 100644 index 7f17000d..00000000 --- a/proto/node/akash/base/v1beta2/endpoint.proto +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index deb472f0..00000000 --- a/proto/node/akash/base/v1beta2/resource.proto +++ /dev/null @@ -1,56 +0,0 @@ -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 deleted file mode 100644 index 55c06141..00000000 --- a/proto/node/akash/base/v1beta2/resourceunits.proto +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index e8315484..00000000 --- a/proto/node/akash/base/v1beta2/resourcevalue.proto +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 5c02a80d..00000000 --- a/proto/node/akash/base/v1beta3/attribute.proto +++ /dev/null @@ -1,54 +0,0 @@ -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.castrepeated) = "Attributes", - (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 deleted file mode 100644 index 40ab2b33..00000000 --- a/proto/node/akash/base/v1beta3/cpu.proto +++ /dev/null @@ -1,20 +0,0 @@ -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/gpu.proto b/proto/node/akash/base/v1beta3/gpu.proto deleted file mode 100644 index 8141d0bd..00000000 --- a/proto/node/akash/base/v1beta3/gpu.proto +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index bc778a48..00000000 --- a/proto/node/akash/base/v1beta3/memory.proto +++ /dev/null @@ -1,24 +0,0 @@ -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/resources.proto b/proto/node/akash/base/v1beta3/resources.proto deleted file mode 100644 index 050ed269..00000000 --- a/proto/node/akash/base/v1beta3/resources.proto +++ /dev/null @@ -1,51 +0,0 @@ -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"; - -// Resources describes all available resources types for deployment/node etc -// if field is nil resource is not present in the given data-structure -message Resources { - option (gogoproto.equal) = true; - uint32 id = 1 [ - (gogoproto.customname) = "ID", - (gogoproto.jsontag) = "id", - (gogoproto.moretags) = "yaml:\"id\"" - ]; - CPU cpu = 2 [ - (gogoproto.nullable) = true, - (gogoproto.customname) = "CPU", - (gogoproto.jsontag) = "cpu,omitempty", - (gogoproto.moretags) = "yaml:\"cpu,omitempty\"" - ]; - Memory memory = 3 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "memory,omitempty", - (gogoproto.moretags) = "yaml:\"memory,omitempty\"" - ]; - repeated Storage storage = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "Volumes", - (gogoproto.jsontag) = "storage,omitempty", - (gogoproto.moretags) = "yaml:\"storage,omitempty\"" - ]; - GPU gpu = 5 [ - (gogoproto.nullable) = true, - (gogoproto.customname) = "GPU", - (gogoproto.jsontag) = "gpu,omitempty", - (gogoproto.moretags) = "yaml:\"gpu,omitempty\"" - ]; - repeated Endpoint endpoints = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "Endpoints", - (gogoproto.jsontag) = "endpoints", - (gogoproto.moretags) = "yaml:\"endpoints\"" - ]; -} diff --git a/proto/node/akash/base/v1beta3/storage.proto b/proto/node/akash/base/v1beta3/storage.proto deleted file mode 100644 index a1d09e3c..00000000 --- a/proto/node/akash/base/v1beta3/storage.proto +++ /dev/null @@ -1,28 +0,0 @@ -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/v1/cert.proto b/proto/node/akash/cert/v1/cert.proto new file mode 100644 index 00000000..7090337f --- /dev/null +++ b/proto/node/akash/cert/v1/cert.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; +package akash.cert.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "pkg.akt.io/go/node/cert/v1"; + +// 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" + ]; +} + +// ID stores owner and sequence number +message ID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 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\"" + ]; +} diff --git a/proto/node/akash/cert/v1/filters.proto b/proto/node/akash/cert/v1/filters.proto new file mode 100644 index 00000000..532bd140 --- /dev/null +++ b/proto/node/akash/cert/v1/filters.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.cert.v1; + +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; + +import "akash/cert/v1/cert.proto"; + +option go_package = "pkg.akt.io/go/node/cert/v1"; + +// CertificateFilter defines filters used to filter certificates +message CertificateFilter { + option (gogoproto.equal) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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\"" + ]; +} diff --git a/proto/node/akash/cert/v1beta3/genesis.proto b/proto/node/akash/cert/v1/genesis.proto similarity index 74% rename from proto/node/akash/cert/v1beta3/genesis.proto rename to proto/node/akash/cert/v1/genesis.proto index 1a6ae53d..69563c26 100644 --- a/proto/node/akash/cert/v1beta3/genesis.proto +++ b/proto/node/akash/cert/v1/genesis.proto @@ -1,19 +1,21 @@ syntax = "proto3"; -package akash.cert.v1beta3; +package akash.cert.v1; -import "akash/cert/v1beta3/cert.proto"; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "akash/cert/v1/cert.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3"; +option go_package = "pkg.akt.io/go/node/cert/v1"; // GenesisCertificate defines certificate entry at genesis message GenesisCertificate { string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\"" ]; - Certificate certificate = 2 [ + akash.cert.v1.Certificate certificate = 2 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "certificate", (gogoproto.moretags) = "yaml:\"certificate\"" diff --git a/proto/node/akash/cert/v1/msg.proto b/proto/node/akash/cert/v1/msg.proto new file mode 100644 index 00000000..77da754f --- /dev/null +++ b/proto/node/akash/cert/v1/msg.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +package akash.cert.v1; + +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; + +import "akash/cert/v1/cert.proto"; + +option go_package = "pkg.akt.io/go/node/cert/v1"; + +// MsgCreateCertificate defines an SDK message for creating certificate +message MsgCreateCertificate { + option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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; + + akash.cert.v1.ID 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/query.proto b/proto/node/akash/cert/v1/query.proto similarity index 82% rename from proto/node/akash/cert/v1beta3/query.proto rename to proto/node/akash/cert/v1/query.proto index d72129d9..c6ea37b2 100644 --- a/proto/node/akash/cert/v1beta3/query.proto +++ b/proto/node/akash/cert/v1/query.proto @@ -1,24 +1,25 @@ syntax = "proto3"; -package akash.cert.v1beta3; +package akash.cert.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "akash/cert/v1beta3/cert.proto"; +import "akash/cert/v1/cert.proto"; +import "akash/cert/v1/filters.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/cert/v1beta3"; +option go_package = "pkg.akt.io/go/node/cert/v1"; // 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"; + option (google.api.http).get = "/akash/cert/1/certificates/list"; } } // CertificateResponse contains a single X509 certificate and its serial number message CertificateResponse { - Certificate certificate = 1 [ + akash.cert.v1.Certificate certificate = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "certificate", (gogoproto.moretags) = "yaml:\"certificate\"" diff --git a/proto/node/akash/cert/v1/service.proto b/proto/node/akash/cert/v1/service.proto new file mode 100644 index 00000000..05f4a7e6 --- /dev/null +++ b/proto/node/akash/cert/v1/service.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package akash.cert.v1; + +import "cosmos/msg/v1/msg.proto"; + +import "akash/cert/v1/msg.proto"; + +option go_package = "pkg.akt.io/go/node/cert/v1"; + +// Msg defines the provider Msg service +service Msg { + option (cosmos.msg.v1.service) = true; + + // 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); +} diff --git a/proto/node/akash/cert/v1beta2/cert.proto b/proto/node/akash/cert/v1beta2/cert.proto deleted file mode 100644 index ddee422a..00000000 --- a/proto/node/akash/cert/v1beta2/cert.proto +++ /dev/null @@ -1,118 +0,0 @@ -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 deleted file mode 100644 index c0ff6f06..00000000 --- a/proto/node/akash/cert/v1beta2/genesis.proto +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 4dd3391a..00000000 --- a/proto/node/akash/cert/v1beta2/query.proto +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index 07282aa1..00000000 --- a/proto/node/akash/cert/v1beta3/cert.proto +++ /dev/null @@ -1,118 +0,0 @@ -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/deployment/v1beta1/authz.proto b/proto/node/akash/deployment/v1/authz.proto similarity index 78% rename from proto/node/akash/deployment/v1beta1/authz.proto rename to proto/node/akash/deployment/v1/authz.proto index ed294bf8..f04b3b9a 100644 --- a/proto/node/akash/deployment/v1beta1/authz.proto +++ b/proto/node/akash/deployment/v1/authz.proto @@ -1,15 +1,15 @@ syntax = "proto3"; -package akash.deployment.v1beta1; +package akash.deployment.v1; 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"; +option go_package = "pkg.akt.io/go/node/deployment/v1"; // DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from // the granter's account for a deployment. -message DepositDeploymentAuthorization { +message DepositAuthorization { option (cosmos_proto.implements_interface) = "Authorization"; // SpendLimit is the amount the grantee is authorized to spend from the granter's account for diff --git a/proto/node/akash/deployment/v1/deployment.proto b/proto/node/akash/deployment/v1/deployment.proto new file mode 100644 index 00000000..821a1335 --- /dev/null +++ b/proto/node/akash/deployment/v1/deployment.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; +package akash.deployment.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1"; + +// DeploymentState is an enum which refers to state of deployment +enum DeploymentState { + 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"]; +} + +// DeploymentID stores owner and sequence number +message DeploymentID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + DeploymentState state = 2 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + bytes hash = 3 [ + (gogoproto.jsontag) = "hash", + (gogoproto.moretags) = "yaml:\"hash\"" + ]; + int64 created_at = 4; +} diff --git a/proto/node/akash/deployment/v1/event.proto b/proto/node/akash/deployment/v1/event.proto new file mode 100644 index 00000000..d5450301 --- /dev/null +++ b/proto/node/akash/deployment/v1/event.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; +package akash.deployment.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +import "akash/deployment/v1/deployment.proto"; +import "akash/deployment/v1/group.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1"; + + +message EventDeploymentCreated { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + bytes hash = 2 [ + (gogoproto.jsontag) = "hash", + (gogoproto.moretags) = "yaml:\"hash\"" + ]; +} + +message EventDeploymentUpdated { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + bytes hash = 2 [ + (gogoproto.jsontag) = "hash", + (gogoproto.moretags) = "yaml:\"hash\"" + ]; +} + +message EventDeploymentClosed { + option (gogoproto.equal) = false; + + DeploymentID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventGroupStarted { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventGroupPaused { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventGroupClosed { + option (gogoproto.equal) = false; + + GroupID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + diff --git a/proto/node/akash/deployment/v1beta3/groupid.proto b/proto/node/akash/deployment/v1/group.proto similarity index 68% rename from proto/node/akash/deployment/v1beta3/groupid.proto rename to proto/node/akash/deployment/v1/group.proto index 01d8e5a3..2b9e5107 100644 --- a/proto/node/akash/deployment/v1beta3/groupid.proto +++ b/proto/node/akash/deployment/v1/group.proto @@ -1,9 +1,10 @@ syntax = "proto3"; -package akash.deployment.v1beta3; +package akash.deployment.v1; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; +option go_package = "pkg.akt.io/go/node/deployment/v1"; // GroupID stores owner, deployment sequence number and group sequence number message GroupID { @@ -11,8 +12,9 @@ message GroupID { option (gogoproto.goproto_stringer) = false; string owner = 1 [ - (gogoproto.jsontag) = "owner", - (gogoproto.moretags) = "yaml:\"owner\"" + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" ]; uint64 dseq = 2 [ (gogoproto.customname) = "DSeq", diff --git a/proto/node/akash/deployment/v1/msg.proto b/proto/node/akash/deployment/v1/msg.proto new file mode 100644 index 00000000..b7e19fcb --- /dev/null +++ b/proto/node/akash/deployment/v1/msg.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package akash.deployment.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +import "akash/deployment/v1/deployment.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1"; + + +// 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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; +} + +// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +message MsgDepositDeploymentResponse {} diff --git a/proto/node/akash/deployment/v1beta1/deployment.proto b/proto/node/akash/deployment/v1beta1/deployment.proto deleted file mode 100644 index 0d4e811b..00000000 --- a/proto/node/akash/deployment/v1beta1/deployment.proto +++ /dev/null @@ -1,152 +0,0 @@ -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 deleted file mode 100644 index 81f74b56..00000000 --- a/proto/node/akash/deployment/v1beta1/genesis.proto +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 7c27172e..00000000 --- a/proto/node/akash/deployment/v1beta1/group.proto +++ /dev/null @@ -1,128 +0,0 @@ -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 deleted file mode 100644 index 453c1ca7..00000000 --- a/proto/node/akash/deployment/v1beta1/params.proto +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 8230a0e8..00000000 --- a/proto/node/akash/deployment/v1beta1/query.proto +++ /dev/null @@ -1,71 +0,0 @@ -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 deleted file mode 100644 index 1862e8c4..00000000 --- a/proto/node/akash/deployment/v1beta2/authz.proto +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 3a8973b8..00000000 --- a/proto/node/akash/deployment/v1beta2/deployment.proto +++ /dev/null @@ -1,75 +0,0 @@ -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 deleted file mode 100644 index 9ace46f4..00000000 --- a/proto/node/akash/deployment/v1beta2/deploymentmsg.proto +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index 0338d5f7..00000000 --- a/proto/node/akash/deployment/v1beta2/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index cfe341b1..00000000 --- a/proto/node/akash/deployment/v1beta2/group.proto +++ /dev/null @@ -1,48 +0,0 @@ -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 deleted file mode 100644 index f1247a59..00000000 --- a/proto/node/akash/deployment/v1beta2/groupid.proto +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 04c85943..00000000 --- a/proto/node/akash/deployment/v1beta2/groupmsg.proto +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 9f5aa771..00000000 --- a/proto/node/akash/deployment/v1beta2/groupspec.proto +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index c15181d8..00000000 --- a/proto/node/akash/deployment/v1beta2/params.proto +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index c2ccf115..00000000 --- a/proto/node/akash/deployment/v1beta2/query.proto +++ /dev/null @@ -1,72 +0,0 @@ -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 deleted file mode 100644 index 3610be2e..00000000 --- a/proto/node/akash/deployment/v1beta2/resource.proto +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index cea1aa2c..00000000 --- a/proto/node/akash/deployment/v1beta2/service.proto +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index a52c520c..00000000 --- a/proto/node/akash/deployment/v1beta3/authz.proto +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 5616cd66..00000000 --- a/proto/node/akash/deployment/v1beta3/deployment.proto +++ /dev/null @@ -1,75 +0,0 @@ -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 deleted file mode 100644 index 47443ae9..00000000 --- a/proto/node/akash/deployment/v1beta3/deploymentmsg.proto +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index 8375cb9a..00000000 --- a/proto/node/akash/deployment/v1beta3/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -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 deleted file mode 100644 index 2a9b1df6..00000000 --- a/proto/node/akash/deployment/v1beta3/group.proto +++ /dev/null @@ -1,58 +0,0 @@ -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/groupmsg.proto b/proto/node/akash/deployment/v1beta3/groupmsg.proto deleted file mode 100644 index ad647b84..00000000 --- a/proto/node/akash/deployment/v1beta3/groupmsg.proto +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index 851d37a7..00000000 --- a/proto/node/akash/deployment/v1beta3/groupspec.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package akash.deployment.v1beta3; - -import "gogoproto/gogo.proto"; -import "akash/base/v1beta3/attribute.proto"; -import "akash/deployment/v1beta3/resourceunit.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 ResourceUnit resources = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourceUnits", - (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 deleted file mode 100644 index 91ed80ca..00000000 --- a/proto/node/akash/deployment/v1beta3/params.proto +++ /dev/null @@ -1,19 +0,0 @@ -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 { - repeated cosmos.base.v1beta1.Coin min_deposits = 1[ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.customname) = "MinDeposits", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "min_deposits", - (gogoproto.moretags) = "yaml:\"min_deposits\"" - ]; -} diff --git a/proto/node/akash/deployment/v1beta3/query.proto b/proto/node/akash/deployment/v1beta3/query.proto deleted file mode 100644 index d80d16eb..00000000 --- a/proto/node/akash/deployment/v1beta3/query.proto +++ /dev/null @@ -1,90 +0,0 @@ -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/resourceunit.proto b/proto/node/akash/deployment/v1beta3/resourceunit.proto deleted file mode 100644 index 29c2a7f9..00000000 --- a/proto/node/akash/deployment/v1beta3/resourceunit.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package akash.deployment.v1beta3; - -import "gogoproto/gogo.proto"; -import "akash/base/v1beta3/resources.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta3"; - -// ResourceUnit extends Resources and adds Count along with the Price -message ResourceUnit { - option (gogoproto.equal) = true; - - akash.base.v1beta3.Resources resource = 1 [ - (gogoproto.nullable) = false, - (gogoproto.embed) = true, - (gogoproto.jsontag) = "resource", - (gogoproto.moretags) = "yaml:\"resource\"" - ]; - 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 deleted file mode 100644 index cf89f664..00000000 --- a/proto/node/akash/deployment/v1beta3/service.proto +++ /dev/null @@ -1,31 +0,0 @@ -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/deployment/v1beta4/authz.proto b/proto/node/akash/deployment/v1beta4/authz.proto deleted file mode 100644 index 755428bf..00000000 --- a/proto/node/akash/deployment/v1beta4/authz.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package akash.deployment.v1beta4; - -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/v1beta4"; - -// 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/v1beta4/deployment.proto b/proto/node/akash/deployment/v1beta4/deployment.proto deleted file mode 100644 index 33478668..00000000 --- a/proto/node/akash/deployment/v1beta4/deployment.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; -package akash.deployment.v1beta4; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; - -// 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/v1beta4/deploymentmsg.proto b/proto/node/akash/deployment/v1beta4/deploymentmsg.proto index c2b52d61..1cce07af 100644 --- a/proto/node/akash/deployment/v1beta4/deploymentmsg.proto +++ b/proto/node/akash/deployment/v1beta4/deploymentmsg.proto @@ -2,32 +2,36 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; - -import "akash/deployment/v1beta4/deployment.proto"; -import "akash/deployment/v1beta4/groupspec.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +import "akash/deployment/v1/deployment.proto"; +import "akash/deployment/v1beta4/groupspec.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // MsgCreateDeployment defines an SDK message for creating deployment message MsgCreateDeployment { option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "id.owner"; - DeploymentID id = 1 [ + akash.deployment.v1.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\"" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "GroupSpecs", + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" ]; - bytes version = 3 [ - (gogoproto.jsontag) = "version", - (gogoproto.moretags) = "yaml:\"version\"" + bytes hash = 3 [ + (gogoproto.jsontag) = "hash", + (gogoproto.moretags) = "yaml:\"hash\"" ]; cosmos.base.v1beta1.Coin deposit = 4 [ (gogoproto.nullable) = false, @@ -36,54 +40,28 @@ message MsgCreateDeployment { ]; // Depositor pays for the deposit string depositor = 5 [ - (gogoproto.jsontag) = "depositor", - (gogoproto.moretags) = "yaml:\"depositor\"" + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 [ + akash.deployment.v1.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\"" + bytes hash = 3 [ + (gogoproto.jsontag) = "hash", + (gogoproto.moretags) = "yaml:\"hash\"" ]; } @@ -94,7 +72,7 @@ message MsgUpdateDeploymentResponse {} message MsgCloseDeployment { option (gogoproto.equal) = false; - DeploymentID id = 1 [ + akash.deployment.v1.DeploymentID id = 1 [ (gogoproto.nullable) = false, (gogoproto.customname) = "ID", (gogoproto.jsontag) = "id", diff --git a/proto/node/akash/deployment/v1beta4/filters.proto b/proto/node/akash/deployment/v1beta4/filters.proto new file mode 100644 index 00000000..fc210c10 --- /dev/null +++ b/proto/node/akash/deployment/v1beta4/filters.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package akash.deployment.v1beta4; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "akash/deployment/v1/deployment.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; + +// DeploymentFilters defines filters used to filter deployments +message DeploymentFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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/v1beta4/genesis.proto b/proto/node/akash/deployment/v1beta4/genesis.proto index 437f508a..d56bfa13 100644 --- a/proto/node/akash/deployment/v1beta4/genesis.proto +++ b/proto/node/akash/deployment/v1beta4/genesis.proto @@ -2,24 +2,27 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; -import "akash/deployment/v1beta4/deployment.proto"; + +import "akash/deployment/v1/deployment.proto"; + import "akash/deployment/v1beta4/group.proto"; import "akash/deployment/v1beta4/params.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // GenesisDeployment defines the basic genesis state used by deployment module message GenesisDeployment { - Deployment deployment = 1 [ + akash.deployment.v1.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\"" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Groups", + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" ]; } diff --git a/proto/node/akash/deployment/v1beta4/group.proto b/proto/node/akash/deployment/v1beta4/group.proto index 127fb039..029ed88f 100644 --- a/proto/node/akash/deployment/v1beta4/group.proto +++ b/proto/node/akash/deployment/v1beta4/group.proto @@ -2,56 +2,59 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; -import "akash/deployment/v1beta4/groupid.proto"; +import "akash/deployment/v1/group.proto"; import "akash/deployment/v1beta4/groupspec.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; + +// GroupState is an enum which refers to state of group +enum GroupState { + 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" + ]; +} + // Group stores group id, state and specifications of group message Group { option (gogoproto.equal) = false; - GroupID group_id = 1 [ - (gogoproto.customname) = "GroupID", + akash.deployment.v1.GroupID id = 1 [ + (gogoproto.customname) = "ID", (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 [ + GroupState state = 2 [ (gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\"" ]; + GroupSpec group_spec = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "spec", - (gogoproto.moretags) = "yaml:\"spec\"" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "GroupSpecs", + (gogoproto.jsontag) = "spec", + (gogoproto.moretags) = "yaml:\"spec\"" ]; int64 created_at = 4; diff --git a/proto/node/akash/deployment/v1beta4/groupid.proto b/proto/node/akash/deployment/v1beta4/groupid.proto deleted file mode 100644 index 278ce046..00000000 --- a/proto/node/akash/deployment/v1beta4/groupid.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package akash.deployment.v1beta4; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; - -// 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/v1beta4/groupmsg.proto b/proto/node/akash/deployment/v1beta4/groupmsg.proto index 624bf937..b018ef73 100644 --- a/proto/node/akash/deployment/v1beta4/groupmsg.proto +++ b/proto/node/akash/deployment/v1beta4/groupmsg.proto @@ -2,15 +2,16 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; -import "akash/deployment/v1beta4/groupid.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +import "akash/deployment/v1/group.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // MsgCloseGroup defines SDK message to close a single Group within a Deployment. message MsgCloseGroup { option (gogoproto.equal) = false; - GroupID id = 1 [ + akash.deployment.v1.GroupID id = 1 [ (gogoproto.customname) = "ID", (gogoproto.nullable) = false, (gogoproto.jsontag) = "id", @@ -25,7 +26,7 @@ message MsgCloseGroupResponse {} message MsgPauseGroup { option (gogoproto.equal) = false; - GroupID id = 1 [ + akash.deployment.v1.GroupID id = 1 [ (gogoproto.customname) = "ID", (gogoproto.nullable) = false, (gogoproto.jsontag) = "id", @@ -40,7 +41,7 @@ message MsgPauseGroupResponse {} message MsgStartGroup { option (gogoproto.equal) = false; - GroupID id = 1 [ + akash.deployment.v1.GroupID id = 1 [ (gogoproto.customname) = "ID", (gogoproto.nullable) = false, (gogoproto.jsontag) = "id", diff --git a/proto/node/akash/deployment/v1beta4/groupspec.proto b/proto/node/akash/deployment/v1beta4/groupspec.proto index a28ca2f9..3e493ca5 100644 --- a/proto/node/akash/deployment/v1beta4/groupspec.proto +++ b/proto/node/akash/deployment/v1beta4/groupspec.proto @@ -2,12 +2,13 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; + import "akash/base/attributes/v1/attribute.proto"; import "akash/deployment/v1beta4/resourceunit.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; -// GroupSpec stores group specifications +// Spec stores group specifications message GroupSpec { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; diff --git a/proto/node/akash/deployment/v1beta4/params.proto b/proto/node/akash/deployment/v1beta4/params.proto index 34d74bd6..92d20562 100644 --- a/proto/node/akash/deployment/v1beta4/params.proto +++ b/proto/node/akash/deployment/v1beta4/params.proto @@ -5,7 +5,7 @@ package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // Params defines the parameters for the x/deployment package message Params { diff --git a/proto/node/akash/deployment/v1beta4/query.proto b/proto/node/akash/deployment/v1beta4/query.proto index 71cd6797..6d1cc34b 100644 --- a/proto/node/akash/deployment/v1beta4/query.proto +++ b/proto/node/akash/deployment/v1beta4/query.proto @@ -4,28 +4,32 @@ package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "akash/deployment/v1beta4/deployment.proto"; + +import "akash/deployment/v1beta4/filters.proto"; import "akash/deployment/v1beta4/group.proto"; -import "akash/deployment/v1beta4/groupid.proto"; -import "akash/escrow/v1beta3/types.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +import "akash/deployment/v1/deployment.proto"; +import "akash/deployment/v1/group.proto"; + +import "akash/escrow/v1/types.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // Query defines the gRPC querier service service Query { // Deployments queries deployments rpc Deployments(QueryDeploymentsRequest) returns (QueryDeploymentsResponse) { - option (google.api.http).get = "/akash/deployment/v1beta4/deployments/list"; + option (google.api.http).get = "/akash/deployment/v1/deployments/list"; } // Deployment queries deployment details rpc Deployment(QueryDeploymentRequest) returns (QueryDeploymentResponse) { - option (google.api.http).get = "/akash/deployment/v1beta4/deployments/info"; + option (google.api.http).get = "/akash/deployment/v1/deployments/info"; } // Group queries group details rpc Group(QueryGroupRequest) returns (QueryGroupResponse) { - option (google.api.http).get = "/akash/deployment/v1beta4/groups/info"; + option (google.api.http).get = "/akash/deployment/v1/groups/info"; } } @@ -50,8 +54,8 @@ message QueryDeploymentsResponse { // QueryDeploymentRequest is request type for the Query/Deployment RPC method message QueryDeploymentRequest { - DeploymentID id = 1 [ - (gogoproto.nullable) = false, + akash.deployment.v1.DeploymentID id = 1 [ + (gogoproto.nullable) = false, (gogoproto.customname) = "ID" ]; } @@ -59,24 +63,25 @@ message QueryDeploymentRequest { // QueryDeploymentResponse is response type for the Query/Deployment RPC method message QueryDeploymentResponse { option (gogoproto.equal) = false; - Deployment deployment = 1 [ + akash.deployment.v1.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\"" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Groups", + (gogoproto.jsontag) = "groups", + (gogoproto.moretags) = "yaml:\"groups\"" ]; - akash.escrow.v1beta3.Account escrow_account = 3 [ + akash.escrow.v1.Account escrow_account = 3 [ (gogoproto.nullable) = false ]; } // QueryGroupRequest is request type for the Query/Group RPC method message QueryGroupRequest { - GroupID id = 1 [ + akash.deployment.v1.GroupID id = 1 [ (gogoproto.nullable) = false, (gogoproto.customname) = "ID" ]; diff --git a/proto/node/akash/deployment/v1beta4/resourceunit.proto b/proto/node/akash/deployment/v1beta4/resourceunit.proto index b670f846..8b1b021b 100644 --- a/proto/node/akash/deployment/v1beta4/resourceunit.proto +++ b/proto/node/akash/deployment/v1beta4/resourceunit.proto @@ -2,16 +2,18 @@ syntax = "proto3"; package akash.deployment.v1beta4; import "gogoproto/gogo.proto"; -import "akash/base/resources/v1/resources.proto"; + import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +import "akash/base/resources/v1beta4/resources.proto"; + +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // ResourceUnit extends Resources and adds Count along with the Price message ResourceUnit { option (gogoproto.equal) = true; - akash.base.resources.v1.Resources resource = 1 [ + akash.base.resources.v1beta4.Resources resource = 1 [ (gogoproto.nullable) = false, (gogoproto.embed) = true, (gogoproto.jsontag) = "resource", diff --git a/proto/node/akash/deployment/v1beta4/service.proto b/proto/node/akash/deployment/v1beta4/service.proto index dfcbc692..367ebf8b 100644 --- a/proto/node/akash/deployment/v1beta4/service.proto +++ b/proto/node/akash/deployment/v1beta4/service.proto @@ -1,18 +1,23 @@ syntax = "proto3"; package akash.deployment.v1beta4; +import "cosmos/msg/v1/msg.proto"; + import "akash/deployment/v1beta4/deploymentmsg.proto"; import "akash/deployment/v1beta4/groupmsg.proto"; +import "akash/deployment/v1/msg.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/deployment/v1beta4"; +option go_package = "pkg.akt.io/go/node/deployment/v1beta4"; // Msg defines the deployment Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // 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); + rpc DepositDeployment(akash.deployment.v1.MsgDepositDeployment) returns (akash.deployment.v1.MsgDepositDeploymentResponse); // UpdateDeployment defines a method to update a deployment given proper inputs. rpc UpdateDeployment(MsgUpdateDeployment) returns (MsgUpdateDeploymentResponse); diff --git a/proto/node/akash/discovery/v1/akash.proto b/proto/node/akash/discovery/v1/akash.proto index 5bdf3630..9154acbf 100644 --- a/proto/node/akash/discovery/v1/akash.proto +++ b/proto/node/akash/discovery/v1/akash.proto @@ -5,7 +5,7 @@ package akash.discovery.v1; import "akash/discovery/v1/client_info.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/client"; +option go_package = "pkg.akt.io/go/node/client"; // Akash akash specific RPC parameters message Akash { diff --git a/proto/node/akash/discovery/v1/client_info.proto b/proto/node/akash/discovery/v1/client_info.proto index d01ad9e8..f5913a6c 100644 --- a/proto/node/akash/discovery/v1/client_info.proto +++ b/proto/node/akash/discovery/v1/client_info.proto @@ -4,7 +4,7 @@ package akash.discovery.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/client"; +option go_package = "pkg.akt.io/go/node/client"; // ClientInfo akash specific client info message ClientInfo { diff --git a/proto/node/akash/escrow/v1/genesis.proto b/proto/node/akash/escrow/v1/genesis.proto new file mode 100644 index 00000000..ccbb2190 --- /dev/null +++ b/proto/node/akash/escrow/v1/genesis.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.escrow.v1; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1/types.proto"; + +option go_package = "pkg.akt.io/go/node/escrow/v1"; + +// GenesisState defines the basic genesis state used by escrow module +message GenesisState { + repeated Account accounts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Accounts", + (gogoproto.jsontag) = "accounts", + (gogoproto.moretags) = "yaml:\"accounts\"" + ]; + + repeated FractionalPayment payments = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "FractionalPayments", + (gogoproto.jsontag) = "payments", + (gogoproto.moretags) = "yaml:\"payments\"" + ]; +} diff --git a/proto/node/akash/escrow/v1beta3/query.proto b/proto/node/akash/escrow/v1/query.proto similarity index 78% rename from proto/node/akash/escrow/v1beta3/query.proto rename to proto/node/akash/escrow/v1/query.proto index 10062c29..ed65ae85 100644 --- a/proto/node/akash/escrow/v1beta3/query.proto +++ b/proto/node/akash/escrow/v1/query.proto @@ -1,13 +1,14 @@ syntax = "proto3"; -package akash.escrow.v1beta3; +package akash.escrow.v1; 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"; +import "akash/escrow/v1/types.proto"; + +option go_package = "pkg.akt.io/go/node/escrow/v1"; // Query defines the gRPC querier service service Query { @@ -15,14 +16,14 @@ service Query { // 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"; + option (google.api.http).get = "/akash/escrow/v1/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"; + option (google.api.http).get = "/akash/escrow/v1/types/payments/list"; } } @@ -38,7 +39,8 @@ message QueryAccountsRequest { // QueryProvidersResponse is response type for the Query/Providers RPC method message QueryAccountsResponse { repeated Account accounts = 1 [ - (gogoproto.nullable) = false + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Accounts" ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -56,7 +58,8 @@ message QueryPaymentsRequest { // QueryProvidersResponse is response type for the Query/Providers RPC method message QueryPaymentsResponse { repeated FractionalPayment payments = 1 [ - (gogoproto.nullable) = false + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "FractionalPayments" ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } diff --git a/proto/node/akash/escrow/v1beta2/types.proto b/proto/node/akash/escrow/v1/types.proto similarity index 77% rename from proto/node/akash/escrow/v1beta2/types.proto rename to proto/node/akash/escrow/v1/types.proto index c5ceeb1b..d8012b7b 100644 --- a/proto/node/akash/escrow/v1beta2/types.proto +++ b/proto/node/akash/escrow/v1/types.proto @@ -1,10 +1,12 @@ syntax = "proto3"; -package akash.escrow.v1beta2; +package akash.escrow.v1; 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/escrow/v1beta2"; +option go_package = "pkg.akt.io/go/node/escrow/v1"; // AccountID is the account identifier message AccountID { @@ -19,23 +21,22 @@ message AccountID { ]; } +// State stores state for an escrow account +enum AccountState { + 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"]; +} + // 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, @@ -46,12 +47,13 @@ message Account { // bech32 encoded account address of the owner of this escrow account string owner = 2 [ - (gogoproto.jsontag) = "owner", - (gogoproto.moretags) = "yaml:\"owner\"" + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" ]; // current state of this escrow account - State state = 3 [ + AccountState state = 3 [ (gogoproto.jsontag) = "state", (gogoproto.moretags) = "yaml:\"state\"" ]; @@ -81,6 +83,7 @@ message Account { // 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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "depositor", (gogoproto.moretags) = "yaml:\"depositor\"" ]; @@ -96,7 +99,7 @@ message Account { // Payment stores state for a payment message FractionalPayment { - option (gogoproto.goproto_stringer) = true; +// option (gogoproto.goproto_stringer) = false; // Payment State enum State { @@ -126,8 +129,9 @@ message FractionalPayment { ]; string owner = 3 [ - (gogoproto.jsontag) = "owner", - (gogoproto.moretags) = "yaml:\"owner\"" + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" ]; State state = 4 [ diff --git a/proto/node/akash/escrow/v1beta1/genesis.proto b/proto/node/akash/escrow/v1beta1/genesis.proto deleted file mode 100644 index e02f21e9..00000000 --- a/proto/node/akash/escrow/v1beta1/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 7cf8ca3c..00000000 --- a/proto/node/akash/escrow/v1beta1/query.proto +++ /dev/null @@ -1,58 +0,0 @@ -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 deleted file mode 100644 index 5f24fcd5..00000000 --- a/proto/node/akash/escrow/v1beta1/types.proto +++ /dev/null @@ -1,139 +0,0 @@ -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 deleted file mode 100644 index e9a3a078..00000000 --- a/proto/node/akash/escrow/v1beta2/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index df835805..00000000 --- a/proto/node/akash/escrow/v1beta2/query.proto +++ /dev/null @@ -1,58 +0,0 @@ -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/v1beta3/genesis.proto b/proto/node/akash/escrow/v1beta3/genesis.proto deleted file mode 100644 index e530adf8..00000000 --- a/proto/node/akash/escrow/v1beta3/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -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/types.proto b/proto/node/akash/escrow/v1beta3/types.proto deleted file mode 100644 index f767a8a4..00000000 --- a/proto/node/akash/escrow/v1beta3/types.proto +++ /dev/null @@ -1,155 +0,0 @@ -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/gov/v1beta3/genesis.proto b/proto/node/akash/gov/v1beta3/genesis.proto index 1765a325..4eb22728 100644 --- a/proto/node/akash/gov/v1beta3/genesis.proto +++ b/proto/node/akash/gov/v1beta3/genesis.proto @@ -4,7 +4,7 @@ package akash.gov.v1beta3; import "gogoproto/gogo.proto"; import "akash/gov/v1beta3/params.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/gov/v1beta3"; +option go_package = "pkg.akt.io/go/node/gov/v1beta3"; // GenesisState stores slice of genesis deployment instance message GenesisState { diff --git a/proto/node/akash/gov/v1beta3/params.proto b/proto/node/akash/gov/v1beta3/params.proto index e325b854..cb80b37b 100644 --- a/proto/node/akash/gov/v1beta3/params.proto +++ b/proto/node/akash/gov/v1beta3/params.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package akash.gov.v1beta3; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/gov/v1beta3"; +option go_package = "pkg.akt.io/go/node/gov/v1beta3"; // DepositParams defines the parameters for the x/gov module message DepositParams { diff --git a/proto/node/akash/inflation/v1beta2/genesis.proto b/proto/node/akash/inflation/v1beta2/genesis.proto index 9f66ece4..d711ce0f 100644 --- a/proto/node/akash/inflation/v1beta2/genesis.proto +++ b/proto/node/akash/inflation/v1beta2/genesis.proto @@ -4,7 +4,7 @@ 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"; +option go_package = "pkg.akt.io/go/node/inflation/types/v1beta2"; // GenesisState stores slice of genesis deployment instance message GenesisState { diff --git a/proto/node/akash/inflation/v1beta2/params.proto b/proto/node/akash/inflation/v1beta2/params.proto index c1e3b5b6..f50b1dac 100644 --- a/proto/node/akash/inflation/v1beta2/params.proto +++ b/proto/node/akash/inflation/v1beta2/params.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package akash.inflation.v1beta2; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/inflation/types/v1beta2"; +option go_package = "pkg.akt.io/go/node/inflation/types/v1beta2"; // Params defines the parameters for the x/deployment package message Params { diff --git a/proto/node/akash/inflation/v1beta3/genesis.proto b/proto/node/akash/inflation/v1beta3/genesis.proto index 2fa5fe9a..0921667c 100644 --- a/proto/node/akash/inflation/v1beta3/genesis.proto +++ b/proto/node/akash/inflation/v1beta3/genesis.proto @@ -4,7 +4,7 @@ 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"; +option go_package = "pkg.akt.io/go/node/inflation/v1beta3"; // GenesisState stores slice of genesis deployment instance message GenesisState { diff --git a/proto/node/akash/inflation/v1beta3/params.proto b/proto/node/akash/inflation/v1beta3/params.proto index 87cc6feb..4de0caea 100644 --- a/proto/node/akash/inflation/v1beta3/params.proto +++ b/proto/node/akash/inflation/v1beta3/params.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package akash.inflation.v1beta3; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/inflation/v1beta3"; +option go_package = "pkg.akt.io/go/node/inflation/v1beta3"; // Params defines the parameters for the x/deployment package message Params { diff --git a/proto/node/akash/market/v1/bid.proto b/proto/node/akash/market/v1/bid.proto new file mode 100644 index 00000000..5ff48d46 --- /dev/null +++ b/proto/node/akash/market/v1/bid.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +package akash.market.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1"; + +// BidState is an enum which refers to state of bid +enum BidState { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + bid_invalid = 0 [ + (gogoproto.enumvalue_customname) = "BidStateInvalid" + ]; + // BidOpen denotes state for bid open + bid_open = 1 [ + (gogoproto.enumvalue_customname) = "BidOpen" + ]; + // BidMatched denotes state for bid open + bid_active = 2 [ + (gogoproto.enumvalue_customname) = "BidActive" + ]; + // BidLost denotes state for bid lost + bid_lost = 3 [ + (gogoproto.enumvalue_customname) = "BidLost" + ]; + // BidClosed denotes state for bid closed + bid_closed = 4 [ + (gogoproto.enumvalue_customname) = "BidClosed" + ]; +} + +// 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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; +} diff --git a/proto/node/akash/market/v1/event.proto b/proto/node/akash/market/v1/event.proto new file mode 100644 index 00000000..078e4b42 --- /dev/null +++ b/proto/node/akash/market/v1/event.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; +package akash.market.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +import "akash/market/v1/bid.proto"; +import "akash/market/v1/order.proto"; +import "akash/market/v1/lease.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1"; + + +message EventOrderCreated { + option (gogoproto.equal) = false; + + OrderID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventOrderClosed { + option (gogoproto.equal) = false; + + OrderID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventBidCreated { + option (gogoproto.equal) = false; + + BidID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; +} + +message EventBidClosed { + option (gogoproto.equal) = false; + + BidID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +message EventLeaseCreated { + option (gogoproto.equal) = false; + + LeaseID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + cosmos.base.v1beta1.DecCoin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"" + ]; +} + +message EventLeaseClosed { + option (gogoproto.equal) = false; + + LeaseID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "ID", + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + diff --git a/proto/node/akash/market/v1/filters.proto b/proto/node/akash/market/v1/filters.proto new file mode 100644 index 00000000..5ae14076 --- /dev/null +++ b/proto/node/akash/market/v1/filters.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; +package akash.market.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "akash/market/v1/bid.proto"; +import "akash/market/v1/lease.proto"; +import "akash/market/v1/order.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1"; + +// BidFilters defines flags for bid list filter +message BidFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; + string state = 6 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} + +// LeaseFilters defines flags for lease list filter +message LeaseFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "provider", + (gogoproto.moretags) = "yaml:\"provider\"" + ]; + string state = 6 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; +} + +// OrderFilters defines flags for order list filter +message OrderFilters { + option (gogoproto.equal) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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/v1/lease.proto b/proto/node/akash/market/v1/lease.proto new file mode 100644 index 00000000..0d51a5fb --- /dev/null +++ b/proto/node/akash/market/v1/lease.proto @@ -0,0 +1,95 @@ +syntax = "proto3"; +package akash.market.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1"; + +// State is an enum which refers to state of lease +enum LeaseState { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + lease_invalid = 0 [ + (gogoproto.enumvalue_customname) = "LeaseStateInvalid" + ]; + // LeaseActive denotes state for lease active + lease_active = 1 [ + (gogoproto.enumvalue_customname) = "LeaseActive" + ]; + // LeaseInsufficientFunds denotes state for lease insufficient_funds + lease_insufficient_funds = 2 [ + (gogoproto.enumvalue_customname) = "LeaseInsufficientFunds" + ]; + // LeaseClosed denotes state for lease closed + lease_closed = 3 [ + (gogoproto.enumvalue_customname) = "LeaseClosed" + ]; +} + +// LeaseID stores bid details of lease +message LeaseID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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 id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; + + LeaseState 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 [ + (gogoproto.jsontag) = "created_at", + (gogoproto.moretags) = "yaml:\"created_at\"" + ]; + int64 closed_on = 5 [ + (gogoproto.jsontag) = "closed_on", + (gogoproto.moretags) = "yaml:\"closed_on\"" + ]; +} diff --git a/proto/node/akash/market/v1/order.proto b/proto/node/akash/market/v1/order.proto new file mode 100644 index 00000000..af65efe6 --- /dev/null +++ b/proto/node/akash/market/v1/order.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package akash.market.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1"; + +// OrderState is an enum which refers to state of order +enum OrderState { + option (gogoproto.goproto_enum_prefix) = false; + + // Prefix should start with 0 in enum. So declaring dummy state + order_invalid = 0 [ + (gogoproto.enumvalue_customname) = "OrderStateInvalid" + ]; + // OrderOpen denotes state for order open + order_open = 1 [ + (gogoproto.enumvalue_customname) = "OrderOpen" + ]; + // OrderMatched denotes state for order matched + order_active = 2 [ + (gogoproto.enumvalue_customname) = "OrderActive" + ]; + // OrderClosed denotes state for order lost + order_closed = 3 [ + (gogoproto.enumvalue_customname) = "OrderClosed" + ]; +} + +// OrderID stores owner and all other seq numbers +message OrderID { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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\"" + ]; +} diff --git a/proto/node/akash/market/v1beta2/bid.proto b/proto/node/akash/market/v1beta2/bid.proto deleted file mode 100644 index 0cdab374..00000000 --- a/proto/node/akash/market/v1beta2/bid.proto +++ /dev/null @@ -1,109 +0,0 @@ -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 deleted file mode 100644 index 686ebff3..00000000 --- a/proto/node/akash/market/v1beta2/genesis.proto +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 9aab0588..00000000 --- a/proto/node/akash/market/v1beta2/lease.proto +++ /dev/null @@ -1,117 +0,0 @@ -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 deleted file mode 100644 index 7822234c..00000000 --- a/proto/node/akash/market/v1beta2/order.proto +++ /dev/null @@ -1,74 +0,0 @@ -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 deleted file mode 100644 index 2953b972..00000000 --- a/proto/node/akash/market/v1beta2/params.proto +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index fbacfc93..00000000 --- a/proto/node/akash/market/v1beta2/query.proto +++ /dev/null @@ -1,123 +0,0 @@ -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 deleted file mode 100644 index b995f19c..00000000 --- a/proto/node/akash/market/v1beta2/service.proto +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 9026c985..00000000 --- a/proto/node/akash/market/v1beta3/bid.proto +++ /dev/null @@ -1,164 +0,0 @@ -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 deleted file mode 100644 index f3309210..00000000 --- a/proto/node/akash/market/v1beta3/genesis.proto +++ /dev/null @@ -1,34 +0,0 @@ -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/bid.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 { - Params params = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "params", - (gogoproto.moretags) = "yaml:\"params\"" - ]; - repeated Order orders = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "orders", - (gogoproto.moretags) = "yaml:\"orders\"" - ]; - repeated Lease leases = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "leases", - (gogoproto.moretags) = "yaml:\"leases\"" - ]; - repeated Bid bids = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bids", - (gogoproto.moretags) = "yaml:\"bids\"" - ]; -} diff --git a/proto/node/akash/market/v1beta3/lease.proto b/proto/node/akash/market/v1beta3/lease.proto deleted file mode 100644 index 023d28ff..00000000 --- a/proto/node/akash/market/v1beta3/lease.proto +++ /dev/null @@ -1,164 +0,0 @@ -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 deleted file mode 100644 index e019bf0e..00000000 --- a/proto/node/akash/market/v1beta3/order.proto +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100644 index d0e2bf34..00000000 --- a/proto/node/akash/market/v1beta3/params.proto +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index a42b973b..00000000 --- a/proto/node/akash/market/v1beta3/query.proto +++ /dev/null @@ -1,147 +0,0 @@ -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 deleted file mode 100644 index 80fd62a1..00000000 --- a/proto/node/akash/market/v1beta3/service.proto +++ /dev/null @@ -1,25 +0,0 @@ -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/market/v1beta4/bid.proto b/proto/node/akash/market/v1beta4/bid.proto deleted file mode 100644 index 0af39505..00000000 --- a/proto/node/akash/market/v1beta4/bid.proto +++ /dev/null @@ -1,199 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -import "akash/base/v1beta3/resources.proto"; -import "akash/market/v1beta4/order.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// ResourceOffer describes resources that provider is offering -// for deployment -message ResourceOffer { - option (gogoproto.equal) = true; - akash.base.v1beta3.Resources resources = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "resources", - (gogoproto.moretags) = 'yaml:"resources"' - ]; - uint32 count = 2 [ - (gogoproto.jsontag) = "count", - (gogoproto.moretags) = 'yaml:"count"' - ]; -} - -// 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"' - ]; - repeated ResourceOffer resources_offer = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourcesOffer", - (gogoproto.customname) = "ResourcesOffer", - (gogoproto.jsontag) = "resources_offer", - (gogoproto.moretags) = 'yaml:"resources_offer"' - ]; -} - -// 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; - - repeated ResourceOffer resources_offer = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourcesOffer", - (gogoproto.customname) = "ResourcesOffer", - (gogoproto.jsontag) = "resources_offer", - (gogoproto.moretags) = 'yaml:"resources_offer"' - ]; -} - -// 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/v1beta4/genesis.proto b/proto/node/akash/market/v1beta4/genesis.proto deleted file mode 100644 index e22dd504..00000000 --- a/proto/node/akash/market/v1beta4/genesis.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "akash/market/v1beta4/order.proto"; -import "akash/market/v1beta4/lease.proto"; -import "akash/market/v1beta4/bid.proto"; -import "akash/market/v1beta4/params.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// GenesisState defines the basic genesis state used by market module -message GenesisState { - Params params = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "params", - (gogoproto.moretags) = 'yaml:"params"' - ]; - repeated Order orders = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "orders", - (gogoproto.moretags) = 'yaml:"orders"' - ]; - repeated Lease leases = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "leases", - (gogoproto.moretags) = 'yaml:"leases"' - ]; - repeated Bid bids = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bids", - (gogoproto.moretags) = 'yaml:"bids"' - ]; -} diff --git a/proto/node/akash/market/v1beta4/lease.proto b/proto/node/akash/market/v1beta4/lease.proto deleted file mode 100644 index 6e89feb1..00000000 --- a/proto/node/akash/market/v1beta4/lease.proto +++ /dev/null @@ -1,164 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "akash/market/v1beta4/bid.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// 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/v1beta4/order.proto b/proto/node/akash/market/v1beta4/order.proto deleted file mode 100644 index 0b393806..00000000 --- a/proto/node/akash/market/v1beta4/order.proto +++ /dev/null @@ -1,109 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "akash/deployment/v1beta3/groupspec.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// 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/v1beta4/params.proto b/proto/node/akash/market/v1beta4/params.proto deleted file mode 100644 index 3dff6706..00000000 --- a/proto/node/akash/market/v1beta4/params.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// 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/v1beta4/query.proto b/proto/node/akash/market/v1beta4/query.proto deleted file mode 100644 index 7260e013..00000000 --- a/proto/node/akash/market/v1beta4/query.proto +++ /dev/null @@ -1,151 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -import "akash/escrow/v1beta3/types.proto"; - -import "akash/market/v1beta4/order.proto"; -import "akash/market/v1beta4/bid.proto"; -import "akash/market/v1beta4/lease.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// 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/v1beta4/orders/list"; - } - - // Order queries order details - rpc Order(QueryOrderRequest) returns (QueryOrderResponse) { - option (google.api.http).get = "/akash/market/v1beta4/orders/info"; - } - - // Bids queries bids with filters - rpc Bids(QueryBidsRequest) returns (QueryBidsResponse) { - option (google.api.http).get = "/akash/market/v1beta4/bids/list"; - } - - // Bid queries bid details - rpc Bid(QueryBidRequest) returns (QueryBidResponse) { - option (google.api.http).get = "/akash/market/v1beta4/bids/info"; - } - - // Leases queries leases with filters - rpc Leases(QueryLeasesRequest) returns (QueryLeasesResponse) { - option (google.api.http).get = "/akash/market/v1beta4/leases/list"; - } - - // Lease queries lease details - rpc Lease(QueryLeaseRequest) returns (QueryLeaseResponse) { - option (google.api.http).get = "/akash/market/v1beta4/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/v1beta4/service.proto b/proto/node/akash/market/v1beta4/service.proto deleted file mode 100644 index 5177a431..00000000 --- a/proto/node/akash/market/v1beta4/service.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta4; - -import "akash/market/v1beta4/bid.proto"; -import "akash/market/v1beta4/lease.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta4"; - -// 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/v1beta5/bid.proto b/proto/node/akash/market/v1beta5/bid.proto index 89d5c10b..57867e82 100644 --- a/proto/node/akash/market/v1beta5/bid.proto +++ b/proto/node/akash/market/v1beta5/bid.proto @@ -4,196 +4,44 @@ package akash.market.v1beta5; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "akash/base/resources/v1/resources.proto"; -import "akash/market/v1beta5/order.proto"; +import "akash/market/v1beta5/resourcesoffer.proto"; +import "akash/market/v1/bid.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; - -// ResourceOffer describes resources that provider is offering -// for deployment -message ResourceOffer { - option (gogoproto.equal) = true; - akash.base.resources.v1.Resources resources = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "resources", - (gogoproto.moretags) = 'yaml:"resources"' - ]; - uint32 count = 2 [ - (gogoproto.jsontag) = "count", - (gogoproto.moretags) = 'yaml:"count"' - ]; -} - -// 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"' - ]; - repeated ResourceOffer resources_offer = 5 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourcesOffer", - (gogoproto.customname) = "ResourcesOffer", - (gogoproto.jsontag) = "resources_offer", - (gogoproto.moretags) = 'yaml:"resources_offer"' - ]; -} - -// 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"' - ]; -} +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // 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", + akash.market.v1.BidID id = 1 [ + (gogoproto.customname) = "ID", (gogoproto.nullable) = false, (gogoproto.jsontag) = "id", - (gogoproto.moretags) = 'yaml:"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 [ + akash.market.v1.BidState state = 2 [ (gogoproto.jsontag) = "state", - (gogoproto.moretags) = 'yaml:"state"' + (gogoproto.moretags) = "yaml:\"state\"" ]; cosmos.base.v1beta1.DecCoin price = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "price", - (gogoproto.moretags) = 'yaml:"price"' + (gogoproto.moretags) = "yaml:\"price\"" + ]; + + int64 created_at = 4 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"created_at\"" ]; - int64 created_at = 4; repeated ResourceOffer resources_offer = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "ResourcesOffer", (gogoproto.customname) = "ResourcesOffer", (gogoproto.jsontag) = "resources_offer", - (gogoproto.moretags) = 'yaml:"resources_offer"' - ]; -} - -// 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"' + (gogoproto.moretags) = "yaml:\"resources_offer\"" ]; } diff --git a/proto/node/akash/market/v1beta5/bidmsg.proto b/proto/node/akash/market/v1beta5/bidmsg.proto new file mode 100644 index 00000000..cafe8ce4 --- /dev/null +++ b/proto/node/akash/market/v1beta5/bidmsg.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +package akash.market.v1beta5; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +import "akash/market/v1beta5/resourcesoffer.proto"; + +import "akash/market/v1/bid.proto"; +import "akash/market/v1/order.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1beta5"; + +// MsgCreateBid defines an SDK message for creating Bid +message MsgCreateBid { + option (gogoproto.equal) = false; + + akash.market.v1.OrderID order_id = 1 [ + (gogoproto.customname) = "OrderID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "order_id", + (gogoproto.moretags) = "yaml:\"order_id\"" + ]; + string provider = 2 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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\"" + ]; + repeated ResourceOffer resources_offer = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "ResourcesOffer", + (gogoproto.customname) = "ResourcesOffer", + (gogoproto.jsontag) = "resources_offer", + (gogoproto.moretags) = "yaml:\"resources_offer\"" + ]; +} + +// MsgCreateBidResponse defines the Msg/CreateBid response type. +message MsgCreateBidResponse {} + +// MsgCloseBid defines an SDK message for closing bid +message MsgCloseBid { + option (gogoproto.equal) = false; + + akash.market.v1.BidID id = 1 [ + (gogoproto.customname) = "ID", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"" + ]; +} + +// MsgCloseBidResponse defines the Msg/CloseBid response type. +message MsgCloseBidResponse {} diff --git a/proto/node/akash/market/v1beta5/genesis.proto b/proto/node/akash/market/v1beta5/genesis.proto index 7f7acfd7..ef415cd0 100644 --- a/proto/node/akash/market/v1beta5/genesis.proto +++ b/proto/node/akash/market/v1beta5/genesis.proto @@ -3,12 +3,13 @@ package akash.market.v1beta5; import "gogoproto/gogo.proto"; -import "akash/market/v1beta5/order.proto"; -import "akash/market/v1beta5/lease.proto"; -import "akash/market/v1beta5/bid.proto"; +import "akash/market/v1/lease.proto"; + import "akash/market/v1beta5/params.proto"; +import "akash/market/v1beta5/bid.proto"; +import "akash/market/v1beta5/order.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // GenesisState defines the basic genesis state used by market module message GenesisState { @@ -18,18 +19,21 @@ message GenesisState { (gogoproto.moretags) = 'yaml:"params"' ]; repeated Order orders = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "orders", - (gogoproto.moretags) = 'yaml:"orders"' + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Orders", + (gogoproto.jsontag) = "orders", + (gogoproto.moretags) = "yaml:\"orders\"" ]; - repeated Lease leases = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "leases", - (gogoproto.moretags) = 'yaml:"leases"' + repeated akash.market.v1.Lease leases = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "pkg.akt.io/go/node/market/v1.Leases", + (gogoproto.jsontag) = "leases", + (gogoproto.moretags) = "yaml:\"leases\"" ]; repeated Bid bids = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bids", - (gogoproto.moretags) = 'yaml:"bids"' + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Bids", + (gogoproto.jsontag) = "bids", + (gogoproto.moretags) = "yaml:\"bids\"" ]; } diff --git a/proto/node/akash/market/v1beta5/lease.proto b/proto/node/akash/market/v1beta5/lease.proto deleted file mode 100644 index ede77709..00000000 --- a/proto/node/akash/market/v1beta5/lease.proto +++ /dev/null @@ -1,166 +0,0 @@ -syntax = "proto3"; -package akash.market.v1beta5; - -import "gogoproto/gogo.proto"; - -import "cosmos/base/v1beta1/coin.proto"; - -import "akash/market/v1beta5/bid.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; - -// 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/v1beta5/leasemsg.proto b/proto/node/akash/market/v1beta5/leasemsg.proto new file mode 100644 index 00000000..6215fbda --- /dev/null +++ b/proto/node/akash/market/v1beta5/leasemsg.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; +package akash.market.v1beta5; + +import "gogoproto/gogo.proto"; + +import "akash/market/v1/bid.proto"; +import "akash/market/v1/lease.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1beta5"; + +// MsgCreateLease is sent to create a lease +message MsgCreateLease { + option (gogoproto.equal) = false; + + akash.market.v1.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; + + akash.market.v1.LeaseID bid_id = 1 [ + (gogoproto.customname) = "ID", + (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; + + akash.market.v1.LeaseID lease_id = 1 [ + (gogoproto.customname) = "ID", + (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/v1beta5/order.proto b/proto/node/akash/market/v1beta5/order.proto index 9a46c94c..c4f606d8 100644 --- a/proto/node/akash/market/v1beta5/order.proto +++ b/proto/node/akash/market/v1beta5/order.proto @@ -2,108 +2,35 @@ syntax = "proto3"; package akash.market.v1beta5; import "gogoproto/gogo.proto"; + import "akash/deployment/v1beta4/groupspec.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; +import "akash/market/v1/order.proto"; -// 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"' - ]; -} +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // 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", + akash.market.v1.OrderID id = 1 [ + (gogoproto.customname) = "ID", (gogoproto.nullable) = false, (gogoproto.jsontag) = "id", - (gogoproto.moretags) = 'yaml:"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 [ + akash.market.v1.OrderState state = 2 [ (gogoproto.jsontag) = "state", - (gogoproto.moretags) = 'yaml:"state"' + (gogoproto.moretags) = "yaml:\"state\"" ]; + akash.deployment.v1beta4.GroupSpec spec = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "spec", - (gogoproto.moretags) = 'yaml:"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/v1beta5/params.proto b/proto/node/akash/market/v1beta5/params.proto index 08a6673e..4742136e 100644 --- a/proto/node/akash/market/v1beta5/params.proto +++ b/proto/node/akash/market/v1beta5/params.proto @@ -4,7 +4,7 @@ package akash.market.v1beta5; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // Params is the params for the x/market module message Params { @@ -12,11 +12,11 @@ message Params { (gogoproto.customname) = "BidMinDeposit", (gogoproto.nullable) = false, (gogoproto.jsontag) = "bid_min_deposit", - (gogoproto.moretags) = 'yaml:"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"' + (gogoproto.moretags) = "yaml:\"order_max_bids\"" ]; } diff --git a/proto/node/akash/market/v1beta5/query.proto b/proto/node/akash/market/v1beta5/query.proto index f4745dcd..de178da8 100644 --- a/proto/node/akash/market/v1beta5/query.proto +++ b/proto/node/akash/market/v1beta5/query.proto @@ -6,12 +6,17 @@ import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "akash/escrow/v1beta3/types.proto"; +import "akash/escrow/v1/types.proto"; + +import "akash/market/v1/order.proto"; +import "akash/market/v1/bid.proto"; +import "akash/market/v1/lease.proto"; + import "akash/market/v1beta5/order.proto"; import "akash/market/v1beta5/bid.proto"; -import "akash/market/v1beta5/lease.proto"; +import "akash/market/v1/filters.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // Query defines the gRPC querier service service Query { @@ -48,7 +53,7 @@ service Query { // QueryOrdersRequest is request type for the Query/Orders RPC method message QueryOrdersRequest { - OrderFilters filters = 1 [ + akash.market.v1.OrderFilters filters = 1 [ (gogoproto.nullable) = false ]; @@ -67,7 +72,7 @@ message QueryOrdersResponse { // QueryOrderRequest is request type for the Query/Order RPC method message QueryOrderRequest { - OrderID id = 1 [ + akash.market.v1.OrderID id = 1 [ (gogoproto.nullable) = false, (gogoproto.customname) = "ID" ]; @@ -82,7 +87,7 @@ message QueryOrderResponse { // QueryBidsRequest is request type for the Query/Bids RPC method message QueryBidsRequest { - BidFilters filters = 1 [ + akash.market.v1.BidFilters filters = 1 [ (gogoproto.nullable) = false ]; @@ -100,7 +105,7 @@ message QueryBidsResponse { // QueryBidRequest is request type for the Query/Bid RPC method message QueryBidRequest { - BidID id = 1 [ + akash.market.v1.BidID id = 1 [ (gogoproto.nullable) = false, (gogoproto.customname) = "ID" ]; @@ -108,15 +113,17 @@ message QueryBidRequest { // 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 [ + Bid bid = 1 [ + (gogoproto.nullable) = false + ]; + akash.escrow.v1.Account escrow_account = 2 [ (gogoproto.nullable) = false ]; } // QueryLeasesRequest is request type for the Query/Leases RPC method message QueryLeasesRequest { - LeaseFilters filters = 1 [ + akash.market.v1.LeaseFilters filters = 1 [ (gogoproto.nullable) = false ]; @@ -134,7 +141,7 @@ message QueryLeasesResponse { // QueryLeaseRequest is request type for the Query/Lease RPC method message QueryLeaseRequest { - LeaseID id = 1 [ + akash.market.v1.LeaseID id = 1 [ (gogoproto.nullable) = false, (gogoproto.customname) = "ID" ]; @@ -142,10 +149,10 @@ message QueryLeaseRequest { // QueryLeaseResponse is response type for the Query/Lease RPC method message QueryLeaseResponse { - Lease lease = 1 [ + akash.market.v1.Lease lease = 1 [ (gogoproto.nullable) = false ]; - akash.escrow.v1beta3.FractionalPayment escrow_payment = 2 [ + akash.escrow.v1.FractionalPayment escrow_payment = 2 [ (gogoproto.nullable) = false ]; } diff --git a/proto/node/akash/market/v1beta5/resourcesoffer.proto b/proto/node/akash/market/v1beta5/resourcesoffer.proto new file mode 100644 index 00000000..2ec3506a --- /dev/null +++ b/proto/node/akash/market/v1beta5/resourcesoffer.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package akash.market.v1beta5; + +import "gogoproto/gogo.proto"; + +import "akash/base/resources/v1beta4/resources.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1beta5"; + +// ResourceOffer describes resources that provider is offering +// for deployment +message ResourceOffer { + option (gogoproto.equal) = true; + akash.base.resources.v1beta4.Resources resources = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resources", + (gogoproto.moretags) = "yaml:\"resources\"" + ]; + uint32 count = 2 [ + (gogoproto.jsontag) = "count", + (gogoproto.moretags) = "yaml:\"count\"" + ]; +} diff --git a/proto/node/akash/market/v1beta5/service.proto b/proto/node/akash/market/v1beta5/service.proto index 87b8d96d..df3b2f8b 100644 --- a/proto/node/akash/market/v1beta5/service.proto +++ b/proto/node/akash/market/v1beta5/service.proto @@ -1,13 +1,16 @@ syntax = "proto3"; package akash.market.v1beta5; -import "akash/market/v1beta5/bid.proto"; -import "akash/market/v1beta5/lease.proto"; +import "cosmos/msg/v1/msg.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/market/v1beta5"; +import "akash/market/v1beta5/bidmsg.proto"; +import "akash/market/v1beta5/leasemsg.proto"; + +option go_package = "pkg.akt.io/go/node/market/v1beta5"; // Msg defines the market Msg service service Msg { + option (cosmos.msg.v1.service) = true; // CreateBid defines a method to create a bid given proper inputs. rpc CreateBid(MsgCreateBid) returns (MsgCreateBidResponse); diff --git a/proto/node/akash/provider/v1beta1/provider.proto b/proto/node/akash/provider/v1beta1/provider.proto deleted file mode 100644 index 7b82effe..00000000 --- a/proto/node/akash/provider/v1beta1/provider.proto +++ /dev/null @@ -1,120 +0,0 @@ -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 deleted file mode 100644 index c2718c8d..00000000 --- a/proto/node/akash/provider/v1beta2/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 01344ab7..00000000 --- a/proto/node/akash/provider/v1beta2/provider.proto +++ /dev/null @@ -1,120 +0,0 @@ -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 deleted file mode 100644 index 5b4cc1a8..00000000 --- a/proto/node/akash/provider/v1beta2/query.proto +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 703f215e..00000000 --- a/proto/node/akash/provider/v1beta3/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 693a42f6..00000000 --- a/proto/node/akash/provider/v1beta3/provider.proto +++ /dev/null @@ -1,120 +0,0 @@ -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 deleted file mode 100644 index 87a2e423..00000000 --- a/proto/node/akash/provider/v1beta3/query.proto +++ /dev/null @@ -1,49 +0,0 @@ -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/akash/provider/v1beta4/genesis.proto b/proto/node/akash/provider/v1beta4/genesis.proto index e8001188..147865f6 100644 --- a/proto/node/akash/provider/v1beta4/genesis.proto +++ b/proto/node/akash/provider/v1beta4/genesis.proto @@ -4,13 +4,14 @@ package akash.provider.v1beta4; import "gogoproto/gogo.proto"; import "akash/provider/v1beta4/provider.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta4"; +option go_package = "pkg.akt.io/go/node/provider/v1beta4"; // 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\"" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "Providers", + (gogoproto.jsontag) = "providers", + (gogoproto.moretags) = "yaml:\"providers\"" ]; } diff --git a/proto/node/akash/provider/v1beta4/msg.proto b/proto/node/akash/provider/v1beta4/msg.proto new file mode 100644 index 00000000..dc4248cc --- /dev/null +++ b/proto/node/akash/provider/v1beta4/msg.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; +package akash.provider.v1beta4; + +import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; + +import "akash/base/attributes/v1/attribute.proto"; + +import "akash/provider/v1beta4/provider.proto"; + +option go_package = "pkg.akt.io/go/node/provider/v1beta4"; + +// MsgCreateProvider defines an SDK message for creating a provider +message MsgCreateProvider { + option (gogoproto.equal) = false; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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.attributes.v1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + + akash.provider.v1beta4.Info 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; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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.attributes.v1.Attribute attributes = 3 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes", + (gogoproto.moretags) = "yaml:\"attributes\"" + ]; + akash.provider.v1beta4.Info 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; + option (cosmos.msg.v1.signer) = "owner"; + + string owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; +} + +// MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. +message MsgDeleteProviderResponse {} diff --git a/proto/node/akash/provider/v1beta4/provider.proto b/proto/node/akash/provider/v1beta4/provider.proto index 887d0b5d..0206cadc 100644 --- a/proto/node/akash/provider/v1beta4/provider.proto +++ b/proto/node/akash/provider/v1beta4/provider.proto @@ -2,24 +2,14 @@ syntax = "proto3"; package akash.provider.v1beta4; import "gogoproto/gogo.proto"; -import "akash/base/attributes/v1/attribute.proto"; - -option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta4"; - -// 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); +import "cosmos_proto/cosmos.proto"; - // UpdateProvider defines a method that updates a provider given the proper inputs - rpc UpdateProvider(MsgUpdateProvider) returns (MsgUpdateProviderResponse); +import "akash/base/attributes/v1/attribute.proto"; - // DeleteProvider defines a method that deletes a provider given the proper inputs - rpc DeleteProvider(MsgDeleteProvider) returns (MsgDeleteProviderResponse); -} +option go_package = "pkg.akt.io/go/node/provider/v1beta4"; -// ProviderInfo -message ProviderInfo { +// Info +message Info { string email = 1 [ (gogoproto.customname) = "EMail", (gogoproto.jsontag) = "email", @@ -31,88 +21,29 @@ message ProviderInfo { ]; } -// 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.attributes.v1.Attribute attributes = 3 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.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.attributes.v1.Attribute attributes = 3 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.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 owner = 1 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (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.attributes.v1.Attribute attributes = 3 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/attributes/v1.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", (gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\"" ]; - ProviderInfo info = 4 [ + Info info = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "info", (gogoproto.moretags) = "yaml:\"info\"" diff --git a/proto/node/akash/provider/v1beta4/query.proto b/proto/node/akash/provider/v1beta4/query.proto index aacfb053..cdfc0915 100644 --- a/proto/node/akash/provider/v1beta4/query.proto +++ b/proto/node/akash/provider/v1beta4/query.proto @@ -4,9 +4,10 @@ package akash.provider.v1beta4; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; + import "akash/provider/v1beta4/provider.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/provider/v1beta4"; +option go_package = "pkg.akt.io/go/node/provider/v1beta4"; // Query defines the gRPC querier service service Query { diff --git a/proto/node/akash/provider/v1beta4/service.proto b/proto/node/akash/provider/v1beta4/service.proto new file mode 100644 index 00000000..992e40f8 --- /dev/null +++ b/proto/node/akash/provider/v1beta4/service.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.provider.v1beta4; + +import "cosmos/msg/v1/msg.proto"; + +import "akash/provider/v1beta4/msg.proto"; + +option go_package = "pkg.akt.io/go/node/provider/v1beta4"; + +// Msg defines the provider Msg service +service Msg { + option (cosmos.msg.v1.service) = true; + + // 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); +} diff --git a/proto/node/akash/staking/v1beta3/genesis.proto b/proto/node/akash/staking/v1beta3/genesis.proto index 40b46921..de2d6bd7 100644 --- a/proto/node/akash/staking/v1beta3/genesis.proto +++ b/proto/node/akash/staking/v1beta3/genesis.proto @@ -4,7 +4,7 @@ package akash.staking.v1beta3; import "gogoproto/gogo.proto"; import "akash/staking/v1beta3/params.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/staking/v1beta3"; +option go_package = "pkg.akt.io/go/node/staking/v1beta3"; // GenesisState stores slice of genesis deployment instance message GenesisState { diff --git a/proto/node/akash/staking/v1beta3/params.proto b/proto/node/akash/staking/v1beta3/params.proto index 9df24863..df54609c 100644 --- a/proto/node/akash/staking/v1beta3/params.proto +++ b/proto/node/akash/staking/v1beta3/params.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package akash.staking.v1beta3; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/staking/v1beta3"; +option go_package = "pkg.akt.io/go/node/staking/v1beta3"; // Params extends the parameters for the x/staking module message Params { diff --git a/proto/node/akash/take/v1beta3/genesis.proto b/proto/node/akash/take/v1beta3/genesis.proto index 32905155..07560693 100644 --- a/proto/node/akash/take/v1beta3/genesis.proto +++ b/proto/node/akash/take/v1beta3/genesis.proto @@ -4,7 +4,7 @@ package akash.take.v1beta3; import "gogoproto/gogo.proto"; import "akash/take/v1beta3/params.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3"; +option go_package = "pkg.akt.io/go/node/take/v1beta3"; // GenesisState stores slice of genesis deployment instance message GenesisState { diff --git a/proto/node/akash/take/v1beta3/params.proto b/proto/node/akash/take/v1beta3/params.proto index ab18adf3..a450a02f 100644 --- a/proto/node/akash/take/v1beta3/params.proto +++ b/proto/node/akash/take/v1beta3/params.proto @@ -4,7 +4,7 @@ package akash.take.v1beta3; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3"; +option go_package = "pkg.akt.io/go/node/take/v1beta3"; // DenomTakeRate describes take rate for specified denom message DenomTakeRate { diff --git a/proto/node/akash/take/v1beta3/query.proto b/proto/node/akash/take/v1beta3/query.proto index e5952aae..d714b8ff 100644 --- a/proto/node/akash/take/v1beta3/query.proto +++ b/proto/node/akash/take/v1beta3/query.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package akash.take.v1beta3; -option go_package = "github.com/akash-network/akash-api/go/node/take/v1beta3"; +option go_package = "pkg.akt.io/go/node/take/v1beta3"; // Query defines the gRPC querier service service Query { diff --git a/proto/node/buf.gen.doc.yaml b/proto/node/buf.gen.doc.yaml new file mode 100644 index 00000000..1c39a39c --- /dev/null +++ b/proto/node/buf.gen.doc.yaml @@ -0,0 +1,6 @@ +version: v1 +plugins: + - name: doc + strategy: all + out: ./docs/proto + opt: ./docs/protodoc-markdown.tmpl,node.md diff --git a/proto/node/buf.lock b/proto/node/buf.lock index c91b5810..d6a46546 100644 --- a/proto/node/buf.lock +++ b/proto/node/buf.lock @@ -1,2 +1,23 @@ # Generated by buf. DO NOT EDIT. version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 954f7b05f38440fc8250134b15adec47 + digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 74015a8aeb8445aa9e3e1454cb54bc35 + digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13 diff --git a/proto/node/buf.yaml b/proto/node/buf.yaml index 40bce3e7..5175c1af 100644 --- a/proto/node/buf.yaml +++ b/proto/node/buf.yaml @@ -1,11 +1,11 @@ # 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 +deps: + - buf.build/cosmos/gogo-proto + - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/cosmos-proto + - buf.build/googleapis/googleapis breaking: use: - FILE @@ -23,21 +23,3 @@ lint: - 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/market/v1beta3 - - akash/deployment/v1beta1 - - akash/deployment/v1beta2 - - akash/provider/v1beta1 - - akash/provider/v1beta2 diff --git a/proto/provider/akash/inventory/v1/cluster.proto b/proto/provider/akash/inventory/v1/cluster.proto index 7aca9c42..d5a93687 100644 --- a/proto/provider/akash/inventory/v1/cluster.proto +++ b/proto/provider/akash/inventory/v1/cluster.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "akash/inventory/v1/node.proto"; import "akash/inventory/v1/storage.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // Cluster reports inventory across entire cluster message Cluster { diff --git a/proto/provider/akash/inventory/v1/cpu.proto b/proto/provider/akash/inventory/v1/cpu.proto index 46c82234..1e1d0929 100644 --- a/proto/provider/akash/inventory/v1/cpu.proto +++ b/proto/provider/akash/inventory/v1/cpu.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "akash/inventory/v1/resourcepair.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // leave it commented for now. having it as true used to cause issues with GRPC reflection. // it seems to work for now diff --git a/proto/provider/akash/inventory/v1/gpu.proto b/proto/provider/akash/inventory/v1/gpu.proto index 7f35edfb..4285903b 100644 --- a/proto/provider/akash/inventory/v1/gpu.proto +++ b/proto/provider/akash/inventory/v1/gpu.proto @@ -5,7 +5,7 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/resourcepair.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // GPUInfo reports GPU details message GPUInfo { diff --git a/proto/provider/akash/inventory/v1/memory.proto b/proto/provider/akash/inventory/v1/memory.proto index 287dcf26..936e88e2 100644 --- a/proto/provider/akash/inventory/v1/memory.proto +++ b/proto/provider/akash/inventory/v1/memory.proto @@ -5,7 +5,7 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/resourcepair.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // MemoryInfo reports Memory details message MemoryInfo { diff --git a/proto/provider/akash/inventory/v1/node.proto b/proto/provider/akash/inventory/v1/node.proto index 6a796560..605b9a47 100644 --- a/proto/provider/akash/inventory/v1/node.proto +++ b/proto/provider/akash/inventory/v1/node.proto @@ -4,7 +4,7 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/resources.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // NodeCapabilities extended list of node capabilities message NodeCapabilities { diff --git a/proto/provider/akash/inventory/v1/resourcepair.proto b/proto/provider/akash/inventory/v1/resourcepair.proto index 9f036d8f..fd0a832b 100644 --- a/proto/provider/akash/inventory/v1/resourcepair.proto +++ b/proto/provider/akash/inventory/v1/resourcepair.proto @@ -3,10 +3,10 @@ syntax = "proto3"; package akash.inventory.v1; import "gogoproto/gogo.proto"; -import "akash/base/v1beta3/attribute.proto"; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "akash/base/attributes/v1/attribute.proto"; +import "k8s/io/apimachinery/pkg/api/resource/generated.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // ResourcePair to extents resource.Quantity to provide total and available units of the resource message ResourcePair { @@ -24,9 +24,9 @@ message ResourcePair { (gogoproto.jsontag) = "allocated", (gogoproto.moretags) = "yaml:\"allocated\"" ]; - repeated akash.base.v1beta3.Attribute attributes = 3 [ + repeated akash.base.attributes.v1.Attribute attributes = 3 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/node/types/v1beta3.Attributes", + (gogoproto.castrepeated) = "pkg.akt.io/go/node/types/attributes/v1.Attributes", (gogoproto.jsontag) = "attributes,omitempty", (gogoproto.moretags) = "yaml:\"attributes,omitempty\"" ]; diff --git a/proto/provider/akash/inventory/v1/resources.proto b/proto/provider/akash/inventory/v1/resources.proto index 9e30fd16..9b4dd30d 100644 --- a/proto/provider/akash/inventory/v1/resources.proto +++ b/proto/provider/akash/inventory/v1/resources.proto @@ -7,7 +7,7 @@ import "akash/inventory/v1/gpu.proto"; import "akash/inventory/v1/memory.proto"; import "akash/inventory/v1/resourcepair.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // NodeResources reports node inventory details message NodeResources { diff --git a/proto/provider/akash/inventory/v1/service.proto b/proto/provider/akash/inventory/v1/service.proto index 3e319209..181d52e5 100644 --- a/proto/provider/akash/inventory/v1/service.proto +++ b/proto/provider/akash/inventory/v1/service.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "akash/inventory/v1/node.proto"; import "akash/inventory/v1/cluster.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // NodeRPC defines the RPC server of node diff --git a/proto/provider/akash/inventory/v1/storage.proto b/proto/provider/akash/inventory/v1/storage.proto index de39e9ce..b75d415a 100644 --- a/proto/provider/akash/inventory/v1/storage.proto +++ b/proto/provider/akash/inventory/v1/storage.proto @@ -5,7 +5,7 @@ package akash.inventory.v1; import "gogoproto/gogo.proto"; import "akash/inventory/v1/resourcepair.proto"; -option go_package = "github.com/akash-network/akash-api/go/inventory/v1"; +option go_package = "pkg.akt.io/go/inventory/v1"; // StorageInfo reports Storage details message StorageInfo { diff --git a/proto/provider/akash/manifest/v2beta1/group.proto b/proto/provider/akash/manifest/v2beta1/group.proto deleted file mode 100644 index 009a346a..00000000 --- a/proto/provider/akash/manifest/v2beta1/group.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package akash.manifest.v2beta1; - -import "gogoproto/gogo.proto"; -import "akash/manifest/v2beta1/service.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta1"; - -// Group store name and list of services -message Group { - // getters must be implemented as value receiver - // due to GetName collision - option (gogoproto.goproto_getters) = false; - string name = 1 [ - (gogoproto.jsontag) = "name", - (gogoproto.moretags) = "yaml:\"name\"" - ]; - repeated Service services = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "services", - (gogoproto.moretags) = "yaml:\"services\"" - ]; -} diff --git a/proto/provider/akash/manifest/v2beta1/httpoptions.proto b/proto/provider/akash/manifest/v2beta1/httpoptions.proto deleted file mode 100644 index 1b090eb3..00000000 --- a/proto/provider/akash/manifest/v2beta1/httpoptions.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package akash.manifest.v2beta1; - -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/v2beta1"; - -// 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/v2beta1/service.proto b/proto/provider/akash/manifest/v2beta1/service.proto deleted file mode 100644 index f1a50c31..00000000 --- a/proto/provider/akash/manifest/v2beta1/service.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package akash.manifest.v2beta1; - -import "gogoproto/gogo.proto"; -import "akash/manifest/v2beta1/serviceexpose.proto"; -import "akash/base/v1beta2/resourceunits.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta1"; - -// 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.nullable) = false, - (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\"" - ]; - repeated string args = 4 [ - (gogoproto.jsontag) = "args", - (gogoproto.moretags) = "yaml:\"args\"" - ]; - repeated string env = 5 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "env", - (gogoproto.moretags) = "yaml:\"env\"" - ]; - akash.base.v1beta2.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.nullable) = false, - (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/v2beta1/serviceexpose.proto b/proto/provider/akash/manifest/v2beta1/serviceexpose.proto deleted file mode 100644 index 46d1d818..00000000 --- a/proto/provider/akash/manifest/v2beta1/serviceexpose.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package akash.manifest.v2beta1; - -import "gogoproto/gogo.proto"; -import "akash/manifest/v2beta1/httpoptions.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta1"; - -//// 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\"" - ]; - string proto = 3 [ - (gogoproto.casttype) = "ServiceProtocol", - (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.nullable) = false, - (gogoproto.customname) = "HTTPOptions", - (gogoproto.jsontag) = "httpOptions", - (gogoproto.moretags) = "yaml:\"httpOptions\"" - ]; - // The name of the IP address associated with this, if any - string ip = 8 [ - (gogoproto.customname) = "IP", - (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/akash/manifest/v2beta2/group.proto b/proto/provider/akash/manifest/v2beta2/group.proto deleted file mode 100644 index 9285eea2..00000000 --- a/proto/provider/akash/manifest/v2beta2/group.proto +++ /dev/null @@ -1,27 +0,0 @@ -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 { - // getters must be implemented as value receiver - // due to GetName collision - option (gogoproto.goproto_getters) = false; - string name = 1 [ - (gogoproto.jsontag) = "name", - (gogoproto.moretags) = "yaml:\"name\"" - ]; - repeated Service services = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "Services", - (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 deleted file mode 100644 index 919080fb..00000000 --- a/proto/provider/akash/manifest/v2beta2/httpoptions.proto +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index d3ce1f19..00000000 --- a/proto/provider/akash/manifest/v2beta2/service.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package akash.manifest.v2beta2; - -import "gogoproto/gogo.proto"; -import "akash/manifest/v2beta2/serviceexpose.proto"; -import "akash/base/v1beta3/resources.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.nullable) = false, - (gogoproto.jsontag) = "storage", - (gogoproto.moretags) = "yaml:\"storage\"" - ]; -} - -// Credentials to fetch image from registry -message ServiceImageCredentials { - string host = 1 [ - (gogoproto.jsontag) = "host", - (gogoproto.moretags) = "yaml:\"host\"" - ]; - string email = 2 [ - (gogoproto.jsontag) = "email", - (gogoproto.moretags) = "yaml:\"email\"" - ]; - string username = 3 [ - (gogoproto.jsontag) = "username", - (gogoproto.moretags) = "yaml:\"username\"" - ]; - string password = 4 [ - (gogoproto.jsontag) = "password", - (gogoproto.moretags) = "yaml:\"password\"" - ]; -} - -// 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\"" - ]; - repeated string args = 4 [ - (gogoproto.jsontag) = "args", - (gogoproto.moretags) = "yaml:\"args\"" - ]; - repeated string env = 5 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "env", - (gogoproto.moretags) = "yaml:\"env\"" - ]; - akash.base.v1beta3.Resources 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.nullable) = false, - (gogoproto.castrepeated) = "ServiceExposes", - (gogoproto.jsontag) = "expose", - (gogoproto.moretags) = "yaml:\"expose\"" - ]; - ServiceParams params = 9 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "params", - (gogoproto.moretags) = "yaml:\"params\"" - ]; - ServiceImageCredentials credentials = 10 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "credentials", - (gogoproto.moretags) = "yaml:\"credentials\"" - ]; -} diff --git a/proto/provider/akash/manifest/v2beta2/serviceexpose.proto b/proto/provider/akash/manifest/v2beta2/serviceexpose.proto deleted file mode 100644 index 40956f6c..00000000 --- a/proto/provider/akash/manifest/v2beta2/serviceexpose.proto +++ /dev/null @@ -1,71 +0,0 @@ -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 { - option (gogoproto.goproto_getters) = false; - - // 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\"" - ]; - string proto = 3 [ - (gogoproto.casttype) = "ServiceProtocol", - (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.nullable) = false, - (gogoproto.customname) = "HTTPOptions", - (gogoproto.jsontag) = "httpOptions", - (gogoproto.moretags) = "yaml:\"httpOptions\"" - ]; - // The name of the IP address associated with this, if any - string ip = 8 [ - (gogoproto.customname) = "IP", - (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/akash/manifest/v2beta3/group.proto b/proto/provider/akash/manifest/v2beta3/group.proto index 7b8dc4bd..799f9544 100644 --- a/proto/provider/akash/manifest/v2beta3/group.proto +++ b/proto/provider/akash/manifest/v2beta3/group.proto @@ -7,7 +7,7 @@ import "akash/manifest/v2beta3/service.proto"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta3"; +option go_package = "pkg.akt.io/go/manifest/v2beta3"; // Group store name and list of services message Group { diff --git a/proto/provider/akash/manifest/v2beta3/httpoptions.proto b/proto/provider/akash/manifest/v2beta3/httpoptions.proto index 8f7eced2..f30d45d4 100644 --- a/proto/provider/akash/manifest/v2beta3/httpoptions.proto +++ b/proto/provider/akash/manifest/v2beta3/httpoptions.proto @@ -6,7 +6,7 @@ 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/v2beta3"; +option go_package = "pkg.akt.io/go/manifest/v2beta3"; // ServiceExposeHTTPOptions message ServiceExposeHTTPOptions { diff --git a/proto/provider/akash/manifest/v2beta3/service.proto b/proto/provider/akash/manifest/v2beta3/service.proto index 55c02967..f3a04739 100644 --- a/proto/provider/akash/manifest/v2beta3/service.proto +++ b/proto/provider/akash/manifest/v2beta3/service.proto @@ -3,12 +3,13 @@ syntax = "proto3"; package akash.manifest.v2beta3; import "gogoproto/gogo.proto"; + import "akash/manifest/v2beta3/serviceexpose.proto"; -import "akash/base/resources/v1/resources.proto"; +import "akash/base/resources/v1beta4/resources.proto"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta3"; +option go_package = "pkg.akt.io/go/manifest/v2beta3"; // StorageParams message StorageParams { @@ -83,7 +84,7 @@ message Service { (gogoproto.jsontag) = "env", (gogoproto.moretags) = "yaml:\"env\"" ]; - akash.base.resources.v1.Resources resources = 6 [ + akash.base.resources.v1beta4.Resources resources = 6 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "resources", (gogoproto.moretags) = "yaml:\"resources\"" @@ -103,4 +104,9 @@ message Service { (gogoproto.jsontag) = "params,omitempty", (gogoproto.moretags) = "yaml:\"params,omitempty\"" ]; + ImageCredentials credentials = 10 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "credentials", + (gogoproto.moretags) = "yaml:\"credentials\"" + ]; } diff --git a/proto/provider/akash/manifest/v2beta3/serviceexpose.proto b/proto/provider/akash/manifest/v2beta3/serviceexpose.proto index 69736de5..50acd8a9 100644 --- a/proto/provider/akash/manifest/v2beta3/serviceexpose.proto +++ b/proto/provider/akash/manifest/v2beta3/serviceexpose.proto @@ -7,7 +7,7 @@ import "akash/manifest/v2beta3/httpoptions.proto"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = true; -option go_package = "github.com/akash-network/akash-api/go/manifest/v2beta3"; +option go_package = "pkg.akt.io/go/manifest/v2beta3"; // ServiceExpose stores exposed ports and hosts details message ServiceExpose { diff --git a/proto/provider/akash/provider/lease/v1/service.proto b/proto/provider/akash/provider/lease/v1/service.proto index f7f26f8d..33793780 100644 --- a/proto/provider/akash/provider/lease/v1/service.proto +++ b/proto/provider/akash/provider/lease/v1/service.proto @@ -1,11 +1,12 @@ syntax = "proto3"; package akash.provider.lease.v1; -import "akash/manifest/v2beta2/group.proto"; -import "akash/market/v1beta4/lease.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/akash-network/akash-api/go/provider/lease/v1"; +import "akash/manifest/v2beta3/group.proto"; +import "akash/market/v1/lease.proto"; + +option go_package = "pkg.akt.io/go/provider/lease/v1"; // LeaseServiceStatus message LeaseServiceStatus { @@ -88,14 +89,14 @@ message ServiceStatus { // SendManifestRequest is request type for the SendManifest Providers RPC method message SendManifestRequest { - akash.market.v1beta4.LeaseID lease_id = 1 [ + akash.market.v1.LeaseID lease_id = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "LeaseID", (gogoproto.moretags) = "yaml:\"LeaseID\"" ]; - repeated akash.manifest.v2beta2.Group manifest = 2 [ - (gogoproto.castrepeated) = "github.com/akash-network/akash-api/go/manifest/v2beta2.Manifest", + repeated akash.manifest.v2beta3.Group manifest = 2 [ + (gogoproto.castrepeated) = "pkg.akt.io/go/manifest/v2beta3.Manifest", (gogoproto.nullable) = false, (gogoproto.customname) = "Manifest", (gogoproto.jsontag) = "manifest", @@ -108,7 +109,7 @@ message SendManifestResponse {} // ServiceLogsRequest message ServiceLogsRequest { - akash.market.v1beta4.LeaseID lease_id = 1 [ + akash.market.v1.LeaseID lease_id = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "LeaseID", (gogoproto.moretags) = "yaml:\"LeaseID\"" @@ -141,7 +142,7 @@ message ServiceLogsResponse { // ShellRequest message ShellRequest { - akash.market.v1beta4.LeaseID lease_id = 1 [ + akash.market.v1.LeaseID lease_id = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "LeaseID", (gogoproto.moretags) = "yaml:\"LeaseID\"" @@ -150,7 +151,7 @@ message ShellRequest { // ServiceStatusRequest message ServiceStatusRequest { - akash.market.v1beta4.LeaseID lease_id = 1 [ + akash.market.v1.LeaseID lease_id = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "LeaseID", (gogoproto.moretags) = "yaml:\"LeaseID\"" diff --git a/proto/provider/akash/provider/v1/service.proto b/proto/provider/akash/provider/v1/service.proto index 1abb2985..4d2947d2 100644 --- a/proto/provider/akash/provider/v1/service.proto +++ b/proto/provider/akash/provider/v1/service.proto @@ -3,9 +3,10 @@ package akash.provider.v1; import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; + import "akash/provider/v1/status.proto"; -option go_package = "github.com/akash-network/akash-api/go/provider/v1"; +option go_package = "pkg.akt.io/go/provider/v1"; // ProviderRPC defines the RPC server for provider service ProviderRPC { diff --git a/proto/provider/akash/provider/v1/status.proto b/proto/provider/akash/provider/v1/status.proto index d0a304e7..79459cef 100644 --- a/proto/provider/akash/provider/v1/status.proto +++ b/proto/provider/akash/provider/v1/status.proto @@ -1,12 +1,11 @@ syntax = "proto3"; package akash.provider.v1; -import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; import "akash/inventory/v1/cluster.proto"; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; +import "k8s/io/apimachinery/pkg/api/resource/generated.proto"; -option go_package = "github.com/akash-network/akash-api/go/provider/v1"; +option go_package = "pkg.akt.io/go/provider/v1"; // ResourceMetrics message ResourcesMetric { @@ -177,11 +176,11 @@ message Status { (gogoproto.moretags) = "yaml:\"public_hostnames\"" ]; - google.protobuf.Timestamp timestamp = 6 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.customname) = "Timestamp", - (gogoproto.jsontag) = "timestamp", - (gogoproto.moretags) = "yaml:\"timestamp\"" - ]; +// google.protobuf.Timestamp timestamp = 6 [ +// (gogoproto.nullable) = false, +// (gogoproto.stdtime) = true, +// (gogoproto.customname) = "Timestamp", +// (gogoproto.jsontag) = "timestamp", +// (gogoproto.moretags) = "yaml:\"timestamp\"" +// ]; } diff --git a/proto/provider/buf.gen.doc.yaml b/proto/provider/buf.gen.doc.yaml new file mode 100644 index 00000000..eeb85a3c --- /dev/null +++ b/proto/provider/buf.gen.doc.yaml @@ -0,0 +1,6 @@ +version: v1 +plugins: + - name: doc + strategy: all + out: ./docs/proto + opt: ./docs/protodoc-markdown.tmpl,provider.md diff --git a/proto/provider/buf.lock b/proto/provider/buf.lock index c91b5810..78a35732 100644 --- a/proto/provider/buf.lock +++ b/proto/provider/buf.lock @@ -1,2 +1,28 @@ # Generated by buf. DO NOT EDIT. version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 954f7b05f38440fc8250134b15adec47 + digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 74015a8aeb8445aa9e3e1454cb54bc35 + digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13 + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: 3186086b2a8e44d9acdeeef2423c5de7 + digest: shake256:3b9dc2f56d9ed2e4001f95b701985fd803f7e2559b19b6a18d5f4e792cfdde320e765638de69fff037edc202b0006532d7ff19eab9465526b5ec628e4a5e5a1a diff --git a/proto/provider/buf.yaml b/proto/provider/buf.yaml index 3c1f7e5b..05bf8c9e 100644 --- a/proto/provider/buf.yaml +++ b/proto/provider/buf.yaml @@ -3,10 +3,11 @@ version: v1 name: buf.build/akash-network/provider deps: - buf.build/akash-network/node -# - buf.build/cosmos/cosmos-proto -# - buf.build/cosmos/cosmos-sdk -# - buf.build/cosmos/gogo-proto -# - buf.build/googleapis/googleapis + - buf.build/cosmos/gogo-proto + - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/cosmos-proto + - buf.build/googleapis/googleapis + - buf.build/protocolbuffers/wellknowntypes lint: allow_comment_ignores: true use: diff --git a/script/protoc-gen-swagger.sh b/script/protoc-gen-swagger.sh deleted file mode 100755 index 76e64376..00000000 --- a/script/protoc-gen-swagger.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/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.yaml \ - -o ./docs/swagger-ui/swagger.yaml \ - --continueOnConflictingPaths=true \ - --includeDefinitions=true diff --git a/script/protocgen-legacy.sh b/script/protocgen-legacy.sh deleted file mode 100755 index 47640598..00000000 --- a/script/protocgen-legacy.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -PATH=$(pwd)/.cache/bin/legacy:$PATH -export PATH=$PATH - -function cleanup { - # put absolute path - rm -rf "${AKASH_ROOT}/github.com" - rm -rf "$AKASH_DEVCACHE_TS_TMP_GRPC_JS" - rm -rf "${AKASH_DEVCACHE_TS_TMP_PATCHES}" -} - -trap cleanup EXIT ERR - -mkdir -p "${AKASH_DEVCACHE_TS_TMP_GRPC_JS}" -mkdir -p "${AKASH_DEVCACHE_TS_TMP_PATCHES}" - -script/ts-patches.sh preserve - -ts_generated="${AKASH_TS_ROOT}/src/generated" -rm -rf "$ts_generated" -mkdir -p "$ts_generated" - -proto_dirs=$(find ./proto/node -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -#shellcheck disable=SC2046 -for dir in $proto_dirs; do - .cache/bin/protoc \ - -I "proto/node" \ - -I ".cache/include/google/protobuf" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - # command to generate gRPC gateway (*.pb.gw.go in respective modules) files - .cache/bin/protoc \ - -I "proto/node" \ - -I ".cache/include" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - .cache/bin/protoc \ - -I ".cache/include/google/protobuf" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --plugin="${AKASH_TS_NODE_BIN}/protoc-gen-ts_proto" \ - --ts_proto_out="${AKASH_TS_ROOT}/src/generated" \ - --ts_proto_opt="esModuleInterop=true,forceLong=long,outputTypeRegistry=true,useExactTypes=false,outputIndex=true" \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - .cache/bin/protoc \ - -I ".cache/include/google/protobuf" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --plugin="${AKASH_TS_NODE_BIN}/protoc-gen-ts_proto" \ - --ts_proto_out="$AKASH_DEVCACHE_TS_TMP_GRPC_JS" \ - --ts_proto_opt="esModuleInterop=true,forceLong=long,outputTypeRegistry=true,useExactTypes=false,outputServices=grpc-js" \ - $(find "${dir}" -maxdepth 1 -name '*.proto') -done - -proto_dirs=$(find ./proto/provider -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -#shellcheck disable=SC2046 -for dir in $proto_dirs; do - .cache/bin/protoc \ - -I "proto/provider" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - -I "vendor" \ - --gocosmos_out=plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - # command to generate gRPC gateway (*.pb.gw.go in respective modules) files - .cache/bin/protoc \ - -I "proto/provider" \ - -I "proto/node" \ - -I ".cache/include" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - .cache/bin/protoc \ - -I "proto/provider" \ - -I ".cache/include" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --plugin="${AKASH_TS_NODE_BIN}/protoc-gen-ts_proto" \ - --ts_proto_out="${AKASH_TS_ROOT}/src/generated" \ - --ts_proto_opt="esModuleInterop=true,forceLong=long,outputTypeRegistry=true,useExactTypes=false,outputIndex=true" \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - .cache/bin/protoc \ - -I "proto/provider" \ - -I ".cache/include" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --plugin="${AKASH_TS_NODE_BIN}/protoc-gen-ts_proto" \ - --ts_proto_out="$AKASH_DEVCACHE_TS_TMP_GRPC_JS" \ - --ts_proto_opt="esModuleInterop=true,forceLong=long,outputTypeRegistry=true,useExactTypes=false,outputServices=grpc-js" \ - $(find "${dir}" -maxdepth 1 -name '*.proto') -done - -# merge generated grpc-js services to the main generated directory -ts_grpc_js_services=$(find "$AKASH_DEVCACHE_TS_TMP_GRPC_JS" -name 'service.ts') - -for file in $ts_grpc_js_services; do - dest_path=$(dirname "${file/$AKASH_DEVCACHE_TS_TMP_GRPC_JS/$AKASH_TS_ROOT\/src\/generated}") - dest_file="${dest_path}/service.grpc-js.ts" - - mv "$file" "$dest_file" - - path_from_gen_dir=${dest_file#"${AKASH_TS_ROOT}/src/generated/"} - index_file_name_base=${path_from_gen_dir%/service.grpc-js.ts} - index_file_name="index.${index_file_name_base//\//.}.grpc-js.ts" - index_file_path="${AKASH_TS_ROOT}/src/generated/$index_file_name" - export_statement="export * from \"./${path_from_gen_dir%.ts}\";" - - echo "$export_statement" > "$index_file_path" -done - -# move proto files to the right places -cp -rv github.com/akash-network/akash-api/* ./ - -# shellcheck disable=SC2046 -.cache/bin/protoc \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - --doc_out=./docs/proto \ - --doc_opt=./docs/protodoc-markdown.tmpl,node.md \ - $(find "./proto/node" -maxdepth 4 -name '*.proto') - -# shellcheck disable=SC2046 -.cache/bin/protoc \ - -I "proto/provider" \ - -I "proto/node" \ - -I "vendor/github.com/cosmos/cosmos-sdk/proto" \ - -I "vendor/github.com/cosmos/cosmos-sdk/third_party/proto" \ - -I "vendor" \ - --doc_out=./docs/proto \ - --doc_opt=./docs/protodoc-markdown.tmpl,provider.md \ - $(find "./proto/provider" -maxdepth 4 -name '*.proto') - -script/ts-patches.sh restore - -npm run format --prefix "$AKASH_TS_ROOT" diff --git a/script/protocgen.sh b/script/protocgen.sh index 7c05ab6e..b63607b1 100755 --- a/script/protocgen.sh +++ b/script/protocgen.sh @@ -2,22 +2,187 @@ set -eo pipefail +if [[ $# -ne 3 ]]; then + echo "invalid number of parameters" + exit 1 +fi + +#SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" + PATH=$(pwd)/.cache/bin:$PATH export PATH=$PATH -function cleanup { - rm -rf github.com +function gen() { + proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) + + for dir in $proto_dirs; do + while IFS= read -r -d '' file; do + buf generate --template "$1" "$file" + done < <(find "${dir}" -maxdepth 1 -name '*.proto' -print0) + done +} + +function gen_go() { + IFS=/ read -r pkg_domain _ <<<"$1" + + function cleanup_go() { + rm -rf "$pkg_domain" + } + + trap cleanup_go EXIT ERR + + gen buf.gen.go.yaml + + set -x + cp -r ./$1/* ./$2/ } -trap cleanup EXIT +function ts_patches() { + local generated_dir + local tmp_dir + + generated_dir="$AKASH_TS_ROOT/src/generated" + tmp_dir="$AKASH_DEVCACHE_TMP_TS_PATCHES" + + if [ ! -d "$generated_dir" ]; then + return 0 + fi + + function cleanup() { + rm -rf "$tmp_dir" + } + + case $1 in + preserve) + echo "Preserving TypeScript patches..." + + find "$generated_dir" -type f -name "*.original.ts" | while read -r src_file; do + local gen_dir + local file + local tmp_file + + src_file=${src_file//.original/} + gen_dir=$(dirname "$src_file") + gen_dir=${gen_dir//$generated_dir\//} + file=$(basename "$src_file" .original.ts) + mkdir -p "$tmp_dir/$gen_dir" + tmp_file="$tmp_dir/$gen_dir/$file" + + echo "Preserving $src_file to $tmp_file" + cp "$src_file" "$tmp_file" + done + + ;; + restore) + trap cleanup EXIT ERR + + echo "Restoring TypeScript patches..." + + find "$tmp_dir" -type f -name "*.ts" | while read -r src_file; do + local original_file_path + local renamed_original_file_path + + original_file_path=${src_file/$tmp_dir\//} + renamed_original_file_path="${original_file_path/.ts/.original.ts}" + + echo "Restoring $original_file_path to $generated_dir/$original_file_path" + + mv "$generated_dir/$original_file_path" "$generated_dir/$renamed_original_file_path" + mv "$tmp_dir/$original_file_path" "$generated_dir/$original_file_path" + done + ;; + *) + echo "Invalid argument. Use 'preserve' or 'restore'." + exit 1 + ;; + esac +} -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 +function gen_ts() { + function cleanup_ts { + rm -rf "${AKASH_DEVCACHE_TMP_TS_GRPC_JS}" + rm -rf "${AKASH_DEVCACHE_TMP_TS_PATCHES}" + } + + trap cleanup_ts EXIT ERR + + mkdir -p "${AKASH_DEVCACHE_TMP_TS_GRPC_JS}" + mkdir -p "${AKASH_DEVCACHE_TMP_TS_PATCHES}" + + ts_patches preserve + + gen buf.gen.ts.yaml + + local ts_grpc_js_services + + # merge generated grpc-js services to the main generated directory + ts_grpc_js_services=$(find "$AKASH_DEVCACHE_TMP_TS_GRPC_JS" -name 'service.ts') + + for file in $ts_grpc_js_services; do + dest_path=$(dirname "${file/$AKASH_DEVCACHE_TMP_TS_GRPC_JS/$AKASH_TS_ROOT\/src\/generated}") + dest_file="${dest_path}/service.grpc-js.ts" + + mv "$file" "$dest_file" + + path_from_gen_dir=${dest_file#"${AKASH_TS_ROOT}/src/generated/"} + index_file_name_base=${path_from_gen_dir%/service.grpc-js.ts} + index_file_name="index.${index_file_name_base//\//.}.grpc-js.ts" + index_file_path="${AKASH_TS_ROOT}/src/generated/$index_file_name" + export_statement="export * from \"./${path_from_gen_dir%.ts}\";" + + echo "$export_statement" > "$index_file_path" + done + + ts_patches restore + + npm run format --prefix "$AKASH_TS_ROOT" +} + +function gen_doc() { + local workdir + + workdir=$AKASH_DEVCACHE_TMP/swagger-gen + + function cleanup { + rm -rf "$workdir" + } + + # clean swagger files + trap cleanup EXIT ERR + + buf generate --template ./proto/node/buf.gen.doc.yaml ./proto/node 2> /dev/null + buf generate --template ./proto/provider/buf.gen.doc.yaml ./proto/provider 2> /dev/null + + 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.yaml \ + -o ./docs/swagger-ui/swagger.yaml \ + --continueOnConflictingPaths=true \ + --includeDefinitions=true +} -# move proto files to the right places -cp -rv github.com/akash-network/akash-api/* ./ +case $1 in + go) + shift + gen_go "$@" + ;; + ts) + gen_ts + ;; + doc) + gen_doc + ;; + *) + echo "Invalid argument" + exit 1 + ;; +esac diff --git a/script/tools.sh b/script/tools.sh index 7126c582..e4343068 100755 --- a/script/tools.sh +++ b/script/tools.sh @@ -1,22 +1,41 @@ #!/usr/bin/env bash -set -o pipefail +set -eo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" SEMVER=$SCRIPT_DIR/semver.sh -gomod="$SCRIPT_DIR/../go.mod" +GO_PKG=$(realpath "$SCRIPT_DIR/../go") + +gomod="$GO_PKG/go.mod" function get_gotoolchain() { local gotoolchain local goversion + local local_goversion + + set +o pipefail + gotoolchain=$(grep -E '^toolchain go[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$' "$gomod" | cut -d ' ' -f 2 | tr -d '\n') + goversion=$(grep -E '^go [0-9]{1,}.[0-9]{1,}(.[0-9]{1,})?$' "$gomod" | cut -d ' ' -f 2 | tr -d '\n') - gotoolchain=$(grep -E '^toolchain go[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$' < "$gomod" | cut -d ' ' -f 2 | tr -d '\n') + set -o pipefail if [[ ${gotoolchain} == "" ]]; then # determine go toolchain from go version in go.mod if which go > /dev/null 2>&1 ; then - goversion=$(GOTOOLCHAIN=local go version | cut -d ' ' -f 3 | sed 's/go*//' | tr -d '\n') + local_goversion=$(GOTOOLCHAIN=local go version | cut -d ' ' -f 3 | sed 's/go*//' | tr -d '\n') + if [[ $($SEMVER compare "v$local_goversion" v"$goversion") -ge 0 ]]; then + goversion=$local_goversion + else + local_goversion= + fi + fi + + if [[ "$local_goversion" == "" ]]; then + goversion=$(curl -s "https://go.dev/dl/?mode=json&include=all" | \ + jq -r --arg regexp "^go$goversion" '.[] | select(.stable == true) | select(.version | match($regexp)) | .version' | \ + head -n 1 | \ + sed -e s/^go//) fi if [[ $goversion != "" ]] && [[ $($SEMVER compare "v$goversion" v1.21.0) -ge 0 ]]; then @@ -31,45 +50,49 @@ function get_gotoolchain() { replace_paths() { local file="${1}" - local cversion="${2}" - local nversion="${3}" + local cimport="${2}" + local nimport="${3}" local sedcmd=sed if [[ "$OSTYPE" == "darwin"* ]]; then sedcmd=gsed fi - $sedcmd -ri "s/github.com\/akash-network\/node\/(v${cversion})?/github.com\/akash-network\/node\/v${nversion}\//g" "${file}" + $sedcmd -ri "s~$cimport~$nimport~" "${file}" } function replace_import_path() { local next_major_version=$1 - local import_path_to_replace - import_path_to_replace=$(go list -m) + local curr_module_name + local curr_version + local new_module_name - local version_to_replace - version_to_replace=$(echo "$import_path_to_replace" | sed -n 's/.*v\([0-9]*\).*/\1/p') + curr_module_name=$(cd go; go list -m) + curr_version=$(echo "$curr_module_name" | sed -n 's/.*v\([0-9]*\).*/\1/p') + new_module_name=${curr_module_name%/v$curr_version}/$next_major_version - echo "$version_to_replace" - echo Current import paths are "$version_to_replace", replacing with "$next_major_version" + echo "current import paths are $curr_module_name, replacing with $new_module_name" - # list all folders containing Go modules. -# local modules -# modules=$(go list -tags e2e ./... | sed "s/g.*v${version_to_replace}\///") + declare -a modules_to_upgrade_manually - while IFS= read -r line; do - modules_to_upgrade_manually+=("$line") - done < <(find . -name go.mod -exec grep -l "github.com/akash-network/node" {} \; | grep -v "^./go.mod$" | sed 's|/go.mod||' | sed 's|^./||') + modules_to_upgrade_manually+=("./go/go.mod") - echo "Replacing import paths in all files" + echo "preparing files to replace" declare -a files while IFS= read -r line; do files+=("$line") - done < <(find . -type f -not \(-path "./install.sh" -or -path "./upgrades/software/*" -or -path "./upgrades/heightpatches/*" -or -path "./.cache/*" -or -path "./dist/*" -or -path "./.git*" -or -name "*.md" -or -path "./.idea/*" \)) + done < <(find . -type f -not \( \ + -path "./install.sh" \ + -or -path "./upgrades/*" \ + -or -path "./.cache/*" \ + -or -path "./dist/*" \ + -or -path "./.git*" \ + -or -name "*.md" \ + -or -path "./.idea/*" \)) -# echo "Updating all files" + echo "updating all files" for file in "${files[@]}"; do if test -f "$file"; then @@ -79,28 +102,23 @@ function replace_import_path() { continue 2 fi done - replace_paths "$file" "$version_to_replace" "$next_major_version" + + replace_paths "$file" "\"$curr_module_name" "\"$new_module_name" fi done -# exit 0 - -# echo "Updating go.mod and vendoring" - # go.mod -# replace_paths "go.mod" -# go mod tidy >/dev/null -# go mod vendor >/dev/null - - # ensure that generated files are updated. - # N.B.: This must be run after go mod vendor. -# echo "running make proto-gen" -# make proto-gen >/dev/null -# -# echo "Run go mod vendor after proto-gen to avoid vendoring issues" -# go mod vendor >/dev/null -# -# echo "running make run-querygen" -# make run-querygen >/dev/null + echo "updating go.mod" + for retract in $(cd go; go mod edit --json | jq -cr '.Retract | if . != null then .[] else empty end'); do + local low + local high + + low=$(jq -r '.Low' <<<"$retract") + high=$(jq -r '.High' <<<"$retract") + echo " dropping retract: [$low, $high]" + go mod edit -dropretract=["$low","$high"] + done + + replace_paths "./go/go.mod" "$curr_module_name" "$new_module_name" } case "$1" in diff --git a/script/ts-patches.sh b/script/ts-patches.sh deleted file mode 100755 index 6ba4e575..00000000 --- a/script/ts-patches.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -generated_dir="$AKASH_TS_ROOT/src/generated" -tmp_dir="$AKASH_DEVCACHE_TS_TMP_PATCHES" - -if [ ! -d "$generated_dir" ]; then - echo "Directory $generated_dir does not exist. Skipping..." - exit 0 -fi - -preserve_patches() { - echo "Preserving TypeScript patches..." - - find "$generated_dir" -type f -name "*.original.ts" | while read -r src_file; do - src_file=${src_file//.original/} - gen_dir=$(dirname "$src_file") - gen_dir=${gen_dir//$generated_dir\//} - file=$(basename "$src_file" .original.ts) - mkdir -p "$tmp_dir/$gen_dir" - tmp_file="$tmp_dir/$gen_dir/$file" - - echo "Preserving $src_file to $tmp_file" - cp "$src_file" "$tmp_file" - done -} - -function cleanup { - rm -rf "$tmp_dir" -} - -restore_patches() { - trap cleanup EXIT ERR - - echo "Restoring TypeScript patches..." - find "$tmp_dir" -type f -name "*.ts" | while read -r src_file; do - original_file_path=${src_file/$tmp_dir\//} - renamed_original_file_path="${original_file_path/.ts/.original.ts}" - echo "Restoring $original_file_path to $generated_dir/$original_file_path" - - mv "$generated_dir/$original_file_path" "$generated_dir/$renamed_original_file_path" - mv "$tmp_dir/$original_file_path" "$generated_dir/$original_file_path" - done -} - -case $1 in -preserve) - preserve_patches - ;; -restore) - restore_patches - ;; -*) - echo "Invalid argument. Use 'preserve' or 'restore'." - exit 1 - ;; -esac diff --git a/tools.go b/tools.go deleted file mode 100644 index 62b9f5de..00000000 --- a/tools.go +++ /dev/null @@ -1,17 +0,0 @@ -//go:build tools -// +build tools - -package api - -import ( - _ "github.com/99designs/keyring" - _ "github.com/grpc-ecosystem/grpc-gateway/runtime" - _ "google.golang.org/grpc" - - _ "github.com/btcsuite/btcd/chaincfg/chainhash" - - _ "github.com/pseudomuto/protoc-gen-doc" - - // TODO https://github.com/akash-network/support/issues/77 - _ "github.com/regen-network/cosmos-proto/protoc-gen-gocosmos" -)