diff --git a/proto/sentinel/deposit/v1/deposit.proto b/proto/sentinel/deposit/v1/deposit.proto index 11975548..34897cee 100644 --- a/proto/sentinel/deposit/v1/deposit.proto +++ b/proto/sentinel/deposit/v1/deposit.proto @@ -8,8 +8,15 @@ option go_package = "github.com/sentinel-official/hub/v1/x/deposit/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Deposit represents a message for handling deposits. message Deposit { + // Field 1: Deposit address represented as a string. string address = 1; + + // Field 2: List of coins involved in the deposit. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin coins = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" diff --git a/proto/sentinel/deposit/v1/events.proto b/proto/sentinel/deposit/v1/events.proto index 6b4deef6..37e951f2 100644 --- a/proto/sentinel/deposit/v1/events.proto +++ b/proto/sentinel/deposit/v1/events.proto @@ -7,12 +7,20 @@ option go_package = "github.com/sentinel-official/hub/v1/x/deposit/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// EventAdd represents a message for adding events. message EventAdd { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Coins associated with the event. string coins = 2 [(gogoproto.moretags) = "yaml:\"coins\""]; } +// EventSubtract represents a message for subtracting events. message EventSubtract { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Coins associated with the event. string coins = 2 [(gogoproto.moretags) = "yaml:\"coins\""]; } diff --git a/proto/sentinel/deposit/v1/querier.proto b/proto/sentinel/deposit/v1/querier.proto index 346659f1..02e300e1 100644 --- a/proto/sentinel/deposit/v1/querier.proto +++ b/proto/sentinel/deposit/v1/querier.proto @@ -10,28 +10,41 @@ option go_package = "github.com/sentinel-official/hub/v1/x/deposit/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QueryDepositsRequest represents a request to query deposits with optional pagination. message QueryDepositsRequest { + // Field 1: Pagination parameters for the query. cosmos.base.query.v1beta1.PageRequest pagination = 1; } +// QueryDepositRequest represents a request to query a specific deposit by address. message QueryDepositRequest { + // Field 1: Address of the deposit to be queried. string address = 1; } +// QueryDepositsResponse represents the response to a query for deposits. message QueryDepositsResponse { + // Field 1: List of deposits returned in the response. repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryDepositResponse represents the response to a query for a specific deposit. message QueryDepositResponse { + // Field 1: The queried deposit. Deposit deposit = 1 [(gogoproto.nullable) = false]; } +// QueryService is the service definition for the deposit module's queries. service QueryService { + // RPC method for querying deposits with optional pagination. rpc QueryDeposits(QueryDepositsRequest) returns (QueryDepositsResponse) { option (google.api.http).get = "/sentinel/deposits"; } + // RPC method for querying a specific deposit by address. rpc QueryDeposit(QueryDepositRequest) returns (QueryDepositResponse) { option (google.api.http).get = "/sentinel/deposits/{address}"; } diff --git a/proto/sentinel/mint/v1/genesis.proto b/proto/sentinel/mint/v1/genesis.proto index 4eba665b..deb250d9 100644 --- a/proto/sentinel/mint/v1/genesis.proto +++ b/proto/sentinel/mint/v1/genesis.proto @@ -8,7 +8,11 @@ option go_package = "github.com/sentinel-official/hub/v1/x/mint/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisState represents the genesis state for the module. message GenesisState { + // Field 1: List of inflations included in the genesis state. + // - (gogoproto.moretags) = "yaml:\"inflations\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. repeated Inflation inflations = 1 [ (gogoproto.moretags) = "yaml:\"inflations\"", (gogoproto.nullable) = false diff --git a/proto/sentinel/mint/v1/inflation.proto b/proto/sentinel/mint/v1/inflation.proto index 0940752c..e01ee4be 100644 --- a/proto/sentinel/mint/v1/inflation.proto +++ b/proto/sentinel/mint/v1/inflation.proto @@ -8,22 +8,45 @@ option go_package = "github.com/sentinel-official/hub/v1/x/mint/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Inflation represents a message for handling inflation parameters. message Inflation { + // Field 1: Maximum inflation rate. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"max\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. string max = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.moretags) = "yaml:\"max\"", (gogoproto.nullable) = false ]; + + // Field 2: Minimum inflation rate. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"min\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. string min = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.moretags) = "yaml:\"min\"", (gogoproto.nullable) = false ]; + + // Field 3: Rate of change of inflation. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"rate_change\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. string rate_change = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.moretags) = "yaml:\"rate_change\"", (gogoproto.nullable) = false ]; + + // Field 4: Timestamp indicating when the inflation parameters were set. + // - (gogoproto.moretags) = "yaml:\"timestamp\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. google.protobuf.Timestamp timestamp = 4 [ (gogoproto.moretags) = "yaml:\"timestamp\"", (gogoproto.nullable) = false, diff --git a/proto/sentinel/node/v2/events.proto b/proto/sentinel/node/v2/events.proto index bb05d0e9..076fb2a1 100644 --- a/proto/sentinel/node/v2/events.proto +++ b/proto/sentinel/node/v2/events.proto @@ -8,22 +8,36 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// EventRegister represents an event for registration. message EventRegister { + // Field 1: Address associated with the registration event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; } +// EventUpdateDetails represents an event for updating details. message EventUpdateDetails { + // Field 1: Address associated with the update details event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; } +// EventUpdateStatus represents an event for updating status. message EventUpdateStatus { + // Field 1: Status to be updated in the event. sentinel.types.v1.Status status = 1 [(gogoproto.moretags) = "yaml:\"status\""]; + + // Field 2: Address associated with the update status event. string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; } +// EventCreateSubscription represents an event for creating a subscription. message EventCreateSubscription { + // Field 1: Address associated with the create subscription event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the create subscription event. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: ID associated with the create subscription event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" diff --git a/proto/sentinel/node/v2/genesis.proto b/proto/sentinel/node/v2/genesis.proto index 800756f9..2eee301c 100644 --- a/proto/sentinel/node/v2/genesis.proto +++ b/proto/sentinel/node/v2/genesis.proto @@ -9,7 +9,13 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisState represents the genesis state for the module. message GenesisState { + // Field 1: List of nodes included in the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. repeated Node nodes = 1 [(gogoproto.nullable) = false]; + + // Field 2: Parameters associated with the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/sentinel/node/v2/msg.proto b/proto/sentinel/node/v2/msg.proto index 4e29e962..9d3830e7 100644 --- a/proto/sentinel/node/v2/msg.proto +++ b/proto/sentinel/node/v2/msg.proto @@ -9,66 +9,112 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; -// MsgRegisterRequest defines the SDK message for registering a node +// MsgRegisterRequest defines the SDK message for registering a node. message MsgRegisterRequest { + // Field 1: Sender's address initiating the registration. string from = 1; + + // Field 2: Prices in gigabytes for the registered node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin gigabyte_prices = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 3: Hourly prices for the registered node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin hourly_prices = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 4: Remote URL associated with the registered node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; } -// MsgUpdateDetailsRequest defines the SDK message for updating the node details +// MsgUpdateDetailsRequest defines the SDK message for updating node details. message MsgUpdateDetailsRequest { + // Field 1: Sender's address initiating the update. string from = 1; + + // Field 2: Updated prices in gigabytes for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin gigabyte_prices = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 3: Updated hourly prices for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin hourly_prices = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 4: Updated remote URL for the node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; } -// MsgUpdateStatusRequest defines the SDK message for updating the node status +// MsgUpdateStatusRequest defines the SDK message for updating node status. message MsgUpdateStatusRequest { + // Field 1: Sender's address initiating the status update. string from = 1; + + // Field 2: New status for the node. sentinel.types.v1.Status status = 2; } -// MsgSubscribeRequest defines the SDK message for subscribe to a node +// MsgSubscribeRequest defines the SDK message for subscribing to a node. message MsgSubscribeRequest { + // Field 1: Sender's address initiating the subscription. string from = 1; + + // Field 2: Node address to subscribe to. string node_address = 2; + + // Field 3: Number of gigabytes for the subscription. int64 gigabytes = 3; + + // Field 4: Number of hours for the subscription. int64 hours = 4; + + // Field 5: Denomination for the subscription. string denom = 5; } -// MsgRegisterResponse defines the response of message MsgRegisterRequest +// MsgRegisterResponse defines the response of message MsgRegisterRequest. message MsgRegisterResponse {} -// MsgUpdateDetailsResponse defines the response of message -// MsgUpdateDetailsRequest +// MsgUpdateDetailsResponse defines the response of message MsgUpdateDetailsRequest. message MsgUpdateDetailsResponse {} -// MsgUpdateStatusResponse defines the response of message -// MsgUpdateStatusRequest +// MsgUpdateStatusResponse defines the response of message MsgUpdateStatusRequest. message MsgUpdateStatusResponse {} -// MsgSubscribeResponse defines the response of message MsgSubscribeRequest +// MsgSubscribeResponse defines the response of message MsgSubscribeRequest. message MsgSubscribeResponse {} +// MsgService is the service definition for the node module's messages. service MsgService { + // RPC method for registering a node. rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse); + + // RPC method for updating node details. rpc MsgUpdateDetails(MsgUpdateDetailsRequest) returns (MsgUpdateDetailsResponse); + + // RPC method for updating node status. rpc MsgUpdateStatus(MsgUpdateStatusRequest) returns (MsgUpdateStatusResponse); + + // RPC method for subscribing to a node. rpc MsgSubscribe(MsgSubscribeRequest) returns (MsgSubscribeResponse); } diff --git a/proto/sentinel/node/v2/node.proto b/proto/sentinel/node/v2/node.proto index 696c9865..361b0683 100644 --- a/proto/sentinel/node/v2/node.proto +++ b/proto/sentinel/node/v2/node.proto @@ -10,22 +10,47 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Node represents a message for handling node information. message Node { + // Field 1: Address associated with the node. string address = 1; + + // Field 2: Prices in gigabytes for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin gigabyte_prices = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 3: Hourly prices for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin hourly_prices = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 4: Remote URL associated with the node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; + + // Field 5: Timestamp indicating when the node became inactive. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. google.protobuf.Timestamp inactive_at = 5 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + + // Field 6: Status of the node, using the sentinel.types.v1.Status enum. sentinel.types.v1.Status status = 6; + + // Field 7: Timestamp indicating when the status of the node was last updated. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. google.protobuf.Timestamp status_at = 7 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true diff --git a/proto/sentinel/node/v2/params.proto b/proto/sentinel/node/v2/params.proto index 3de9a021..8c590510 100644 --- a/proto/sentinel/node/v2/params.proto +++ b/proto/sentinel/node/v2/params.proto @@ -9,32 +9,72 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Params represents a message for handling node parameters. message Params { + // Field 1: Deposit required for registering a node. + // - (gogoproto.nullable) = false: Field is not nullable. cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false]; + + // Field 2: Duration for which a node remains active. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdduration) = true: Use standard duration representation for Go. google.protobuf.Duration active_duration = 2 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + + // Field 3: Maximum prices in gigabytes for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin max_gigabyte_prices = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 4: Minimum prices in gigabytes for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin min_gigabyte_prices = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 5: Maximum prices in hours for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin max_hourly_prices = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 6: Minimum prices in hours for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. repeated cosmos.base.v1beta1.Coin min_hourly_prices = 6 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 7: Maximum gigabytes allowed for a subscription. int64 max_subscription_gigabytes = 7; + + // Field 8: Minimum gigabytes required for a subscription. int64 min_subscription_gigabytes = 8; + + // Field 9: Maximum hours allowed for a subscription. int64 max_subscription_hours = 9; + + // Field 10: Minimum hours required for a subscription. int64 min_subscription_hours = 10; + + // Field 11: Staking share required for a node. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.nullable) = false: Field is not nullable. string staking_share = 11 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false diff --git a/proto/sentinel/node/v2/querier.proto b/proto/sentinel/node/v2/querier.proto index 9b45da20..552094cd 100644 --- a/proto/sentinel/node/v2/querier.proto +++ b/proto/sentinel/node/v2/querier.proto @@ -12,54 +12,84 @@ option go_package = "github.com/sentinel-official/hub/v1/x/node/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QueryNodesRequest represents a request to query nodes with a specific status and pagination. message QueryNodesRequest { + // Field 1: Status to filter nodes by. sentinel.types.v1.Status status = 1; + + // Field 2: Pagination parameters for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QueryNodesForPlanRequest represents a request to query nodes for a specific plan with status and pagination. message QueryNodesForPlanRequest { + // Field 1: Plan ID to filter nodes by. uint64 id = 1; + + // Field 2: Status to filter nodes by. sentinel.types.v1.Status status = 2; + + // Field 3: Pagination parameters for the query. cosmos.base.query.v1beta1.PageRequest pagination = 3; } +// QueryNodeRequest represents a request to query information about a specific node. message QueryNodeRequest { + // Field 1: Address of the node to query. string address = 1; } +// QueryParamsRequest represents a request to query module parameters. message QueryParamsRequest {} +// QueryNodesResponse represents a response containing a list of nodes and pagination information. message QueryNodesResponse { + // Field 1: List of nodes in the response. repeated Node nodes = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryNodesForPlanResponse represents a response containing a list of nodes for a specific plan and pagination information. message QueryNodesForPlanResponse { + // Field 1: List of nodes in the response. repeated Node nodes = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryNodeResponse represents a response containing information about a specific node. message QueryNodeResponse { + // Field 1: Information about the queried node. Node node = 1 [(gogoproto.nullable) = false]; } +// QueryParamsResponse represents a response containing module parameters. message QueryParamsResponse { + // Field 1: Module parameters in the response. Params params = 1 [(gogoproto.nullable) = false]; } +// QueryService is the service definition for the node module's queries. service QueryService { + // RPC method for querying nodes with a specific status and pagination. rpc QueryNodes(QueryNodesRequest) returns (QueryNodesResponse) { option (google.api.http).get = "/sentinel/nodes"; } + // RPC method for querying nodes for a specific plan with status and pagination. rpc QueryNodesForPlan(QueryNodesForPlanRequest) returns (QueryNodesForPlanResponse) { option (google.api.http).get = "/sentinel/plans/{id}/nodes"; } + // RPC method for querying information about a specific node. rpc QueryNode(QueryNodeRequest) returns (QueryNodeResponse) { option (google.api.http).get = "/sentinel/nodes/{address}"; } + // RPC method for querying module parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/sentinel/modules/node/params"; } diff --git a/proto/sentinel/plan/v2/events.proto b/proto/sentinel/plan/v2/events.proto index c631dfaf..f0e908ae 100644 --- a/proto/sentinel/plan/v2/events.proto +++ b/proto/sentinel/plan/v2/events.proto @@ -8,48 +8,78 @@ option go_package = "github.com/sentinel-official/hub/v1/x/plan/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// EventCreate represents an event for creating an entity. message EventCreate { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Identifier associated with the event. uint64 id = 2 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventUpdateStatus represents an event for updating the status of an entity. message EventUpdateStatus { + // Field 1: Status associated with the event. sentinel.types.v1.Status status = 1 [(gogoproto.moretags) = "yaml:\"status\""]; + + // Field 2: Address associated with the event. string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 3: Identifier associated with the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventLinkNode represents an event for linking a node to an entity. message EventLinkNode { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the event. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Identifier associated with the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventUnlinkNode represents an event for unlinking a node from an entity. message EventUnlinkNode { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the event. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Identifier associated with the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventCreateSubscription represents an event for creating a subscription. message EventCreateSubscription { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Provider address associated with the event. string provider_address = 2 [(gogoproto.moretags) = "yaml:\"provider_address\""]; + + // Field 3: Identifier associated with the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; + + // Field 4: Plan ID associated with the event. uint64 plan_id = 4 [ (gogoproto.customname) = "PlanID", (gogoproto.moretags) = "yaml:\"plan_id\"" diff --git a/proto/sentinel/plan/v2/genesis.proto b/proto/sentinel/plan/v2/genesis.proto index 6d7a18cc..07f79f6a 100644 --- a/proto/sentinel/plan/v2/genesis.proto +++ b/proto/sentinel/plan/v2/genesis.proto @@ -8,7 +8,12 @@ option go_package = "github.com/sentinel-official/hub/v1/x/plan/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisPlan represents the genesis state for a plan. message GenesisPlan { + // Field 1: Plan information. + // - (gogoproto.nullable) = false: Field is not nullable. Plan plan = 1 [(gogoproto.nullable) = false]; + + // Field 2: List of node addresses associated with the plan. repeated string nodes = 2; } diff --git a/proto/sentinel/plan/v2/msg.proto b/proto/sentinel/plan/v2/msg.proto index c9f1f177..704d641a 100644 --- a/proto/sentinel/plan/v2/msg.proto +++ b/proto/sentinel/plan/v2/msg.proto @@ -10,72 +10,104 @@ option go_package = "github.com/sentinel-official/hub/v1/x/plan/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; -// MsgCreateRequest defines the SDK message for creating a subscription plan +// MsgCreateRequest defines the SDK message for creating a subscription plan. message MsgCreateRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Duration of the subscription plan. google.protobuf.Duration duration = 2 [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; + + // Field 3: Amount of gigabytes in the subscription plan. int64 gigabytes = 3; + + // Field 4: Prices associated with the subscription plan. repeated cosmos.base.v1beta1.Coin prices = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } -// MsgUpdateStatusRequest defines the SDK message for modifying the status of a -// subscription plan +// MsgUpdateStatusRequest defines the SDK message for modifying the status of a subscription plan. message MsgUpdateStatusRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the subscription plan. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: New status for the subscription plan. sentinel.types.v1.Status status = 3; } -// MsgLinkNodeRequest defines the SDK message for adding a node to a -// subscription plan +// MsgLinkNodeRequest defines the SDK message for adding a node to a subscription plan. message MsgLinkNodeRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the subscription plan. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Node address to be linked to the subscription plan. string node_address = 3; } -// MsgUnlinkNodeRequest defines the SDK message for removing a node from a -// subscription plan +// MsgUnlinkNodeRequest defines the SDK message for removing a node from a subscription plan. message MsgUnlinkNodeRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the subscription plan. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Node address to be unlinked from the subscription plan. string node_address = 3; } -// MsgSubscribeRequest defines the SDK message for subscribing to a subscription -// plan +// MsgSubscribeRequest defines the SDK message for subscribing to a subscription plan. message MsgSubscribeRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the subscription plan. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Denomination for the subscription. string denom = 3; } -// MsgCreateResponse defines the response of message MsgCreateRequest +// MsgCreateResponse defines the response of message MsgCreateRequest. message MsgCreateResponse {} -// MsgUpdateStatusResponse defines the response of message -// MsgUpdateStatusRequest +// MsgUpdateStatusResponse defines the response of message MsgUpdateStatusRequest. message MsgUpdateStatusResponse {} -// MsgLinkNodeResponse defines the response of message MsgLinkNodeRequest +// MsgLinkNodeResponse defines the response of message MsgLinkNodeRequest. message MsgLinkNodeResponse {} -// MsgUnlinkNodeResponse defines the response of message MsgUnlinkNodeRequest +// MsgUnlinkNodeResponse defines the response of message MsgUnlinkNodeRequest. message MsgUnlinkNodeResponse {} -// MsgSubscribeResponse defines the response of message MsgSubscribeRequest +// MsgSubscribeResponse defines the response of message MsgSubscribeRequest. message MsgSubscribeResponse {} +// MsgService is the service definition for subscription plan messages. service MsgService { + // RPC method for creating a subscription plan. rpc MsgCreate(MsgCreateRequest) returns (MsgCreateResponse); + + // RPC method for modifying the status of a subscription plan. rpc MsgUpdateStatus(MsgUpdateStatusRequest) returns (MsgUpdateStatusResponse); + + // RPC method for linking a node to a subscription plan. rpc MsgLinkNode(MsgLinkNodeRequest) returns (MsgLinkNodeResponse); + + // RPC method for unlinking a node from a subscription plan. rpc MsgUnlinkNode(MsgUnlinkNodeRequest) returns (MsgUnlinkNodeResponse); + + // RPC method for subscribing to a subscription plan. rpc MsgSubscribe(MsgSubscribeRequest) returns (MsgSubscribeResponse); } diff --git a/proto/sentinel/plan/v2/plan.proto b/proto/sentinel/plan/v2/plan.proto index 10a341f9..49cb3eca 100644 --- a/proto/sentinel/plan/v2/plan.proto +++ b/proto/sentinel/plan/v2/plan.proto @@ -11,19 +11,33 @@ option go_package = "github.com/sentinel-official/hub/v1/x/plan/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Plan represents a subscription plan. message Plan { + // Field 1: Identifier of the subscription plan. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Provider's address associated with the plan. string provider_address = 2; + + // Field 3: Duration of the subscription plan. google.protobuf.Duration duration = 3 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + + // Field 4: Amount of gigabytes in the subscription plan. int64 gigabytes = 4; + + // Field 5: Prices associated with the subscription plan. repeated cosmos.base.v1beta1.Coin prices = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; + + // Field 6: Status of the subscription plan. sentinel.types.v1.Status status = 6; + + // Field 7: Timestamp when the status was last updated. google.protobuf.Timestamp status_at = 7 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true diff --git a/proto/sentinel/plan/v2/querier.proto b/proto/sentinel/plan/v2/querier.proto index 1e266cdf..457ee8dd 100644 --- a/proto/sentinel/plan/v2/querier.proto +++ b/proto/sentinel/plan/v2/querier.proto @@ -11,44 +11,72 @@ option go_package = "github.com/sentinel-official/hub/v1/x/plan/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QueryPlansRequest defines the request for querying subscription plans. message QueryPlansRequest { + // Field 1: Status filter for subscription plans. sentinel.types.v1.Status status = 1; + + // Field 2: Pagination information. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QueryPlansForProviderRequest defines the request for querying subscription plans +// associated with a provider. message QueryPlansForProviderRequest { + // Field 1: Provider's address for filtering subscription plans. string address = 1; + + // Field 2: Status filter for subscription plans. sentinel.types.v1.Status status = 2; + + // Field 3: Pagination information. cosmos.base.query.v1beta1.PageRequest pagination = 3; } +// QueryPlanRequest defines the request for querying a specific subscription plan. message QueryPlanRequest { + // Field 1: Identifier of the subscription plan. uint64 id = 1; } +// QueryPlansResponse defines the response for querying subscription plans. message QueryPlansResponse { + // Field 1: List of subscription plans. repeated Plan plans = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPlansForProviderResponse defines the response for querying subscription +// plans associated with a provider. message QueryPlansForProviderResponse { + // Field 1: List of subscription plans. repeated Plan plans = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPlanResponse defines the response for querying a specific subscription plan. message QueryPlanResponse { + // Field 1: Subscription plan information. Plan plan = 1 [(gogoproto.nullable) = false]; } +// QueryService is the service definition for subscription plan queries. service QueryService { + // RPC method for querying all subscription plans. rpc QueryPlans(QueryPlansRequest) returns (QueryPlansResponse) { option (google.api.http).get = "/sentinel/plans"; } + // RPC method for querying subscription plans associated with a provider. rpc QueryPlansForProvider(QueryPlansForProviderRequest) returns (QueryPlansForProviderResponse) { option (google.api.http).get = "/sentinel/providers/{address}/plans"; } + // RPC method for querying a specific subscription plan. rpc QueryPlan(QueryPlanRequest) returns (QueryPlanResponse) { option (google.api.http).get = "/sentinel/plans/{id}"; } diff --git a/proto/sentinel/provider/v2/events.proto b/proto/sentinel/provider/v2/events.proto index 982afc1a..feec3f65 100644 --- a/proto/sentinel/provider/v2/events.proto +++ b/proto/sentinel/provider/v2/events.proto @@ -7,10 +7,14 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Message representing an event registration. message EventRegister { + // Field 1: Address associated with the registration. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; } +// Message representing an event update. message EventUpdate { + // Field 1: Address associated with the update. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; } diff --git a/proto/sentinel/provider/v2/genesis.proto b/proto/sentinel/provider/v2/genesis.proto index 8c050f71..b37e17d8 100644 --- a/proto/sentinel/provider/v2/genesis.proto +++ b/proto/sentinel/provider/v2/genesis.proto @@ -9,7 +9,13 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Message representing the genesis state for the module. message GenesisState { + // Field 1: List of providers included in the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. repeated Provider providers = 1 [(gogoproto.nullable) = false]; + + // Field 2: Parameters associated with the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/sentinel/provider/v2/msg.proto b/proto/sentinel/provider/v2/msg.proto index 68d22a71..f28872ff 100644 --- a/proto/sentinel/provider/v2/msg.proto +++ b/proto/sentinel/provider/v2/msg.proto @@ -8,32 +8,56 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; -// MsgRegisterRequest defines the SDK message for registering a provider +// MsgRegisterRequest defines the SDK message for registering a provider. message MsgRegisterRequest { + // Field 1: Sender's address initiating the registration. string from = 1; + + // Field 2: Provider name. string name = 2; + + // Field 3: Identity of the provider. string identity = 3; + + // Field 4: Website associated with the provider. string website = 4; + + // Field 5: Description of the provider. string description = 5; } -// MsgUpdateRequest defines the SDK message for updating a provider +// MsgUpdateRequest defines the SDK message for updating a provider. message MsgUpdateRequest { + // Field 1: Sender's address initiating the update. string from = 1; + + // Field 2: New provider name. string name = 2; + + // Field 3: New identity of the provider. string identity = 3; + + // Field 4: New website associated with the provider. string website = 4; + + // Field 5: New description of the provider. string description = 5; + + // Field 6: New status of the provider, using the sentinel.types.v1.Status enum. sentinel.types.v1.Status status = 6; } -// MsgRegisterResponse defines the response of message MsgRegisterRequest +// MsgRegisterResponse defines the response of message MsgRegisterRequest. message MsgRegisterResponse {} -// MsgUpdateResponse defines the response of message MsgUpdateRequest +// MsgUpdateResponse defines the response of message MsgUpdateRequest. message MsgUpdateResponse {} +// MsgService is the service definition for the provider module's messages. service MsgService { + // RPC method for registering a provider. rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse); + + // RPC method for updating a provider. rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse); } diff --git a/proto/sentinel/provider/v2/params.proto b/proto/sentinel/provider/v2/params.proto index 8e8a93d7..88dfd595 100644 --- a/proto/sentinel/provider/v2/params.proto +++ b/proto/sentinel/provider/v2/params.proto @@ -8,8 +8,16 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Params defines the parameters for the provider module. message Params { + // Field 1: Deposit required for providers. + // - (gogoproto.nullable) = false: Field is not nullable. cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false]; + + // Field 2: Staking share associated with the providers. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.nullable) = false: Field is not nullable. string staking_share = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false diff --git a/proto/sentinel/provider/v2/provider.proto b/proto/sentinel/provider/v2/provider.proto index 1b9caadd..ae0e18c3 100644 --- a/proto/sentinel/provider/v2/provider.proto +++ b/proto/sentinel/provider/v2/provider.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package sentinel.provider.v2; import "gogoproto/gogo.proto"; @@ -9,13 +10,29 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Message representing a provider. message Provider { + // Field 1: Provider address represented as a string. string address = 1; + + // Field 2: Provider name. string name = 2; + + // Field 3: Identity of the provider. string identity = 3; + + // Field 4: Website associated with the provider. string website = 4; + + // Field 5: Description of the provider. string description = 5; + + // Field 6: Status of the provider, using the sentinel.types.v1.Status enum. sentinel.types.v1.Status status = 6; + + // Field 7: Timestamp indicating when the status was last updated. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. google.protobuf.Timestamp status_at = 7 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true diff --git a/proto/sentinel/provider/v2/querier.proto b/proto/sentinel/provider/v2/querier.proto index 3b0db121..cad67b32 100644 --- a/proto/sentinel/provider/v2/querier.proto +++ b/proto/sentinel/provider/v2/querier.proto @@ -12,39 +12,58 @@ option go_package = "github.com/sentinel-official/hub/v1/x/provider/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QueryProvidersRequest represents a request to query providers with optional pagination and status filter. message QueryProvidersRequest { + // Field 1: Pagination parameters for the query. cosmos.base.query.v1beta1.PageRequest pagination = 1; + + // Field 2: Status filter for querying providers. sentinel.types.v1.Status status = 2; } +// QueryProviderRequest represents a request to query a specific provider by address. message QueryProviderRequest { + // Field 1: Address of the provider to be queried. string address = 1; } +// QueryParamsRequest represents a request to query parameters for providers. message QueryParamsRequest {} +// QueryProvidersResponse represents the response to a query for providers. message QueryProvidersResponse { + // Field 1: List of providers returned in the response. repeated Provider providers = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryProviderResponse represents the response to a query for a specific provider. message QueryProviderResponse { + // Field 1: The queried provider. Provider provider = 1 [(gogoproto.nullable) = false]; } +// QueryParamsResponse represents the response to a query for provider parameters. message QueryParamsResponse { + // Field 1: Parameters for providers returned in the response. Params params = 1 [(gogoproto.nullable) = false]; } +// QueryService is the service definition for the provider module's queries. service QueryService { + // RPC method for querying providers with optional pagination and status filter. rpc QueryProviders(QueryProvidersRequest) returns (QueryProvidersResponse) { option (google.api.http).get = "/sentinel/providers"; } + // RPC method for querying a specific provider by address. rpc QueryProvider(QueryProviderRequest) returns (QueryProviderResponse) { option (google.api.http).get = "/sentinel/providers/{address}"; } + // RPC method for querying parameters for providers. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/sentinel/params/provider"; } diff --git a/proto/sentinel/session/v2/events.proto b/proto/sentinel/session/v2/events.proto index 603c162a..c46f85fd 100644 --- a/proto/sentinel/session/v2/events.proto +++ b/proto/sentinel/session/v2/events.proto @@ -8,52 +8,84 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// EventStart represents an event signaling the start of a subscription. message EventStart { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the event. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Identifier of the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; + + // Field 4: Identifier of the plan associated with the event. uint64 plan_id = 4 [ (gogoproto.customname) = "PlanID", (gogoproto.moretags) = "yaml:\"plan_id\"" ]; + + // Field 5: Identifier of the subscription associated with the event. uint64 subscription_id = 5 [ (gogoproto.customname) = "SubscriptionID", (gogoproto.moretags) = "yaml:\"subscription_id\"" ]; } +// EventUpdateDetails represents an event signaling an update in subscription details. message EventUpdateDetails { + // Field 1: Address associated with the event. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the event. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Identifier of the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; + + // Field 4: Identifier of the plan associated with the event. uint64 plan_id = 4 [ (gogoproto.customname) = "PlanID", (gogoproto.moretags) = "yaml:\"plan_id\"" ]; + + // Field 5: Identifier of the subscription associated with the event. uint64 subscription_id = 5 [ (gogoproto.customname) = "SubscriptionID", (gogoproto.moretags) = "yaml:\"subscription_id\"" ]; } +// EventUpdateStatus represents an event signaling an update in subscription status. message EventUpdateStatus { + // Field 1: Status associated with the event. sentinel.types.v1.Status status = 1 [(gogoproto.moretags) = "yaml:\"status\""]; + + // Field 2: Address associated with the event. string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 3: Node address associated with the event. string node_address = 3 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 4: Identifier of the event. uint64 id = 4 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; + + // Field 5: Identifier of the plan associated with the event. uint64 plan_id = 5 [ (gogoproto.customname) = "PlanID", (gogoproto.moretags) = "yaml:\"plan_id\"" ]; + + // Field 6: Identifier of the subscription associated with the event. uint64 subscription_id = 6 [ (gogoproto.customname) = "SubscriptionID", (gogoproto.moretags) = "yaml:\"subscription_id\"" diff --git a/proto/sentinel/session/v2/genesis.proto b/proto/sentinel/session/v2/genesis.proto index 87e7dcd2..ebc98ba9 100644 --- a/proto/sentinel/session/v2/genesis.proto +++ b/proto/sentinel/session/v2/genesis.proto @@ -9,7 +9,11 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisState represents the initial state for the sessions module. message GenesisState { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Parameters for the sessions module. Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/sentinel/session/v2/msg.proto b/proto/sentinel/session/v2/msg.proto index 9bd90039..ca10add4 100644 --- a/proto/sentinel/session/v2/msg.proto +++ b/proto/sentinel/session/v2/msg.proto @@ -8,39 +8,59 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; -// MsgStartRequest defines the SDK message for starting a session +// MsgStartRequest defines the SDK message for starting a session. message MsgStartRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the session. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Address associated with the session. string address = 3; } -// MsgUpdateDetailsRequest defines the SDK message for updating a session +// MsgUpdateDetailsRequest defines the SDK message for updating a session. message MsgUpdateDetailsRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Proof associated with the session. Proof proof = 2 [(gogoproto.nullable) = false]; + + // Field 3: Signature associated with the session. bytes signature = 3; } -// MsgEndRequest defines the SDK message for ending a session +// MsgEndRequest defines the SDK message for ending a session. message MsgEndRequest { + // Field 1: Sender's address. string from = 1; + + // Field 2: Identifier of the session. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Rating associated with the session. uint64 rating = 3; } -// MsgStartResponse defines the response of message MsgStartRequest +// MsgStartResponse defines the response of message MsgStartRequest. message MsgStartResponse {} -// MsgUpdateDetailsResponse defines the response of message -// MsgUpdateDetailsRequest +// MsgUpdateDetailsResponse defines the response of message MsgUpdateDetailsRequest. message MsgUpdateDetailsResponse {} -// MsgEndResponse defines the response of message MsgEndRequest +// MsgEndResponse defines the response of message MsgEndRequest. message MsgEndResponse {} +// MsgService represents the service for session-related messages. service MsgService { + // RPC method for handling MsgStart messages. rpc MsgStart(MsgStartRequest) returns (MsgStartResponse); + + // RPC method for handling MsgUpdateDetails messages. rpc MsgUpdateDetails(MsgUpdateDetailsRequest) returns (MsgUpdateDetailsResponse); + + // RPC method for handling MsgEnd messages. rpc MsgEnd(MsgEndRequest) returns (MsgEndResponse); } diff --git a/proto/sentinel/session/v2/params.proto b/proto/sentinel/session/v2/params.proto index d3a76a07..0aa817d8 100644 --- a/proto/sentinel/session/v2/params.proto +++ b/proto/sentinel/session/v2/params.proto @@ -8,10 +8,14 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Params represents the parameters for the sessions module. message Params { + // Field 1: Duration for status change delay. google.protobuf.Duration status_change_delay = 1 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + + // Field 2: Flag indicating whether proof verification is enabled. bool proof_verification_enabled = 2; } diff --git a/proto/sentinel/session/v2/proof.proto b/proto/sentinel/session/v2/proof.proto index 78767853..cf1906fb 100644 --- a/proto/sentinel/session/v2/proof.proto +++ b/proto/sentinel/session/v2/proof.proto @@ -9,9 +9,15 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Proof represents the proof associated with a session. message Proof { + // Field 1: Identifier of the proof. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Bandwidth information for the proof. sentinel.types.v1.Bandwidth bandwidth = 2 [(gogoproto.nullable) = false]; + + // Field 3: Duration of the proof. google.protobuf.Duration duration = 3 [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false diff --git a/proto/sentinel/session/v2/querier.proto b/proto/sentinel/session/v2/querier.proto index 0b3aed02..8bc346c4 100644 --- a/proto/sentinel/session/v2/querier.proto +++ b/proto/sentinel/session/v2/querier.proto @@ -11,95 +11,150 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QuerySessionsRequest represents the request to query sessions. message QuerySessionsRequest { + // Field 1: Pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 1; } +// QuerySessionsForAccountRequest represents the request to query sessions for an account. message QuerySessionsForAccountRequest { + // Field 1: Account address. string address = 1; + + // Field 2: Pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySessionsForNodeRequest represents the request to query sessions for a node. message QuerySessionsForNodeRequest { + // Field 1: Node address. string address = 1; + + // Field 2: Pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySessionsForSubscriptionRequest represents the request to query sessions for a subscription. message QuerySessionsForSubscriptionRequest { + // Field 1: Subscription ID. uint64 id = 1; + + // Field 2: Pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySessionsForAllocationRequest represents the request to query sessions for an allocation. message QuerySessionsForAllocationRequest { + // Field 1: Subscription ID. uint64 id = 1; + + // Field 2: Allocation address. string address = 2; + + // Field 3: Pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 3; } +// QuerySessionRequest represents the request to query a specific session. message QuerySessionRequest { + // Field 1: Session ID. uint64 id = 1; } +// QueryParamsRequest represents the request to query session parameters. message QueryParamsRequest {} +// QuerySessionsResponse represents the response for querying sessions. message QuerySessionsResponse { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySessionsForAccountResponse represents the response for querying sessions for an account. message QuerySessionsForAccountResponse { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySessionsForNodeResponse represents the response for querying sessions for a node. message QuerySessionsForNodeResponse { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySessionsForSubscriptionResponse represents the response for querying sessions for a subscription. message QuerySessionsForSubscriptionResponse { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySessionsForAllocationResponse represents the response for querying sessions for an allocation. message QuerySessionsForAllocationResponse { + // Field 1: List of sessions. repeated Session sessions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination details. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySessionResponse represents the response for querying a specific session. message QuerySessionResponse { + // Field 1: Session details. Session session = 1 [(gogoproto.nullable) = false]; } +// QueryParamsResponse represents the response for querying session parameters. message QueryParamsResponse { + // Field 1: Session parameters. Params params = 1 [(gogoproto.nullable) = false]; } +// QueryService represents the service for querying sessions. service QueryService { + // RPC method to query sessions. rpc QuerySessions(QuerySessionsRequest) returns (QuerySessionsResponse) { option (google.api.http).get = "/sentinel/sessions"; } + // RPC method to query sessions for an account. rpc QuerySessionsForAccount(QuerySessionsForAccountRequest) returns (QuerySessionsForAccountResponse) { option (google.api.http).get = "/sentinel/accounts/{address}/sessions"; } + // RPC method to query sessions for a node. rpc QuerySessionsForNode(QuerySessionsForNodeRequest) returns (QuerySessionsForNodeResponse) { option (google.api.http).get = "/sentinel/nodes/{address}/sessions"; } + // RPC method to query sessions for a subscription. rpc QuerySessionsForSubscription(QuerySessionsForSubscriptionRequest) returns (QuerySessionsForSubscriptionResponse) { option (google.api.http).get = "/sentinel/subscriptions/{id}/sessions"; } + // RPC method to query sessions for an allocation. rpc QuerySessionsForAllocation(QuerySessionsForAllocationRequest) returns (QuerySessionsForAllocationResponse) { option (google.api.http).get = "/sentinel/subscriptions/{id}/allocations/{address}/sessions"; } + // RPC method to query a specific session. rpc QuerySession(QuerySessionRequest) returns (QuerySessionResponse) { option (google.api.http).get = "/sentinel/sessions/{id}"; } + // RPC method to query session parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/sentinel/modules/session/params"; } diff --git a/proto/sentinel/session/v2/session.proto b/proto/sentinel/session/v2/session.proto index 4f12bfd4..99d62d66 100644 --- a/proto/sentinel/session/v2/session.proto +++ b/proto/sentinel/session/v2/session.proto @@ -11,21 +11,39 @@ option go_package = "github.com/sentinel-official/hub/v1/x/session/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Session represents a session. message Session { + // Field 1: Session ID. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Subscription ID. uint64 subscription_id = 2 [(gogoproto.customname) = "SubscriptionID"]; + + // Field 3: Node address. string node_address = 3; + + // Field 4: Account address. string address = 4; + + // Field 5: Bandwidth details. sentinel.types.v1.Bandwidth bandwidth = 5 [(gogoproto.nullable) = false]; + + // Field 6: Session duration. google.protobuf.Duration duration = 6 [ (gogoproto.stdduration) = true, (gogoproto.nullable) = false ]; + + // Field 7: Inactive timestamp. google.protobuf.Timestamp inactive_at = 7 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + + // Field 8: Session status. sentinel.types.v1.Status status = 8; + + // Field 9: Status timestamp. google.protobuf.Timestamp status_at = 9 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true diff --git a/proto/sentinel/subscription/v2/allocation.proto b/proto/sentinel/subscription/v2/allocation.proto index 8be5e072..9196fd25 100644 --- a/proto/sentinel/subscription/v2/allocation.proto +++ b/proto/sentinel/subscription/v2/allocation.proto @@ -7,13 +7,21 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Allocation represents an allocation. message Allocation { + // Field 1: Allocation ID. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Account address. string address = 2; + + // Field 3: Granted bytes. string granted_bytes = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + + // Field 4: Utilized bytes. string utilised_bytes = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false diff --git a/proto/sentinel/subscription/v2/events.proto b/proto/sentinel/subscription/v2/events.proto index e7741b6a..0514d6a2 100644 --- a/proto/sentinel/subscription/v2/events.proto +++ b/proto/sentinel/subscription/v2/events.proto @@ -8,84 +8,144 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// EventUpdateStatus represents an update to the status of an event. message EventUpdateStatus { + // Field 1: Status of the event. sentinel.types.v1.Status status = 1 [(gogoproto.moretags) = "yaml:\"status\""]; + + // Field 2: Address associated with the event. string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 3: Unique identifier for the event. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; + + // Field 4: Unique identifier for the associated plan. uint64 plan_id = 4 [ (gogoproto.customname) = "PlanID", (gogoproto.moretags) = "yaml:\"plan_id\"" ]; } +// EventAllocate represents an allocation event. message EventAllocate { + // Field 1: Address associated with the allocation. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Granted bytes in the allocation. string granted_bytes = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + + // Field 3: Utilized bytes in the allocation. string utilised_bytes = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + + // Field 4: Unique identifier for the allocation. uint64 id = 4 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventCreatePayout represents an event for creating a payout. message EventCreatePayout { + // Field 1: Address associated with the payout. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the payout. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Unique identifier for the payout. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventPayForPayout represents an event for paying for a payout. message EventPayForPayout { + // Field 1: Address associated with the payout payment. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the payout payment. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Payment amount for the payout. string payment = 3 [(gogoproto.moretags) = "yaml:\"payment\""]; + + // Field 4: Staking reward associated with the payout. string staking_reward = 4 [(gogoproto.moretags) = "yaml:\"staking_reward\""]; + + // Field 5: Unique identifier for the payout. uint64 id = 5 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventPayForPlan represents an event for paying for a plan. message EventPayForPlan { + // Field 1: Address associated with the plan payment. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Payment amount for the plan. string payment = 2 [(gogoproto.moretags) = "yaml:\"payment\""]; + + // Field 3: Provider address associated with the plan payment. string provider_address = 3 [(gogoproto.moretags) = "yaml:\"provider_address\""]; + + // Field 4: Staking reward associated with the plan. string staking_reward = 4 [(gogoproto.moretags) = "yaml:\"staking_reward\""]; + + // Field 5: Unique identifier for the plan. uint64 id = 5 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" ]; } +// EventPayForSession represents an event for paying for a session. message EventPayForSession { + // Field 1: Address associated with the session payment. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Node address associated with the session payment. string node_address = 2 [(gogoproto.moretags) = "yaml:\"node_address\""]; + + // Field 3: Payment amount for the session. string payment = 3 [(gogoproto.moretags) = "yaml:\"payment\""]; + + // Field 4: Staking reward associated with the session. string staking_reward = 4 [(gogoproto.moretags) = "yaml:\"staking_reward\""]; + + // Field 5: Unique identifier for the session. uint64 session_id = 5 [ (gogoproto.customname) = "SessionID", (gogoproto.moretags) = "yaml:\"session_id\"" ]; + + // Field 6: Unique identifier for the subscription. uint64 subscription_id = 6 [ (gogoproto.customname) = "SubscriptionID", (gogoproto.moretags) = "yaml:\"subscription_id\"" ]; } +// EventRefund represents an event for processing a refund. message EventRefund { + // Field 1: Address associated with the refund. string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + + // Field 2: Amount to be refunded. string amount = 2 [(gogoproto.moretags) = "yaml:\"amount\""]; + + // Field 3: Unique identifier for the refund. uint64 id = 3 [ (gogoproto.customname) = "ID", (gogoproto.moretags) = "yaml:\"id\"" diff --git a/proto/sentinel/subscription/v2/genesis.proto b/proto/sentinel/subscription/v2/genesis.proto index 71872f79..7bbcc3b9 100644 --- a/proto/sentinel/subscription/v2/genesis.proto +++ b/proto/sentinel/subscription/v2/genesis.proto @@ -10,12 +10,22 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisSubscription represents the initial state for a subscription in the genesis block. message GenesisSubscription { + // Field 1: Subscription information stored as a serialized Any message. google.protobuf.Any subscription = 1; + + // Field 2: Allocations associated with the subscription. + // Each allocation contains information about granted and utilized bytes. repeated Allocation allocations = 2 [(gogoproto.nullable) = false]; } +// GenesisState represents the initial state of the module in the genesis block. message GenesisState { + // Field 1: Subscriptions in the genesis block. + // Each GenesisSubscription contains subscription information and associated allocations. repeated GenesisSubscription subscriptions = 1 [(gogoproto.nullable) = false]; + + // Field 2: Parameters for the module stored in the genesis block. Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/sentinel/subscription/v2/msg.proto b/proto/sentinel/subscription/v2/msg.proto index 779789e6..858820ed 100644 --- a/proto/sentinel/subscription/v2/msg.proto +++ b/proto/sentinel/subscription/v2/msg.proto @@ -7,31 +7,44 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; -// MsgCancelRequest defines the SDK message for cancelling a subscription +// MsgCancelRequest defines the SDK message for cancelling a subscription. message MsgCancelRequest { + // Field 1: Address initiating the cancel request. string from = 1; + + // Field 2: Unique identifier for the subscription to be cancelled. uint64 id = 2 [(gogoproto.customname) = "ID"]; } -// MsgAllocateRequest defines the SDK message for allocating the bytes of a -// subscription for an address +// MsgAllocateRequest defines the SDK message for allocating bytes of a subscription for an address. message MsgAllocateRequest { + // Field 1: Address initiating the allocate request. string from = 1; + + // Field 2: Unique identifier for the subscription. uint64 id = 2 [(gogoproto.customname) = "ID"]; + + // Field 3: Address for which bytes are allocated. string address = 3; + + // Field 4: Number of bytes to allocate. string bytes = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; } -// MsgCancelResponse defines the response of message MsgCancelRequest +// MsgCancelResponse defines the response of message MsgCancelRequest. message MsgCancelResponse {} -// MsgAllocateResponse defines the response of message MsgAllocateRequest +// MsgAllocateResponse defines the response of message MsgAllocateRequest. message MsgAllocateResponse {} +// MsgService defines the gRPC service for subscription-related messages. service MsgService { + // RPC method for cancelling a subscription. rpc MsgCancel(MsgCancelRequest) returns (MsgCancelResponse); + + // RPC method for allocating bytes of a subscription for an address. rpc MsgAllocate(MsgAllocateRequest) returns (MsgAllocateResponse); } diff --git a/proto/sentinel/subscription/v2/params.proto b/proto/sentinel/subscription/v2/params.proto index 73aaa993..6cbcd47e 100644 --- a/proto/sentinel/subscription/v2/params.proto +++ b/proto/sentinel/subscription/v2/params.proto @@ -8,7 +8,10 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Params represents the configurable parameters for subscription status changes. message Params { + // Field 1: status_change_delay specifies the duration before a subscription status change takes effect. + // The value is a duration specified in the standard Duration format. google.protobuf.Duration status_change_delay = 1 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true diff --git a/proto/sentinel/subscription/v2/payout.proto b/proto/sentinel/subscription/v2/payout.proto index 5bb7e09f..adbcd668 100644 --- a/proto/sentinel/subscription/v2/payout.proto +++ b/proto/sentinel/subscription/v2/payout.proto @@ -9,12 +9,26 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Payout represents information about a payout. message Payout { + // Field 1: Unique identifier for the payout. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Address associated with the payout. string address = 2; + + // Field 3: Node address associated with the payout. string node_address = 3; + + // Field 4: Duration, in hours, for which the payout is calculated. int64 hours = 4; + + // Field 5: Price of the payout, represented as a Cosmos Coin. + // This field is not nullable. cosmos.base.v1beta1.Coin price = 5 [(gogoproto.nullable) = false]; + + // Field 6: Timestamp indicating when the next payout is scheduled. + // This field is not nullable and is represented using the standard Timestamp format. google.protobuf.Timestamp next_at = 6 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true diff --git a/proto/sentinel/subscription/v2/querier.proto b/proto/sentinel/subscription/v2/querier.proto index 7964dbe7..dfb1dc94 100644 --- a/proto/sentinel/subscription/v2/querier.proto +++ b/proto/sentinel/subscription/v2/querier.proto @@ -13,160 +13,250 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// QuerySubscriptionsRequest represents the request for querying subscriptions. message QuerySubscriptionsRequest { + // Field 1: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 1; } +// QuerySubscriptionsForAccountRequest represents the request for querying subscriptions for a specific account. message QuerySubscriptionsForAccountRequest { + // Field 1: Address of the account for which subscriptions are queried. string address = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySubscriptionsForNodeRequest represents the request for querying subscriptions for a specific node. message QuerySubscriptionsForNodeRequest { + // Field 1: Address of the node for which subscriptions are queried. string address = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySubscriptionsForPlanRequest represents the request for querying subscriptions for a specific plan. message QuerySubscriptionsForPlanRequest { + // Field 1: Unique identifier for the plan for which subscriptions are queried. uint64 id = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QuerySubscriptionRequest represents the request for querying a specific subscription. message QuerySubscriptionRequest { + // Field 1: Unique identifier for the subscription being queried. uint64 id = 1; } +// QueryAllocationRequest represents the request for querying a specific allocation. message QueryAllocationRequest { + // Field 1: Unique identifier for the subscription associated with the allocation. uint64 id = 1; + + // Field 2: Address for which the allocation is queried. string address = 2; } +// QueryAllocationsRequest represents the request for querying allocations associated with a subscription. message QueryAllocationsRequest { + // Field 1: Unique identifier for the subscription for which allocations are queried. uint64 id = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QueryPayoutsRequest represents the request for querying payouts. message QueryPayoutsRequest { + // Field 1: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 1; } +// QueryPayoutsForAccountRequest represents the request for querying payouts for a specific account. message QueryPayoutsForAccountRequest { + // Field 1: Address of the account for which payouts are queried. string address = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QueryPayoutsForNodeRequest represents the request for querying payouts for a specific node. message QueryPayoutsForNodeRequest { + // Field 1: Address of the node for which payouts are queried. string address = 1; + + // Field 2: Pagination options for the query. cosmos.base.query.v1beta1.PageRequest pagination = 2; } +// QueryPayoutRequest represents the request for querying a specific payout. message QueryPayoutRequest { + // Field 1: Unique identifier for the payout being queried. uint64 id = 1; } +// QueryParamsRequest represents the request for querying subscription module parameters. message QueryParamsRequest {} +// QuerySubscriptionsResponse represents the response for querying subscriptions. message QuerySubscriptionsResponse { + // Field 1: List of serialized subscription information. repeated google.protobuf.Any subscriptions = 1; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySubscriptionsForAccountResponse represents the response for querying subscriptions for a specific account. message QuerySubscriptionsForAccountResponse { + // Field 1: List of serialized subscription information. repeated google.protobuf.Any subscriptions = 1; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySubscriptionsForNodeResponse represents the response for querying subscriptions for a specific node. message QuerySubscriptionsForNodeResponse { + // Field 1: List of serialized subscription information. repeated google.protobuf.Any subscriptions = 1; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySubscriptionsForPlanResponse represents the response for querying subscriptions for a specific plan. message QuerySubscriptionsForPlanResponse { + // Field 1: List of serialized subscription information. repeated google.protobuf.Any subscriptions = 1; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QuerySubscriptionResponse represents the response for querying a specific subscription. message QuerySubscriptionResponse { + // Field 1: Serialized subscription information. google.protobuf.Any subscription = 1; } +// QueryAllocationResponse represents the response for querying a specific allocation. message QueryAllocationResponse { + // Field 1: Allocation information. Allocation allocation = 1 [(gogoproto.nullable) = false]; } +// QueryAllocationsResponse represents the response for querying allocations associated with a subscription. message QueryAllocationsResponse { + // Field 1: List of allocation information. repeated Allocation allocations = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPayoutsResponse represents the response for querying payouts. message QueryPayoutsResponse { + // Field 1: List of payout information. repeated Payout payouts = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPayoutsForAccountResponse represents the response for querying payouts for a specific account. message QueryPayoutsForAccountResponse { + // Field 1: List of payout information. repeated Payout payouts = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPayoutsForNodeResponse represents the response for querying payouts for a specific node. message QueryPayoutsForNodeResponse { + // Field 1: List of payout information. repeated Payout payouts = 1 [(gogoproto.nullable) = false]; + + // Field 2: Pagination information for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryPayoutResponse represents the response for querying a specific payout. message QueryPayoutResponse { + // Field 1: Payout information. Payout payout = 1 [(gogoproto.nullable) = false]; } +// QueryParamsResponse represents the response for querying subscription module parameters. message QueryParamsResponse { + // Field 1: Subscription module parameters. Params params = 1 [(gogoproto.nullable) = false]; } +// QueryService defines the gRPC service for subscription-related queries. service QueryService { + // RPC method for querying subscriptions. rpc QuerySubscriptions(QuerySubscriptionsRequest) returns (QuerySubscriptionsResponse) { option (google.api.http).get = "/sentinel/subscriptions"; } + // RPC method for querying subscriptions for a specific account. rpc QuerySubscriptionsForAccount(QuerySubscriptionsForAccountRequest) returns (QuerySubscriptionsForAccountResponse) { option (google.api.http).get = "/sentinel/accounts/{address}/subscriptions"; } + // RPC method for querying subscriptions for a specific node. rpc QuerySubscriptionsForNode(QuerySubscriptionsForNodeRequest) returns (QuerySubscriptionsForNodeResponse) { option (google.api.http).get = "/sentinel/nodes/{address}/subscriptions"; } + // RPC method for querying subscriptions for a specific plan. rpc QuerySubscriptionsForPlan(QuerySubscriptionsForPlanRequest) returns (QuerySubscriptionsForPlanResponse) { option (google.api.http).get = "/sentinel/plans/{id}/subscriptions"; } + // RPC method for querying a specific subscription. rpc QuerySubscription(QuerySubscriptionRequest) returns (QuerySubscriptionResponse) { option (google.api.http).get = "/sentinel/subscriptions/{id}"; } + // RPC method for querying allocations associated with a subscription. rpc QueryAllocations(QueryAllocationsRequest) returns (QueryAllocationsResponse) { option (google.api.http).get = "/sentinel/subscriptions/{id}/allocations"; } + // RPC method for querying a specific allocation. rpc QueryAllocation(QueryAllocationRequest) returns (QueryAllocationResponse) { option (google.api.http).get = "/sentinel/subscriptions/{id}/allocations/{address}"; } + // RPC method for querying payouts. rpc QueryPayouts(QueryPayoutsRequest) returns (QueryPayoutsResponse) { option (google.api.http).get = "/sentinel/payouts"; } + // RPC method for querying payouts for a specific account. rpc QueryPayoutsForAccount(QueryPayoutsForAccountRequest) returns (QueryPayoutsForAccountResponse) { option (google.api.http).get = "/sentinel/accounts/{address}/payouts"; } + // RPC method for querying payouts for a specific node. rpc QueryPayoutsForNode(QueryPayoutsForNodeRequest) returns (QueryPayoutsForNodeResponse) { option (google.api.http).get = "/sentinel/nodes/{address}/payouts"; } + // RPC method for querying a specific payout. rpc QueryPayout(QueryPayoutRequest) returns (QueryPayoutResponse) { option (google.api.http).get = "/sentinel/payouts/{id}"; } + // RPC method for querying subscription module parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/sentinel/modules/subscription/params"; } diff --git a/proto/sentinel/subscription/v2/subscription.proto b/proto/sentinel/subscription/v2/subscription.proto index 0c1e4c25..27be8449 100644 --- a/proto/sentinel/subscription/v2/subscription.proto +++ b/proto/sentinel/subscription/v2/subscription.proto @@ -10,38 +10,72 @@ option go_package = "github.com/sentinel-official/hub/v1/x/subscription/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// SubscriptionType represents the type of a subscription. enum SubscriptionType { + // Use of goproto_enum_prefix is disabled for this enum. option (gogoproto.goproto_enum_prefix) = false; + + // TYPE_UNSPECIFIED indicates an unspecified subscription type. TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "TypeUnspecified"]; + + // TYPE_NODE indicates a subscription associated with a node. TYPE_NODE = 1 [(gogoproto.enumvalue_customname) = "TypeNode"]; + + // TYPE_PLAN indicates a subscription associated with a plan. TYPE_PLAN = 2 [(gogoproto.enumvalue_customname) = "TypePlan"]; } +// BaseSubscription represents the common base for different subscription types. message BaseSubscription { + // Field 1: Unique identifier for the subscription. uint64 id = 1 [(gogoproto.customname) = "ID"]; + + // Field 2: Address associated with the subscription. string address = 2; + + // Field 3: Timestamp indicating when the subscription became inactive. google.protobuf.Timestamp inactive_at = 3 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; + // Field 4: Status of the subscription. sentinel.types.v1.Status status = 4; + + // Field 5: Timestamp indicating when the subscription status was last updated. google.protobuf.Timestamp status_at = 5 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; } +// NodeSubscription represents a subscription associated with a node. message NodeSubscription { + // Field 1: Common base subscription information. BaseSubscription base = 1 [(gogoproto.embed) = true]; + + // Field 2: Node address associated with the subscription. string node_address = 2; + + // Field 3: Number of gigabytes associated with the subscription. int64 gigabytes = 3; + + // Field 4: Duration, in hours, for which the subscription is active. int64 hours = 4; + + // Field 5: Deposit required for the subscription, represented as a Cosmos Coin. + // This field is not nullable. cosmos.base.v1beta1.Coin deposit = 5 [(gogoproto.nullable) = false]; } +// PlanSubscription represents a subscription associated with a plan. message PlanSubscription { + // Field 1: Common base subscription information. BaseSubscription base = 1 [(gogoproto.embed) = true]; + + // Field 2: Unique identifier for the plan associated with the subscription. uint64 plan_id = 2 [(gogoproto.customname) = "PlanID"]; + + // Field 3: Denomination associated with the subscription. string denom = 3; } diff --git a/proto/sentinel/types/v1/bandwidth.proto b/proto/sentinel/types/v1/bandwidth.proto index 14e36370..f43f2ffa 100644 --- a/proto/sentinel/types/v1/bandwidth.proto +++ b/proto/sentinel/types/v1/bandwidth.proto @@ -7,11 +7,17 @@ option go_package = "github.com/sentinel-official/hub/v1/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// Bandwidth represents information about upload and download bandwidth. message Bandwidth { + // Field 1: Upload bandwidth, represented as a Cosmos SDK Int type. + // This field is not nullable. string upload = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + + // Field 2: Download bandwidth, represented as a Cosmos SDK Int type. + // This field is not nullable. string download = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false diff --git a/proto/sentinel/types/v1/status.proto b/proto/sentinel/types/v1/status.proto index 25ab0444..126af459 100644 --- a/proto/sentinel/types/v1/status.proto +++ b/proto/sentinel/types/v1/status.proto @@ -8,9 +8,17 @@ option (gogoproto.goproto_enum_prefix_all) = false; option (gogoproto.goproto_enum_stringer_all) = false; option (gogoproto.goproto_getters_all) = false; +// Status represents the status of a subscription. enum Status { + // STATUS_UNSPECIFIED indicates an unspecified subscription status. STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusUnspecified"]; + + // STATUS_ACTIVE indicates that the subscription is currently active. STATUS_ACTIVE = 1 [(gogoproto.enumvalue_customname) = "StatusActive"]; + + // STATUS_INACTIVE_PENDING indicates that the subscription is pending deactivation. STATUS_INACTIVE_PENDING = 2 [(gogoproto.enumvalue_customname) = "StatusInactivePending"]; + + // STATUS_INACTIVE indicates that the subscription is inactive. STATUS_INACTIVE = 3 [(gogoproto.enumvalue_customname) = "StatusInactive"]; } diff --git a/proto/sentinel/vpn/v1/genesis.proto b/proto/sentinel/vpn/v1/genesis.proto index 970caa19..96af2dd0 100644 --- a/proto/sentinel/vpn/v1/genesis.proto +++ b/proto/sentinel/vpn/v1/genesis.proto @@ -13,11 +13,25 @@ option go_package = "github.com/sentinel-official/hub/v1/x/vpn/types"; option (gogoproto.equal_all) = false; option (gogoproto.goproto_getters_all) = false; +// GenesisState represents the initial state of the Sentinel module at genesis. message GenesisState { + // Field 1: List of deposits associated with the Sentinel module. + // This field is not nullable. repeated sentinel.deposit.v1.Deposit deposits = 1 [(gogoproto.nullable) = false]; + + // Field 2: Genesis state for nodes in the Sentinel module. sentinel.node.v2.GenesisState nodes = 2; + + // Field 3: List of plans associated with the Sentinel module. + // This field is not nullable. repeated sentinel.plan.v2.GenesisPlan plans = 3 [(gogoproto.nullable) = false]; + + // Field 4: Genesis state for providers in the Sentinel module. sentinel.provider.v2.GenesisState providers = 4; + + // Field 5: Genesis state for sessions in the Sentinel module. sentinel.session.v2.GenesisState sessions = 5; + + // Field 6: Genesis state for subscriptions in the Sentinel module. sentinel.subscription.v2.GenesisState subscriptions = 6; } diff --git a/types/bandwidth.pb.go b/types/bandwidth.pb.go index 067d9b67..dd71e5de 100644 --- a/types/bandwidth.pb.go +++ b/types/bandwidth.pb.go @@ -24,8 +24,13 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Bandwidth represents information about upload and download bandwidth. type Bandwidth struct { - Upload github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=upload,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"upload"` + // Field 1: Upload bandwidth, represented as a Cosmos SDK Int type. + // This field is not nullable. + Upload github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=upload,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"upload"` + // Field 2: Download bandwidth, represented as a Cosmos SDK Int type. + // This field is not nullable. Download github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=download,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"download"` } diff --git a/types/status.pb.go b/types/status.pb.go index 27a2e2b8..967892a4 100644 --- a/types/status.pb.go +++ b/types/status.pb.go @@ -21,13 +21,18 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Status represents the status of a subscription. type Status int32 const ( - StatusUnspecified Status = 0 - StatusActive Status = 1 + // STATUS_UNSPECIFIED indicates an unspecified subscription status. + StatusUnspecified Status = 0 + // STATUS_ACTIVE indicates that the subscription is currently active. + StatusActive Status = 1 + // STATUS_INACTIVE_PENDING indicates that the subscription is pending deactivation. StatusInactivePending Status = 2 - StatusInactive Status = 3 + // STATUS_INACTIVE indicates that the subscription is inactive. + StatusInactive Status = 3 ) var Status_name = map[int32]string{ diff --git a/x/deposit/types/deposit.pb.go b/x/deposit/types/deposit.pb.go index 6b87dbda..9164f371 100644 --- a/x/deposit/types/deposit.pb.go +++ b/x/deposit/types/deposit.pb.go @@ -25,9 +25,15 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Deposit represents a message for handling deposits. type Deposit struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` + // Field 1: Deposit address represented as a string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: List of coins involved in the deposit. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"` } func (m *Deposit) Reset() { *m = Deposit{} } diff --git a/x/deposit/types/events.pb.go b/x/deposit/types/events.pb.go index 1f084a20..d6d97adf 100644 --- a/x/deposit/types/events.pb.go +++ b/x/deposit/types/events.pb.go @@ -23,9 +23,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// EventAdd represents a message for adding events. type EventAdd struct { + // Field 1: Address associated with the event. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Coins string `protobuf:"bytes,2,opt,name=coins,proto3" json:"coins,omitempty" yaml:"coins"` + // Field 2: Coins associated with the event. + Coins string `protobuf:"bytes,2,opt,name=coins,proto3" json:"coins,omitempty" yaml:"coins"` } func (m *EventAdd) Reset() { *m = EventAdd{} } @@ -61,9 +64,12 @@ func (m *EventAdd) XXX_DiscardUnknown() { var xxx_messageInfo_EventAdd proto.InternalMessageInfo +// EventSubtract represents a message for subtracting events. type EventSubtract struct { + // Field 1: Address associated with the event. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Coins string `protobuf:"bytes,2,opt,name=coins,proto3" json:"coins,omitempty" yaml:"coins"` + // Field 2: Coins associated with the event. + Coins string `protobuf:"bytes,2,opt,name=coins,proto3" json:"coins,omitempty" yaml:"coins"` } func (m *EventSubtract) Reset() { *m = EventSubtract{} } diff --git a/x/deposit/types/querier.pb.go b/x/deposit/types/querier.pb.go index 66711ad5..e8871819 100644 --- a/x/deposit/types/querier.pb.go +++ b/x/deposit/types/querier.pb.go @@ -30,7 +30,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryDepositsRequest represents a request to query deposits with optional pagination. type QueryDepositsRequest struct { + // Field 1: Pagination parameters for the query. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -67,7 +69,9 @@ func (m *QueryDepositsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDepositsRequest proto.InternalMessageInfo +// QueryDepositRequest represents a request to query a specific deposit by address. type QueryDepositRequest struct { + // Field 1: Address of the deposit to be queried. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } @@ -104,8 +108,11 @@ func (m *QueryDepositRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDepositRequest proto.InternalMessageInfo +// QueryDepositsResponse represents the response to a query for deposits. type QueryDepositsResponse struct { - Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` + // Field 1: List of deposits returned in the response. + Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` + // Field 2: Pagination details for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -142,7 +149,9 @@ func (m *QueryDepositsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDepositsResponse proto.InternalMessageInfo +// QueryDepositResponse represents the response to a query for a specific deposit. type QueryDepositResponse struct { + // Field 1: The queried deposit. Deposit Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` } @@ -233,7 +242,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method for querying deposits with optional pagination. QueryDeposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) + // RPC method for querying a specific deposit by address. QueryDeposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) } @@ -265,7 +276,9 @@ func (c *queryServiceClient) QueryDeposit(ctx context.Context, in *QueryDepositR // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method for querying deposits with optional pagination. QueryDeposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) + // RPC method for querying a specific deposit by address. QueryDeposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) } diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go index 74ce5b0d..e29d712e 100644 --- a/x/mint/types/genesis.pb.go +++ b/x/mint/types/genesis.pb.go @@ -23,7 +23,11 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisState represents the genesis state for the module. type GenesisState struct { + // Field 1: List of inflations included in the genesis state. + // - (gogoproto.moretags) = "yaml:\"inflations\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. Inflations []Inflation `protobuf:"bytes,1,rep,name=inflations,proto3" json:"inflations" yaml:"inflations"` } diff --git a/x/mint/types/inflation.pb.go b/x/mint/types/inflation.pb.go index 9b3a4352..2c15fc05 100644 --- a/x/mint/types/inflation.pb.go +++ b/x/mint/types/inflation.pb.go @@ -28,11 +28,31 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Inflation represents a message for handling inflation parameters. type Inflation struct { - Max github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=max,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max" yaml:"max"` - Min github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=min,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min" yaml:"min"` + // Field 1: Maximum inflation rate. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"max\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. + Max github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=max,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max" yaml:"max"` + // Field 2: Minimum inflation rate. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"min\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. + Min github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=min,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min" yaml:"min"` + // Field 3: Rate of change of inflation. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.moretags) = "yaml:\"rate_change\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. RateChange github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=rate_change,json=rateChange,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate_change" yaml:"rate_change"` - Timestamp time.Time `protobuf:"bytes,4,opt,name=timestamp,proto3,stdtime" json:"timestamp" yaml:"timestamp"` + // Field 4: Timestamp indicating when the inflation parameters were set. + // - (gogoproto.moretags) = "yaml:\"timestamp\"": YAML tag for better representation. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. + Timestamp time.Time `protobuf:"bytes,4,opt,name=timestamp,proto3,stdtime" json:"timestamp" yaml:"timestamp"` } func (m *Inflation) Reset() { *m = Inflation{} } diff --git a/x/node/types/events.pb.go b/x/node/types/events.pb.go index be77868b..5bcf4849 100644 --- a/x/node/types/events.pb.go +++ b/x/node/types/events.pb.go @@ -24,7 +24,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// EventRegister represents an event for registration. type EventRegister struct { + // Field 1: Address associated with the registration event. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` } @@ -61,7 +63,9 @@ func (m *EventRegister) XXX_DiscardUnknown() { var xxx_messageInfo_EventRegister proto.InternalMessageInfo +// EventUpdateDetails represents an event for updating details. type EventUpdateDetails struct { + // Field 1: Address associated with the update details event. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` } @@ -98,9 +102,12 @@ func (m *EventUpdateDetails) XXX_DiscardUnknown() { var xxx_messageInfo_EventUpdateDetails proto.InternalMessageInfo +// EventUpdateStatus represents an event for updating status. type EventUpdateStatus struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Status to be updated in the event. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` + // Field 2: Address associated with the update status event. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` } func (m *EventUpdateStatus) Reset() { *m = EventUpdateStatus{} } @@ -136,10 +143,14 @@ func (m *EventUpdateStatus) XXX_DiscardUnknown() { var xxx_messageInfo_EventUpdateStatus proto.InternalMessageInfo +// EventCreateSubscription represents an event for creating a subscription. type EventCreateSubscription struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Address associated with the create subscription event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the create subscription event. NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 3: ID associated with the create subscription event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventCreateSubscription) Reset() { *m = EventCreateSubscription{} } diff --git a/x/node/types/genesis.pb.go b/x/node/types/genesis.pb.go index a22181e1..66dcbacf 100644 --- a/x/node/types/genesis.pb.go +++ b/x/node/types/genesis.pb.go @@ -23,8 +23,13 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisState represents the genesis state for the module. type GenesisState struct { - Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 1: List of nodes included in the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 2: Parameters associated with the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } diff --git a/x/node/types/msg.pb.go b/x/node/types/msg.pb.go index 16b66973..6477ca8f 100644 --- a/x/node/types/msg.pb.go +++ b/x/node/types/msg.pb.go @@ -31,12 +31,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgRegisterRequest defines the SDK message for registering a node +// MsgRegisterRequest defines the SDK message for registering a node. type MsgRegisterRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 1: Sender's address initiating the registration. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Prices in gigabytes for the registered node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. GigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=gigabyte_prices,json=gigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"gigabyte_prices"` - HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` - RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` + // Field 3: Hourly prices for the registered node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` + // Field 4: Remote URL associated with the registered node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` } func (m *MsgRegisterRequest) Reset() { *m = MsgRegisterRequest{} } @@ -72,12 +83,23 @@ func (m *MsgRegisterRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterRequest proto.InternalMessageInfo -// MsgUpdateDetailsRequest defines the SDK message for updating the node details +// MsgUpdateDetailsRequest defines the SDK message for updating node details. type MsgUpdateDetailsRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 1: Sender's address initiating the update. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Updated prices in gigabytes for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. GigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=gigabyte_prices,json=gigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"gigabyte_prices"` - HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` - RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` + // Field 3: Updated hourly prices for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` + // Field 4: Updated remote URL for the node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` } func (m *MsgUpdateDetailsRequest) Reset() { *m = MsgUpdateDetailsRequest{} } @@ -113,9 +135,11 @@ func (m *MsgUpdateDetailsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDetailsRequest proto.InternalMessageInfo -// MsgUpdateStatusRequest defines the SDK message for updating the node status +// MsgUpdateStatusRequest defines the SDK message for updating node status. type MsgUpdateStatusRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 1: Sender's address initiating the status update. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: New status for the node. Status types1.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` } @@ -152,13 +176,18 @@ func (m *MsgUpdateStatusRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateStatusRequest proto.InternalMessageInfo -// MsgSubscribeRequest defines the SDK message for subscribe to a node +// MsgSubscribeRequest defines the SDK message for subscribing to a node. type MsgSubscribeRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 1: Sender's address initiating the subscription. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Node address to subscribe to. NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` - Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` - Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` + // Field 3: Number of gigabytes for the subscription. + Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` + // Field 4: Number of hours for the subscription. + Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` + // Field 5: Denomination for the subscription. + Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` } func (m *MsgSubscribeRequest) Reset() { *m = MsgSubscribeRequest{} } @@ -194,7 +223,7 @@ func (m *MsgSubscribeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubscribeRequest proto.InternalMessageInfo -// MsgRegisterResponse defines the response of message MsgRegisterRequest +// MsgRegisterResponse defines the response of message MsgRegisterRequest. type MsgRegisterResponse struct { } @@ -231,8 +260,7 @@ func (m *MsgRegisterResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterResponse proto.InternalMessageInfo -// MsgUpdateDetailsResponse defines the response of message -// MsgUpdateDetailsRequest +// MsgUpdateDetailsResponse defines the response of message MsgUpdateDetailsRequest. type MsgUpdateDetailsResponse struct { } @@ -269,8 +297,7 @@ func (m *MsgUpdateDetailsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDetailsResponse proto.InternalMessageInfo -// MsgUpdateStatusResponse defines the response of message -// MsgUpdateStatusRequest +// MsgUpdateStatusResponse defines the response of message MsgUpdateStatusRequest. type MsgUpdateStatusResponse struct { } @@ -307,7 +334,7 @@ func (m *MsgUpdateStatusResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateStatusResponse proto.InternalMessageInfo -// MsgSubscribeResponse defines the response of message MsgSubscribeRequest +// MsgSubscribeResponse defines the response of message MsgSubscribeRequest. type MsgSubscribeResponse struct { } @@ -412,9 +439,13 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { + // RPC method for registering a node. MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) + // RPC method for updating node details. MsgUpdateDetails(ctx context.Context, in *MsgUpdateDetailsRequest, opts ...grpc.CallOption) (*MsgUpdateDetailsResponse, error) + // RPC method for updating node status. MsgUpdateStatus(ctx context.Context, in *MsgUpdateStatusRequest, opts ...grpc.CallOption) (*MsgUpdateStatusResponse, error) + // RPC method for subscribing to a node. MsgSubscribe(ctx context.Context, in *MsgSubscribeRequest, opts ...grpc.CallOption) (*MsgSubscribeResponse, error) } @@ -464,9 +495,13 @@ func (c *msgServiceClient) MsgSubscribe(ctx context.Context, in *MsgSubscribeReq // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { + // RPC method for registering a node. MsgRegister(context.Context, *MsgRegisterRequest) (*MsgRegisterResponse, error) + // RPC method for updating node details. MsgUpdateDetails(context.Context, *MsgUpdateDetailsRequest) (*MsgUpdateDetailsResponse, error) + // RPC method for updating node status. MsgUpdateStatus(context.Context, *MsgUpdateStatusRequest) (*MsgUpdateStatusResponse, error) + // RPC method for subscribing to a node. MsgSubscribe(context.Context, *MsgSubscribeRequest) (*MsgSubscribeResponse, error) } diff --git a/x/node/types/node.pb.go b/x/node/types/node.pb.go index 363a6472..16f6be3e 100644 --- a/x/node/types/node.pb.go +++ b/x/node/types/node.pb.go @@ -30,14 +30,33 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Node represents a message for handling node information. type Node struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Address associated with the node. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Prices in gigabytes for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. GigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=gigabyte_prices,json=gigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"gigabyte_prices"` - HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` - RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` - InactiveAt time.Time `protobuf:"bytes,5,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` - Status types1.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` - StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` + // Field 3: Hourly prices for the node. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + HourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=hourly_prices,json=hourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"hourly_prices"` + // Field 4: Remote URL associated with the node. + // - (gogoproto.customname) = "RemoteURL": Custom name for the field. + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` + // Field 5: Timestamp indicating when the node became inactive. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. + InactiveAt time.Time `protobuf:"bytes,5,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` + // Field 6: Status of the node, using the sentinel.types.v1.Status enum. + Status types1.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 7: Timestamp indicating when the status of the node was last updated. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. + StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` } func (m *Node) Reset() { *m = Node{} } diff --git a/x/node/types/params.pb.go b/x/node/types/params.pb.go index b0a338a4..5e5920e5 100644 --- a/x/node/types/params.pb.go +++ b/x/node/types/params.pb.go @@ -29,18 +29,48 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Params represents a message for handling node parameters. type Params struct { - Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` - ActiveDuration time.Duration `protobuf:"bytes,2,opt,name=active_duration,json=activeDuration,proto3,stdduration" json:"active_duration"` - MaxGigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=max_gigabyte_prices,json=maxGigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_gigabyte_prices"` - MinGigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=min_gigabyte_prices,json=minGigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_gigabyte_prices"` - MaxHourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=max_hourly_prices,json=maxHourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_hourly_prices"` - MinHourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=min_hourly_prices,json=minHourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_hourly_prices"` - MaxSubscriptionGigabytes int64 `protobuf:"varint,7,opt,name=max_subscription_gigabytes,json=maxSubscriptionGigabytes,proto3" json:"max_subscription_gigabytes,omitempty"` - MinSubscriptionGigabytes int64 `protobuf:"varint,8,opt,name=min_subscription_gigabytes,json=minSubscriptionGigabytes,proto3" json:"min_subscription_gigabytes,omitempty"` - MaxSubscriptionHours int64 `protobuf:"varint,9,opt,name=max_subscription_hours,json=maxSubscriptionHours,proto3" json:"max_subscription_hours,omitempty"` - MinSubscriptionHours int64 `protobuf:"varint,10,opt,name=min_subscription_hours,json=minSubscriptionHours,proto3" json:"min_subscription_hours,omitempty"` - StakingShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=staking_share,json=stakingShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_share"` + // Field 1: Deposit required for registering a node. + // - (gogoproto.nullable) = false: Field is not nullable. + Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` + // Field 2: Duration for which a node remains active. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdduration) = true: Use standard duration representation for Go. + ActiveDuration time.Duration `protobuf:"bytes,2,opt,name=active_duration,json=activeDuration,proto3,stdduration" json:"active_duration"` + // Field 3: Maximum prices in gigabytes for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + MaxGigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=max_gigabyte_prices,json=maxGigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_gigabyte_prices"` + // Field 4: Minimum prices in gigabytes for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + MinGigabytePrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=min_gigabyte_prices,json=minGigabytePrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_gigabyte_prices"` + // Field 5: Maximum prices in hours for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + MaxHourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=max_hourly_prices,json=maxHourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_hourly_prices"` + // Field 6: Minimum prices in hours for a node's subscription. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins": + // Type to cast to when repeating this field. + MinHourlyPrices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=min_hourly_prices,json=minHourlyPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_hourly_prices"` + // Field 7: Maximum gigabytes allowed for a subscription. + MaxSubscriptionGigabytes int64 `protobuf:"varint,7,opt,name=max_subscription_gigabytes,json=maxSubscriptionGigabytes,proto3" json:"max_subscription_gigabytes,omitempty"` + // Field 8: Minimum gigabytes required for a subscription. + MinSubscriptionGigabytes int64 `protobuf:"varint,8,opt,name=min_subscription_gigabytes,json=minSubscriptionGigabytes,proto3" json:"min_subscription_gigabytes,omitempty"` + // Field 9: Maximum hours allowed for a subscription. + MaxSubscriptionHours int64 `protobuf:"varint,9,opt,name=max_subscription_hours,json=maxSubscriptionHours,proto3" json:"max_subscription_hours,omitempty"` + // Field 10: Minimum hours required for a subscription. + MinSubscriptionHours int64 `protobuf:"varint,10,opt,name=min_subscription_hours,json=minSubscriptionHours,proto3" json:"min_subscription_hours,omitempty"` + // Field 11: Staking share required for a node. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.nullable) = false: Field is not nullable. + StakingShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=staking_share,json=stakingShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_share"` } func (m *Params) Reset() { *m = Params{} } diff --git a/x/node/types/querier.pb.go b/x/node/types/querier.pb.go index dda4184a..1f54ae00 100644 --- a/x/node/types/querier.pb.go +++ b/x/node/types/querier.pb.go @@ -31,8 +31,11 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryNodesRequest represents a request to query nodes with a specific status and pagination. type QueryNodesRequest struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 1: Status to filter nodes by. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 2: Pagination parameters for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -69,9 +72,13 @@ func (m *QueryNodesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodesRequest proto.InternalMessageInfo +// QueryNodesForPlanRequest represents a request to query nodes for a specific plan with status and pagination. type QueryNodesForPlanRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 1: Plan ID to filter nodes by. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Status to filter nodes by. + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 3: Pagination parameters for the query. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -108,7 +115,9 @@ func (m *QueryNodesForPlanRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodesForPlanRequest proto.InternalMessageInfo +// QueryNodeRequest represents a request to query information about a specific node. type QueryNodeRequest struct { + // Field 1: Address of the node to query. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } @@ -145,6 +154,7 @@ func (m *QueryNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodeRequest proto.InternalMessageInfo +// QueryParamsRequest represents a request to query module parameters. type QueryParamsRequest struct { } @@ -181,8 +191,11 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +// QueryNodesResponse represents a response containing a list of nodes and pagination information. type QueryNodesResponse struct { - Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 1: List of nodes in the response. + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 2: Pagination information in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -219,8 +232,11 @@ func (m *QueryNodesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodesResponse proto.InternalMessageInfo +// QueryNodesForPlanResponse represents a response containing a list of nodes for a specific plan and pagination information. type QueryNodesForPlanResponse struct { - Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 1: List of nodes in the response. + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + // Field 2: Pagination information in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -257,7 +273,9 @@ func (m *QueryNodesForPlanResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodesForPlanResponse proto.InternalMessageInfo +// QueryNodeResponse represents a response containing information about a specific node. type QueryNodeResponse struct { + // Field 1: Information about the queried node. Node Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node"` } @@ -294,7 +312,9 @@ func (m *QueryNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNodeResponse proto.InternalMessageInfo +// QueryParamsResponse represents a response containing module parameters. type QueryParamsResponse struct { + // Field 1: Module parameters in the response. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -401,9 +421,13 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method for querying nodes with a specific status and pagination. QueryNodes(ctx context.Context, in *QueryNodesRequest, opts ...grpc.CallOption) (*QueryNodesResponse, error) + // RPC method for querying nodes for a specific plan with status and pagination. QueryNodesForPlan(ctx context.Context, in *QueryNodesForPlanRequest, opts ...grpc.CallOption) (*QueryNodesForPlanResponse, error) + // RPC method for querying information about a specific node. QueryNode(ctx context.Context, in *QueryNodeRequest, opts ...grpc.CallOption) (*QueryNodeResponse, error) + // RPC method for querying module parameters. QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -453,9 +477,13 @@ func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsReq // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method for querying nodes with a specific status and pagination. QueryNodes(context.Context, *QueryNodesRequest) (*QueryNodesResponse, error) + // RPC method for querying nodes for a specific plan with status and pagination. QueryNodesForPlan(context.Context, *QueryNodesForPlanRequest) (*QueryNodesForPlanResponse, error) + // RPC method for querying information about a specific node. QueryNode(context.Context, *QueryNodeRequest) (*QueryNodeResponse, error) + // RPC method for querying module parameters. QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/plan/types/events.pb.go b/x/plan/types/events.pb.go index f02894ae..8c6fe335 100644 --- a/x/plan/types/events.pb.go +++ b/x/plan/types/events.pb.go @@ -24,9 +24,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// EventCreate represents an event for creating an entity. type EventCreate struct { + // Field 1: Address associated with the event. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 2: Identifier associated with the event. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventCreate) Reset() { *m = EventCreate{} } @@ -62,10 +65,14 @@ func (m *EventCreate) XXX_DiscardUnknown() { var xxx_messageInfo_EventCreate proto.InternalMessageInfo +// EventUpdateStatus represents an event for updating the status of an entity. type EventUpdateStatus struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 1: Status associated with the event. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` + // Field 2: Address associated with the event. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 3: Identifier associated with the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventUpdateStatus) Reset() { *m = EventUpdateStatus{} } @@ -101,10 +108,14 @@ func (m *EventUpdateStatus) XXX_DiscardUnknown() { var xxx_messageInfo_EventUpdateStatus proto.InternalMessageInfo +// EventLinkNode represents an event for linking a node to an entity. type EventLinkNode struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Address associated with the event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the event. NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 3: Identifier associated with the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventLinkNode) Reset() { *m = EventLinkNode{} } @@ -140,10 +151,14 @@ func (m *EventLinkNode) XXX_DiscardUnknown() { var xxx_messageInfo_EventLinkNode proto.InternalMessageInfo +// EventUnlinkNode represents an event for unlinking a node from an entity. type EventUnlinkNode struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Address associated with the event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the event. NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 3: Identifier associated with the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventUnlinkNode) Reset() { *m = EventUnlinkNode{} } @@ -179,11 +194,16 @@ func (m *EventUnlinkNode) XXX_DiscardUnknown() { var xxx_messageInfo_EventUnlinkNode proto.InternalMessageInfo +// EventCreateSubscription represents an event for creating a subscription. type EventCreateSubscription struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Address associated with the event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Provider address associated with the event. ProviderAddress string `protobuf:"bytes,2,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty" yaml:"provider_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 3: Identifier associated with the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Plan ID associated with the event. + PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` } func (m *EventCreateSubscription) Reset() { *m = EventCreateSubscription{} } diff --git a/x/plan/types/genesis.pb.go b/x/plan/types/genesis.pb.go index a6b2cb5e..bcb63eef 100644 --- a/x/plan/types/genesis.pb.go +++ b/x/plan/types/genesis.pb.go @@ -23,8 +23,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisPlan represents the genesis state for a plan. type GenesisPlan struct { - Plan Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` + // Field 1: Plan information. + // - (gogoproto.nullable) = false: Field is not nullable. + Plan Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` + // Field 2: List of node addresses associated with the plan. Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` } diff --git a/x/plan/types/msg.pb.go b/x/plan/types/msg.pb.go index 13f95319..ca2dd1b3 100644 --- a/x/plan/types/msg.pb.go +++ b/x/plan/types/msg.pb.go @@ -35,12 +35,16 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgCreateRequest defines the SDK message for creating a subscription plan +// MsgCreateRequest defines the SDK message for creating a subscription plan. type MsgCreateRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Duration time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,stdduration" json:"duration"` - Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` - Prices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=prices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"prices"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Duration of the subscription plan. + Duration time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,stdduration" json:"duration"` + // Field 3: Amount of gigabytes in the subscription plan. + Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` + // Field 4: Prices associated with the subscription plan. + Prices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=prices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"prices"` } func (m *MsgCreateRequest) Reset() { *m = MsgCreateRequest{} } @@ -76,11 +80,13 @@ func (m *MsgCreateRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateRequest proto.InternalMessageInfo -// MsgUpdateStatusRequest defines the SDK message for modifying the status of a -// subscription plan +// MsgUpdateStatusRequest defines the SDK message for modifying the status of a subscription plan. type MsgUpdateStatusRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the subscription plan. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: New status for the subscription plan. Status types1.Status `protobuf:"varint,3,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` } @@ -117,11 +123,13 @@ func (m *MsgUpdateStatusRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateStatusRequest proto.InternalMessageInfo -// MsgLinkNodeRequest defines the SDK message for adding a node to a -// subscription plan +// MsgLinkNodeRequest defines the SDK message for adding a node to a subscription plan. type MsgLinkNodeRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the subscription plan. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Node address to be linked to the subscription plan. NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` } @@ -158,11 +166,13 @@ func (m *MsgLinkNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgLinkNodeRequest proto.InternalMessageInfo -// MsgUnlinkNodeRequest defines the SDK message for removing a node from a -// subscription plan +// MsgUnlinkNodeRequest defines the SDK message for removing a node from a subscription plan. type MsgUnlinkNodeRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the subscription plan. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Node address to be unlinked from the subscription plan. NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` } @@ -199,11 +209,13 @@ func (m *MsgUnlinkNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUnlinkNodeRequest proto.InternalMessageInfo -// MsgSubscribeRequest defines the SDK message for subscribing to a subscription -// plan +// MsgSubscribeRequest defines the SDK message for subscribing to a subscription plan. type MsgSubscribeRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the subscription plan. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Denomination for the subscription. Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` } @@ -240,7 +252,7 @@ func (m *MsgSubscribeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubscribeRequest proto.InternalMessageInfo -// MsgCreateResponse defines the response of message MsgCreateRequest +// MsgCreateResponse defines the response of message MsgCreateRequest. type MsgCreateResponse struct { } @@ -277,8 +289,7 @@ func (m *MsgCreateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateResponse proto.InternalMessageInfo -// MsgUpdateStatusResponse defines the response of message -// MsgUpdateStatusRequest +// MsgUpdateStatusResponse defines the response of message MsgUpdateStatusRequest. type MsgUpdateStatusResponse struct { } @@ -315,7 +326,7 @@ func (m *MsgUpdateStatusResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateStatusResponse proto.InternalMessageInfo -// MsgLinkNodeResponse defines the response of message MsgLinkNodeRequest +// MsgLinkNodeResponse defines the response of message MsgLinkNodeRequest. type MsgLinkNodeResponse struct { } @@ -352,7 +363,7 @@ func (m *MsgLinkNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgLinkNodeResponse proto.InternalMessageInfo -// MsgUnlinkNodeResponse defines the response of message MsgUnlinkNodeRequest +// MsgUnlinkNodeResponse defines the response of message MsgUnlinkNodeRequest. type MsgUnlinkNodeResponse struct { } @@ -389,7 +400,7 @@ func (m *MsgUnlinkNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUnlinkNodeResponse proto.InternalMessageInfo -// MsgSubscribeResponse defines the response of message MsgSubscribeRequest +// MsgSubscribeResponse defines the response of message MsgSubscribeRequest. type MsgSubscribeResponse struct { } @@ -497,10 +508,15 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { + // RPC method for creating a subscription plan. MsgCreate(ctx context.Context, in *MsgCreateRequest, opts ...grpc.CallOption) (*MsgCreateResponse, error) + // RPC method for modifying the status of a subscription plan. MsgUpdateStatus(ctx context.Context, in *MsgUpdateStatusRequest, opts ...grpc.CallOption) (*MsgUpdateStatusResponse, error) + // RPC method for linking a node to a subscription plan. MsgLinkNode(ctx context.Context, in *MsgLinkNodeRequest, opts ...grpc.CallOption) (*MsgLinkNodeResponse, error) + // RPC method for unlinking a node from a subscription plan. MsgUnlinkNode(ctx context.Context, in *MsgUnlinkNodeRequest, opts ...grpc.CallOption) (*MsgUnlinkNodeResponse, error) + // RPC method for subscribing to a subscription plan. MsgSubscribe(ctx context.Context, in *MsgSubscribeRequest, opts ...grpc.CallOption) (*MsgSubscribeResponse, error) } @@ -559,10 +575,15 @@ func (c *msgServiceClient) MsgSubscribe(ctx context.Context, in *MsgSubscribeReq // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { + // RPC method for creating a subscription plan. MsgCreate(context.Context, *MsgCreateRequest) (*MsgCreateResponse, error) + // RPC method for modifying the status of a subscription plan. MsgUpdateStatus(context.Context, *MsgUpdateStatusRequest) (*MsgUpdateStatusResponse, error) + // RPC method for linking a node to a subscription plan. MsgLinkNode(context.Context, *MsgLinkNodeRequest) (*MsgLinkNodeResponse, error) + // RPC method for unlinking a node from a subscription plan. MsgUnlinkNode(context.Context, *MsgUnlinkNodeRequest) (*MsgUnlinkNodeResponse, error) + // RPC method for subscribing to a subscription plan. MsgSubscribe(context.Context, *MsgSubscribeRequest) (*MsgSubscribeResponse, error) } diff --git a/x/plan/types/plan.pb.go b/x/plan/types/plan.pb.go index 91ee7065..6a5ccf87 100644 --- a/x/plan/types/plan.pb.go +++ b/x/plan/types/plan.pb.go @@ -31,14 +31,22 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Plan represents a subscription plan. type Plan struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - ProviderAddress string `protobuf:"bytes,2,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` - Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration"` - Gigabytes int64 `protobuf:"varint,4,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` - Prices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=prices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"prices"` - Status types1.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` - StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` + // Field 1: Identifier of the subscription plan. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Provider's address associated with the plan. + ProviderAddress string `protobuf:"bytes,2,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty"` + // Field 3: Duration of the subscription plan. + Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration"` + // Field 4: Amount of gigabytes in the subscription plan. + Gigabytes int64 `protobuf:"varint,4,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` + // Field 5: Prices associated with the subscription plan. + Prices github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=prices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"prices"` + // Field 6: Status of the subscription plan. + Status types1.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 7: Timestamp when the status was last updated. + StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` } func (m *Plan) Reset() { *m = Plan{} } diff --git a/x/plan/types/querier.pb.go b/x/plan/types/querier.pb.go index a50d150c..72a0691c 100644 --- a/x/plan/types/querier.pb.go +++ b/x/plan/types/querier.pb.go @@ -31,8 +31,11 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryPlansRequest defines the request for querying subscription plans. type QueryPlansRequest struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 1: Status filter for subscription plans. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 2: Pagination information. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -69,9 +72,14 @@ func (m *QueryPlansRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPlansRequest proto.InternalMessageInfo +// QueryPlansForProviderRequest defines the request for querying subscription plans +// associated with a provider. type QueryPlansForProviderRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 1: Provider's address for filtering subscription plans. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Status filter for subscription plans. + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 3: Pagination information. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -108,7 +116,9 @@ func (m *QueryPlansForProviderRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPlansForProviderRequest proto.InternalMessageInfo +// QueryPlanRequest defines the request for querying a specific subscription plan. type QueryPlanRequest struct { + // Field 1: Identifier of the subscription plan. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -145,8 +155,11 @@ func (m *QueryPlanRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPlanRequest proto.InternalMessageInfo +// QueryPlansResponse defines the response for querying subscription plans. type QueryPlansResponse struct { - Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + // Field 1: List of subscription plans. + Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + // Field 2: Pagination information. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -183,8 +196,12 @@ func (m *QueryPlansResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPlansResponse proto.InternalMessageInfo +// QueryPlansForProviderResponse defines the response for querying subscription +// plans associated with a provider. type QueryPlansForProviderResponse struct { - Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + // Field 1: List of subscription plans. + Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + // Field 2: Pagination information. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -221,7 +238,9 @@ func (m *QueryPlansForProviderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPlansForProviderResponse proto.InternalMessageInfo +// QueryPlanResponse defines the response for querying a specific subscription plan. type QueryPlanResponse struct { + // Field 1: Subscription plan information. Plan Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` } @@ -321,8 +340,11 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method for querying all subscription plans. QueryPlans(ctx context.Context, in *QueryPlansRequest, opts ...grpc.CallOption) (*QueryPlansResponse, error) + // RPC method for querying subscription plans associated with a provider. QueryPlansForProvider(ctx context.Context, in *QueryPlansForProviderRequest, opts ...grpc.CallOption) (*QueryPlansForProviderResponse, error) + // RPC method for querying a specific subscription plan. QueryPlan(ctx context.Context, in *QueryPlanRequest, opts ...grpc.CallOption) (*QueryPlanResponse, error) } @@ -363,8 +385,11 @@ func (c *queryServiceClient) QueryPlan(ctx context.Context, in *QueryPlanRequest // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method for querying all subscription plans. QueryPlans(context.Context, *QueryPlansRequest) (*QueryPlansResponse, error) + // RPC method for querying subscription plans associated with a provider. QueryPlansForProvider(context.Context, *QueryPlansForProviderRequest) (*QueryPlansForProviderResponse, error) + // RPC method for querying a specific subscription plan. QueryPlan(context.Context, *QueryPlanRequest) (*QueryPlanResponse, error) } diff --git a/x/provider/types/events.pb.go b/x/provider/types/events.pb.go index 4c3b2b7b..407f0636 100644 --- a/x/provider/types/events.pb.go +++ b/x/provider/types/events.pb.go @@ -23,7 +23,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Message representing an event registration. type EventRegister struct { + // Field 1: Address associated with the registration. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` } @@ -60,7 +62,9 @@ func (m *EventRegister) XXX_DiscardUnknown() { var xxx_messageInfo_EventRegister proto.InternalMessageInfo +// Message representing an event update. type EventUpdate struct { + // Field 1: Address associated with the update. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` } diff --git a/x/provider/types/genesis.pb.go b/x/provider/types/genesis.pb.go index 137f22f0..4c674538 100644 --- a/x/provider/types/genesis.pb.go +++ b/x/provider/types/genesis.pb.go @@ -23,9 +23,14 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Message representing the genesis state for the module. type GenesisState struct { + // Field 1: List of providers included in the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers"` - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` + // Field 2: Parameters associated with the genesis state. + // - (gogoproto.nullable) = false: Field is not nullable. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } diff --git a/x/provider/types/msg.pb.go b/x/provider/types/msg.pb.go index bdf485c8..925ee383 100644 --- a/x/provider/types/msg.pb.go +++ b/x/provider/types/msg.pb.go @@ -29,12 +29,17 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgRegisterRequest defines the SDK message for registering a provider +// MsgRegisterRequest defines the SDK message for registering a provider. type MsgRegisterRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + // Field 1: Sender's address initiating the registration. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Provider name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Field 3: Identity of the provider. + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + // Field 4: Website associated with the provider. + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + // Field 5: Description of the provider. Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` } @@ -71,14 +76,20 @@ func (m *MsgRegisterRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterRequest proto.InternalMessageInfo -// MsgUpdateRequest defines the SDK message for updating a provider +// MsgUpdateRequest defines the SDK message for updating a provider. type MsgUpdateRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Status types.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 1: Sender's address initiating the update. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: New provider name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Field 3: New identity of the provider. + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + // Field 4: New website associated with the provider. + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + // Field 5: New description of the provider. + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // Field 6: New status of the provider, using the sentinel.types.v1.Status enum. + Status types.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` } func (m *MsgUpdateRequest) Reset() { *m = MsgUpdateRequest{} } @@ -114,7 +125,7 @@ func (m *MsgUpdateRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateRequest proto.InternalMessageInfo -// MsgRegisterResponse defines the response of message MsgRegisterRequest +// MsgRegisterResponse defines the response of message MsgRegisterRequest. type MsgRegisterResponse struct { } @@ -151,7 +162,7 @@ func (m *MsgRegisterResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterResponse proto.InternalMessageInfo -// MsgUpdateResponse defines the response of message MsgUpdateRequest +// MsgUpdateResponse defines the response of message MsgUpdateRequest. type MsgUpdateResponse struct { } @@ -238,7 +249,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { + // RPC method for registering a provider. MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) + // RPC method for updating a provider. MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) } @@ -270,7 +283,9 @@ func (c *msgServiceClient) MsgUpdate(ctx context.Context, in *MsgUpdateRequest, // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { + // RPC method for registering a provider. MsgRegister(context.Context, *MsgRegisterRequest) (*MsgRegisterResponse, error) + // RPC method for updating a provider. MsgUpdate(context.Context, *MsgUpdateRequest) (*MsgUpdateResponse, error) } diff --git a/x/provider/types/params.pb.go b/x/provider/types/params.pb.go index e936cd00..3a153cc5 100644 --- a/x/provider/types/params.pb.go +++ b/x/provider/types/params.pb.go @@ -25,8 +25,15 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Params defines the parameters for the provider module. type Params struct { - Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` + // Field 1: Deposit required for providers. + // - (gogoproto.nullable) = false: Field is not nullable. + Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` + // Field 2: Staking share associated with the providers. + // - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec": + // Custom type definition for the field. + // - (gogoproto.nullable) = false: Field is not nullable. StakingShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=staking_share,json=stakingShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_share"` } diff --git a/x/provider/types/provider.pb.go b/x/provider/types/provider.pb.go index a8784a7c..5b54fa4e 100644 --- a/x/provider/types/provider.pb.go +++ b/x/provider/types/provider.pb.go @@ -28,14 +28,24 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Message representing a provider. type Provider struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` - Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Status types.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` - StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` + // Field 1: Provider address represented as a string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Provider name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Field 3: Identity of the provider. + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + // Field 4: Website associated with the provider. + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + // Field 5: Description of the provider. + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // Field 6: Status of the provider, using the sentinel.types.v1.Status enum. + Status types.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 7: Timestamp indicating when the status was last updated. + // - (gogoproto.nullable) = false: Field is not nullable. + // - (gogoproto.stdtime) = true: Use standard time representation for Go. + StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` } func (m *Provider) Reset() { *m = Provider{} } diff --git a/x/provider/types/querier.pb.go b/x/provider/types/querier.pb.go index b7d92125..bb12af66 100644 --- a/x/provider/types/querier.pb.go +++ b/x/provider/types/querier.pb.go @@ -31,9 +31,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryProvidersRequest represents a request to query providers with optional pagination and status filter. type QueryProvidersRequest struct { + // Field 1: Pagination parameters for the query. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` - Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 2: Status filter for querying providers. + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` } func (m *QueryProvidersRequest) Reset() { *m = QueryProvidersRequest{} } @@ -69,7 +72,9 @@ func (m *QueryProvidersRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryProvidersRequest proto.InternalMessageInfo +// QueryProviderRequest represents a request to query a specific provider by address. type QueryProviderRequest struct { + // Field 1: Address of the provider to be queried. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } @@ -106,6 +111,7 @@ func (m *QueryProviderRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo +// QueryParamsRequest represents a request to query parameters for providers. type QueryParamsRequest struct { } @@ -142,8 +148,11 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +// QueryProvidersResponse represents the response to a query for providers. type QueryProvidersResponse struct { - Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers"` + // Field 1: List of providers returned in the response. + Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers"` + // Field 2: Pagination details for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -180,7 +189,9 @@ func (m *QueryProvidersResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo +// QueryProviderResponse represents the response to a query for a specific provider. type QueryProviderResponse struct { + // Field 1: The queried provider. Provider Provider `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider"` } @@ -217,7 +228,9 @@ func (m *QueryProviderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryProviderResponse proto.InternalMessageInfo +// QueryParamsResponse represents the response to a query for provider parameters. type QueryParamsResponse struct { + // Field 1: Parameters for providers returned in the response. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -319,8 +332,11 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method for querying providers with optional pagination and status filter. QueryProviders(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + // RPC method for querying a specific provider by address. QueryProvider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) + // RPC method for querying parameters for providers. QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -361,8 +377,11 @@ func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsReq // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method for querying providers with optional pagination and status filter. QueryProviders(context.Context, *QueryProvidersRequest) (*QueryProvidersResponse, error) + // RPC method for querying a specific provider by address. QueryProvider(context.Context, *QueryProviderRequest) (*QueryProviderResponse, error) + // RPC method for querying parameters for providers. QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/session/types/events.pb.go b/x/session/types/events.pb.go index 3b8b2fde..ec2093a6 100644 --- a/x/session/types/events.pb.go +++ b/x/session/types/events.pb.go @@ -24,11 +24,17 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// EventStart represents an event signaling the start of a subscription. type EventStart struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 1: Address associated with the event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the event. + NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` + // Field 3: Identifier of the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Identifier of the plan associated with the event. + PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 5: Identifier of the subscription associated with the event. SubscriptionID uint64 `protobuf:"varint,5,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty" yaml:"subscription_id"` } @@ -65,11 +71,17 @@ func (m *EventStart) XXX_DiscardUnknown() { var xxx_messageInfo_EventStart proto.InternalMessageInfo +// EventUpdateDetails represents an event signaling an update in subscription details. type EventUpdateDetails struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 1: Address associated with the event. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the event. + NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` + // Field 3: Identifier of the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Identifier of the plan associated with the event. + PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 5: Identifier of the subscription associated with the event. SubscriptionID uint64 `protobuf:"varint,5,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty" yaml:"subscription_id"` } @@ -106,13 +118,20 @@ func (m *EventUpdateDetails) XXX_DiscardUnknown() { var xxx_messageInfo_EventUpdateDetails proto.InternalMessageInfo +// EventUpdateStatus represents an event signaling an update in subscription status. type EventUpdateStatus struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - PlanID uint64 `protobuf:"varint,5,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` - SubscriptionID uint64 `protobuf:"varint,6,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty" yaml:"subscription_id"` + // Field 1: Status associated with the event. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` + // Field 2: Address associated with the event. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 3: Node address associated with the event. + NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` + // Field 4: Identifier of the event. + ID uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 5: Identifier of the plan associated with the event. + PlanID uint64 `protobuf:"varint,5,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 6: Identifier of the subscription associated with the event. + SubscriptionID uint64 `protobuf:"varint,6,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty" yaml:"subscription_id"` } func (m *EventUpdateStatus) Reset() { *m = EventUpdateStatus{} } diff --git a/x/session/types/genesis.pb.go b/x/session/types/genesis.pb.go index 33a4f2ea..be89d71f 100644 --- a/x/session/types/genesis.pb.go +++ b/x/session/types/genesis.pb.go @@ -23,9 +23,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisState represents the initial state for the sessions module. type GenesisState struct { + // Field 1: List of sessions. Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` + // Field 2: Parameters for the sessions module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } diff --git a/x/session/types/msg.pb.go b/x/session/types/msg.pb.go index b511fa7e..2d4c2dd3 100644 --- a/x/session/types/msg.pb.go +++ b/x/session/types/msg.pb.go @@ -28,10 +28,13 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgStartRequest defines the SDK message for starting a session +// MsgStartRequest defines the SDK message for starting a session. type MsgStartRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the session. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Address associated with the session. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` } @@ -68,10 +71,13 @@ func (m *MsgStartRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStartRequest proto.InternalMessageInfo -// MsgUpdateDetailsRequest defines the SDK message for updating a session +// MsgUpdateDetailsRequest defines the SDK message for updating a session. type MsgUpdateDetailsRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - Proof Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Proof associated with the session. + Proof Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"` + // Field 3: Signature associated with the session. Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -108,10 +114,13 @@ func (m *MsgUpdateDetailsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDetailsRequest proto.InternalMessageInfo -// MsgEndRequest defines the SDK message for ending a session +// MsgEndRequest defines the SDK message for ending a session. type MsgEndRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Sender's address. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Identifier of the session. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Rating associated with the session. Rating uint64 `protobuf:"varint,3,opt,name=rating,proto3" json:"rating,omitempty"` } @@ -148,7 +157,7 @@ func (m *MsgEndRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEndRequest proto.InternalMessageInfo -// MsgStartResponse defines the response of message MsgStartRequest +// MsgStartResponse defines the response of message MsgStartRequest. type MsgStartResponse struct { } @@ -185,8 +194,7 @@ func (m *MsgStartResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStartResponse proto.InternalMessageInfo -// MsgUpdateDetailsResponse defines the response of message -// MsgUpdateDetailsRequest +// MsgUpdateDetailsResponse defines the response of message MsgUpdateDetailsRequest. type MsgUpdateDetailsResponse struct { } @@ -223,7 +231,7 @@ func (m *MsgUpdateDetailsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDetailsResponse proto.InternalMessageInfo -// MsgEndResponse defines the response of message MsgEndRequest +// MsgEndResponse defines the response of message MsgEndRequest. type MsgEndResponse struct { } @@ -315,8 +323,11 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { + // RPC method for handling MsgStart messages. MsgStart(ctx context.Context, in *MsgStartRequest, opts ...grpc.CallOption) (*MsgStartResponse, error) + // RPC method for handling MsgUpdateDetails messages. MsgUpdateDetails(ctx context.Context, in *MsgUpdateDetailsRequest, opts ...grpc.CallOption) (*MsgUpdateDetailsResponse, error) + // RPC method for handling MsgEnd messages. MsgEnd(ctx context.Context, in *MsgEndRequest, opts ...grpc.CallOption) (*MsgEndResponse, error) } @@ -357,8 +368,11 @@ func (c *msgServiceClient) MsgEnd(ctx context.Context, in *MsgEndRequest, opts . // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { + // RPC method for handling MsgStart messages. MsgStart(context.Context, *MsgStartRequest) (*MsgStartResponse, error) + // RPC method for handling MsgUpdateDetails messages. MsgUpdateDetails(context.Context, *MsgUpdateDetailsRequest) (*MsgUpdateDetailsResponse, error) + // RPC method for handling MsgEnd messages. MsgEnd(context.Context, *MsgEndRequest) (*MsgEndResponse, error) } diff --git a/x/session/types/params.pb.go b/x/session/types/params.pb.go index fd476430..c31ba414 100644 --- a/x/session/types/params.pb.go +++ b/x/session/types/params.pb.go @@ -27,9 +27,12 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Params represents the parameters for the sessions module. type Params struct { - StatusChangeDelay time.Duration `protobuf:"bytes,1,opt,name=status_change_delay,json=statusChangeDelay,proto3,stdduration" json:"status_change_delay"` - ProofVerificationEnabled bool `protobuf:"varint,2,opt,name=proof_verification_enabled,json=proofVerificationEnabled,proto3" json:"proof_verification_enabled,omitempty"` + // Field 1: Duration for status change delay. + StatusChangeDelay time.Duration `protobuf:"bytes,1,opt,name=status_change_delay,json=statusChangeDelay,proto3,stdduration" json:"status_change_delay"` + // Field 2: Flag indicating whether proof verification is enabled. + ProofVerificationEnabled bool `protobuf:"varint,2,opt,name=proof_verification_enabled,json=proofVerificationEnabled,proto3" json:"proof_verification_enabled,omitempty"` } func (m *Params) Reset() { *m = Params{} } diff --git a/x/session/types/proof.pb.go b/x/session/types/proof.pb.go index 3075b232..032f7028 100644 --- a/x/session/types/proof.pb.go +++ b/x/session/types/proof.pb.go @@ -28,10 +28,14 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Proof represents the proof associated with a session. type Proof struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Identifier of the proof. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Bandwidth information for the proof. Bandwidth types.Bandwidth `protobuf:"bytes,2,opt,name=bandwidth,proto3" json:"bandwidth"` - Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration"` + // Field 3: Duration of the proof. + Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration"` } func (m *Proof) Reset() { *m = Proof{} } diff --git a/x/session/types/querier.pb.go b/x/session/types/querier.pb.go index 1f26c3a5..94e776e6 100644 --- a/x/session/types/querier.pb.go +++ b/x/session/types/querier.pb.go @@ -30,7 +30,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QuerySessionsRequest represents the request to query sessions. type QuerySessionsRequest struct { + // Field 1: Pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -67,8 +69,11 @@ func (m *QuerySessionsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsRequest proto.InternalMessageInfo +// QuerySessionsForAccountRequest represents the request to query sessions for an account. type QuerySessionsForAccountRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Account address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -105,8 +110,11 @@ func (m *QuerySessionsForAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForAccountRequest proto.InternalMessageInfo +// QuerySessionsForNodeRequest represents the request to query sessions for a node. type QuerySessionsForNodeRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Node address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -143,8 +151,11 @@ func (m *QuerySessionsForNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForNodeRequest proto.InternalMessageInfo +// QuerySessionsForSubscriptionRequest represents the request to query sessions for a subscription. type QuerySessionsForSubscriptionRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Subscription ID. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -181,9 +192,13 @@ func (m *QuerySessionsForSubscriptionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForSubscriptionRequest proto.InternalMessageInfo +// QuerySessionsForAllocationRequest represents the request to query sessions for an allocation. type QuerySessionsForAllocationRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Subscription ID. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Allocation address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Field 3: Pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -220,7 +235,9 @@ func (m *QuerySessionsForAllocationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForAllocationRequest proto.InternalMessageInfo +// QuerySessionRequest represents the request to query a specific session. type QuerySessionRequest struct { + // Field 1: Session ID. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -257,6 +274,7 @@ func (m *QuerySessionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionRequest proto.InternalMessageInfo +// QueryParamsRequest represents the request to query session parameters. type QueryParamsRequest struct { } @@ -293,8 +311,11 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +// QuerySessionsResponse represents the response for querying sessions. type QuerySessionsResponse struct { - Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 1: List of sessions. + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 2: Pagination details. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -331,8 +352,11 @@ func (m *QuerySessionsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsResponse proto.InternalMessageInfo +// QuerySessionsForAccountResponse represents the response for querying sessions for an account. type QuerySessionsForAccountResponse struct { - Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 1: List of sessions. + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 2: Pagination details. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -369,8 +393,11 @@ func (m *QuerySessionsForAccountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForAccountResponse proto.InternalMessageInfo +// QuerySessionsForNodeResponse represents the response for querying sessions for a node. type QuerySessionsForNodeResponse struct { - Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 1: List of sessions. + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 2: Pagination details. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -407,8 +434,11 @@ func (m *QuerySessionsForNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForNodeResponse proto.InternalMessageInfo +// QuerySessionsForSubscriptionResponse represents the response for querying sessions for a subscription. type QuerySessionsForSubscriptionResponse struct { - Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 1: List of sessions. + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 2: Pagination details. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -445,8 +475,11 @@ func (m *QuerySessionsForSubscriptionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForSubscriptionResponse proto.InternalMessageInfo +// QuerySessionsForAllocationResponse represents the response for querying sessions for an allocation. type QuerySessionsForAllocationResponse struct { - Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 1: List of sessions. + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + // Field 2: Pagination details. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -483,7 +516,9 @@ func (m *QuerySessionsForAllocationResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionsForAllocationResponse proto.InternalMessageInfo +// QuerySessionResponse represents the response for querying a specific session. type QuerySessionResponse struct { + // Field 1: Session details. Session Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session"` } @@ -520,7 +555,9 @@ func (m *QuerySessionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySessionResponse proto.InternalMessageInfo +// QueryParamsResponse represents the response for querying session parameters. type QueryParamsResponse struct { + // Field 1: Session parameters. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -642,12 +679,19 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method to query sessions. QuerySessions(ctx context.Context, in *QuerySessionsRequest, opts ...grpc.CallOption) (*QuerySessionsResponse, error) + // RPC method to query sessions for an account. QuerySessionsForAccount(ctx context.Context, in *QuerySessionsForAccountRequest, opts ...grpc.CallOption) (*QuerySessionsForAccountResponse, error) + // RPC method to query sessions for a node. QuerySessionsForNode(ctx context.Context, in *QuerySessionsForNodeRequest, opts ...grpc.CallOption) (*QuerySessionsForNodeResponse, error) + // RPC method to query sessions for a subscription. QuerySessionsForSubscription(ctx context.Context, in *QuerySessionsForSubscriptionRequest, opts ...grpc.CallOption) (*QuerySessionsForSubscriptionResponse, error) + // RPC method to query sessions for an allocation. QuerySessionsForAllocation(ctx context.Context, in *QuerySessionsForAllocationRequest, opts ...grpc.CallOption) (*QuerySessionsForAllocationResponse, error) + // RPC method to query a specific session. QuerySession(ctx context.Context, in *QuerySessionRequest, opts ...grpc.CallOption) (*QuerySessionResponse, error) + // RPC method to query session parameters. QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -724,12 +768,19 @@ func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsReq // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method to query sessions. QuerySessions(context.Context, *QuerySessionsRequest) (*QuerySessionsResponse, error) + // RPC method to query sessions for an account. QuerySessionsForAccount(context.Context, *QuerySessionsForAccountRequest) (*QuerySessionsForAccountResponse, error) + // RPC method to query sessions for a node. QuerySessionsForNode(context.Context, *QuerySessionsForNodeRequest) (*QuerySessionsForNodeResponse, error) + // RPC method to query sessions for a subscription. QuerySessionsForSubscription(context.Context, *QuerySessionsForSubscriptionRequest) (*QuerySessionsForSubscriptionResponse, error) + // RPC method to query sessions for an allocation. QuerySessionsForAllocation(context.Context, *QuerySessionsForAllocationRequest) (*QuerySessionsForAllocationResponse, error) + // RPC method to query a specific session. QuerySession(context.Context, *QuerySessionRequest) (*QuerySessionResponse, error) + // RPC method to query session parameters. QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/session/types/session.pb.go b/x/session/types/session.pb.go index 4aa97d48..e0123daa 100644 --- a/x/session/types/session.pb.go +++ b/x/session/types/session.pb.go @@ -29,16 +29,26 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Session represents a session. type Session struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - SubscriptionID uint64 `protobuf:"varint,2,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` - NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` - Bandwidth types.Bandwidth `protobuf:"bytes,5,opt,name=bandwidth,proto3" json:"bandwidth"` - Duration time.Duration `protobuf:"bytes,6,opt,name=duration,proto3,stdduration" json:"duration"` - InactiveAt time.Time `protobuf:"bytes,7,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` - Status types.Status `protobuf:"varint,8,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` - StatusAt time.Time `protobuf:"bytes,9,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` + // Field 1: Session ID. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Subscription ID. + SubscriptionID uint64 `protobuf:"varint,2,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` + // Field 3: Node address. + NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` + // Field 4: Account address. + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + // Field 5: Bandwidth details. + Bandwidth types.Bandwidth `protobuf:"bytes,5,opt,name=bandwidth,proto3" json:"bandwidth"` + // Field 6: Session duration. + Duration time.Duration `protobuf:"bytes,6,opt,name=duration,proto3,stdduration" json:"duration"` + // Field 7: Inactive timestamp. + InactiveAt time.Time `protobuf:"bytes,7,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` + // Field 8: Session status. + Status types.Status `protobuf:"varint,8,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 9: Status timestamp. + StatusAt time.Time `protobuf:"bytes,9,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` } func (m *Session) Reset() { *m = Session{} } diff --git a/x/subscription/types/allocation.pb.go b/x/subscription/types/allocation.pb.go index e008dd51..055f67f8 100644 --- a/x/subscription/types/allocation.pb.go +++ b/x/subscription/types/allocation.pb.go @@ -24,10 +24,15 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Allocation represents an allocation. type Allocation struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - GrantedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=granted_bytes,json=grantedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"granted_bytes"` + // Field 1: Allocation ID. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Account address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Field 3: Granted bytes. + GrantedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=granted_bytes,json=grantedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"granted_bytes"` + // Field 4: Utilized bytes. UtilisedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=utilised_bytes,json=utilisedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"utilised_bytes"` } diff --git a/x/subscription/types/events.pb.go b/x/subscription/types/events.pb.go index 2746a904..4f708c76 100644 --- a/x/subscription/types/events.pb.go +++ b/x/subscription/types/events.pb.go @@ -25,11 +25,16 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// EventUpdateStatus represents an update to the status of an event. type EventUpdateStatus struct { - Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` - PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` + // Field 1: Status of the event. + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` + // Field 2: Address associated with the event. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 3: Unique identifier for the event. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Unique identifier for the associated plan. + PlanID uint64 `protobuf:"varint,4,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty" yaml:"plan_id"` } func (m *EventUpdateStatus) Reset() { *m = EventUpdateStatus{} } @@ -65,11 +70,16 @@ func (m *EventUpdateStatus) XXX_DiscardUnknown() { var xxx_messageInfo_EventUpdateStatus proto.InternalMessageInfo +// EventAllocate represents an allocation event. type EventAllocate struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - GrantedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=granted_bytes,json=grantedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"granted_bytes"` + // Field 1: Address associated with the allocation. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Granted bytes in the allocation. + GrantedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=granted_bytes,json=grantedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"granted_bytes"` + // Field 3: Utilized bytes in the allocation. UtilisedBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=utilised_bytes,json=utilisedBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"utilised_bytes"` - ID uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Unique identifier for the allocation. + ID uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventAllocate) Reset() { *m = EventAllocate{} } @@ -105,10 +115,14 @@ func (m *EventAllocate) XXX_DiscardUnknown() { var xxx_messageInfo_EventAllocate proto.InternalMessageInfo +// EventCreatePayout represents an event for creating a payout. type EventCreatePayout struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 1: Address associated with the payout. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the payout. NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 3: Unique identifier for the payout. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventCreatePayout) Reset() { *m = EventCreatePayout{} } @@ -144,12 +158,18 @@ func (m *EventCreatePayout) XXX_DiscardUnknown() { var xxx_messageInfo_EventCreatePayout proto.InternalMessageInfo +// EventPayForPayout represents an event for paying for a payout. type EventPayForPayout struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` + // Field 1: Address associated with the payout payment. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the payout payment. + NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` + // Field 3: Payment amount for the payout. + Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` + // Field 4: Staking reward associated with the payout. StakingReward string `protobuf:"bytes,4,opt,name=staking_reward,json=stakingReward,proto3" json:"staking_reward,omitempty" yaml:"staking_reward"` - ID uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 5: Unique identifier for the payout. + ID uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventPayForPayout) Reset() { *m = EventPayForPayout{} } @@ -185,12 +205,18 @@ func (m *EventPayForPayout) XXX_DiscardUnknown() { var xxx_messageInfo_EventPayForPayout proto.InternalMessageInfo +// EventPayForPlan represents an event for paying for a plan. type EventPayForPlan struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Payment string `protobuf:"bytes,2,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` + // Field 1: Address associated with the plan payment. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Payment amount for the plan. + Payment string `protobuf:"bytes,2,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` + // Field 3: Provider address associated with the plan payment. ProviderAddress string `protobuf:"bytes,3,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty" yaml:"provider_address"` - StakingReward string `protobuf:"bytes,4,opt,name=staking_reward,json=stakingReward,proto3" json:"staking_reward,omitempty" yaml:"staking_reward"` - ID uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 4: Staking reward associated with the plan. + StakingReward string `protobuf:"bytes,4,opt,name=staking_reward,json=stakingReward,proto3" json:"staking_reward,omitempty" yaml:"staking_reward"` + // Field 5: Unique identifier for the plan. + ID uint64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventPayForPlan) Reset() { *m = EventPayForPlan{} } @@ -226,12 +252,19 @@ func (m *EventPayForPlan) XXX_DiscardUnknown() { var xxx_messageInfo_EventPayForPlan proto.InternalMessageInfo +// EventPayForSession represents an event for paying for a session. type EventPayForSession struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` - Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` - StakingReward string `protobuf:"bytes,4,opt,name=staking_reward,json=stakingReward,proto3" json:"staking_reward,omitempty" yaml:"staking_reward"` - SessionID uint64 `protobuf:"varint,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty" yaml:"session_id"` + // Field 1: Address associated with the session payment. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + // Field 2: Node address associated with the session payment. + NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty" yaml:"node_address"` + // Field 3: Payment amount for the session. + Payment string `protobuf:"bytes,3,opt,name=payment,proto3" json:"payment,omitempty" yaml:"payment"` + // Field 4: Staking reward associated with the session. + StakingReward string `protobuf:"bytes,4,opt,name=staking_reward,json=stakingReward,proto3" json:"staking_reward,omitempty" yaml:"staking_reward"` + // Field 5: Unique identifier for the session. + SessionID uint64 `protobuf:"varint,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty" yaml:"session_id"` + // Field 6: Unique identifier for the subscription. SubscriptionID uint64 `protobuf:"varint,6,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty" yaml:"subscription_id"` } @@ -268,10 +301,14 @@ func (m *EventPayForSession) XXX_DiscardUnknown() { var xxx_messageInfo_EventPayForSession proto.InternalMessageInfo +// EventRefund represents an event for processing a refund. type EventRefund struct { + // Field 1: Address associated with the refund. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` - ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + // Field 2: Amount to be refunded. + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` + // Field 3: Unique identifier for the refund. + ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` } func (m *EventRefund) Reset() { *m = EventRefund{} } diff --git a/x/subscription/types/genesis.pb.go b/x/subscription/types/genesis.pb.go index e935755e..c9cc0245 100644 --- a/x/subscription/types/genesis.pb.go +++ b/x/subscription/types/genesis.pb.go @@ -24,9 +24,13 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisSubscription represents the initial state for a subscription in the genesis block. type GenesisSubscription struct { - Subscription *types.Any `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"` - Allocations []Allocation `protobuf:"bytes,2,rep,name=allocations,proto3" json:"allocations"` + // Field 1: Subscription information stored as a serialized Any message. + Subscription *types.Any `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"` + // Field 2: Allocations associated with the subscription. + // Each allocation contains information about granted and utilized bytes. + Allocations []Allocation `protobuf:"bytes,2,rep,name=allocations,proto3" json:"allocations"` } func (m *GenesisSubscription) Reset() { *m = GenesisSubscription{} } @@ -62,9 +66,13 @@ func (m *GenesisSubscription) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisSubscription proto.InternalMessageInfo +// GenesisState represents the initial state of the module in the genesis block. type GenesisState struct { + // Field 1: Subscriptions in the genesis block. + // Each GenesisSubscription contains subscription information and associated allocations. Subscriptions []GenesisSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions"` - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` + // Field 2: Parameters for the module stored in the genesis block. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } func (m *GenesisState) Reset() { *m = GenesisState{} } diff --git a/x/subscription/types/msg.pb.go b/x/subscription/types/msg.pb.go index 7ceb58ac..b024ea22 100644 --- a/x/subscription/types/msg.pb.go +++ b/x/subscription/types/msg.pb.go @@ -29,10 +29,12 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgCancelRequest defines the SDK message for cancelling a subscription +// MsgCancelRequest defines the SDK message for cancelling a subscription. type MsgCancelRequest struct { + // Field 1: Address initiating the cancel request. From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Unique identifier for the subscription to be cancelled. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` } func (m *MsgCancelRequest) Reset() { *m = MsgCancelRequest{} } @@ -68,13 +70,16 @@ func (m *MsgCancelRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelRequest proto.InternalMessageInfo -// MsgAllocateRequest defines the SDK message for allocating the bytes of a -// subscription for an address +// MsgAllocateRequest defines the SDK message for allocating bytes of a subscription for an address. type MsgAllocateRequest struct { - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` + // Field 1: Address initiating the allocate request. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Field 2: Unique identifier for the subscription. + ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Field 3: Address for which bytes are allocated. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // Field 4: Number of bytes to allocate. + Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` } func (m *MsgAllocateRequest) Reset() { *m = MsgAllocateRequest{} } @@ -110,7 +115,7 @@ func (m *MsgAllocateRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAllocateRequest proto.InternalMessageInfo -// MsgCancelResponse defines the response of message MsgCancelRequest +// MsgCancelResponse defines the response of message MsgCancelRequest. type MsgCancelResponse struct { } @@ -147,7 +152,7 @@ func (m *MsgCancelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelResponse proto.InternalMessageInfo -// MsgAllocateResponse defines the response of message MsgAllocateRequest +// MsgAllocateResponse defines the response of message MsgAllocateRequest. type MsgAllocateResponse struct { } @@ -235,7 +240,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgServiceClient interface { + // RPC method for cancelling a subscription. MsgCancel(ctx context.Context, in *MsgCancelRequest, opts ...grpc.CallOption) (*MsgCancelResponse, error) + // RPC method for allocating bytes of a subscription for an address. MsgAllocate(ctx context.Context, in *MsgAllocateRequest, opts ...grpc.CallOption) (*MsgAllocateResponse, error) } @@ -267,7 +274,9 @@ func (c *msgServiceClient) MsgAllocate(ctx context.Context, in *MsgAllocateReque // MsgServiceServer is the server API for MsgService service. type MsgServiceServer interface { + // RPC method for cancelling a subscription. MsgCancel(context.Context, *MsgCancelRequest) (*MsgCancelResponse, error) + // RPC method for allocating bytes of a subscription for an address. MsgAllocate(context.Context, *MsgAllocateRequest) (*MsgAllocateResponse, error) } diff --git a/x/subscription/types/params.pb.go b/x/subscription/types/params.pb.go index a8505d04..34492c6c 100644 --- a/x/subscription/types/params.pb.go +++ b/x/subscription/types/params.pb.go @@ -27,7 +27,10 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Params represents the configurable parameters for subscription status changes. type Params struct { + // Field 1: status_change_delay specifies the duration before a subscription status change takes effect. + // The value is a duration specified in the standard Duration format. StatusChangeDelay time.Duration `protobuf:"bytes,1,opt,name=status_change_delay,json=statusChangeDelay,proto3,stdduration" json:"status_change_delay"` } diff --git a/x/subscription/types/payout.pb.go b/x/subscription/types/payout.pb.go index 65b63202..5e990c6b 100644 --- a/x/subscription/types/payout.pb.go +++ b/x/subscription/types/payout.pb.go @@ -28,13 +28,22 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Payout represents information about a payout. type Payout struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` - Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` - Price types.Coin `protobuf:"bytes,5,opt,name=price,proto3" json:"price"` - NextAt time.Time `protobuf:"bytes,6,opt,name=next_at,json=nextAt,proto3,stdtime" json:"next_at"` + // Field 1: Unique identifier for the payout. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Address associated with the payout. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Field 3: Node address associated with the payout. + NodeAddress string `protobuf:"bytes,3,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` + // Field 4: Duration, in hours, for which the payout is calculated. + Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` + // Field 5: Price of the payout, represented as a Cosmos Coin. + // This field is not nullable. + Price types.Coin `protobuf:"bytes,5,opt,name=price,proto3" json:"price"` + // Field 6: Timestamp indicating when the next payout is scheduled. + // This field is not nullable and is represented using the standard Timestamp format. + NextAt time.Time `protobuf:"bytes,6,opt,name=next_at,json=nextAt,proto3,stdtime" json:"next_at"` } func (m *Payout) Reset() { *m = Payout{} } diff --git a/x/subscription/types/querier.pb.go b/x/subscription/types/querier.pb.go index 1d965fe4..a9456167 100644 --- a/x/subscription/types/querier.pb.go +++ b/x/subscription/types/querier.pb.go @@ -31,7 +31,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QuerySubscriptionsRequest represents the request for querying subscriptions. type QuerySubscriptionsRequest struct { + // Field 1: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -68,8 +70,11 @@ func (m *QuerySubscriptionsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsRequest proto.InternalMessageInfo +// QuerySubscriptionsForAccountRequest represents the request for querying subscriptions for a specific account. type QuerySubscriptionsForAccountRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Address of the account for which subscriptions are queried. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -106,8 +111,11 @@ func (m *QuerySubscriptionsForAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForAccountRequest proto.InternalMessageInfo +// QuerySubscriptionsForNodeRequest represents the request for querying subscriptions for a specific node. type QuerySubscriptionsForNodeRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Address of the node for which subscriptions are queried. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -144,8 +152,11 @@ func (m *QuerySubscriptionsForNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForNodeRequest proto.InternalMessageInfo +// QuerySubscriptionsForPlanRequest represents the request for querying subscriptions for a specific plan. type QuerySubscriptionsForPlanRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Unique identifier for the plan for which subscriptions are queried. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -182,7 +193,9 @@ func (m *QuerySubscriptionsForPlanRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForPlanRequest proto.InternalMessageInfo +// QuerySubscriptionRequest represents the request for querying a specific subscription. type QuerySubscriptionRequest struct { + // Field 1: Unique identifier for the subscription being queried. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -219,8 +232,11 @@ func (m *QuerySubscriptionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionRequest proto.InternalMessageInfo +// QueryAllocationRequest represents the request for querying a specific allocation. type QueryAllocationRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Unique identifier for the subscription associated with the allocation. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Address for which the allocation is queried. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` } @@ -257,8 +273,11 @@ func (m *QueryAllocationRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllocationRequest proto.InternalMessageInfo +// QueryAllocationsRequest represents the request for querying allocations associated with a subscription. type QueryAllocationsRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 1: Unique identifier for the subscription for which allocations are queried. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -295,7 +314,9 @@ func (m *QueryAllocationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllocationsRequest proto.InternalMessageInfo +// QueryPayoutsRequest represents the request for querying payouts. type QueryPayoutsRequest struct { + // Field 1: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -332,8 +353,11 @@ func (m *QueryPayoutsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsRequest proto.InternalMessageInfo +// QueryPayoutsForAccountRequest represents the request for querying payouts for a specific account. type QueryPayoutsForAccountRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Address of the account for which payouts are queried. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -370,8 +394,11 @@ func (m *QueryPayoutsForAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsForAccountRequest proto.InternalMessageInfo +// QueryPayoutsForNodeRequest represents the request for querying payouts for a specific node. type QueryPayoutsForNodeRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 1: Address of the node for which payouts are queried. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Field 2: Pagination options for the query. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -408,7 +435,9 @@ func (m *QueryPayoutsForNodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsForNodeRequest proto.InternalMessageInfo +// QueryPayoutRequest represents the request for querying a specific payout. type QueryPayoutRequest struct { + // Field 1: Unique identifier for the payout being queried. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -445,6 +474,7 @@ func (m *QueryPayoutRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutRequest proto.InternalMessageInfo +// QueryParamsRequest represents the request for querying subscription module parameters. type QueryParamsRequest struct { } @@ -481,9 +511,12 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +// QuerySubscriptionsResponse represents the response for querying subscriptions. type QuerySubscriptionsResponse struct { - Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Field 1: List of serialized subscription information. + Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + // Field 2: Pagination information for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QuerySubscriptionsResponse) Reset() { *m = QuerySubscriptionsResponse{} } @@ -519,9 +552,12 @@ func (m *QuerySubscriptionsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsResponse proto.InternalMessageInfo +// QuerySubscriptionsForAccountResponse represents the response for querying subscriptions for a specific account. type QuerySubscriptionsForAccountResponse struct { - Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Field 1: List of serialized subscription information. + Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + // Field 2: Pagination information for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QuerySubscriptionsForAccountResponse) Reset() { *m = QuerySubscriptionsForAccountResponse{} } @@ -557,9 +593,12 @@ func (m *QuerySubscriptionsForAccountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForAccountResponse proto.InternalMessageInfo +// QuerySubscriptionsForNodeResponse represents the response for querying subscriptions for a specific node. type QuerySubscriptionsForNodeResponse struct { - Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Field 1: List of serialized subscription information. + Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + // Field 2: Pagination information for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QuerySubscriptionsForNodeResponse) Reset() { *m = QuerySubscriptionsForNodeResponse{} } @@ -595,9 +634,12 @@ func (m *QuerySubscriptionsForNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForNodeResponse proto.InternalMessageInfo +// QuerySubscriptionsForPlanResponse represents the response for querying subscriptions for a specific plan. type QuerySubscriptionsForPlanResponse struct { - Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Field 1: List of serialized subscription information. + Subscriptions []*types.Any `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + // Field 2: Pagination information for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QuerySubscriptionsForPlanResponse) Reset() { *m = QuerySubscriptionsForPlanResponse{} } @@ -633,7 +675,9 @@ func (m *QuerySubscriptionsForPlanResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionsForPlanResponse proto.InternalMessageInfo +// QuerySubscriptionResponse represents the response for querying a specific subscription. type QuerySubscriptionResponse struct { + // Field 1: Serialized subscription information. Subscription *types.Any `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"` } @@ -670,7 +714,9 @@ func (m *QuerySubscriptionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySubscriptionResponse proto.InternalMessageInfo +// QueryAllocationResponse represents the response for querying a specific allocation. type QueryAllocationResponse struct { + // Field 1: Allocation information. Allocation Allocation `protobuf:"bytes,1,opt,name=allocation,proto3" json:"allocation"` } @@ -707,9 +753,12 @@ func (m *QueryAllocationResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllocationResponse proto.InternalMessageInfo +// QueryAllocationsResponse represents the response for querying allocations associated with a subscription. type QueryAllocationsResponse struct { - Allocations []Allocation `protobuf:"bytes,1,rep,name=allocations,proto3" json:"allocations"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Field 1: List of allocation information. + Allocations []Allocation `protobuf:"bytes,1,rep,name=allocations,proto3" json:"allocations"` + // Field 2: Pagination information for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllocationsResponse) Reset() { *m = QueryAllocationsResponse{} } @@ -745,8 +794,11 @@ func (m *QueryAllocationsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllocationsResponse proto.InternalMessageInfo +// QueryPayoutsResponse represents the response for querying payouts. type QueryPayoutsResponse struct { - Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 1: List of payout information. + Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 2: Pagination information for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -783,8 +835,11 @@ func (m *QueryPayoutsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsResponse proto.InternalMessageInfo +// QueryPayoutsForAccountResponse represents the response for querying payouts for a specific account. type QueryPayoutsForAccountResponse struct { - Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 1: List of payout information. + Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 2: Pagination information for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -821,8 +876,11 @@ func (m *QueryPayoutsForAccountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsForAccountResponse proto.InternalMessageInfo +// QueryPayoutsForNodeResponse represents the response for querying payouts for a specific node. type QueryPayoutsForNodeResponse struct { - Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 1: List of payout information. + Payouts []Payout `protobuf:"bytes,1,rep,name=payouts,proto3" json:"payouts"` + // Field 2: Pagination information for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -859,7 +917,9 @@ func (m *QueryPayoutsForNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutsForNodeResponse proto.InternalMessageInfo +// QueryPayoutResponse represents the response for querying a specific payout. type QueryPayoutResponse struct { + // Field 1: Payout information. Payout Payout `protobuf:"bytes,1,opt,name=payout,proto3" json:"payout"` } @@ -896,7 +956,9 @@ func (m *QueryPayoutResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPayoutResponse proto.InternalMessageInfo +// QueryParamsResponse represents the response for querying subscription module parameters. type QueryParamsResponse struct { + // Field 1: Subscription module parameters. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -1049,17 +1111,29 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryServiceClient interface { + // RPC method for querying subscriptions. QuerySubscriptions(ctx context.Context, in *QuerySubscriptionsRequest, opts ...grpc.CallOption) (*QuerySubscriptionsResponse, error) + // RPC method for querying subscriptions for a specific account. QuerySubscriptionsForAccount(ctx context.Context, in *QuerySubscriptionsForAccountRequest, opts ...grpc.CallOption) (*QuerySubscriptionsForAccountResponse, error) + // RPC method for querying subscriptions for a specific node. QuerySubscriptionsForNode(ctx context.Context, in *QuerySubscriptionsForNodeRequest, opts ...grpc.CallOption) (*QuerySubscriptionsForNodeResponse, error) + // RPC method for querying subscriptions for a specific plan. QuerySubscriptionsForPlan(ctx context.Context, in *QuerySubscriptionsForPlanRequest, opts ...grpc.CallOption) (*QuerySubscriptionsForPlanResponse, error) + // RPC method for querying a specific subscription. QuerySubscription(ctx context.Context, in *QuerySubscriptionRequest, opts ...grpc.CallOption) (*QuerySubscriptionResponse, error) + // RPC method for querying allocations associated with a subscription. QueryAllocations(ctx context.Context, in *QueryAllocationsRequest, opts ...grpc.CallOption) (*QueryAllocationsResponse, error) + // RPC method for querying a specific allocation. QueryAllocation(ctx context.Context, in *QueryAllocationRequest, opts ...grpc.CallOption) (*QueryAllocationResponse, error) + // RPC method for querying payouts. QueryPayouts(ctx context.Context, in *QueryPayoutsRequest, opts ...grpc.CallOption) (*QueryPayoutsResponse, error) + // RPC method for querying payouts for a specific account. QueryPayoutsForAccount(ctx context.Context, in *QueryPayoutsForAccountRequest, opts ...grpc.CallOption) (*QueryPayoutsForAccountResponse, error) + // RPC method for querying payouts for a specific node. QueryPayoutsForNode(ctx context.Context, in *QueryPayoutsForNodeRequest, opts ...grpc.CallOption) (*QueryPayoutsForNodeResponse, error) + // RPC method for querying a specific payout. QueryPayout(ctx context.Context, in *QueryPayoutRequest, opts ...grpc.CallOption) (*QueryPayoutResponse, error) + // RPC method for querying subscription module parameters. QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -1181,17 +1255,29 @@ func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsReq // QueryServiceServer is the server API for QueryService service. type QueryServiceServer interface { + // RPC method for querying subscriptions. QuerySubscriptions(context.Context, *QuerySubscriptionsRequest) (*QuerySubscriptionsResponse, error) + // RPC method for querying subscriptions for a specific account. QuerySubscriptionsForAccount(context.Context, *QuerySubscriptionsForAccountRequest) (*QuerySubscriptionsForAccountResponse, error) + // RPC method for querying subscriptions for a specific node. QuerySubscriptionsForNode(context.Context, *QuerySubscriptionsForNodeRequest) (*QuerySubscriptionsForNodeResponse, error) + // RPC method for querying subscriptions for a specific plan. QuerySubscriptionsForPlan(context.Context, *QuerySubscriptionsForPlanRequest) (*QuerySubscriptionsForPlanResponse, error) + // RPC method for querying a specific subscription. QuerySubscription(context.Context, *QuerySubscriptionRequest) (*QuerySubscriptionResponse, error) + // RPC method for querying allocations associated with a subscription. QueryAllocations(context.Context, *QueryAllocationsRequest) (*QueryAllocationsResponse, error) + // RPC method for querying a specific allocation. QueryAllocation(context.Context, *QueryAllocationRequest) (*QueryAllocationResponse, error) + // RPC method for querying payouts. QueryPayouts(context.Context, *QueryPayoutsRequest) (*QueryPayoutsResponse, error) + // RPC method for querying payouts for a specific account. QueryPayoutsForAccount(context.Context, *QueryPayoutsForAccountRequest) (*QueryPayoutsForAccountResponse, error) + // RPC method for querying payouts for a specific node. QueryPayoutsForNode(context.Context, *QueryPayoutsForNodeRequest) (*QueryPayoutsForNodeResponse, error) + // RPC method for querying a specific payout. QueryPayout(context.Context, *QueryPayoutRequest) (*QueryPayoutResponse, error) + // RPC method for querying subscription module parameters. QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } diff --git a/x/subscription/types/subscription.pb.go b/x/subscription/types/subscription.pb.go index 92d5c6d6..b8e65e78 100644 --- a/x/subscription/types/subscription.pb.go +++ b/x/subscription/types/subscription.pb.go @@ -29,12 +29,16 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// SubscriptionType represents the type of a subscription. type SubscriptionType int32 const ( + // TYPE_UNSPECIFIED indicates an unspecified subscription type. TypeUnspecified SubscriptionType = 0 - TypeNode SubscriptionType = 1 - TypePlan SubscriptionType = 2 + // TYPE_NODE indicates a subscription associated with a node. + TypeNode SubscriptionType = 1 + // TYPE_PLAN indicates a subscription associated with a plan. + TypePlan SubscriptionType = 2 ) var SubscriptionType_name = map[int32]string{ @@ -57,12 +61,18 @@ func (SubscriptionType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f6350e663da1ca66, []int{0} } +// BaseSubscription represents the common base for different subscription types. type BaseSubscription struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - InactiveAt time.Time `protobuf:"bytes,3,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` - Status types.Status `protobuf:"varint,4,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` - StatusAt time.Time `protobuf:"bytes,5,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` + // Field 1: Unique identifier for the subscription. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Field 2: Address associated with the subscription. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Field 3: Timestamp indicating when the subscription became inactive. + InactiveAt time.Time `protobuf:"bytes,3,opt,name=inactive_at,json=inactiveAt,proto3,stdtime" json:"inactive_at"` + // Field 4: Status of the subscription. + Status types.Status `protobuf:"varint,4,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + // Field 5: Timestamp indicating when the subscription status was last updated. + StatusAt time.Time `protobuf:"bytes,5,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` } func (m *BaseSubscription) Reset() { *m = BaseSubscription{} } @@ -98,12 +108,19 @@ func (m *BaseSubscription) XXX_DiscardUnknown() { var xxx_messageInfo_BaseSubscription proto.InternalMessageInfo +// NodeSubscription represents a subscription associated with a node. type NodeSubscription struct { + // Field 1: Common base subscription information. *BaseSubscription `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:"base,omitempty"` - NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` - Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` - Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` - Deposit types1.Coin `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit"` + // Field 2: Node address associated with the subscription. + NodeAddress string `protobuf:"bytes,2,opt,name=node_address,json=nodeAddress,proto3" json:"node_address,omitempty"` + // Field 3: Number of gigabytes associated with the subscription. + Gigabytes int64 `protobuf:"varint,3,opt,name=gigabytes,proto3" json:"gigabytes,omitempty"` + // Field 4: Duration, in hours, for which the subscription is active. + Hours int64 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"` + // Field 5: Deposit required for the subscription, represented as a Cosmos Coin. + // This field is not nullable. + Deposit types1.Coin `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit"` } func (m *NodeSubscription) Reset() { *m = NodeSubscription{} } @@ -139,10 +156,14 @@ func (m *NodeSubscription) XXX_DiscardUnknown() { var xxx_messageInfo_NodeSubscription proto.InternalMessageInfo +// PlanSubscription represents a subscription associated with a plan. type PlanSubscription struct { + // Field 1: Common base subscription information. *BaseSubscription `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:"base,omitempty"` - PlanID uint64 `protobuf:"varint,2,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + // Field 2: Unique identifier for the plan associated with the subscription. + PlanID uint64 `protobuf:"varint,2,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` + // Field 3: Denomination associated with the subscription. + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` } func (m *PlanSubscription) Reset() { *m = PlanSubscription{} } diff --git a/x/vpn/types/genesis.pb.go b/x/vpn/types/genesis.pb.go index 851423dd..d8e73fcf 100644 --- a/x/vpn/types/genesis.pb.go +++ b/x/vpn/types/genesis.pb.go @@ -29,12 +29,21 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GenesisState represents the initial state of the Sentinel module at genesis. type GenesisState struct { - Deposits []types.Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` - Nodes *types1.GenesisState `protobuf:"bytes,2,opt,name=nodes,proto3" json:"nodes,omitempty"` - Plans []types2.GenesisPlan `protobuf:"bytes,3,rep,name=plans,proto3" json:"plans"` - Providers *types3.GenesisState `protobuf:"bytes,4,opt,name=providers,proto3" json:"providers,omitempty"` - Sessions *types4.GenesisState `protobuf:"bytes,5,opt,name=sessions,proto3" json:"sessions,omitempty"` + // Field 1: List of deposits associated with the Sentinel module. + // This field is not nullable. + Deposits []types.Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` + // Field 2: Genesis state for nodes in the Sentinel module. + Nodes *types1.GenesisState `protobuf:"bytes,2,opt,name=nodes,proto3" json:"nodes,omitempty"` + // Field 3: List of plans associated with the Sentinel module. + // This field is not nullable. + Plans []types2.GenesisPlan `protobuf:"bytes,3,rep,name=plans,proto3" json:"plans"` + // Field 4: Genesis state for providers in the Sentinel module. + Providers *types3.GenesisState `protobuf:"bytes,4,opt,name=providers,proto3" json:"providers,omitempty"` + // Field 5: Genesis state for sessions in the Sentinel module. + Sessions *types4.GenesisState `protobuf:"bytes,5,opt,name=sessions,proto3" json:"sessions,omitempty"` + // Field 6: Genesis state for subscriptions in the Sentinel module. Subscriptions *types5.GenesisState `protobuf:"bytes,6,opt,name=subscriptions,proto3" json:"subscriptions,omitempty"` }