-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a8de0f
commit 124946b
Showing
69 changed files
with
33,322 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message EventRegister { | ||
string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; | ||
string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
} | ||
|
||
message EventUpdate { | ||
string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; | ||
string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
} | ||
|
||
message EventSetStatus { | ||
string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; | ||
sentinel.types.v1.Status status = 2 [(gogoproto.moretags) = "yaml:\"status\""]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "sentinel/node/v1/node.proto"; | ||
import "sentinel/node/v1/params.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message GenesisState { | ||
repeated Node nodes = 1 [ | ||
(gogoproto.jsontag) = "_,omitempty", | ||
(gogoproto.nullable) = false | ||
]; | ||
Params params = 2 [(gogoproto.nullable) = false]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// MsgRegisterRequest defines the SDK message for registering a node | ||
message MsgRegisterRequest { | ||
string from = 1; | ||
string provider = 2; | ||
repeated cosmos.base.v1beta1.Coin price = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; | ||
} | ||
|
||
// MsgUpdateRequest defines the SDK message for updating a node | ||
message MsgUpdateRequest { | ||
string from = 1; | ||
string provider = 2; | ||
repeated cosmos.base.v1beta1.Coin price = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; | ||
} | ||
|
||
// MsgSetStatusRequest defines the SDK message for modifying the status of a | ||
// node | ||
message MsgSetStatusRequest { | ||
string from = 1; | ||
sentinel.types.v1.Status status = 2; | ||
} | ||
|
||
// MsgRegisterResponse defines the response of message MsgRegisterRequest | ||
message MsgRegisterResponse {} | ||
|
||
// MsgUpdateResponse defines the response of message MsgUpdateRequest | ||
message MsgUpdateResponse {} | ||
|
||
// MsgSetStatusResponse defines the response of message MsgSetStatusRequest | ||
message MsgSetStatusResponse {} | ||
|
||
service MsgService { | ||
rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse); | ||
rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse); | ||
rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message Node { | ||
string address = 1; | ||
string provider = 2; | ||
repeated cosmos.base.v1beta1.Coin price = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; | ||
sentinel.types.v1.Status status = 5; | ||
google.protobuf.Timestamp status_at = 6 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdtime) = true | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/duration.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message Params { | ||
cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false]; | ||
google.protobuf.Duration inactive_duration = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdduration) = true | ||
]; | ||
repeated cosmos.base.v1beta1.Coin max_price = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
repeated cosmos.base.v1beta1.Coin min_price = 4 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
string staking_share = 5 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.nullable) = false | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
syntax = "proto3"; | ||
package sentinel.node.v1; | ||
|
||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "sentinel/node/v1/node.proto"; | ||
import "sentinel/node/v1/params.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message QueryNodesRequest { | ||
sentinel.types.v1.Status status = 1; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} | ||
|
||
message QueryNodesForProviderRequest { | ||
string address = 1; | ||
sentinel.types.v1.Status status = 2; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 3; | ||
} | ||
|
||
message QueryNodeRequest { | ||
string address = 1; | ||
} | ||
|
||
message QueryParamsRequest {} | ||
|
||
message QueryNodesResponse { | ||
repeated Node nodes = 1 [(gogoproto.nullable) = false]; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message QueryNodesForProviderResponse { | ||
repeated Node nodes = 1 [(gogoproto.nullable) = false]; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message QueryNodeResponse { | ||
Node node = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message QueryParamsResponse { | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
service QueryService { | ||
rpc QueryNodes(QueryNodesRequest) returns (QueryNodesResponse) { | ||
option (google.api.http).get = "/sentinel/nodes"; | ||
} | ||
|
||
rpc QueryNodesForProvider(QueryNodesForProviderRequest) returns (QueryNodesForProviderResponse) { | ||
option (google.api.http).get = "/sentinel/providers/{address}/nodes"; | ||
} | ||
|
||
rpc QueryNode(QueryNodeRequest) returns (QueryNodeResponse) { | ||
option (google.api.http).get = "/sentinel/nodes/{address}"; | ||
} | ||
|
||
rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/sentinel/modules/node/params"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
syntax = "proto3"; | ||
package sentinel.plan.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message EventAdd { | ||
uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; | ||
string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
} | ||
|
||
message EventSetStatus { | ||
uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; | ||
string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
sentinel.types.v1.Status status = 3 [(gogoproto.moretags) = "yaml:\"status\""]; | ||
} | ||
|
||
message EventAddNode { | ||
uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; | ||
string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; | ||
string provider = 3 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
} | ||
|
||
message EventRemoveNode { | ||
uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; | ||
string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; | ||
string provider = 3 [(gogoproto.moretags) = "yaml:\"provider\""]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
syntax = "proto3"; | ||
package sentinel.plan.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "sentinel/plan/v1/plan.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message GenesisPlan { | ||
Plan plan = 1 [ | ||
(gogoproto.jsontag) = "_,omitempty", | ||
(gogoproto.nullable) = false | ||
]; | ||
repeated string nodes = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
syntax = "proto3"; | ||
package sentinel.plan.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// MsgAddRequest defines the SDK message for adding a plan | ||
message MsgAddRequest { | ||
string from = 1; | ||
repeated cosmos.base.v1beta1.Coin price = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
google.protobuf.Duration validity = 3 [ | ||
(gogoproto.stdduration) = true, | ||
(gogoproto.nullable) = false | ||
]; | ||
string bytes = 4 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.nullable) = false | ||
]; | ||
} | ||
|
||
// MsgSetStatusRequest defines the SDK message for modifying the status of a | ||
// plan | ||
message MsgSetStatusRequest { | ||
string from = 1; | ||
uint64 id = 2; | ||
sentinel.types.v1.Status status = 3; | ||
} | ||
|
||
// MsgAddNodeRequest defines the SDK message for adding a node to a plan | ||
message MsgAddNodeRequest { | ||
string from = 1; | ||
uint64 id = 2; | ||
string address = 3; | ||
} | ||
|
||
// MsgRemoveNodeRequest defines the SDK message for removing a node from a plan | ||
message MsgRemoveNodeRequest { | ||
string from = 1; | ||
uint64 id = 2; | ||
string address = 3; | ||
} | ||
|
||
// MsgAddResponse defines the response of message MsgRegisterRequest | ||
message MsgAddResponse {} | ||
|
||
// MsgSetStatusResponse defines the response of message MsgSetStatusRequest | ||
message MsgSetStatusResponse {} | ||
|
||
// MsgAddNodeResponse defines the response of message MsgAddNodeRequest | ||
message MsgAddNodeResponse {} | ||
|
||
// MsgRemoveNodeResponse defines the response of message MsgRemoveNodeRequest | ||
message MsgRemoveNodeResponse {} | ||
|
||
service MsgService { | ||
rpc MsgAdd(MsgAddRequest) returns (MsgAddResponse); | ||
rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse); | ||
rpc MsgAddNode(MsgAddNodeRequest) returns (MsgAddNodeResponse); | ||
rpc MsgRemoveNode(MsgRemoveNodeRequest) returns (MsgRemoveNodeResponse); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
syntax = "proto3"; | ||
package sentinel.plan.v1; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
syntax = "proto3"; | ||
package sentinel.plan.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "sentinel/types/v1/status.proto"; | ||
|
||
option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; | ||
option (gogoproto.equal_all) = false; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
message Plan { | ||
uint64 id = 1; | ||
string provider = 2; | ||
repeated cosmos.base.v1beta1.Coin price = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
google.protobuf.Duration validity = 4 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdduration) = true | ||
]; | ||
string bytes = 5 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.nullable) = false | ||
]; | ||
sentinel.types.v1.Status status = 6; | ||
google.protobuf.Timestamp status_at = 7 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.stdtime) = true | ||
]; | ||
} |
Oops, something went wrong.