From af211da3b88827b2bc32a01fa4812d800a31068b Mon Sep 17 00:00:00 2001 From: ctrl-felix <62290842+ctrl-Felix@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:00:05 +0200 Subject: [PATCH] add akash --- README.md | 1 + .../akash/audit/v1beta1/audit.proto | 99 +++++++++++ .../akash/audit/v1beta2/audit.proto | 99 +++++++++++ .../akash/audit/v1beta2/genesis.proto | 13 ++ .../akash/audit/v1beta2/query.proto | 79 +++++++++ .../akash/base/v1beta1/attribute.proto | 41 +++++ .../akash/base/v1beta1/endpoint.proto | 19 +++ .../akash/base/v1beta1/resource.proto | 68 ++++++++ .../akash/base/v1beta1/resourcevalue.proto | 12 ++ .../akash/base/v1beta2/attribute.proto | 41 +++++ .../akash/base/v1beta2/endpoint.proto | 23 +++ .../akash/base/v1beta2/resource.proto | 56 +++++++ .../akash/base/v1beta2/resourceunits.proto | 37 +++++ .../akash/base/v1beta2/resourcevalue.proto | 15 ++ .../akash/cert/v1beta2/cert.proto | 118 +++++++++++++ .../akash/cert/v1beta2/genesis.proto | 31 ++++ .../akash/cert/v1beta2/query.proto | 50 ++++++ .../akash/deployment/v1beta1/authz.proto | 21 +++ .../akash/deployment/v1beta1/deployment.proto | 152 +++++++++++++++++ .../akash/deployment/v1beta1/genesis.proto | 33 ++++ .../akash/deployment/v1beta1/group.proto | 128 +++++++++++++++ .../akash/deployment/v1beta1/params.proto | 16 ++ .../akash/deployment/v1beta1/query.proto | 71 ++++++++ .../akash/deployment/v1beta2/authz.proto | 21 +++ .../akash/deployment/v1beta2/deployment.proto | 75 +++++++++ .../deployment/v1beta2/deploymentmsg.proto | 106 ++++++++++++ .../akash/deployment/v1beta2/genesis.proto | 39 +++++ .../akash/deployment/v1beta2/group.proto | 48 ++++++ .../akash/deployment/v1beta2/groupid.proto | 27 +++ .../akash/deployment/v1beta2/groupmsg.proto | 52 ++++++ .../akash/deployment/v1beta2/groupspec.proto | 31 ++++ .../akash/deployment/v1beta2/params.proto | 18 ++ .../akash/deployment/v1beta2/query.proto | 72 ++++++++ .../akash/deployment/v1beta2/resource.proto | 28 ++++ .../akash/deployment/v1beta2/service.proto | 31 ++++ .../akash/escrow/v1beta1/genesis.proto | 22 +++ .../akash/escrow/v1beta1/query.proto | 58 +++++++ .../akash/escrow/v1beta1/types.proto | 139 ++++++++++++++++ .../akash/escrow/v1beta2/genesis.proto | 22 +++ .../akash/escrow/v1beta2/query.proto | 58 +++++++ .../akash/escrow/v1beta2/types.proto | 155 ++++++++++++++++++ .../akash/inflation/v1beta2/genesis.proto | 16 ++ .../akash/inflation/v1beta2/params.proto | 37 +++++ .../akash/market/v1beta2/bid.proto | 109 ++++++++++++ .../akash/market/v1beta2/genesis.proto | 24 +++ .../akash/market/v1beta2/lease.proto | 117 +++++++++++++ .../akash/market/v1beta2/order.proto | 74 +++++++++ .../akash/market/v1beta2/params.proto | 21 +++ .../akash/market/v1beta2/query.proto | 123 ++++++++++++++ .../akash/market/v1beta2/service.proto | 24 +++ .../akash/provider/v1beta1/provider.proto | 120 ++++++++++++++ .../akash/provider/v1beta2/genesis.proto | 16 ++ .../akash/provider/v1beta2/provider.proto | 120 ++++++++++++++ .../akash/provider/v1beta2/query.proto | 44 +++++ .../protobuf/{any.proto => cosmos_any.proto} | 0 55 files changed, 3070 insertions(+) create mode 100644 cosmospy_protobuf/akash/audit/v1beta1/audit.proto create mode 100644 cosmospy_protobuf/akash/audit/v1beta2/audit.proto create mode 100644 cosmospy_protobuf/akash/audit/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/audit/v1beta2/query.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta1/attribute.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta1/endpoint.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta1/resource.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta1/resourcevalue.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta2/attribute.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta2/endpoint.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta2/resource.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta2/resourceunits.proto create mode 100644 cosmospy_protobuf/akash/base/v1beta2/resourcevalue.proto create mode 100644 cosmospy_protobuf/akash/cert/v1beta2/cert.proto create mode 100644 cosmospy_protobuf/akash/cert/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/cert/v1beta2/query.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/authz.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/deployment.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/genesis.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/group.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/params.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta1/query.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/authz.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/deployment.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/deploymentmsg.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/group.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/groupid.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/groupmsg.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/groupspec.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/params.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/query.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/resource.proto create mode 100644 cosmospy_protobuf/akash/deployment/v1beta2/service.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta1/genesis.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta1/query.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta1/types.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta2/query.proto create mode 100644 cosmospy_protobuf/akash/escrow/v1beta2/types.proto create mode 100644 cosmospy_protobuf/akash/inflation/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/inflation/v1beta2/params.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/bid.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/lease.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/order.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/params.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/query.proto create mode 100644 cosmospy_protobuf/akash/market/v1beta2/service.proto create mode 100644 cosmospy_protobuf/akash/provider/v1beta1/provider.proto create mode 100644 cosmospy_protobuf/akash/provider/v1beta2/genesis.proto create mode 100644 cosmospy_protobuf/akash/provider/v1beta2/provider.proto create mode 100644 cosmospy_protobuf/akash/provider/v1beta2/query.proto rename cosmospy_protobuf/google/protobuf/{any.proto => cosmos_any.proto} (100%) diff --git a/README.md b/README.md index 6e1c9071..c8531228 100644 --- a/README.md +++ b/README.md @@ -45,5 +45,6 @@ Note: ## Other Cosmos based coins Currently following coins are supported by this library: * Akash +* Cosmos * Osmosis * Umee diff --git a/cosmospy_protobuf/akash/audit/v1beta1/audit.proto b/cosmospy_protobuf/akash/audit/v1beta1/audit.proto new file mode 100644 index 00000000..b27aabc2 --- /dev/null +++ b/cosmospy_protobuf/akash/audit/v1beta1/audit.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package akash.audit.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; + +option go_package = "github.com/ovrclk/akash/x/audit/types/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/ovrclk/akash/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/ovrclk/akash/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/ovrclk/akash/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/cosmospy_protobuf/akash/audit/v1beta2/audit.proto b/cosmospy_protobuf/akash/audit/v1beta2/audit.proto new file mode 100644 index 00000000..b91ac553 --- /dev/null +++ b/cosmospy_protobuf/akash/audit/v1beta2/audit.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; + +option go_package = "github.com/ovrclk/akash/x/audit/types/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/ovrclk/akash/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/ovrclk/akash/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/ovrclk/akash/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/cosmospy_protobuf/akash/audit/v1beta2/genesis.proto b/cosmospy_protobuf/akash/audit/v1beta2/genesis.proto new file mode 100644 index 00000000..0ee2345d --- /dev/null +++ b/cosmospy_protobuf/akash/audit/v1beta2/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/audit/v1beta2/audit.proto"; + +option go_package = "github.com/ovrclk/akash/x/audit/types/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/cosmospy_protobuf/akash/audit/v1beta2/query.proto b/cosmospy_protobuf/akash/audit/v1beta2/query.proto new file mode 100644 index 00000000..7b2ba77c --- /dev/null +++ b/cosmospy_protobuf/akash/audit/v1beta2/query.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; + +// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME + +package akash.audit.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/audit/v1beta2/audit.proto"; + +option go_package = "github.com/ovrclk/akash/x/audit/types/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/cosmospy_protobuf/akash/base/v1beta1/attribute.proto b/cosmospy_protobuf/akash/base/v1beta1/attribute.proto new file mode 100644 index 00000000..94cffe4c --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta1/attribute.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta1/endpoint.proto b/cosmospy_protobuf/akash/base/v1beta1/endpoint.proto new file mode 100644 index 00000000..809fba87 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta1/endpoint.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta1/resource.proto b/cosmospy_protobuf/akash/base/v1beta1/resource.proto new file mode 100644 index 00000000..ff0ed877 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta1/resource.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; +import "akash/base/v1beta1/resourcevalue.proto"; +import "akash/base/v1beta1/endpoint.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta1/resourcevalue.proto b/cosmospy_protobuf/akash/base/v1beta1/resourcevalue.proto new file mode 100644 index 00000000..86109943 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta1/resourcevalue.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package akash.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta2/attribute.proto b/cosmospy_protobuf/akash/base/v1beta2/attribute.proto new file mode 100644 index 00000000..f2d25fd9 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta2/attribute.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta2/endpoint.proto b/cosmospy_protobuf/akash/base/v1beta2/endpoint.proto new file mode 100644 index 00000000..4bc67171 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta2/endpoint.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta2/resource.proto b/cosmospy_protobuf/akash/base/v1beta2/resource.proto new file mode 100644 index 00000000..9768964d --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta2/resource.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; +import "akash/base/v1beta2/resourcevalue.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta2/resourceunits.proto b/cosmospy_protobuf/akash/base/v1beta2/resourceunits.proto new file mode 100644 index 00000000..97d866f1 --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta2/resourceunits.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/resource.proto"; +import "akash/base/v1beta2/endpoint.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/base/v1beta2/resourcevalue.proto b/cosmospy_protobuf/akash/base/v1beta2/resourcevalue.proto new file mode 100644 index 00000000..f7a2c3ba --- /dev/null +++ b/cosmospy_protobuf/akash/base/v1beta2/resourcevalue.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package akash.base.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/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/cosmospy_protobuf/akash/cert/v1beta2/cert.proto b/cosmospy_protobuf/akash/cert/v1beta2/cert.proto new file mode 100644 index 00000000..6c866562 --- /dev/null +++ b/cosmospy_protobuf/akash/cert/v1beta2/cert.proto @@ -0,0 +1,118 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/x/cert/types/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/cosmospy_protobuf/akash/cert/v1beta2/genesis.proto b/cosmospy_protobuf/akash/cert/v1beta2/genesis.proto new file mode 100644 index 00000000..fd44d7ec --- /dev/null +++ b/cosmospy_protobuf/akash/cert/v1beta2/genesis.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "akash/cert/v1beta2/cert.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/x/cert/types/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/cosmospy_protobuf/akash/cert/v1beta2/query.proto b/cosmospy_protobuf/akash/cert/v1beta2/query.proto new file mode 100644 index 00000000..7fce9908 --- /dev/null +++ b/cosmospy_protobuf/akash/cert/v1beta2/query.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package akash.cert.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/cert/v1beta2/cert.proto"; + +option go_package = "github.com/ovrclk/akash/x/cert/types/v1beta2"; + +// Query defines the gRPC querier service +service Query { + // Certificates queries certificates + rpc Certificates(QueryCertificatesRequest) returns (QueryCertificatesResponse) { + option (google.api.http).get = "/akash/cert/v1beta2/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/cosmospy_protobuf/akash/deployment/v1beta1/authz.proto b/cosmospy_protobuf/akash/deployment/v1beta1/authz.proto new file mode 100644 index 00000000..e1003e2a --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/authz.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/v1beta1"; + +// DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from +// the granter's account for a deployment. +message DepositDeploymentAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // SpendLimit is the amount the grantee is authorized to spend from the granter's account for + // the purpose of deployment. + cosmos.base.v1beta1.Coin spend_limit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "spend_limit" + ]; +} diff --git a/cosmospy_protobuf/akash/deployment/v1beta1/deployment.proto b/cosmospy_protobuf/akash/deployment/v1beta1/deployment.proto new file mode 100644 index 00000000..2698cc98 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/deployment.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta1/genesis.proto b/cosmospy_protobuf/akash/deployment/v1beta1/genesis.proto new file mode 100644 index 00000000..3c92c96f --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/genesis.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta1/deployment.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "akash/deployment/v1beta1/params.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta1/group.proto b/cosmospy_protobuf/akash/deployment/v1beta1/group.proto new file mode 100644 index 00000000..5bd313bc --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/group.proto @@ -0,0 +1,128 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/resource.proto"; +import "akash/base/v1beta1/attribute.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta1/params.proto b/cosmospy_protobuf/akash/deployment/v1beta1/params.proto new file mode 100644 index 00000000..faa0adea --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/params.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta1/query.proto b/cosmospy_protobuf/akash/deployment/v1beta1/query.proto new file mode 100644 index 00000000..60e810a7 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta1/query.proto @@ -0,0 +1,71 @@ +syntax = "proto3"; +package akash.deployment.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/deployment/v1beta1/deployment.proto"; +import "akash/deployment/v1beta1/group.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/authz.proto b/cosmospy_protobuf/akash/deployment/v1beta2/authz.proto new file mode 100644 index 00000000..992ad7f8 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/authz.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/deployment.proto b/cosmospy_protobuf/akash/deployment/v1beta2/deployment.proto new file mode 100644 index 00000000..d9409ab9 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/deployment.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/deploymentmsg.proto b/cosmospy_protobuf/akash/deployment/v1beta2/deploymentmsg.proto new file mode 100644 index 00000000..2f877995 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/deploymentmsg.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/genesis.proto b/cosmospy_protobuf/akash/deployment/v1beta2/genesis.proto new file mode 100644 index 00000000..f53751ad --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/genesis.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/group.proto"; +import "akash/deployment/v1beta2/params.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/group.proto b/cosmospy_protobuf/akash/deployment/v1beta2/group.proto new file mode 100644 index 00000000..20ce83ec --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/group.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupid.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/groupid.proto b/cosmospy_protobuf/akash/deployment/v1beta2/groupid.proto new file mode 100644 index 00000000..b95a83b4 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/groupid.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/groupmsg.proto b/cosmospy_protobuf/akash/deployment/v1beta2/groupmsg.proto new file mode 100644 index 00000000..c3883c17 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/groupmsg.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupid.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/groupspec.proto b/cosmospy_protobuf/akash/deployment/v1beta2/groupspec.proto new file mode 100644 index 00000000..3db687ad --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/groupspec.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; +import "akash/deployment/v1beta2/resource.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/params.proto b/cosmospy_protobuf/akash/deployment/v1beta2/params.proto new file mode 100644 index 00000000..6c2b695a --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/params.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/query.proto b/cosmospy_protobuf/akash/deployment/v1beta2/query.proto new file mode 100644 index 00000000..3f55d8bd --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/query.proto @@ -0,0 +1,72 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/deployment/v1beta2/deployment.proto"; +import "akash/deployment/v1beta2/group.proto"; +import "akash/deployment/v1beta2/groupid.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/resource.proto b/cosmospy_protobuf/akash/deployment/v1beta2/resource.proto new file mode 100644 index 00000000..512bcd14 --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/resource.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/resourceunits.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/deployment/v1beta2/service.proto b/cosmospy_protobuf/akash/deployment/v1beta2/service.proto new file mode 100644 index 00000000..a254f07b --- /dev/null +++ b/cosmospy_protobuf/akash/deployment/v1beta2/service.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package akash.deployment.v1beta2; + +import "akash/deployment/v1beta2/deploymentmsg.proto"; +import "akash/deployment/v1beta2/groupmsg.proto"; + +option go_package = "github.com/ovrclk/akash/x/deployment/types/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/cosmospy_protobuf/akash/escrow/v1beta1/genesis.proto b/cosmospy_protobuf/akash/escrow/v1beta1/genesis.proto new file mode 100644 index 00000000..ea828200 --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/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/cosmospy_protobuf/akash/escrow/v1beta1/query.proto b/cosmospy_protobuf/akash/escrow/v1beta1/query.proto new file mode 100644 index 00000000..41228f09 --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta1/query.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/escrow/v1beta1/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/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/cosmospy_protobuf/akash/escrow/v1beta1/types.proto b/cosmospy_protobuf/akash/escrow/v1beta1/types.proto new file mode 100644 index 00000000..0df98ab5 --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta1/types.proto @@ -0,0 +1,139 @@ +syntax = "proto3"; +package akash.escrow.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/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/cosmospy_protobuf/akash/escrow/v1beta2/genesis.proto b/cosmospy_protobuf/akash/escrow/v1beta2/genesis.proto new file mode 100644 index 00000000..b8e482e4 --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta2/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/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/cosmospy_protobuf/akash/escrow/v1beta2/query.proto b/cosmospy_protobuf/akash/escrow/v1beta2/query.proto new file mode 100644 index 00000000..40f9608c --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta2/query.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/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/cosmospy_protobuf/akash/escrow/v1beta2/types.proto b/cosmospy_protobuf/akash/escrow/v1beta2/types.proto new file mode 100644 index 00000000..2713fff3 --- /dev/null +++ b/cosmospy_protobuf/akash/escrow/v1beta2/types.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package akash.escrow.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/escrow/types/v1beta2"; + +// AccountID is the account identifier +message AccountID { + string scope = 1 [ + (gogoproto.jsontag) = "scope", + (gogoproto.moretags) = "yaml:\"scope\"" + ]; + string xid = 2 [ + (gogoproto.jsontag) = "xid", + (gogoproto.moretags) = "yaml:\"xid\"", + (gogoproto.customname) = "XID" + ]; +} + +// Account stores state for an escrow account +message Account { + + // State stores state for an escrow account + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // AccountStateInvalid is an invalid state + invalid = 0 [(gogoproto.enumvalue_customname) = "AccountStateInvalid"]; + // AccountOpen is the state when an account is open + open = 1 [(gogoproto.enumvalue_customname) = "AccountOpen"]; + // AccountClosed is the state when an account is closed + closed = 2 [(gogoproto.enumvalue_customname) = "AccountClosed"]; + // AccountOverdrawn is the state when an account is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "AccountOverdrawn"]; + } + + // unique identifier for this escrow account + AccountID id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "id", + (gogoproto.moretags) = "yaml:\"id\"", + (gogoproto.customname) = "ID" + ]; + + // bech32 encoded account address of the owner of this escrow account + string owner = 2 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + // current state of this escrow account + State state = 3 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + // unspent coins received from the owner's wallet + cosmos.base.v1beta1.DecCoin balance = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + // total coins spent by this account + cosmos.base.v1beta1.DecCoin transferred = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "transferred", + (gogoproto.moretags) = "yaml:\"transferred\"" + ]; + + // block height at which this account was last settled + int64 settled_at = 6 [ + (gogoproto.jsontag) = "settledAt", + (gogoproto.moretags) = "yaml:\"settledAt\"", + (gogoproto.customname) = "SettledAt" + ]; + + // bech32 encoded account address of the depositor. + // If depositor is same as the owner, then any incoming coins are added to the Balance. + // If depositor isn't same as the owner, then any incoming coins are added to the Funds. + string depositor = 7 [ + (gogoproto.jsontag) = "depositor", + (gogoproto.moretags) = "yaml:\"depositor\"" + ]; + + // Funds are unspent coins received from the (non-Owner) Depositor's wallet. + // If there are any funds, they should be spent before spending the Balance. + cosmos.base.v1beta1.DecCoin funds = 8 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "funds", + (gogoproto.moretags) = "yaml:\"funds\"" + ]; +} + +// Payment stores state for a payment +message FractionalPayment { + option (gogoproto.goproto_stringer) = true; + + // Payment State + enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // PaymentStateInvalid is the state when the payment is invalid + invalid = 0 [(gogoproto.enumvalue_customname) = "PaymentStateInvalid"]; + // PaymentStateOpen is the state when the payment is open + open = 1 [(gogoproto.enumvalue_customname) = "PaymentOpen"]; + // PaymentStateClosed is the state when the payment is closed + closed = 2 [(gogoproto.enumvalue_customname) = "PaymentClosed"]; + // PaymentStateOverdrawn is the state when the payment is overdrawn + overdrawn = 3 [(gogoproto.enumvalue_customname) = "PaymentOverdrawn"]; + } + + AccountID account_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "accountID", + (gogoproto.moretags) = "yaml:\"accountID\"", + (gogoproto.customname) = "AccountID" + ]; + + string payment_id = 2 [ + (gogoproto.jsontag) = "paymentID", + (gogoproto.moretags) = "yaml:\"paymentID\"", + (gogoproto.customname) = "PaymentID" + ]; + + string owner = 3 [ + (gogoproto.jsontag) = "owner", + (gogoproto.moretags) = "yaml:\"owner\"" + ]; + + State state = 4 [ + (gogoproto.jsontag) = "state", + (gogoproto.moretags) = "yaml:\"state\"" + ]; + + cosmos.base.v1beta1.DecCoin rate = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "rate", + (gogoproto.moretags) = "yaml:\"rate\"" + ]; + + cosmos.base.v1beta1.DecCoin balance = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "balance", + (gogoproto.moretags) = "yaml:\"balance\"" + ]; + + cosmos.base.v1beta1.Coin withdrawn = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "withdrawn", + (gogoproto.moretags) = "yaml:\"withdrawn\"" + ]; +} diff --git a/cosmospy_protobuf/akash/inflation/v1beta2/genesis.proto b/cosmospy_protobuf/akash/inflation/v1beta2/genesis.proto new file mode 100644 index 00000000..53def743 --- /dev/null +++ b/cosmospy_protobuf/akash/inflation/v1beta2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.inflation.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/inflation/v1beta2/params.proto"; + +option go_package = "github.com/ovrclk/akash/x/inflation/types/v1beta2"; + +// GenesisState stores slice of genesis deployment instance +message GenesisState { + Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; +} diff --git a/cosmospy_protobuf/akash/inflation/v1beta2/params.proto b/cosmospy_protobuf/akash/inflation/v1beta2/params.proto new file mode 100644 index 00000000..329296d8 --- /dev/null +++ b/cosmospy_protobuf/akash/inflation/v1beta2/params.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package akash.inflation.v1beta2; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ovrclk/akash/x/inflation/types/v1beta2"; + +// Params defines the parameters for the x/deployment package +message Params { + // InflationDecayFactor is the number of years it takes inflation to halve. + string inflation_decay_factor = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InflationDecayFactor", + (gogoproto.jsontag) = "inflation_decay_factor", + (gogoproto.moretags) = "yaml:\"inflation_decay_factor\"" + ]; + + // InitialInflation is the rate at which inflation starts at genesis. + // It is a decimal value in the range [0.0, 100.0]. + string initial_inflation = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "InitialInflation", + (gogoproto.jsontag) = "initial_inflation", + (gogoproto.moretags) = "yaml:\"initial_inflation\"" + ]; + + // Variance defines the fraction by which inflation can vary from ideal inflation in a block. + // It is a decimal value in the range [0.0, 1.0]. + string variance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.customname) = "Variance", + (gogoproto.jsontag) = "variance", + (gogoproto.moretags) = "yaml:\"variance\"" + ]; +} diff --git a/cosmospy_protobuf/akash/market/v1beta2/bid.proto b/cosmospy_protobuf/akash/market/v1beta2/bid.proto new file mode 100644 index 00000000..02d2d272 --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/bid.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/market/v1beta2/order.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/genesis.proto b/cosmospy_protobuf/akash/market/v1beta2/genesis.proto new file mode 100644 index 00000000..038aa0cb --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/genesis.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/market/v1beta2/order.proto"; +import "akash/market/v1beta2/lease.proto"; +import "akash/market/v1beta2/params.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/lease.proto b/cosmospy_protobuf/akash/market/v1beta2/lease.proto new file mode 100644 index 00000000..05ce0e69 --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/lease.proto @@ -0,0 +1,117 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "akash/market/v1beta2/bid.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/order.proto b/cosmospy_protobuf/akash/market/v1beta2/order.proto new file mode 100644 index 00000000..2bd9589c --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/order.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/deployment/v1beta2/groupspec.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/params.proto b/cosmospy_protobuf/akash/market/v1beta2/params.proto new file mode 100644 index 00000000..8eb45f53 --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/params.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package akash.market.v1beta2; +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/query.proto b/cosmospy_protobuf/akash/market/v1beta2/query.proto new file mode 100644 index 00000000..230f091d --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/query.proto @@ -0,0 +1,123 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/market/v1beta2/order.proto"; +import "akash/market/v1beta2/bid.proto"; +import "akash/market/v1beta2/lease.proto"; +import "akash/escrow/v1beta2/types.proto"; + +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/market/v1beta2/service.proto b/cosmospy_protobuf/akash/market/v1beta2/service.proto new file mode 100644 index 00000000..1a9a123d --- /dev/null +++ b/cosmospy_protobuf/akash/market/v1beta2/service.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package akash.market.v1beta2; + +import "akash/market/v1beta2/bid.proto"; +import "akash/market/v1beta2/lease.proto"; +option go_package = "github.com/ovrclk/akash/x/market/types/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/cosmospy_protobuf/akash/provider/v1beta1/provider.proto b/cosmospy_protobuf/akash/provider/v1beta1/provider.proto new file mode 100644 index 00000000..da0e90aa --- /dev/null +++ b/cosmospy_protobuf/akash/provider/v1beta1/provider.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package akash.provider.v1beta1; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta1/attribute.proto"; + +option go_package = "github.com/ovrclk/akash/x/provider/types/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/ovrclk/akash/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/ovrclk/akash/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/ovrclk/akash/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/cosmospy_protobuf/akash/provider/v1beta2/genesis.proto b/cosmospy_protobuf/akash/provider/v1beta2/genesis.proto new file mode 100644 index 00000000..1ce9788f --- /dev/null +++ b/cosmospy_protobuf/akash/provider/v1beta2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/provider/v1beta2/provider.proto"; + +option go_package = "github.com/ovrclk/akash/x/provider/types/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/cosmospy_protobuf/akash/provider/v1beta2/provider.proto b/cosmospy_protobuf/akash/provider/v1beta2/provider.proto new file mode 100644 index 00000000..16ac1146 --- /dev/null +++ b/cosmospy_protobuf/akash/provider/v1beta2/provider.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "akash/base/v1beta2/attribute.proto"; + +option go_package = "github.com/ovrclk/akash/x/provider/types/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/ovrclk/akash/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/ovrclk/akash/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/ovrclk/akash/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/cosmospy_protobuf/akash/provider/v1beta2/query.proto b/cosmospy_protobuf/akash/provider/v1beta2/query.proto new file mode 100644 index 00000000..2c777522 --- /dev/null +++ b/cosmospy_protobuf/akash/provider/v1beta2/query.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package akash.provider.v1beta2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "akash/provider/v1beta2/provider.proto"; + +option go_package = "github.com/ovrclk/akash/x/provider/types/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/cosmospy_protobuf/google/protobuf/any.proto b/cosmospy_protobuf/google/protobuf/cosmos_any.proto similarity index 100% rename from cosmospy_protobuf/google/protobuf/any.proto rename to cosmospy_protobuf/google/protobuf/cosmos_any.proto