2022-04-05 07:09:27 +00:00
|
|
|
syntax = "proto3";
|
2022-12-09 04:17:14 +00:00
|
|
|
package vulcanize.registry.v1beta1;
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
import "vulcanize/registry/v1beta1/registry.proto";
|
2022-04-05 07:09:27 +00:00
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// Query defines the gRPC querier service for registry module
|
2022-04-05 07:09:27 +00:00
|
|
|
service Query {
|
2022-12-09 04:17:14 +00:00
|
|
|
// Params queries the registry module params.
|
2022-04-05 07:09:27 +00:00
|
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/params";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// List records
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc ListRecords(QueryListRecordsRequest) returns (QueryListRecordsResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/records";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// Get record by id
|
2022-10-17 11:03:31 +00:00
|
|
|
rpc GetRecord(QueryRecordByIDRequest) returns (QueryRecordByIDResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/records/{id}";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// Get records by bond id
|
2022-10-17 11:03:31 +00:00
|
|
|
rpc GetRecordByBondID(QueryRecordByBondIDRequest) returns (QueryRecordByBondIDResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/records-by-bond-id/{id}";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
2022-12-09 04:17:14 +00:00
|
|
|
// Get registry module balance
|
|
|
|
rpc GetRegistryModuleBalance(GetRegistryModuleBalanceRequest) returns (GetRegistryModuleBalanceResponse) {
|
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/balance";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// List name records
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc ListNameRecords(QueryListNameRecordsRequest) returns (QueryListNameRecordsResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/names";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// Whois method retrieve the name authority info
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/whois/{name}";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
2022-04-20 07:37:38 +00:00
|
|
|
// LookupCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc LookupCrn(QueryLookupCrn) returns (QueryLookupCrnResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/lookup";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
2022-04-20 07:37:38 +00:00
|
|
|
// ResolveCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc ResolveCrn(QueryResolveCrn) returns (QueryResolveCrnResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/resolve";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// GetRecordExpiryQueue
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc GetRecordExpiryQueue(QueryGetRecordExpiryQueue) returns (QueryGetRecordExpiryQueueResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/record-expiry";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
// GetAuthorityExpiryQueue
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc GetAuthorityExpiryQueue(QueryGetAuthorityExpiryQueue) returns (QueryGetAuthorityExpiryQueueResponse) {
|
2022-12-09 04:17:14 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/registry/v1beta1/authority-expiry";
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryParamsRequest is request type for registry params
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryParamsRequest {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryParamsResponse is response type for registry params
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryParamsResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
Params params = 1;
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryListRecordsRequest is request type for registry records list
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryListRecordsRequest {
|
2024-01-15 04:20:38 +00:00
|
|
|
message LinkInput {
|
2022-04-18 12:34:52 +00:00
|
|
|
string id = 1;
|
|
|
|
}
|
2024-01-15 04:20:38 +00:00
|
|
|
message ArrayInput {
|
|
|
|
repeated ValueInput values = 1;
|
|
|
|
}
|
|
|
|
message MapInput {
|
|
|
|
map<string, ValueInput> values = 1;
|
|
|
|
}
|
2022-04-13 12:03:42 +00:00
|
|
|
message ValueInput {
|
2024-01-15 04:20:38 +00:00
|
|
|
// Type of record attribute value
|
|
|
|
oneof value {
|
|
|
|
string string = 1;
|
|
|
|
int64 int = 2;
|
|
|
|
double float = 3;
|
|
|
|
bool boolean = 4;
|
|
|
|
string link = 5;
|
|
|
|
ArrayInput array = 6;
|
|
|
|
MapInput map = 7;
|
|
|
|
}
|
2022-04-13 12:03:42 +00:00
|
|
|
}
|
|
|
|
message KeyValueInput {
|
2022-10-10 10:38:33 +00:00
|
|
|
string key = 1;
|
2022-04-13 12:03:42 +00:00
|
|
|
ValueInput value = 2;
|
|
|
|
}
|
|
|
|
repeated KeyValueInput attributes = 1;
|
|
|
|
|
2022-04-14 03:56:12 +00:00
|
|
|
bool all = 2;
|
|
|
|
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines an optional pagination for the request.
|
2022-04-14 03:56:12 +00:00
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryListRecordsResponse is response type for registry records list
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryListRecordsResponse {
|
|
|
|
repeated Record records = 1 [(gogoproto.nullable) = false];
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryRecordByIDRequest is request type for registry records by id
|
2022-10-17 11:03:31 +00:00
|
|
|
message QueryRecordByIDRequest {
|
2022-10-10 10:38:33 +00:00
|
|
|
string id = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryRecordByIDResponse is response type for registry records by id
|
2022-10-17 11:03:31 +00:00
|
|
|
message QueryRecordByIDResponse {
|
2022-10-10 10:38:33 +00:00
|
|
|
Record record = 1 [(gogoproto.nullable) = false];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryRecordByBondIdRequest is request type for get the records by bond-id
|
2022-10-17 11:03:31 +00:00
|
|
|
message QueryRecordByBondIDRequest {
|
2022-04-05 07:09:27 +00:00
|
|
|
string id = 1;
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryRecordByBondIdResponse is response type for records list by bond-id
|
2022-10-17 11:03:31 +00:00
|
|
|
message QueryRecordByBondIDResponse {
|
2022-10-10 10:38:33 +00:00
|
|
|
repeated Record records = 1 [(gogoproto.nullable) = false];
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// GetRegistryModuleBalanceRequest is request type for registry module accounts balance
|
|
|
|
message GetRegistryModuleBalanceRequest {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// GetRegistryModuleBalanceResponse is response type for registry module accounts balance
|
|
|
|
message GetRegistryModuleBalanceResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated AccountBalance balances = 1;
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// AccountBalance is registry module account balance
|
2022-04-05 07:09:27 +00:00
|
|
|
message AccountBalance {
|
2022-10-10 10:38:33 +00:00
|
|
|
string account_name = 1 [(gogoproto.moretags) = "json:\"accountName\" yaml:\"accountName\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin balance = 3 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryListNameRecordsRequest is request type for registry names records
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryListNameRecordsRequest {
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
// QueryListNameRecordsResponse is response type for registry names records
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryListNameRecordsResponse {
|
|
|
|
repeated NameEntry names = 1 [(gogoproto.nullable) = false];
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryWhoisRequest is request type for Get NameAuthority
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryWhoisRequest {
|
2022-04-05 07:09:27 +00:00
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryWhoisResponse is response type for whois request
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryWhoisResponse {
|
|
|
|
NameAuthority name_authority = 1
|
|
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"nameAuthority\" yaml:\"nameAuthority\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
// QueryLookupCrn is request type for LookupCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryLookupCrn {
|
2022-04-20 07:37:38 +00:00
|
|
|
string crn = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
// QueryLookupCrnResponse is response type for QueryLookupCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryLookupCrnResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
NameRecord name = 1;
|
|
|
|
}
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
// QueryResolveCrn is request type for ResolveCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryResolveCrn {
|
2022-04-20 07:37:38 +00:00
|
|
|
string crn = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 07:37:38 +00:00
|
|
|
// QueryResolveCrnResponse is response type for QueryResolveCrn
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryResolveCrnResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
Record record = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetRecordExpiryQueue
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetRecordExpiryQueue {
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetRecordExpiryQueueResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetRecordExpiryQueueResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated ExpiryQueueRecord records = 1;
|
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ExpiryQueueRecord
|
2022-10-10 10:38:33 +00:00
|
|
|
message ExpiryQueueRecord {
|
|
|
|
string id = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated string value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetAuthorityExpiryQueue
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetAuthorityExpiryQueue {
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetAuthorityExpiryQueueResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetAuthorityExpiryQueueResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated ExpiryQueueRecord authorities = 1;
|
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|