Julian Strobl 6aaa5399ef
Remove /planetmint-go from API paths (#157)
* Remove `/planetmint-go` from API paths

* Generate protobuf and openapi

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-10-19 10:39:23 +02:00

63 lines
1.9 KiB
Protocol Buffer

syntax = "proto3";
package planetmintgo.asset;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "planetmintgo/asset/params.proto";
option go_package = "github.com/planetmint/planetmint-go/x/asset/types";
// Query defines the gRPC querier service.
service Query {
// Parameters queries the parameters of the module.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/planetmint/asset/params";
}
// Queries a list of GetCIDsByAddress items.
rpc GetCIDsByAddress (QueryGetCIDsByAddressRequest) returns (QueryGetCIDsByAddressResponse) {
option (google.api.http).get = "/planetmint/asset/get_cids_by_address/{address}/{lookupPeriodInMin}";
}
// Queries a list of GetNotarizedAsset items.
rpc GetNotarizedAsset (QueryGetNotarizedAssetRequest) returns (QueryGetNotarizedAssetResponse) {
option (google.api.http).get = "/planetmint/asset/get_notarized_asset/{cid}";
}
}
// QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
}
message QueryGetCIDsByAddressRequest {
string address = 1;
uint64 lookupPeriodInMin = 2;
cosmos.base.query.v1beta1.PageRequest pagination = 3;
}
message QueryGetCIDsByAddressResponse {
repeated string cids = 1;
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
message QueryGetNotarizedAssetRequest {
string cid = 1;
}
message QueryGetNotarizedAssetResponse {
string cid = 1;
string address = 2;
}