forked from cerc-io/registry-sdk
Update proto files and regenerate ts bindings (#1)
* Update proto files * Update script to generate typescript definitions * Generate typescript definitions from protobuf files * Cleanup unnecessary proto files --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package amino;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated.
|
||||
// We need this right now because gogoproto codegen needs to import the extension.
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx/amino";
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
// name is the string used when registering a concrete
|
||||
// type into the Amino type registry, via the Amino codec's
|
||||
// `RegisterConcrete()` method. This string MUST be at most 39
|
||||
// characters long, or else the message will be rejected by the
|
||||
// Ledger hardware device.
|
||||
string name = 11110001;
|
||||
|
||||
// encoding describes the encoding format used by Amino for the given
|
||||
// message. The field type is chosen to be a string for
|
||||
// flexibility, but it should ideally be short and expected to be
|
||||
// machine-readable, for example "base64" or "utf8_json". We
|
||||
// highly recommend to use underscores for word separation instead of spaces.
|
||||
//
|
||||
// If left empty, then the Amino encoding is expected to be the same as the
|
||||
// Protobuf one.
|
||||
//
|
||||
// This annotation should not be confused with the `encoding`
|
||||
// one which operates on the field level.
|
||||
string message_encoding = 11110002;
|
||||
}
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
// encoding describes the encoding format used by Amino for
|
||||
// the given field. The field type is chosen to be a string for
|
||||
// flexibility, but it should ideally be short and expected to be
|
||||
// machine-readable, for example "base64" or "utf8_json". We
|
||||
// highly recommend to use underscores for word separation instead of spaces.
|
||||
//
|
||||
// If left empty, then the Amino encoding is expected to be the same as the
|
||||
// Protobuf one.
|
||||
//
|
||||
// This annotation should not be confused with the
|
||||
// `message_encoding` one which operates on the message level.
|
||||
string encoding = 11110003;
|
||||
|
||||
// field_name sets a different field name (i.e. key name) in
|
||||
// the amino JSON object for the given field.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Foo {
|
||||
// string bar = 1 [(amino.field_name) = "baz"];
|
||||
// }
|
||||
//
|
||||
// Then the Amino encoding of Foo will be:
|
||||
// `{"baz":"some value"}`
|
||||
string field_name = 11110004;
|
||||
|
||||
// dont_omitempty sets the field in the JSON object even if
|
||||
// its value is empty, i.e. equal to the Golang zero value. To learn what
|
||||
// the zero values are, see https://go.dev/ref/spec#The_zero_value.
|
||||
//
|
||||
// Fields default to `omitempty`, which is the default behavior when this
|
||||
// annotation is unset. When set to true, then the field value in the
|
||||
// JSON object will be set, i.e. not `undefined`.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message Foo {
|
||||
// string bar = 1;
|
||||
// string baz = 2 [(amino.dont_omitempty) = true];
|
||||
// }
|
||||
//
|
||||
// f := Foo{};
|
||||
// out := AminoJSONEncoder(&f);
|
||||
// out == {"baz":""}
|
||||
bool dont_omitempty = 11110005;
|
||||
|
||||
// oneof_name sets the type name for the given field oneof field. This is used
|
||||
// by the Amino JSON encoder to encode the type of the oneof field, and must be the same string in
|
||||
// the RegisterConcrete() method usage used to register the concrete type.
|
||||
string oneof_name = 11110006;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.auction.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "git.vdb.to/cerc-io/laconic2d/x/auction"
|
||||
};
|
||||
}
|
||||
@@ -1,39 +1,46 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.auction.v1beta1;
|
||||
|
||||
package cerc.auction.v1;
|
||||
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/auction/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
|
||||
|
||||
// Params defines the auction module parameters
|
||||
message Params {
|
||||
// Write custom stringer method
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
// Duration of the commits phase in seconds
|
||||
google.protobuf.Duration commits_duration = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
||||
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
||||
];
|
||||
|
||||
// Duration of the reveals phase in seconds
|
||||
google.protobuf.Duration reveals_duration = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
||||
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
||||
];
|
||||
|
||||
// Commit fees
|
||||
cosmos.base.v1beta1.Coin commit_fee = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
||||
];
|
||||
|
||||
// Reveal fees
|
||||
cosmos.base.v1beta1.Coin reveal_fee = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
||||
];
|
||||
|
||||
// Minimum acceptable bid amount
|
||||
cosmos.base.v1beta1.Coin minimum_bid = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
@@ -45,28 +52,33 @@ message Params {
|
||||
message Auction {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
string status = 2;
|
||||
|
||||
// Address of the creator of the auction
|
||||
string owner_address = 3;
|
||||
|
||||
// Timestamp at which the auction was created
|
||||
google.protobuf.Timestamp create_time = 4 [
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
|
||||
];
|
||||
|
||||
// Timestamp at which the commits phase concluded
|
||||
google.protobuf.Timestamp commits_end_time = 5 [
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
|
||||
];
|
||||
|
||||
// Timestamp at which the reveals phase concluded
|
||||
google.protobuf.Timestamp reveals_end_time = 6 [
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
|
||||
];
|
||||
|
||||
// Commit and reveal fees must both be paid when committing a bid
|
||||
// Reveal fee is returned only if the bid is revealed
|
||||
cosmos.base.v1beta1.Coin commit_fee = 7 [
|
||||
@@ -77,18 +89,22 @@ message Auction {
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
||||
];
|
||||
|
||||
// Minimum acceptable bid amount for a valid commit
|
||||
cosmos.base.v1beta1.Coin minimum_bid = 9 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
|
||||
];
|
||||
|
||||
// Address of the winner
|
||||
string winner_address = 10;
|
||||
|
||||
// Winning bid, i.e., the highest bid
|
||||
cosmos.base.v1beta1.Coin winning_bid = 11 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""
|
||||
];
|
||||
|
||||
// Amount the winner pays, i.e. the second highest auction
|
||||
cosmos.base.v1beta1.Coin winning_price = 12 [
|
||||
(gogoproto.nullable) = false,
|
||||
@@ -106,30 +122,35 @@ message Auctions {
|
||||
message Bid {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string auction_id = 1;
|
||||
string bidder_address = 2;
|
||||
string status = 3;
|
||||
string commit_hash = 4;
|
||||
google.protobuf.Timestamp commit_time = 5 [
|
||||
(gogoproto.stdtime) = true,
|
||||
string auction_id = 1;
|
||||
string bidder_address = 2;
|
||||
string status = 3;
|
||||
string commit_hash = 4;
|
||||
|
||||
google.protobuf.Timestamp commit_time = 5 [
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"commit_time\" yaml:\"commit_time\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin commit_fee = 6 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
||||
];
|
||||
|
||||
google.protobuf.Timestamp reveal_time = 7 [
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveal_time\" yaml:\"reveal_time\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin reveal_fee = 8 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin bid_amount = 9 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"bid_amount\" yaml:\"bid_amount\""
|
||||
];;
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.auction.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cerc/auction/v1/auction.proto";
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
|
||||
|
||||
// GenesisState defines the genesis state of the auction module
|
||||
message GenesisState {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
Auctions auctions = 2 [(gogoproto.moretags) = "json:\"auctions\" yaml:\"auctions\""];
|
||||
}
|
||||
@@ -1,22 +1,74 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.auction.v1beta1;
|
||||
|
||||
package cerc.auction.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "vulcanize/auction/v1beta1/types.proto";
|
||||
import "cerc/auction/v1/auction.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/auction/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
|
||||
|
||||
// Query defines the gRPC querier interface for the auction module
|
||||
service Query {
|
||||
// Params queries auction module params
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/params";
|
||||
}
|
||||
|
||||
// Auctions queries all auctions
|
||||
rpc Auctions(QueryAuctionsRequest) returns (QueryAuctionsResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/auctions";
|
||||
}
|
||||
|
||||
// GetAuction queries an auction
|
||||
rpc GetAuction(QueryAuctionRequest) returns (QueryAuctionResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/auctions/{id}";
|
||||
}
|
||||
|
||||
// GetBid queries an auction bid
|
||||
rpc GetBid(QueryBidRequest) returns (QueryBidResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/bids/{auction_id}/{bidder}";
|
||||
}
|
||||
|
||||
// GetBids queries all auction bids
|
||||
rpc GetBids(QueryBidsRequest) returns (QueryBidsResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/bids/{auction_id}";
|
||||
}
|
||||
|
||||
// AuctionsByBidder queries auctions by bidder
|
||||
rpc AuctionsByBidder(QueryAuctionsByBidderRequest) returns (QueryAuctionsByBidderResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/by-bidder/{bidder_address}";
|
||||
}
|
||||
|
||||
// AuctionsByOwner queries auctions by owner
|
||||
rpc AuctionsByOwner(QueryAuctionsByOwnerRequest) returns (QueryAuctionsByOwnerResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/by-owner/{owner_address}";
|
||||
}
|
||||
|
||||
// GetAuctionModuleBalance queries the auction module account balance
|
||||
rpc GetAuctionModuleBalance(QueryGetAuctionModuleBalanceRequest) returns (QueryGetAuctionModuleBalanceResponse) {
|
||||
option (google.api.http).get = "/cerc/auction/v1/balance";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the format to query the parameters of the auction module
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse returns parameters of the auction module
|
||||
message QueryParamsResponse {
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// AuctionsRequest is the format for querying all the auctions
|
||||
message AuctionsRequest {
|
||||
message QueryAuctionsRequest {
|
||||
// pagination defines an optional pagination info for the next request
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// AuctionsResponse returns the list of all auctions
|
||||
message AuctionsResponse {
|
||||
message QueryAuctionsResponse {
|
||||
// List of auctions
|
||||
Auctions auctions = 1;
|
||||
// pagination defines an optional pagination info for the next request
|
||||
@@ -24,126 +76,75 @@ message AuctionsResponse {
|
||||
}
|
||||
|
||||
// AuctionRequest is the format for querying a specific auction
|
||||
message AuctionRequest {
|
||||
// Auction ID
|
||||
message QueryAuctionRequest {
|
||||
// Auction id
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// AuctionResponse returns the details of the queried auction
|
||||
message AuctionResponse {
|
||||
message QueryAuctionResponse {
|
||||
// Auction details
|
||||
Auction auction = 1;
|
||||
}
|
||||
|
||||
// BidRequest is the format for querying a specific bid in an auction
|
||||
message BidRequest {
|
||||
// Auction ID
|
||||
message QueryBidRequest {
|
||||
// Auction id
|
||||
string auction_id = 1;
|
||||
// Bidder address
|
||||
string bidder = 2;
|
||||
}
|
||||
|
||||
// BidResponse returns the details of the queried bid
|
||||
message BidResponse {
|
||||
message QueryBidResponse {
|
||||
// Bid details
|
||||
Bid bid = 1;
|
||||
}
|
||||
|
||||
// BidsRequest is the format for querying all bids in an auction
|
||||
message BidsRequest {
|
||||
// Auction ID
|
||||
message QueryBidsRequest {
|
||||
// Auction id
|
||||
string auction_id = 1;
|
||||
}
|
||||
|
||||
// BidsResponse returns details of all bids in an auction
|
||||
message BidsResponse {
|
||||
message QueryBidsResponse {
|
||||
// List of bids in the auction
|
||||
repeated Bid bids = 1;
|
||||
}
|
||||
|
||||
// AuctionsByBidderRequest is the format for querying all auctions containing a bidder address
|
||||
message AuctionsByBidderRequest {
|
||||
message QueryAuctionsByBidderRequest {
|
||||
// Address of the bidder
|
||||
string bidder_address = 1;
|
||||
}
|
||||
|
||||
// AuctionsByBidderResponse returns all auctions containing a bidder
|
||||
message AuctionsByBidderResponse {
|
||||
message QueryAuctionsByBidderResponse {
|
||||
// List of auctions
|
||||
Auctions auctions = 1;
|
||||
}
|
||||
|
||||
// AuctionsByOwnerRequest is the format for querying all auctions created by an owner
|
||||
message AuctionsByOwnerRequest {
|
||||
message QueryAuctionsByOwnerRequest {
|
||||
// Address of the owner
|
||||
string owner_address = 1;
|
||||
}
|
||||
|
||||
// AuctionsByOwnerResponse returns all auctions created by an owner
|
||||
message AuctionsByOwnerResponse {
|
||||
message QueryAuctionsByOwnerResponse {
|
||||
// List of auctions
|
||||
Auctions auctions = 1;
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the format to query the parameters of the auction module
|
||||
message QueryParamsRequest {
|
||||
}
|
||||
|
||||
// QueryParamsResponse returns parameters of the auction module
|
||||
message QueryParamsResponse {
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// BalanceRequest is the format to fetch all balances
|
||||
message BalanceRequest {
|
||||
}
|
||||
message QueryGetAuctionModuleBalanceRequest {}
|
||||
|
||||
message BalanceResponse {
|
||||
message QueryGetAuctionModuleBalanceResponse {
|
||||
// Set of all balances within the auction
|
||||
repeated cosmos.base.v1beta1.Coin balance = 1 [
|
||||
(gogoproto.nullable) = false
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// Query defines the gRPC querier interface for the auction module
|
||||
service Query {
|
||||
// Auctions queries all auctions
|
||||
rpc Auctions(AuctionsRequest) returns (AuctionsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions";
|
||||
}
|
||||
|
||||
// GetAuction queries an auction
|
||||
rpc GetAuction(AuctionRequest) returns (AuctionResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/auctions/{id}";
|
||||
}
|
||||
|
||||
// GetBid queries an auction bid
|
||||
rpc GetBid(BidRequest) returns (BidResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}/{bidder}";
|
||||
}
|
||||
|
||||
// GetBids queries all auction bids
|
||||
rpc GetBids(BidsRequest) returns (BidsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/bids/{auction_id}";
|
||||
}
|
||||
|
||||
// AuctionsByBidder queries auctions by bidder
|
||||
rpc AuctionsByBidder(AuctionsByBidderRequest) returns (AuctionsByBidderResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/by-bidder/{bidder_address}";
|
||||
}
|
||||
|
||||
// AuctionsByOwner queries auctions by owner
|
||||
rpc AuctionsByOwner(AuctionsByOwnerRequest) returns (AuctionsByOwnerResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/by-owner/{owner_address}";
|
||||
}
|
||||
|
||||
// QueryParams implements the params query command
|
||||
rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/params";
|
||||
}
|
||||
|
||||
// Balance queries the auction module account balance
|
||||
rpc Balance(BalanceRequest) returns (BalanceResponse) {
|
||||
option (google.api.http).get = "/vulcanize/auction/v1beta1/balance";
|
||||
}
|
||||
}
|
||||
@@ -1,122 +1,129 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.auction.v1beta1;
|
||||
|
||||
package cerc.auction.v1;
|
||||
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "vulcanize/auction/v1beta1/types.proto";
|
||||
import "cerc/auction/v1/auction.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/auction/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/auction";
|
||||
|
||||
// Tx defines the gRPC tx interface
|
||||
service Msg {
|
||||
option (cosmos.msg.v1.service) = true;
|
||||
|
||||
// CreateAuction is the command for creating an auction
|
||||
rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse) {
|
||||
option (google.api.http).post = "/cerc/auction/v1/create_auction";
|
||||
};
|
||||
|
||||
// CommitBid is the command for committing a bid
|
||||
rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse) {
|
||||
option (google.api.http).post = "/cerc/auction/v1/commit_bid";
|
||||
};
|
||||
|
||||
// RevealBid is the command for revealing a bid
|
||||
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse) {
|
||||
option (google.api.http).post = "/cerc/auction/v1/reveal_bid";
|
||||
};
|
||||
}
|
||||
|
||||
// MsgCreateAuction defines a create auction message
|
||||
message MsgCreateAuction {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
// Duration of the commits phase in seconds
|
||||
google.protobuf.Duration commits_duration = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
||||
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
||||
];
|
||||
|
||||
// Duration of the reveals phase in seconds
|
||||
google.protobuf.Duration reveals_duration = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
||||
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
||||
];
|
||||
|
||||
// Commit fees
|
||||
cosmos.base.v1beta1.Coin commit_fee = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
||||
];
|
||||
|
||||
// Reveal fees
|
||||
cosmos.base.v1beta1.Coin reveal_fee = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
||||
];
|
||||
|
||||
// Minimum acceptable bid amount
|
||||
cosmos.base.v1beta1.Coin minimum_bid = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
|
||||
];
|
||||
|
||||
// Address of the signer
|
||||
string signer = 6 [
|
||||
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
|
||||
];
|
||||
string signer = 6 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
||||
}
|
||||
|
||||
// MsgCreateAuctionResponse returns the details of the created auction
|
||||
message MsgCreateAuctionResponse {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Auction details
|
||||
Auction auction = 1 [
|
||||
(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
|
||||
];
|
||||
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
|
||||
}
|
||||
|
||||
// CommitBid defines the message to commit a bid
|
||||
message MsgCommitBid {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
// Auction id
|
||||
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
|
||||
|
||||
// Auction ID
|
||||
string auction_id = 1 [
|
||||
(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
|
||||
];
|
||||
// Commit Hash
|
||||
string commit_hash = 2 [
|
||||
(gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""
|
||||
];
|
||||
// Address of the signer
|
||||
string signer = 3 [
|
||||
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
|
||||
];
|
||||
}
|
||||
string commit_hash = 2 [(gogoproto.moretags) = "json:\"commit_hash\" yaml:\"commit_hash\""];
|
||||
|
||||
// RevealBid defines the message to reveal a bid
|
||||
message MsgRevealBid {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Auction ID
|
||||
string auction_id = 1 [
|
||||
(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""
|
||||
];
|
||||
// Commit Hash
|
||||
string reveal = 2 [
|
||||
(gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""
|
||||
];
|
||||
// Address of the signer
|
||||
string signer = 3 [
|
||||
(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""
|
||||
];
|
||||
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
||||
}
|
||||
|
||||
// MsgCommitBidResponse returns the state of the auction after the bid creation
|
||||
message MsgCommitBidResponse {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Auction details
|
||||
Bid bid = 1 [
|
||||
(gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""
|
||||
];
|
||||
Bid bid = 1 [(gogoproto.moretags) = "json:\"bid\" yaml:\"bid\""];
|
||||
}
|
||||
|
||||
|
||||
// RevealBid defines the message to reveal a bid
|
||||
message MsgRevealBid {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
// Auction id
|
||||
string auction_id = 1 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
|
||||
|
||||
// Commit Hash
|
||||
string reveal = 2 [(gogoproto.moretags) = "json:\"reveal\" yaml:\"reveal\""];
|
||||
|
||||
// Address of the signer
|
||||
string signer = 3 [(gogoproto.moretags) = "json:\"signer\" yaml:\"signer\""];
|
||||
}
|
||||
|
||||
|
||||
// MsgRevealBidResponse returns the state of the auction after the bid reveal
|
||||
message MsgRevealBidResponse {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Auction details
|
||||
Auction auction = 1 [
|
||||
(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""
|
||||
];
|
||||
Auction auction = 1 [(gogoproto.moretags) = "json:\"auction\" yaml:\"auction\""];
|
||||
}
|
||||
|
||||
// Tx defines the gRPC tx interface
|
||||
service Msg {
|
||||
// CreateAuction is the command for creating an auction
|
||||
rpc CreateAuction(MsgCreateAuction) returns (MsgCreateAuctionResponse);
|
||||
|
||||
// CommitBid is the command for committing a bid
|
||||
rpc CommitBid(MsgCommitBid) returns (MsgCommitBidResponse);
|
||||
|
||||
//RevealBid is the command for revealing a bid
|
||||
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.bond.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "git.vdb.to/cerc-io/laconic2d/x/bond"
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.bond.v1beta1;
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/bond/types";
|
||||
package cerc.bond.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// Params defines the bond module parameters
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
// Params defines the parameters of the bond module.
|
||||
message Params {
|
||||
// max_bond_amount is maximum amount to bond
|
||||
cosmos.base.v1beta1.Coin max_bond_amount = 1 [
|
||||
@@ -19,11 +20,14 @@ message Params {
|
||||
message Bond {
|
||||
// id is unique identifier of the bond
|
||||
string id = 1;
|
||||
|
||||
// owner of the bond
|
||||
string owner = 2;
|
||||
|
||||
// balance of the bond
|
||||
repeated cosmos.base.v1beta1.Coin balance = 3 [
|
||||
(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
||||
];
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.bond.v1beta1;
|
||||
|
||||
package cerc.bond.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "vulcanize/bond/v1beta1/bond.proto";
|
||||
import "cerc/bond/v1/bond.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/bond/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
// GenesisState defines the bond module's genesis state.
|
||||
message GenesisState {
|
||||
@@ -12,7 +13,5 @@ message GenesisState {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// bonds defines all the bonds
|
||||
repeated Bond bonds = 2 [
|
||||
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
|
||||
];
|
||||
repeated Bond bonds = 2 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
|
||||
}
|
||||
@@ -1,84 +1,80 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.bond.v1beta1;
|
||||
|
||||
package cerc.bond.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "vulcanize/bond/v1beta1/bond.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cerc/bond/v1/bond.proto";
|
||||
// import "cosmos/query/v1/query.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/bond/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
// Query defines the gRPC querier service for bond module
|
||||
service Query {
|
||||
// Params queries bonds module params.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/bond/v1beta1/params";
|
||||
option (google.api.http).get = "/cerc/bond/v1/params";
|
||||
}
|
||||
|
||||
// Bonds queries bonds list.
|
||||
// Bonds queries bonds list
|
||||
rpc Bonds(QueryGetBondsRequest) returns (QueryGetBondsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/bond/v1beta1/bonds";
|
||||
// Mark query as module_query_safe?
|
||||
// option (cosmos.query.v1.module_query_safe) = true;
|
||||
option (google.api.http).get = "/cerc/bond/v1/bonds";
|
||||
}
|
||||
|
||||
// GetBondById
|
||||
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse){
|
||||
option (google.api.http).get = "/vulcanize/bond/v1beta1/bonds/{id}";
|
||||
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse) {
|
||||
option (google.api.http).get = "/cerc/bond/v1/bonds/{id}";
|
||||
}
|
||||
|
||||
// Get Bonds List by Owner
|
||||
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse){
|
||||
option (google.api.http).get = "/vulcanize/bond/v1beta1/by-owner/{owner}";
|
||||
// Get Bonds list by Owner
|
||||
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse) {
|
||||
option (google.api.http).get = "/cerc/bond/v1/by-owner/{owner}";
|
||||
}
|
||||
|
||||
// Get Bonds module balance
|
||||
rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse){
|
||||
option (google.api.http).get = "/vulcanize/bond/v1beta1/balance";
|
||||
// Get Bond module balance
|
||||
rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse) {
|
||||
option (google.api.http).get = "/cerc/bond/v1/balance";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request for query the bond module params
|
||||
message QueryParamsRequest{
|
||||
}
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse returns response type of bond module params
|
||||
message QueryParamsResponse{
|
||||
Params params = 1 [
|
||||
(gogoproto.moretags) = "json:\"params\" yaml:\"params\""
|
||||
];
|
||||
message QueryParamsResponse {
|
||||
Params params = 1 [(gogoproto.moretags) = "json:\"params\" yaml:\"params\""];
|
||||
}
|
||||
|
||||
// QueryGetBondById queries a bond by bond-id.
|
||||
message QueryGetBondsRequest{
|
||||
// QueryGetBondById queries a bonds.
|
||||
message QueryGetBondsRequest {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryGetBondsResponse is response type for get the bonds by bond-id
|
||||
message QueryGetBondsResponse{
|
||||
repeated Bond bonds = 1 [
|
||||
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
|
||||
];
|
||||
message QueryGetBondsResponse {
|
||||
repeated Bond bonds = 1 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryGetBondById
|
||||
message QueryGetBondByIdRequest{
|
||||
string id = 1 [
|
||||
(gogoproto.moretags) = "json:\"id\" yaml:\"id\""
|
||||
];
|
||||
message QueryGetBondByIdRequest {
|
||||
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
|
||||
}
|
||||
|
||||
// QueryGetBondByIdResponse returns QueryGetBondById query response
|
||||
message QueryGetBondByIdResponse{
|
||||
Bond bond = 1 [
|
||||
(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""
|
||||
];
|
||||
message QueryGetBondByIdResponse {
|
||||
Bond bond = 1 [(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""];
|
||||
}
|
||||
|
||||
// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method
|
||||
message QueryGetBondsByOwnerRequest{
|
||||
message QueryGetBondsByOwnerRequest {
|
||||
string owner = 1;
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
@@ -90,20 +86,19 @@ message QueryGetBondsByOwnerResponse {
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
|
||||
];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method
|
||||
message QueryGetBondModuleBalanceRequest{
|
||||
|
||||
}
|
||||
message QueryGetBondModuleBalanceRequest {}
|
||||
|
||||
// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method
|
||||
message QueryGetBondModuleBalanceResponse{
|
||||
repeated cosmos.base.v1beta1.Coin balance = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
message QueryGetBondModuleBalanceResponse {
|
||||
repeated cosmos.base.v1beta1.Coin balance = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.bond.v1;
|
||||
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/bond";
|
||||
|
||||
// Msg defines the bond Msg service.
|
||||
service Msg {
|
||||
option (cosmos.msg.v1.service) = true;
|
||||
|
||||
// CreateBond defines a method for creating a new bond.
|
||||
rpc CreateBond(MsgCreateBond) returns (MsgCreateBondResponse) {
|
||||
option (google.api.http).post = "/cerc/bond/v1/create_bond";
|
||||
};
|
||||
|
||||
// RefillBond defines a method for refilling amount for bond.
|
||||
rpc RefillBond(MsgRefillBond) returns (MsgRefillBondResponse) {
|
||||
option (google.api.http).post = "/cerc/bond/v1/refill_bond";
|
||||
};
|
||||
|
||||
// WithdrawBond defines a method for withdrawing amount from bond.
|
||||
rpc WithdrawBond(MsgWithdrawBond) returns (MsgWithdrawBondResponse) {
|
||||
option (google.api.http).post = "/cerc/bond/v1/withdraw_bond";
|
||||
};
|
||||
|
||||
// CancelBond defines a method for cancelling a bond.
|
||||
rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse) {
|
||||
option (google.api.http).post = "/cerc/bond/v1/cancel_bond";
|
||||
};
|
||||
}
|
||||
|
||||
// MsgCreateBond defines a SDK message for creating a new bond.
|
||||
message MsgCreateBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string signer = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgCreateBondResponse defines the Msg/CreateBond response type.
|
||||
message MsgCreateBondResponse {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// MsgRefillBond defines a SDK message for refill the amount for bond.
|
||||
message MsgRefillBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgRefillBondResponse defines the Msg/RefillBond response type.
|
||||
message MsgRefillBondResponse {}
|
||||
|
||||
// MsgWithdrawBond defines a SDK message for withdrawing amount from bond.
|
||||
message MsgWithdrawBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type.
|
||||
message MsgWithdrawBondResponse {}
|
||||
|
||||
// MsgCancelBond defines a SDK message for the cancel the bond.
|
||||
message MsgCancelBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
||||
message MsgCancelBondResponse {}
|
||||
@@ -0,0 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.registry.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "git.vdb.to/cerc-io/laconic2d/x/registry"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.registry.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cerc/registry/v1/registry.proto";
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry";
|
||||
|
||||
// GenesisState defines the registry module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the params of registry module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// records
|
||||
repeated Record records = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"records\" yaml:\"records\""
|
||||
];
|
||||
|
||||
// authorities
|
||||
repeated AuthorityEntry authorities = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"authorities\" yaml:\"authorities\""
|
||||
];
|
||||
|
||||
// names
|
||||
repeated NameEntry names = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"names\" yaml:\"names\""
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.registry.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cerc/registry/v1/registry.proto";
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry";
|
||||
|
||||
// Query defines the gRPC querier service for registry module
|
||||
service Query {
|
||||
// Params queries the registry module params.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/params";
|
||||
}
|
||||
|
||||
// Records queries all records
|
||||
rpc Records(QueryRecordsRequest) returns (QueryRecordsResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/records";
|
||||
}
|
||||
|
||||
// Get record by id
|
||||
rpc GetRecord(QueryRecordByIdRequest) returns (QueryRecordByIdResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/records/{id}";
|
||||
}
|
||||
|
||||
// Get records by bond id
|
||||
rpc GetRecordsByBondId(QueryRecordsByBondIdRequest) returns (QueryRecordsByBondIdResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/records-by-bond-id/{id}";
|
||||
}
|
||||
|
||||
// NameRecords queries all name records
|
||||
rpc NameRecords(QueryNameRecordsRequest) returns (QueryNameRecordsResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/names";
|
||||
}
|
||||
|
||||
// Whois method retrieve the name authority info
|
||||
rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/whois/{name}";
|
||||
}
|
||||
|
||||
// LookupLrn
|
||||
rpc LookupLrn(QueryLookupLrnRequest) returns (QueryLookupLrnResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/lookup";
|
||||
}
|
||||
|
||||
// ResolveLrn
|
||||
rpc ResolveLrn(QueryResolveLrnRequest) returns (QueryResolveLrnResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/resolve";
|
||||
}
|
||||
|
||||
// Get registry module balance
|
||||
rpc GetRegistryModuleBalance(QueryGetRegistryModuleBalanceRequest) returns (QueryGetRegistryModuleBalanceResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/balance";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request type for registry params
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse is response type for registry params
|
||||
message QueryParamsResponse {
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// QueryRecordsRequest is request type for registry records list
|
||||
message QueryRecordsRequest {
|
||||
// TODO: Unused, check
|
||||
// message LinkInput {
|
||||
// string id = 1;
|
||||
// }
|
||||
|
||||
message ArrayInput {
|
||||
repeated ValueInput values = 1;
|
||||
}
|
||||
message MapInput {
|
||||
map<string, ValueInput> values = 1;
|
||||
}
|
||||
message ValueInput {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
message KeyValueInput {
|
||||
string key = 1;
|
||||
ValueInput value = 2;
|
||||
}
|
||||
|
||||
repeated KeyValueInput attributes = 1;
|
||||
|
||||
bool all = 2;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
||||
}
|
||||
|
||||
// QueryRecordsResponse is response type for registry records list
|
||||
message QueryRecordsResponse {
|
||||
repeated Record records = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryRecordByIdRequest is request type for registry records by id
|
||||
message QueryRecordByIdRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// QueryRecordByIdResponse is response type for registry records by id
|
||||
message QueryRecordByIdResponse {
|
||||
Record record = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryRecordsByBondIdRequest is request type for get the records by bond-id
|
||||
message QueryRecordsByBondIdRequest {
|
||||
string id = 1;
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryRecordsByBondIdResponse is response type for records list by bond-id
|
||||
message QueryRecordsByBondIdResponse {
|
||||
repeated Record records = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryNameRecordsRequest is request type for registry names records
|
||||
message QueryNameRecordsRequest {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryNameRecordsResponse is response type for registry names records
|
||||
message QueryNameRecordsResponse {
|
||||
repeated NameEntry names = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryWhoisRequest is request type for Get NameAuthority
|
||||
message QueryWhoisRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// QueryWhoisResponse is response type for whois request
|
||||
message QueryWhoisResponse {
|
||||
NameAuthority name_authority = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"name_authority\" yaml:\"name_authority\""
|
||||
];
|
||||
}
|
||||
|
||||
// QueryLookupLrnRequest is request type for LookupLrn
|
||||
message QueryLookupLrnRequest {
|
||||
string lrn = 1;
|
||||
}
|
||||
|
||||
// QueryLookupLrnResponse is response type for QueryLookupLrnRequest
|
||||
message QueryLookupLrnResponse {
|
||||
NameRecord name = 1;
|
||||
}
|
||||
|
||||
// QueryResolveLrnRequest is request type for ResolveLrn
|
||||
message QueryResolveLrnRequest {
|
||||
string lrn = 1;
|
||||
}
|
||||
|
||||
// QueryResolveLrnResponse is response type for QueryResolveLrnRequest
|
||||
message QueryResolveLrnResponse {
|
||||
Record record = 1;
|
||||
}
|
||||
|
||||
// QueryGetRegistryModuleBalanceRequest is request type for registry module accounts balance
|
||||
message QueryGetRegistryModuleBalanceRequest {}
|
||||
|
||||
// QueryGetRegistryModuleBalanceResponse is response type for registry module accounts balance
|
||||
message QueryGetRegistryModuleBalanceResponse {
|
||||
repeated AccountBalance balances = 1;
|
||||
}
|
||||
|
||||
// AccountBalance is registry module account balance
|
||||
message AccountBalance {
|
||||
string account_name = 1 [(gogoproto.moretags) = "json:\"account_name\" yaml:\"account_name\""];
|
||||
repeated cosmos.base.v1beta1.Coin balance = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
||||
];
|
||||
}
|
||||
+51
-38
@@ -1,74 +1,88 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.registry.v1beta1;
|
||||
|
||||
package cerc.registry.v1;
|
||||
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry";
|
||||
|
||||
// Params defines the registry module parameters
|
||||
message Params {
|
||||
cosmos.base.v1beta1.Coin record_rent = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"record_rent\" yaml:\"record_rent\""];
|
||||
cosmos.base.v1beta1.Coin record_rent = 1[
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"record_rent\" yaml:\"record_rent\""
|
||||
];
|
||||
|
||||
google.protobuf.Duration record_rent_duration = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"record_rent_duration\" yaml:\"record_rent_duration\""
|
||||
];
|
||||
cosmos.base.v1beta1.Coin authority_rent = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"authority_rent\" yaml:\"authority_rent\""];
|
||||
|
||||
cosmos.base.v1beta1.Coin authority_rent = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"authority_rent\" yaml:\"authority_rent\""
|
||||
];
|
||||
|
||||
google.protobuf.Duration authority_rent_duration = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"authority_rent_duration\" yaml:\"authority_rent_duration\""
|
||||
];
|
||||
|
||||
google.protobuf.Duration authority_grace_period = 5 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"authority_grace_period\" yaml:\"authority_grace_period\""
|
||||
];
|
||||
bool authority_auction_enabled = 6
|
||||
[(gogoproto.moretags) = "json:\"authority_auction_enabled\" yaml:\"authority_auction_enabled\""];
|
||||
|
||||
bool authority_auction_enabled = 6 [(gogoproto.moretags) = "json:\"authority_auction_enabled\" yaml:\"authority_auction_enabled\""];
|
||||
|
||||
google.protobuf.Duration authority_auction_commits_duration = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"authority_auction_commits_duration\" yaml:\"authority_auction_commits_duration\""
|
||||
];
|
||||
|
||||
google.protobuf.Duration authority_auction_reveals_duration = 8 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "json:\"authority_auction_reveals_duration\" yaml:\"authority_auction_reveals_duration\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin authority_auction_commit_fee = 9 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"authority_auction_commit_fee\" yaml:\"authority_auction_commit_fee\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin authority_auction_reveal_fee = 10 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"authority_auction_reveal_fee\" yaml:\"authority_auction_reveal_fee\""
|
||||
];
|
||||
|
||||
cosmos.base.v1beta1.Coin authority_auction_minimum_bid = 11 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"authority_auction_minimum_bid\" yaml:\"authority_auction_minimum_bid\""
|
||||
];
|
||||
}
|
||||
|
||||
// Params defines the registry module records
|
||||
// Record defines a registry record
|
||||
message Record {
|
||||
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string create_time = 3 [(gogoproto.moretags) = "json:\"createTime\" yaml:\"createTime\""];
|
||||
string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""];
|
||||
bool deleted = 5;
|
||||
repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""];
|
||||
bytes attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
|
||||
repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
|
||||
string type = 9 [(gogoproto.moretags) = "json:\"types\" yaml:\"types\""];
|
||||
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
string create_time = 3 [(gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""];
|
||||
string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiry_time\" yaml:\"expiry_time\""];
|
||||
bool deleted = 5;
|
||||
repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""];
|
||||
bytes attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
|
||||
repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
|
||||
string type = 9 [(gogoproto.moretags) = "json:\"types\" yaml:\"types\""];
|
||||
}
|
||||
|
||||
// AuthorityEntry defines the registry module AuthorityEntries
|
||||
// AuthorityEntry defines a registry authority
|
||||
message AuthorityEntry {
|
||||
string name = 1;
|
||||
NameAuthority entry = 2;
|
||||
@@ -77,18 +91,19 @@ message AuthorityEntry {
|
||||
// NameAuthority
|
||||
message NameAuthority {
|
||||
// Owner public key.
|
||||
string owner_public_key = 1 [(gogoproto.moretags) = "json:\"ownerPublicKey\" yaml:\"ownerPublicKey\""];
|
||||
string owner_public_key = 1 [(gogoproto.moretags) = "json:\"owner_public_key\" yaml:\"owner_public_key\""];
|
||||
// Owner address.
|
||||
string owner_address = 2 [(gogoproto.moretags) = "json:\"ownerAddress\" yaml:\"ownerAddress\""];
|
||||
string owner_address = 2 [(gogoproto.moretags) = "json:\"owner_address\" yaml:\"owner_address\""];
|
||||
// height at which name/authority was created.
|
||||
uint64 height = 3;
|
||||
string status = 4;
|
||||
string auction_id = 5 [(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""];
|
||||
string bond_id = 6 [(gogoproto.moretags) = "json:\"bondID\" yaml:\"bondID\""];
|
||||
string auction_id = 5 [(gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\""];
|
||||
string bond_id = 6 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
|
||||
google.protobuf.Timestamp expiry_time = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdtime) = true,
|
||||
(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""
|
||||
(gogoproto.moretags) = "json:\"expiry_time\" yaml:\"expiry_time\""
|
||||
];
|
||||
}
|
||||
|
||||
@@ -98,7 +113,7 @@ message NameEntry {
|
||||
NameRecord entry = 2;
|
||||
}
|
||||
|
||||
// NameRecord
|
||||
// NameRecord defines a versioned name record
|
||||
message NameRecord {
|
||||
NameRecordEntry latest = 1;
|
||||
repeated NameRecordEntry history = 2;
|
||||
@@ -113,21 +128,19 @@ message NameRecordEntry {
|
||||
// Signature
|
||||
message Signature {
|
||||
string sig = 1 [(gogoproto.moretags) = "json:\"sig\" yaml:\"sig\""];
|
||||
string pub_key = 2 [(gogoproto.moretags) = "json:\"pubKey\" yaml:\"pubKey\""];
|
||||
string pub_key = 2 [(gogoproto.moretags) = "json:\"pub_key\" yaml:\"pub_key\""];
|
||||
}
|
||||
|
||||
// BlockChangeSet
|
||||
message BlockChangeSet {
|
||||
int64 height = 1;
|
||||
repeated string records = 2;
|
||||
repeated string auctions = 3;
|
||||
repeated AuctionBidInfo auction_bids = 4 [(gogoproto.moretags) = "json:\"auctionBids\" yaml:\"auctionBids\""];
|
||||
repeated string authorities = 5;
|
||||
repeated string names = 6;
|
||||
// ExpiryQueue: record / authority expiry queue type
|
||||
// id: expiry time
|
||||
// value: array of ids (record cids / authority names)
|
||||
message ExpiryQueue {
|
||||
string id = 1;
|
||||
repeated string value = 2;
|
||||
}
|
||||
|
||||
// AuctionBidInfo
|
||||
message AuctionBidInfo {
|
||||
string auction_id = 1 [(gogoproto.moretags) = "json:\"auctionID\" yaml:\"auctionID\""];
|
||||
string bidder_address = 2 [(gogoproto.moretags) = "json:\"bidderAddress\" yaml:\"bidderAddress\""];
|
||||
// List of record ids
|
||||
// Value type to be used in AttributesMap
|
||||
message RecordsList {
|
||||
repeated string value = 1;
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cerc.registry.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "cerc/registry/v1/registry.proto";
|
||||
|
||||
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry";
|
||||
|
||||
// Msg is a service which exposes the registry functionality
|
||||
service Msg {
|
||||
option (cosmos.msg.v1.service) = true;
|
||||
|
||||
// SetRecord records a new record with given payload and bond id
|
||||
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/set_record";
|
||||
}
|
||||
|
||||
// Renew Record renews an expired record
|
||||
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/renew_record";
|
||||
}
|
||||
|
||||
// AssociateBond
|
||||
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/associate_bond";
|
||||
}
|
||||
|
||||
// DissociateBond
|
||||
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/dissociate_bond";
|
||||
}
|
||||
|
||||
// DissociateRecords
|
||||
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/dissociate_records";
|
||||
}
|
||||
|
||||
// ReassociateRecords
|
||||
rpc ReassociateRecords(MsgReassociateRecords) returns (MsgReassociateRecordsResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/reassociate_records";
|
||||
}
|
||||
|
||||
// SetName will store the name with given lrn and name
|
||||
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/set_name";
|
||||
}
|
||||
|
||||
// Reserve name
|
||||
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/reserve_name";
|
||||
}
|
||||
|
||||
// Delete Name method will remove authority name
|
||||
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/delete_name";
|
||||
}
|
||||
|
||||
// SetAuthorityBond
|
||||
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse) {
|
||||
option (google.api.http).post = "/cerc/registry/v1/set_authority_bond";
|
||||
}
|
||||
}
|
||||
|
||||
// MsgSetRecord
|
||||
message MsgSetRecord {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string bond_id = 1 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
string signer = 2;
|
||||
Payload payload = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgSetRecordResponse
|
||||
message MsgSetRecordResponse {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// Payload
|
||||
message Payload {
|
||||
Record record = 1;
|
||||
repeated Signature signatures = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgSetName
|
||||
message MsgSetName {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string lrn = 1;
|
||||
string cid = 2;
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgSetNameResponse
|
||||
message MsgSetNameResponse {}
|
||||
|
||||
// MsgReserveName
|
||||
message MsgReserveAuthority {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string name = 1;
|
||||
string signer = 2;
|
||||
|
||||
// if creating a sub-authority.
|
||||
string owner = 3;
|
||||
}
|
||||
|
||||
// MsgReserveNameResponse
|
||||
message MsgReserveAuthorityResponse {}
|
||||
|
||||
// MsgSetAuthorityBond
|
||||
message MsgSetAuthorityBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string name = 1;
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgSetAuthorityBondResponse
|
||||
message MsgSetAuthorityBondResponse {}
|
||||
|
||||
// MsgDeleteNameAuthority
|
||||
message MsgDeleteNameAuthority {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string lrn = 1;
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDeleteNameAuthorityResponse
|
||||
message MsgDeleteNameAuthorityResponse {}
|
||||
|
||||
// MsgRenewRecord
|
||||
message MsgRenewRecord {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgRenewRecordResponse
|
||||
message MsgRenewRecordResponse {}
|
||||
|
||||
// MsgAssociateBond
|
||||
message MsgAssociateBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\""];
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgAssociateBondResponse
|
||||
message MsgAssociateBondResponse {}
|
||||
|
||||
// MsgDissociateBond
|
||||
message MsgDissociateBond {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateBondResponse
|
||||
message MsgDissociateBondResponse {}
|
||||
|
||||
// MsgDissociateRecords
|
||||
message MsgDissociateRecords {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string bond_id = 1 [(gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateRecordsResponse
|
||||
message MsgDissociateRecordsResponse {}
|
||||
|
||||
// MsgReassociateRecords
|
||||
message MsgReassociateRecords {
|
||||
option (cosmos.msg.v1.signer) = "signer";
|
||||
|
||||
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"new_bond_id\" yaml:\"new_bond_id\""];
|
||||
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"old_bond_id\" yaml:\"old_bond_id\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgReassociateRecordsResponse
|
||||
message MsgReassociateRecordsResponse {}
|
||||
@@ -0,0 +1,91 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cosmos.app.v1alpha1;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
// module indicates that this proto type is a config object for an app module
|
||||
// and optionally provides other descriptive information about the module.
|
||||
// It is recommended that a new module config object and go module is versioned
|
||||
// for every state machine breaking version of a module. The recommended
|
||||
// pattern for doing this is to put module config objects in a separate proto
|
||||
// package from the API they expose. Ex: the cosmos.group.v1 API would be
|
||||
// exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc.
|
||||
ModuleDescriptor module = 57193479;
|
||||
}
|
||||
|
||||
// ModuleDescriptor describes an app module.
|
||||
message ModuleDescriptor {
|
||||
// go_import names the package that should be imported by an app to load the
|
||||
// module in the runtime module registry. It is required to make debugging
|
||||
// of configuration errors easier for users.
|
||||
string go_import = 1;
|
||||
|
||||
// use_package refers to a protobuf package that this module
|
||||
// uses and exposes to the world. In an app, only one module should "use"
|
||||
// or own a single protobuf package. It is assumed that the module uses
|
||||
// all of the .proto files in a single package.
|
||||
repeated PackageReference use_package = 2;
|
||||
|
||||
// can_migrate_from defines which module versions this module can migrate
|
||||
// state from. The framework will check that one module version is able to
|
||||
// migrate from a previous module version before attempting to update its
|
||||
// config. It is assumed that modules can transitively migrate from earlier
|
||||
// versions. For instance if v3 declares it can migrate from v2, and v2
|
||||
// declares it can migrate from v1, the framework knows how to migrate
|
||||
// from v1 to v3, assuming all 3 module versions are registered at runtime.
|
||||
repeated MigrateFromInfo can_migrate_from = 3;
|
||||
}
|
||||
|
||||
// PackageReference is a reference to a protobuf package used by a module.
|
||||
message PackageReference {
|
||||
// name is the fully-qualified name of the package.
|
||||
string name = 1;
|
||||
|
||||
// revision is the optional revision of the package that is being used.
|
||||
// Protobuf packages used in Cosmos should generally have a major version
|
||||
// as the last part of the package name, ex. foo.bar.baz.v1.
|
||||
// The revision of a package can be thought of as the minor version of a
|
||||
// package which has additional backwards compatible definitions that weren't
|
||||
// present in a previous version.
|
||||
//
|
||||
// A package should indicate its revision with a source code comment
|
||||
// above the package declaration in one of its files containing the
|
||||
// text "Revision N" where N is an integer revision. All packages start
|
||||
// at revision 0 the first time they are released in a module.
|
||||
//
|
||||
// When a new version of a module is released and items are added to existing
|
||||
// .proto files, these definitions should contain comments of the form
|
||||
// "Since: Revision N" where N is an integer revision.
|
||||
//
|
||||
// When the module runtime starts up, it will check the pinned proto
|
||||
// image and panic if there are runtime protobuf definitions that are not
|
||||
// in the pinned descriptor which do not have
|
||||
// a "Since Revision N" comment or have a "Since Revision N" comment where
|
||||
// N is <= to the revision specified here. This indicates that the protobuf
|
||||
// files have been updated, but the pinned file descriptor hasn't.
|
||||
//
|
||||
// If there are items in the pinned file descriptor with a revision
|
||||
// greater than the value indicated here, this will also cause a panic
|
||||
// as it may mean that the pinned descriptor for a legacy module has been
|
||||
// improperly updated or that there is some other versioning discrepancy.
|
||||
// Runtime protobuf definitions will also be checked for compatibility
|
||||
// with pinned file descriptors to make sure there are no incompatible changes.
|
||||
//
|
||||
// This behavior ensures that:
|
||||
// * pinned proto images are up-to-date
|
||||
// * protobuf files are carefully annotated with revision comments which
|
||||
// are important good client UX
|
||||
// * protobuf files are changed in backwards and forwards compatible ways
|
||||
uint32 revision = 2;
|
||||
}
|
||||
|
||||
// MigrateFromInfo is information on a module version that a newer module
|
||||
// can migrate from.
|
||||
message MigrateFromInfo {
|
||||
|
||||
// module is the fully-qualified protobuf name of the module config object
|
||||
// for the previous module version, ex: "cosmos.group.module.v1.Module".
|
||||
string module = 1;
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.abci.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "tendermint/abci/types.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
|
||||
// TxResponse defines a structure containing relevant tx data and metadata. The
|
||||
// tags are stringified and the log is JSON decoded.
|
||||
message TxResponse {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
// The block height
|
||||
int64 height = 1;
|
||||
// The transaction hash.
|
||||
string txhash = 2 [(gogoproto.customname) = "TxHash"];
|
||||
// Namespace for the Code
|
||||
string codespace = 3;
|
||||
// Response code.
|
||||
uint32 code = 4;
|
||||
// Result bytes, if any.
|
||||
string data = 5;
|
||||
// The output of the application's logger (raw string). May be
|
||||
// non-deterministic.
|
||||
string raw_log = 6;
|
||||
// The output of the application's logger (typed). May be non-deterministic.
|
||||
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false];
|
||||
// Additional information. May be non-deterministic.
|
||||
string info = 8;
|
||||
// Amount of gas requested for transaction.
|
||||
int64 gas_wanted = 9;
|
||||
// Amount of gas consumed by transaction.
|
||||
int64 gas_used = 10;
|
||||
// The request transaction bytes.
|
||||
google.protobuf.Any tx = 11;
|
||||
// Time of the previous block. For heights > 1, it's the weighted median of
|
||||
// the timestamps of the valid votes in the block.LastCommit. For height == 1,
|
||||
// it's genesis time.
|
||||
string timestamp = 12;
|
||||
}
|
||||
|
||||
// ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
|
||||
message ABCIMessageLog {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
uint32 msg_index = 1;
|
||||
string log = 2;
|
||||
|
||||
// Events contains a slice of Event objects that were emitted during some
|
||||
// execution.
|
||||
repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// StringEvent defines en Event object wrapper where all the attributes
|
||||
// contain key/value pairs that are strings instead of raw bytes.
|
||||
message StringEvent {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
string type = 1;
|
||||
repeated Attribute attributes = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Attribute defines an attribute wrapper where the key and value are
|
||||
// strings instead of raw bytes.
|
||||
message Attribute {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// GasInfo defines tx execution gas context.
|
||||
message GasInfo {
|
||||
// GasWanted is the maximum units of work we allow this tx to perform.
|
||||
uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""];
|
||||
|
||||
// GasUsed is the amount of gas actually consumed.
|
||||
uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""];
|
||||
}
|
||||
|
||||
// Result is the union of ResponseFormat and ResponseCheckTx.
|
||||
message Result {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Data is any data returned from message or handler execution. It MUST be
|
||||
// length prefixed in order to separate data from multiple message executions.
|
||||
bytes data = 1;
|
||||
|
||||
// Log contains the log information from message or handler execution.
|
||||
string log = 2;
|
||||
|
||||
// Events contains a slice of Event objects that were emitted during message
|
||||
// or handler execution.
|
||||
repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SimulationResponse defines the response generated when a transaction is
|
||||
// successfully simulated.
|
||||
message SimulationResponse {
|
||||
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||
Result result = 2;
|
||||
}
|
||||
|
||||
// MsgData defines the data returned in a Result object during message
|
||||
// execution.
|
||||
message MsgData {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
string msg_type = 1;
|
||||
bytes data = 2;
|
||||
}
|
||||
|
||||
// TxMsgData defines a list of MsgData. A transaction will have a MsgData object
|
||||
// for each message.
|
||||
message TxMsgData {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
repeated MsgData data = 1;
|
||||
}
|
||||
|
||||
// SearchTxsResult defines a structure for querying txs pageable
|
||||
message SearchTxsResult {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
// Count of all txs
|
||||
uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"];
|
||||
// Count of txs in current page
|
||||
uint64 count = 2;
|
||||
// Index of current page, start from 1
|
||||
uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"];
|
||||
// Count of total pages
|
||||
uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"];
|
||||
// Max count txs per page
|
||||
uint64 limit = 5;
|
||||
// List of txs in current page
|
||||
repeated TxResponse txs = 6;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.kv.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/kv";
|
||||
|
||||
// Pairs defines a repeated slice of Pair objects.
|
||||
message Pairs {
|
||||
repeated Pair pairs = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Pair defines a key/value bytes tuple.
|
||||
message Pair {
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
@@ -32,6 +32,8 @@ message PageRequest {
|
||||
bool count_total = 4;
|
||||
|
||||
// reverse is set to true if results are to be returned in the descending order.
|
||||
//
|
||||
// Since: cosmos-sdk 0.43
|
||||
bool reverse = 5;
|
||||
}
|
||||
|
||||
@@ -44,7 +46,8 @@ message PageRequest {
|
||||
// }
|
||||
message PageResponse {
|
||||
// next_key is the key to be passed to PageRequest.key to
|
||||
// query the next page most efficiently
|
||||
// query the next page most efficiently. It will be empty if
|
||||
// there are no more results.
|
||||
bytes next_key = 1;
|
||||
|
||||
// total is total number of results available if PageRequest.count_total
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.reflection.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection";
|
||||
|
||||
// ReflectionService defines a service for interface reflection.
|
||||
service ReflectionService {
|
||||
// ListAllInterfaces lists all the interfaces registered in the interface
|
||||
// registry.
|
||||
rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces";
|
||||
};
|
||||
|
||||
// ListImplementations list all the concrete types that implement a given
|
||||
// interface.
|
||||
rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/"
|
||||
"{interface_name}/implementations";
|
||||
};
|
||||
}
|
||||
|
||||
// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC.
|
||||
message ListAllInterfacesRequest {}
|
||||
|
||||
// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.
|
||||
message ListAllInterfacesResponse {
|
||||
// interface_names is an array of all the registered interfaces.
|
||||
repeated string interface_names = 1;
|
||||
}
|
||||
|
||||
// ListImplementationsRequest is the request type of the ListImplementations
|
||||
// RPC.
|
||||
message ListImplementationsRequest {
|
||||
// interface_name defines the interface to query the implementations for.
|
||||
string interface_name = 1;
|
||||
}
|
||||
|
||||
// ListImplementationsResponse is the response type of the ListImplementations
|
||||
// RPC.
|
||||
message ListImplementationsResponse {
|
||||
repeated string implementation_message_names = 1;
|
||||
}
|
||||
@@ -1,217 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.reflection.v2alpha1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1";
|
||||
|
||||
// AppDescriptor describes a cosmos-sdk based application
|
||||
message AppDescriptor {
|
||||
// AuthnDescriptor provides information on how to authenticate transactions on the application
|
||||
// NOTE: experimental and subject to change in future releases.
|
||||
AuthnDescriptor authn = 1;
|
||||
// chain provides the chain descriptor
|
||||
ChainDescriptor chain = 2;
|
||||
// codec provides metadata information regarding codec related types
|
||||
CodecDescriptor codec = 3;
|
||||
// configuration provides metadata information regarding the sdk.Config type
|
||||
ConfigurationDescriptor configuration = 4;
|
||||
// query_services provides metadata information regarding the available queriable endpoints
|
||||
QueryServicesDescriptor query_services = 5;
|
||||
// tx provides metadata information regarding how to send transactions to the given application
|
||||
TxDescriptor tx = 6;
|
||||
}
|
||||
|
||||
// TxDescriptor describes the accepted transaction type
|
||||
message TxDescriptor {
|
||||
// fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type)
|
||||
// it is not meant to support polymorphism of transaction types, it is supposed to be used by
|
||||
// reflection clients to understand if they can handle a specific transaction type in an application.
|
||||
string fullname = 1;
|
||||
// msgs lists the accepted application messages (sdk.Msg)
|
||||
repeated MsgDescriptor msgs = 2;
|
||||
}
|
||||
|
||||
// AuthnDescriptor provides information on how to sign transactions without relying
|
||||
// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures
|
||||
message AuthnDescriptor {
|
||||
// sign_modes defines the supported signature algorithm
|
||||
repeated SigningModeDescriptor sign_modes = 1;
|
||||
}
|
||||
|
||||
// SigningModeDescriptor provides information on a signing flow of the application
|
||||
// NOTE(fdymylja): here we could go as far as providing an entire flow on how
|
||||
// to sign a message given a SigningModeDescriptor, but it's better to think about
|
||||
// this another time
|
||||
message SigningModeDescriptor {
|
||||
// name defines the unique name of the signing mode
|
||||
string name = 1;
|
||||
// number is the unique int32 identifier for the sign_mode enum
|
||||
int32 number = 2;
|
||||
// authn_info_provider_method_fullname defines the fullname of the method to call to get
|
||||
// the metadata required to authenticate using the provided sign_modes
|
||||
string authn_info_provider_method_fullname = 3;
|
||||
}
|
||||
|
||||
// ChainDescriptor describes chain information of the application
|
||||
message ChainDescriptor {
|
||||
// id is the chain id
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// CodecDescriptor describes the registered interfaces and provides metadata information on the types
|
||||
message CodecDescriptor {
|
||||
// interfaces is a list of the registerted interfaces descriptors
|
||||
repeated InterfaceDescriptor interfaces = 1;
|
||||
}
|
||||
|
||||
// InterfaceDescriptor describes the implementation of an interface
|
||||
message InterfaceDescriptor {
|
||||
// fullname is the name of the interface
|
||||
string fullname = 1;
|
||||
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
|
||||
// google.protobuf.Any field
|
||||
repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2;
|
||||
// interface_implementers is a list of the descriptors of the interface implementers
|
||||
repeated InterfaceImplementerDescriptor interface_implementers = 3;
|
||||
}
|
||||
|
||||
// InterfaceImplementerDescriptor describes an interface implementer
|
||||
message InterfaceImplementerDescriptor {
|
||||
// fullname is the protobuf queryable name of the interface implementer
|
||||
string fullname = 1;
|
||||
// type_url defines the type URL used when marshalling the type as any
|
||||
// this is required so we can provide type safe google.protobuf.Any marshalling and
|
||||
// unmarshalling, making sure that we don't accept just 'any' type
|
||||
// in our interface fields
|
||||
string type_url = 2;
|
||||
}
|
||||
|
||||
// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains
|
||||
// an interface represented as a google.protobuf.Any
|
||||
message InterfaceAcceptingMessageDescriptor {
|
||||
// fullname is the protobuf fullname of the type containing the interface
|
||||
string fullname = 1;
|
||||
// field_descriptor_names is a list of the protobuf name (not fullname) of the field
|
||||
// which contains the interface as google.protobuf.Any (the interface is the same, but
|
||||
// it can be in multiple fields of the same proto message)
|
||||
repeated string field_descriptor_names = 2;
|
||||
}
|
||||
|
||||
// ConfigurationDescriptor contains metadata information on the sdk.Config
|
||||
message ConfigurationDescriptor {
|
||||
// bech32_account_address_prefix is the account address prefix
|
||||
string bech32_account_address_prefix = 1;
|
||||
}
|
||||
|
||||
// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction
|
||||
message MsgDescriptor {
|
||||
// msg_type_url contains the TypeURL of a sdk.Msg.
|
||||
string msg_type_url = 1;
|
||||
}
|
||||
|
||||
// ReflectionService defines a service for application reflection.
|
||||
service ReflectionService {
|
||||
// GetAuthnDescriptor returns information on how to authenticate transactions in the application
|
||||
// NOTE: this RPC is still experimental and might be subject to breaking changes or removal in
|
||||
// future releases of the cosmos-sdk.
|
||||
rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn";
|
||||
}
|
||||
// GetChainDescriptor returns the description of the chain
|
||||
rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain";
|
||||
};
|
||||
// GetCodecDescriptor returns the descriptor of the codec of the application
|
||||
rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec";
|
||||
}
|
||||
// GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application
|
||||
rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration";
|
||||
}
|
||||
// GetQueryServicesDescriptor returns the available gRPC queryable services of the application
|
||||
rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services";
|
||||
}
|
||||
// GetTxDescriptor returns information on the used transaction object and available msgs that can be used
|
||||
rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor";
|
||||
}
|
||||
}
|
||||
|
||||
// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC
|
||||
message GetAuthnDescriptorRequest {}
|
||||
// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC
|
||||
message GetAuthnDescriptorResponse {
|
||||
// authn describes how to authenticate to the application when sending transactions
|
||||
AuthnDescriptor authn = 1;
|
||||
}
|
||||
|
||||
// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC
|
||||
message GetChainDescriptorRequest {}
|
||||
// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC
|
||||
message GetChainDescriptorResponse {
|
||||
// chain describes application chain information
|
||||
ChainDescriptor chain = 1;
|
||||
}
|
||||
|
||||
// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC
|
||||
message GetCodecDescriptorRequest {}
|
||||
// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC
|
||||
message GetCodecDescriptorResponse {
|
||||
// codec describes the application codec such as registered interfaces and implementations
|
||||
CodecDescriptor codec = 1;
|
||||
}
|
||||
|
||||
// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC
|
||||
message GetConfigurationDescriptorRequest {}
|
||||
// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC
|
||||
message GetConfigurationDescriptorResponse {
|
||||
// config describes the application's sdk.Config
|
||||
ConfigurationDescriptor config = 1;
|
||||
}
|
||||
|
||||
// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC
|
||||
message GetQueryServicesDescriptorRequest {}
|
||||
// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC
|
||||
message GetQueryServicesDescriptorResponse {
|
||||
// queries provides information on the available queryable services
|
||||
QueryServicesDescriptor queries = 1;
|
||||
}
|
||||
|
||||
// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC
|
||||
message GetTxDescriptorRequest {}
|
||||
// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC
|
||||
message GetTxDescriptorResponse {
|
||||
// tx provides information on msgs that can be forwarded to the application
|
||||
// alongside the accepted transaction protobuf type
|
||||
TxDescriptor tx = 1;
|
||||
}
|
||||
|
||||
// QueryServicesDescriptor contains the list of cosmos-sdk queriable services
|
||||
message QueryServicesDescriptor {
|
||||
// query_services is a list of cosmos-sdk QueryServiceDescriptor
|
||||
repeated QueryServiceDescriptor query_services = 1;
|
||||
}
|
||||
|
||||
// QueryServiceDescriptor describes a cosmos-sdk queryable service
|
||||
message QueryServiceDescriptor {
|
||||
// fullname is the protobuf fullname of the service descriptor
|
||||
string fullname = 1;
|
||||
// is_module describes if this service is actually exposed by an application's module
|
||||
bool is_module = 2;
|
||||
// methods provides a list of query service methods
|
||||
repeated QueryMethodDescriptor methods = 3;
|
||||
}
|
||||
|
||||
// QueryMethodDescriptor describes a queryable method of a query service
|
||||
// no other info is provided beside method name and tendermint queryable path
|
||||
// because it would be redundant with the grpc reflection service
|
||||
message QueryMethodDescriptor {
|
||||
// name is the protobuf name (not fullname) of the method
|
||||
string name = 1;
|
||||
// full_query_path is the path that can be used to query
|
||||
// this method via tendermint abci.Query
|
||||
string full_query_path = 2;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.snapshots.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types";
|
||||
|
||||
// Snapshot contains Tendermint state sync snapshot info.
|
||||
message Snapshot {
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 chunks = 3;
|
||||
bytes hash = 4;
|
||||
Metadata metadata = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Metadata contains SDK-specific snapshot metadata.
|
||||
message Metadata {
|
||||
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.store.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||
|
||||
// CommitInfo defines commit information used by the multi-store when committing
|
||||
// a version/height.
|
||||
message CommitInfo {
|
||||
int64 version = 1;
|
||||
repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// StoreInfo defines store-specific commit information. It contains a reference
|
||||
// between a store name and the commit ID.
|
||||
message StoreInfo {
|
||||
string name = 1;
|
||||
CommitID commit_id = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CommitID defines the committment information when a specific store is
|
||||
// committed.
|
||||
message CommitID {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 version = 1;
|
||||
bytes hash = 2;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.store.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||
|
||||
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
|
||||
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
|
||||
// Deletes
|
||||
message StoreKVPair {
|
||||
string store_key = 1; // the store key for the KVStore this pair originates from
|
||||
bool delete = 2; // true indicates a delete operation, false indicates a set operation
|
||||
bytes key = 3;
|
||||
bytes value = 4;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.store.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||
|
||||
// SnapshotItem is an item contained in a rootmulti.Store snapshot.
|
||||
message SnapshotItem {
|
||||
// item is the specific type of snapshot item.
|
||||
oneof item {
|
||||
SnapshotStoreItem store = 1;
|
||||
SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"];
|
||||
}
|
||||
}
|
||||
|
||||
// SnapshotStoreItem contains metadata about a snapshotted store.
|
||||
message SnapshotStoreItem {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// SnapshotIAVLItem is an exported IAVL node.
|
||||
message SnapshotIAVLItem {
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
int64 version = 3;
|
||||
int32 height = 4;
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.tendermint.v1beta1;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "tendermint/p2p/types.proto";
|
||||
import "tendermint/types/block.proto";
|
||||
import "tendermint/types/types.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice";
|
||||
|
||||
// Service defines the gRPC querier service for tendermint queries.
|
||||
service Service {
|
||||
// GetNodeInfo queries the current node info.
|
||||
rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info";
|
||||
}
|
||||
// GetSyncing queries node syncing.
|
||||
rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing";
|
||||
}
|
||||
// GetLatestBlock returns the latest block.
|
||||
rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest";
|
||||
}
|
||||
// GetBlockByHeight queries block for given height.
|
||||
rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}";
|
||||
}
|
||||
|
||||
// GetLatestValidatorSet queries latest validator-set.
|
||||
rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest";
|
||||
}
|
||||
// GetValidatorSetByHeight queries validator-set at a given height.
|
||||
rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}";
|
||||
}
|
||||
}
|
||||
|
||||
// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetValidatorSetByHeightRequest {
|
||||
int64 height = 1;
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetValidatorSetByHeightResponse {
|
||||
int64 block_height = 1;
|
||||
repeated Validator validators = 2;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
||||
}
|
||||
|
||||
// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetLatestValidatorSetRequest {
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetLatestValidatorSetResponse {
|
||||
int64 block_height = 1;
|
||||
repeated Validator validators = 2;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
||||
}
|
||||
|
||||
// Validator is the type for the validator-set.
|
||||
message Validator {
|
||||
string address = 1;
|
||||
google.protobuf.Any pub_key = 2;
|
||||
int64 voting_power = 3;
|
||||
int64 proposer_priority = 4;
|
||||
}
|
||||
|
||||
// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method.
|
||||
message GetBlockByHeightRequest {
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.
|
||||
message GetBlockByHeightResponse {
|
||||
.tendermint.types.BlockID block_id = 1;
|
||||
.tendermint.types.Block block = 2;
|
||||
}
|
||||
|
||||
// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method.
|
||||
message GetLatestBlockRequest {}
|
||||
|
||||
// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.
|
||||
message GetLatestBlockResponse {
|
||||
.tendermint.types.BlockID block_id = 1;
|
||||
.tendermint.types.Block block = 2;
|
||||
}
|
||||
|
||||
// GetSyncingRequest is the request type for the Query/GetSyncing RPC method.
|
||||
message GetSyncingRequest {}
|
||||
|
||||
// GetSyncingResponse is the response type for the Query/GetSyncing RPC method.
|
||||
message GetSyncingResponse {
|
||||
bool syncing = 1;
|
||||
}
|
||||
|
||||
// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method.
|
||||
message GetNodeInfoRequest {}
|
||||
|
||||
// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method.
|
||||
message GetNodeInfoResponse {
|
||||
.tendermint.p2p.DefaultNodeInfo default_node_info = 1;
|
||||
VersionInfo application_version = 2;
|
||||
}
|
||||
|
||||
// VersionInfo is the type for the GetNodeInfoResponse message.
|
||||
message VersionInfo {
|
||||
string name = 1;
|
||||
string app_name = 2;
|
||||
string version = 3;
|
||||
string git_commit = 4;
|
||||
string build_tags = 5;
|
||||
string go_version = 6;
|
||||
repeated Module build_deps = 7;
|
||||
string cosmos_sdk_version = 8;
|
||||
}
|
||||
|
||||
// Module is the type for VersionInfo
|
||||
message Module {
|
||||
// module path
|
||||
string path = 1;
|
||||
// module version
|
||||
string version = 2;
|
||||
// checksum
|
||||
string sum = 3;
|
||||
}
|
||||
@@ -2,6 +2,8 @@ syntax = "proto3";
|
||||
package cosmos.base.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "amino/amino.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
@@ -15,7 +17,12 @@ message Coin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
string amount = 2 [
|
||||
(cosmos_proto.scalar) = "cosmos.Int",
|
||||
(gogoproto.customtype) = "cosmossdk.io/math.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(amino.dont_omitempty) = true
|
||||
];
|
||||
}
|
||||
|
||||
// DecCoin defines a token with a denomination and a decimal amount.
|
||||
@@ -26,15 +33,29 @@ message DecCoin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
string amount = 2 [
|
||||
(cosmos_proto.scalar) = "cosmos.Dec",
|
||||
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// IntProto defines a Protobuf wrapper around an Int object.
|
||||
// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.
|
||||
message IntProto {
|
||||
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
string int = 1 [
|
||||
(cosmos_proto.scalar) = "cosmos.Int",
|
||||
(gogoproto.customtype) = "cosmossdk.io/math.Int",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// DecProto defines a Protobuf wrapper around a Dec object.
|
||||
// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.
|
||||
message DecProto {
|
||||
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
string dec = 1 [
|
||||
(cosmos_proto.scalar) = "cosmos.Dec",
|
||||
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cosmos.msg.v1;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated.
|
||||
// We need this right now because gogoproto codegen needs to import the extension.
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice";
|
||||
|
||||
extend google.protobuf.ServiceOptions {
|
||||
// service indicates that the service is a Msg service and that requests
|
||||
// must be transported via blockchain transactions rather than gRPC.
|
||||
// Tooling can use this annotation to distinguish between Msg services and
|
||||
// other types of services via reflection.
|
||||
bool service = 11110000;
|
||||
}
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
// signer must be used in cosmos messages in order
|
||||
// to signal to external clients which fields in a
|
||||
// given cosmos message must be filled with signer
|
||||
// information (address).
|
||||
// The field must be the protobuf name of the message
|
||||
// field extended with this MessageOption.
|
||||
// The field must either be of string kind, or of message
|
||||
// kind in case the signer information is contained within
|
||||
// a message inside the cosmos message.
|
||||
repeated string signer = 11110000;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
syntax = "proto3";
|
||||
package cosmos_proto;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto";
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
|
||||
// implements_interface is used to indicate the type name of the interface
|
||||
// that a message implements so that it can be used in google.protobuf.Any
|
||||
// fields that accept that interface. A message can implement multiple
|
||||
// interfaces. Interfaces should be declared using a declare_interface
|
||||
// file option.
|
||||
repeated string implements_interface = 93001;
|
||||
}
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
|
||||
// accepts_interface is used to annotate that a google.protobuf.Any
|
||||
// field accepts messages that implement the specified interface.
|
||||
// Interfaces should be declared using a declare_interface file option.
|
||||
string accepts_interface = 93001;
|
||||
|
||||
// scalar is used to indicate that this field follows the formatting defined
|
||||
// by the named scalar which should be declared with declare_scalar. Code
|
||||
// generators may choose to use this information to map this field to a
|
||||
// language-specific type representing the scalar.
|
||||
string scalar = 93002;
|
||||
}
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
|
||||
// declare_interface declares an interface type to be used with
|
||||
// accepts_interface and implements_interface. Interface names are
|
||||
// expected to follow the following convention such that their declaration
|
||||
// can be discovered by tools: for a given interface type a.b.C, it is
|
||||
// expected that the declaration will be found in a protobuf file named
|
||||
// a/b/interfaces.proto in the file descriptor set.
|
||||
repeated InterfaceDescriptor declare_interface = 793021;
|
||||
|
||||
// declare_scalar declares a scalar type to be used with
|
||||
// the scalar field option. Scalar names are
|
||||
// expected to follow the following convention such that their declaration
|
||||
// can be discovered by tools: for a given scalar type a.b.C, it is
|
||||
// expected that the declaration will be found in a protobuf file named
|
||||
// a/b/scalars.proto in the file descriptor set.
|
||||
repeated ScalarDescriptor declare_scalar = 793022;
|
||||
}
|
||||
|
||||
// InterfaceDescriptor describes an interface type to be used with
|
||||
// accepts_interface and implements_interface and declared by declare_interface.
|
||||
message InterfaceDescriptor {
|
||||
|
||||
// name is the name of the interface. It should be a short-name (without
|
||||
// a period) such that the fully qualified name of the interface will be
|
||||
// package.name, ex. for the package a.b and interface named C, the
|
||||
// fully-qualified name will be a.b.C.
|
||||
string name = 1;
|
||||
|
||||
// description is a human-readable description of the interface and its
|
||||
// purpose.
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// ScalarDescriptor describes an scalar type to be used with
|
||||
// the scalar field option and declared by declare_scalar.
|
||||
// Scalars extend simple protobuf built-in types with additional
|
||||
// syntax and semantics, for instance to represent big integers.
|
||||
// Scalars should ideally define an encoding such that there is only one
|
||||
// valid syntactical representation for a given semantic meaning,
|
||||
// i.e. the encoding should be deterministic.
|
||||
message ScalarDescriptor {
|
||||
|
||||
// name is the name of the scalar. It should be a short-name (without
|
||||
// a period) such that the fully qualified name of the scalar will be
|
||||
// package.name, ex. for the package a.b and scalar named C, the
|
||||
// fully-qualified name will be a.b.C.
|
||||
string name = 1;
|
||||
|
||||
// description is a human-readable description of the scalar and its
|
||||
// encoding format. For instance a big integer or decimal scalar should
|
||||
// specify precisely the expected encoding format.
|
||||
string description = 2;
|
||||
|
||||
// field_type is the type of field with which this scalar can be used.
|
||||
// Scalars can be used with one and only one type of field so that
|
||||
// encoding standards and simple and clear. Currently only string and
|
||||
// bytes fields are supported for scalars.
|
||||
repeated ScalarType field_type = 3;
|
||||
}
|
||||
|
||||
enum ScalarType {
|
||||
SCALAR_TYPE_UNSPECIFIED = 0;
|
||||
SCALAR_TYPE_STRING = 1;
|
||||
SCALAR_TYPE_BYTES = 2;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// Copyright 2018 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.api;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "HttpBodyProto";
|
||||
option java_package = "com.google.api";
|
||||
option objc_class_prefix = "GAPI";
|
||||
|
||||
// Message that represents an arbitrary HTTP body. It should only be used for
|
||||
// payload formats that can't be represented as JSON, such as raw binary or
|
||||
// an HTML page.
|
||||
//
|
||||
//
|
||||
// This message can be used both in streaming and non-streaming API methods in
|
||||
// the request as well as the response.
|
||||
//
|
||||
// It can be used as a top-level request field, which is convenient if one
|
||||
// wants to extract parameters from either the URL or HTTP template into the
|
||||
// request fields and also want access to the raw HTTP body.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// message GetResourceRequest {
|
||||
// // A unique request id.
|
||||
// string request_id = 1;
|
||||
//
|
||||
// // The raw HTTP body is bound to this field.
|
||||
// google.api.HttpBody http_body = 2;
|
||||
// }
|
||||
//
|
||||
// service ResourceService {
|
||||
// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
|
||||
// rpc UpdateResource(google.api.HttpBody) returns
|
||||
// (google.protobuf.Empty);
|
||||
// }
|
||||
//
|
||||
// Example with streaming methods:
|
||||
//
|
||||
// service CaldavService {
|
||||
// rpc GetCalendar(stream google.api.HttpBody)
|
||||
// returns (stream google.api.HttpBody);
|
||||
// rpc UpdateCalendar(stream google.api.HttpBody)
|
||||
// returns (stream google.api.HttpBody);
|
||||
// }
|
||||
//
|
||||
// Use of this type only changes how the request and response bodies are
|
||||
// handled, all other features will continue to work unchanged.
|
||||
message HttpBody {
|
||||
// The HTTP Content-Type header value specifying the content type of the body.
|
||||
string content_type = 1;
|
||||
|
||||
// The HTTP request/response body as raw binary.
|
||||
bytes data = 2;
|
||||
|
||||
// Application specific response metadata. Must be set in the first response
|
||||
// for streaming APIs.
|
||||
repeated google.protobuf.Any extensions = 3;
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option go_package = "types";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "AnyProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
|
||||
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
||||
// URL that describes the type of the serialized message.
|
||||
//
|
||||
// Protobuf library provides support to pack/unpack Any values in the form
|
||||
// of utility functions or additional generated methods of the Any type.
|
||||
//
|
||||
// Example 1: Pack and unpack a message in C++.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any;
|
||||
// any.PackFrom(foo);
|
||||
// ...
|
||||
// if (any.UnpackTo(&foo)) {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// Example 2: Pack and unpack a message in Java.
|
||||
//
|
||||
// Foo foo = ...;
|
||||
// Any any = Any.pack(foo);
|
||||
// ...
|
||||
// if (any.is(Foo.class)) {
|
||||
// foo = any.unpack(Foo.class);
|
||||
// }
|
||||
//
|
||||
// Example 3: Pack and unpack a message in Python.
|
||||
//
|
||||
// foo = Foo(...)
|
||||
// any = Any()
|
||||
// any.Pack(foo)
|
||||
// ...
|
||||
// if any.Is(Foo.DESCRIPTOR):
|
||||
// any.Unpack(foo)
|
||||
// ...
|
||||
//
|
||||
// Example 4: Pack and unpack a message in Go
|
||||
//
|
||||
// foo := &pb.Foo{...}
|
||||
// any, err := ptypes.MarshalAny(foo)
|
||||
// ...
|
||||
// foo := &pb.Foo{}
|
||||
// if err := ptypes.UnmarshalAny(any, foo); err != nil {
|
||||
// ...
|
||||
// }
|
||||
//
|
||||
// The pack methods provided by protobuf library will by default use
|
||||
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
||||
// methods only use the fully qualified type name after the last '/'
|
||||
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
||||
// name "y.z".
|
||||
//
|
||||
//
|
||||
// JSON
|
||||
// ====
|
||||
// The JSON representation of an `Any` value uses the regular
|
||||
// representation of the deserialized, embedded message, with an
|
||||
// additional field `@type` which contains the type URL. Example:
|
||||
//
|
||||
// package google.profile;
|
||||
// message Person {
|
||||
// string first_name = 1;
|
||||
// string last_name = 2;
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.profile.Person",
|
||||
// "firstName": <string>,
|
||||
// "lastName": <string>
|
||||
// }
|
||||
//
|
||||
// If the embedded message type is well-known and has a custom JSON
|
||||
// representation, that representation will be embedded adding a field
|
||||
// `value` which holds the custom JSON in addition to the `@type`
|
||||
// field. Example (for message [google.protobuf.Duration][]):
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
||||
// "value": "1.212s"
|
||||
// }
|
||||
//
|
||||
message Any {
|
||||
// A URL/resource name that uniquely identifies the type of the serialized
|
||||
// protocol buffer message. This string must contain at least
|
||||
// one "/" character. The last segment of the URL's path must represent
|
||||
// the fully qualified name of the type (as in
|
||||
// `path/google.protobuf.Duration`). The name should be in a canonical form
|
||||
// (e.g., leading "." is not accepted).
|
||||
//
|
||||
// In practice, teams usually precompile into the binary all types that they
|
||||
// expect it to use in the context of Any. However, for URLs which use the
|
||||
// scheme `http`, `https`, or no scheme, one can optionally set up a type
|
||||
// server that maps type URLs to message definitions as follows:
|
||||
//
|
||||
// * If no scheme is provided, `https` is assumed.
|
||||
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
||||
// value in binary format, or produce an error.
|
||||
// * Applications are allowed to cache lookup results based on the
|
||||
// URL, or have them precompiled into a binary to avoid any
|
||||
// lookup. Therefore, binary compatibility needs to be preserved
|
||||
// on changes to types. (Use versioned type names to manage
|
||||
// breaking changes.)
|
||||
//
|
||||
// Note: this functionality is not currently available in the official
|
||||
// protobuf release, and it is not used for type URLs beginning with
|
||||
// type.googleapis.com.
|
||||
//
|
||||
// Schemes other than `http`, `https` (or the empty scheme) might be
|
||||
// used with implementation specific semantics.
|
||||
//
|
||||
string type_url = 1;
|
||||
|
||||
// Must be a valid serialized protocol buffer of the above specified type.
|
||||
bytes value = 2;
|
||||
|
||||
option (gogoproto.typedecl) = false;
|
||||
}
|
||||
|
||||
option (gogoproto.goproto_registration) = false;
|
||||
@@ -36,16 +36,17 @@
|
||||
// A valid .proto file can be translated directly to a FileDescriptorProto
|
||||
// without any other information (e.g. without reading its imports).
|
||||
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option go_package = "google.golang.org/protobuf/types/descriptorpb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option go_package = "google.golang.org/protobuf/types/descriptorpb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "DescriptorProtos";
|
||||
option csharp_namespace = "Google.Protobuf.Reflection";
|
||||
option objc_class_prefix = "GPB";
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Protobuf.Reflection";
|
||||
option objc_class_prefix = "GPB";
|
||||
option cc_enable_arenas = true;
|
||||
|
||||
// descriptor.proto must be optimized for speed because reflection-based
|
||||
// algorithms don't work during bootstrapping.
|
||||
@@ -59,8 +60,8 @@ message FileDescriptorSet {
|
||||
|
||||
// Describes a complete .proto file.
|
||||
message FileDescriptorProto {
|
||||
optional string name = 1; // file name, relative to root of source tree
|
||||
optional string package = 2; // e.g. "foo", "foo.bar", etc.
|
||||
optional string name = 1; // file name, relative to root of source tree
|
||||
optional string package = 2; // e.g. "foo", "foo.bar", etc.
|
||||
|
||||
// Names of files imported by this file.
|
||||
repeated string dependency = 3;
|
||||
@@ -71,10 +72,10 @@ message FileDescriptorProto {
|
||||
repeated int32 weak_dependency = 11;
|
||||
|
||||
// All top-level definitions in this file.
|
||||
repeated DescriptorProto message_type = 4;
|
||||
repeated EnumDescriptorProto enum_type = 5;
|
||||
repeated ServiceDescriptorProto service = 6;
|
||||
repeated FieldDescriptorProto extension = 7;
|
||||
repeated DescriptorProto message_type = 4;
|
||||
repeated EnumDescriptorProto enum_type = 5;
|
||||
repeated ServiceDescriptorProto service = 6;
|
||||
repeated FieldDescriptorProto extension = 7;
|
||||
|
||||
optional FileOptions options = 8;
|
||||
|
||||
@@ -93,15 +94,15 @@ message FileDescriptorProto {
|
||||
message DescriptorProto {
|
||||
optional string name = 1;
|
||||
|
||||
repeated FieldDescriptorProto field = 2;
|
||||
repeated FieldDescriptorProto field = 2;
|
||||
repeated FieldDescriptorProto extension = 6;
|
||||
|
||||
repeated DescriptorProto nested_type = 3;
|
||||
repeated EnumDescriptorProto enum_type = 4;
|
||||
repeated DescriptorProto nested_type = 3;
|
||||
repeated EnumDescriptorProto enum_type = 4;
|
||||
|
||||
message ExtensionRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
|
||||
optional ExtensionRangeOptions options = 3;
|
||||
}
|
||||
@@ -115,8 +116,8 @@ message DescriptorProto {
|
||||
// fields or extension ranges in the same message. Reserved ranges may
|
||||
// not overlap.
|
||||
message ReservedRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Exclusive.
|
||||
}
|
||||
repeated ReservedRange reserved_range = 9;
|
||||
// Reserved field names, which may not be used by fields in the same message.
|
||||
@@ -128,6 +129,7 @@ message ExtensionRangeOptions {
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
}
|
||||
@@ -138,33 +140,33 @@ message FieldDescriptorProto {
|
||||
// 0 is reserved for errors.
|
||||
// Order is weird for historical reasons.
|
||||
TYPE_DOUBLE = 1;
|
||||
TYPE_FLOAT = 2;
|
||||
TYPE_FLOAT = 2;
|
||||
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
||||
// negative values are likely.
|
||||
TYPE_INT64 = 3;
|
||||
TYPE_INT64 = 3;
|
||||
TYPE_UINT64 = 4;
|
||||
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
||||
// negative values are likely.
|
||||
TYPE_INT32 = 5;
|
||||
TYPE_INT32 = 5;
|
||||
TYPE_FIXED64 = 6;
|
||||
TYPE_FIXED32 = 7;
|
||||
TYPE_BOOL = 8;
|
||||
TYPE_STRING = 9;
|
||||
TYPE_BOOL = 8;
|
||||
TYPE_STRING = 9;
|
||||
// Tag-delimited aggregate.
|
||||
// Group type is deprecated and not supported in proto3. However, Proto3
|
||||
// implementations should still be able to parse the group wire format and
|
||||
// treat group fields as unknown fields.
|
||||
TYPE_GROUP = 10;
|
||||
TYPE_MESSAGE = 11; // Length-delimited aggregate.
|
||||
TYPE_GROUP = 10;
|
||||
TYPE_MESSAGE = 11; // Length-delimited aggregate.
|
||||
|
||||
// New in version 2.
|
||||
TYPE_BYTES = 12;
|
||||
TYPE_UINT32 = 13;
|
||||
TYPE_ENUM = 14;
|
||||
TYPE_BYTES = 12;
|
||||
TYPE_UINT32 = 13;
|
||||
TYPE_ENUM = 14;
|
||||
TYPE_SFIXED32 = 15;
|
||||
TYPE_SFIXED64 = 16;
|
||||
TYPE_SINT32 = 17; // Uses ZigZag encoding.
|
||||
TYPE_SINT64 = 18; // Uses ZigZag encoding.
|
||||
TYPE_SINT32 = 17; // Uses ZigZag encoding.
|
||||
TYPE_SINT64 = 18; // Uses ZigZag encoding.
|
||||
}
|
||||
|
||||
enum Label {
|
||||
@@ -174,9 +176,9 @@ message FieldDescriptorProto {
|
||||
LABEL_REPEATED = 3;
|
||||
}
|
||||
|
||||
optional string name = 1;
|
||||
optional int32 number = 3;
|
||||
optional Label label = 4;
|
||||
optional string name = 1;
|
||||
optional int32 number = 3;
|
||||
optional Label label = 4;
|
||||
|
||||
// If type_name is set, this need not be set. If both this and type_name
|
||||
// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
||||
@@ -197,7 +199,6 @@ message FieldDescriptorProto {
|
||||
// For booleans, "true" or "false".
|
||||
// For strings, contains the default text contents (not escaped in any way).
|
||||
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
||||
// TODO(kenton): Base-64 encode?
|
||||
optional string default_value = 7;
|
||||
|
||||
// If set, gives the index of a oneof in the containing type's oneof_decl
|
||||
@@ -238,7 +239,7 @@ message FieldDescriptorProto {
|
||||
|
||||
// Describes a oneof.
|
||||
message OneofDescriptorProto {
|
||||
optional string name = 1;
|
||||
optional string name = 1;
|
||||
optional OneofOptions options = 2;
|
||||
}
|
||||
|
||||
@@ -257,8 +258,8 @@ message EnumDescriptorProto {
|
||||
// is inclusive such that it can appropriately represent the entire int32
|
||||
// domain.
|
||||
message EnumReservedRange {
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Inclusive.
|
||||
optional int32 start = 1; // Inclusive.
|
||||
optional int32 end = 2; // Inclusive.
|
||||
}
|
||||
|
||||
// Range of reserved numeric values. Reserved numeric values may not be used
|
||||
@@ -273,15 +274,15 @@ message EnumDescriptorProto {
|
||||
|
||||
// Describes a value within an enum.
|
||||
message EnumValueDescriptorProto {
|
||||
optional string name = 1;
|
||||
optional int32 number = 2;
|
||||
optional string name = 1;
|
||||
optional int32 number = 2;
|
||||
|
||||
optional EnumValueOptions options = 3;
|
||||
}
|
||||
|
||||
// Describes a service.
|
||||
message ServiceDescriptorProto {
|
||||
optional string name = 1;
|
||||
optional string name = 1;
|
||||
repeated MethodDescriptorProto method = 2;
|
||||
|
||||
optional ServiceOptions options = 3;
|
||||
@@ -293,7 +294,7 @@ message MethodDescriptorProto {
|
||||
|
||||
// Input and output type names. These are resolved in the same way as
|
||||
// FieldDescriptorProto.type_name, but must refer to a message type.
|
||||
optional string input_type = 2;
|
||||
optional string input_type = 2;
|
||||
optional string output_type = 3;
|
||||
|
||||
optional MethodOptions options = 4;
|
||||
@@ -304,6 +305,7 @@ message MethodDescriptorProto {
|
||||
optional bool server_streaming = 6 [default = false];
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
// Options
|
||||
|
||||
@@ -344,23 +346,24 @@ message FileOptions {
|
||||
// domain names.
|
||||
optional string java_package = 1;
|
||||
|
||||
// If set, all the classes from the .proto file are wrapped in a single
|
||||
// outer class with the given name. This applies to both Proto1
|
||||
// (equivalent to the old "--one_java_file" option) and Proto2 (where
|
||||
// a .proto always translates to a single class, but you may want to
|
||||
// explicitly choose the class name).
|
||||
|
||||
// Controls the name of the wrapper Java class generated for the .proto file.
|
||||
// That class will always contain the .proto file's getDescriptor() method as
|
||||
// well as any top-level extensions defined in the .proto file.
|
||||
// If java_multiple_files is disabled, then all the other classes from the
|
||||
// .proto file will be nested inside the single wrapper outer class.
|
||||
optional string java_outer_classname = 8;
|
||||
|
||||
// If set true, then the Java code generator will generate a separate .java
|
||||
// If enabled, then the Java code generator will generate a separate .java
|
||||
// file for each top-level message, enum, and service defined in the .proto
|
||||
// file. Thus, these types will *not* be nested inside the outer class
|
||||
// named by java_outer_classname. However, the outer class will still be
|
||||
// file. Thus, these types will *not* be nested inside the wrapper class
|
||||
// named by java_outer_classname. However, the wrapper class will still be
|
||||
// generated to contain the file's getDescriptor() method as well as any
|
||||
// top-level extensions defined in the file.
|
||||
optional bool java_multiple_files = 10 [default = false];
|
||||
|
||||
// This option does nothing.
|
||||
optional bool java_generate_equals_and_hash = 20 [deprecated = true];
|
||||
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
|
||||
|
||||
// If set true, then the Java2 code generator will generate code that
|
||||
// throws an exception whenever an attempt is made to assign a non-UTF-8
|
||||
@@ -370,12 +373,13 @@ message FileOptions {
|
||||
// This option has no effect on when used with the lite runtime.
|
||||
optional bool java_string_check_utf8 = 27 [default = false];
|
||||
|
||||
|
||||
// Generated classes can be optimized for speed or code size.
|
||||
enum OptimizeMode {
|
||||
SPEED = 1; // Generate complete code for parsing, serialization,
|
||||
// etc.
|
||||
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
|
||||
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
|
||||
SPEED = 1; // Generate complete code for parsing, serialization,
|
||||
// etc.
|
||||
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
|
||||
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
|
||||
}
|
||||
optional OptimizeMode optimize_for = 9 [default = SPEED];
|
||||
|
||||
@@ -386,6 +390,9 @@ message FileOptions {
|
||||
// - Otherwise, the basename of the .proto file, without extension.
|
||||
optional string go_package = 11;
|
||||
|
||||
|
||||
|
||||
|
||||
// Should generic services be generated in each language? "Generic" services
|
||||
// are not specific to any particular RPC system. They are generated by the
|
||||
// main code generators in each language (without additional plugins).
|
||||
@@ -396,10 +403,10 @@ message FileOptions {
|
||||
// that generate code specific to your particular RPC system. Therefore,
|
||||
// these default to false. Old code which depends on generic services should
|
||||
// explicitly set them to true.
|
||||
optional bool cc_generic_services = 16 [default = false];
|
||||
optional bool cc_generic_services = 16 [default = false];
|
||||
optional bool java_generic_services = 17 [default = false];
|
||||
optional bool py_generic_services = 18 [default = false];
|
||||
optional bool php_generic_services = 42 [default = false];
|
||||
optional bool py_generic_services = 18 [default = false];
|
||||
optional bool php_generic_services = 42 [default = false];
|
||||
|
||||
// Is this file deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
@@ -411,6 +418,7 @@ message FileOptions {
|
||||
// only to generated classes for C++.
|
||||
optional bool cc_enable_arenas = 31 [default = true];
|
||||
|
||||
|
||||
// Sets the objective c class prefix which is prepended to all objective c
|
||||
// generated classes from this .proto. There is no default.
|
||||
optional string objc_class_prefix = 36;
|
||||
@@ -443,6 +451,7 @@ message FileOptions {
|
||||
// determining the ruby package.
|
||||
optional string ruby_package = 45;
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here.
|
||||
// See the documentation for the "Options" section above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
@@ -486,6 +495,8 @@ message MessageOptions {
|
||||
// this is a formalization for deprecating messages.
|
||||
optional bool deprecated = 3 [default = false];
|
||||
|
||||
reserved 4, 5, 6;
|
||||
|
||||
// Whether the message is an automatically generated map entry type for the
|
||||
// maps field.
|
||||
//
|
||||
@@ -509,8 +520,9 @@ message MessageOptions {
|
||||
// parser.
|
||||
optional bool map_entry = 7;
|
||||
|
||||
reserved 8; // javalite_serializable
|
||||
reserved 9; // javanano_as_lite
|
||||
reserved 8; // javalite_serializable
|
||||
reserved 9; // javanano_as_lite
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
@@ -591,8 +603,19 @@ message FieldOptions {
|
||||
// implementation must either *always* check its required fields, or *never*
|
||||
// check its required fields, regardless of whether or not the message has
|
||||
// been parsed.
|
||||
//
|
||||
// As of 2021, lazy does no correctness checks on the byte stream during
|
||||
// parsing. This may lead to crashes if and when an invalid byte stream is
|
||||
// finally parsed upon access.
|
||||
//
|
||||
// TODO(b/211906113): Enable validation on lazy fields.
|
||||
optional bool lazy = 5 [default = false];
|
||||
|
||||
// unverified_lazy does no correctness checks on the byte stream. This should
|
||||
// only be used where lazy with verification is prohibitive for performance
|
||||
// reasons.
|
||||
optional bool unverified_lazy = 15 [default = false];
|
||||
|
||||
// Is this field deprecated?
|
||||
// Depending on the target platform, this can emit Deprecated annotations
|
||||
// for accessors, or it will be completely ignored; in the very least, this
|
||||
@@ -602,13 +625,14 @@ message FieldOptions {
|
||||
// For Google-internal migration only. Do not use.
|
||||
optional bool weak = 10 [default = false];
|
||||
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
|
||||
// Clients can define custom options in extensions of this message. See above.
|
||||
extensions 1000 to max;
|
||||
|
||||
reserved 4; // removed jtype
|
||||
reserved 4; // removed jtype
|
||||
}
|
||||
|
||||
message OneofOptions {
|
||||
@@ -631,7 +655,7 @@ message EnumOptions {
|
||||
// is a formalization for deprecating enums.
|
||||
optional bool deprecated = 3 [default = false];
|
||||
|
||||
reserved 5; // javanano_as_lite
|
||||
reserved 5; // javanano_as_lite
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
@@ -692,10 +716,11 @@ message MethodOptions {
|
||||
// methods, and PUT verb for idempotent methods instead of the default POST.
|
||||
enum IdempotencyLevel {
|
||||
IDEMPOTENCY_UNKNOWN = 0;
|
||||
NO_SIDE_EFFECTS = 1; // implies idempotent
|
||||
IDEMPOTENT = 2; // idempotent, but may have side effects
|
||||
NO_SIDE_EFFECTS = 1; // implies idempotent
|
||||
IDEMPOTENT = 2; // idempotent, but may have side effects
|
||||
}
|
||||
optional IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
|
||||
optional IdempotencyLevel idempotency_level = 34
|
||||
[default = IDEMPOTENCY_UNKNOWN];
|
||||
|
||||
// The parser stores options it doesn't recognize here. See above.
|
||||
repeated UninterpretedOption uninterpreted_option = 999;
|
||||
@@ -704,6 +729,7 @@ message MethodOptions {
|
||||
extensions 1000 to max;
|
||||
}
|
||||
|
||||
|
||||
// A message representing a option the parser does not recognize. This only
|
||||
// appears in options protos created by the compiler::Parser class.
|
||||
// DescriptorPool resolves these when building Descriptor objects. Therefore,
|
||||
@@ -714,22 +740,22 @@ message UninterpretedOption {
|
||||
// The name of the uninterpreted option. Each string represents a segment in
|
||||
// a dot-separated name. is_extension is true iff a segment represents an
|
||||
// extension (denoted with parentheses in options specs in .proto files).
|
||||
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
|
||||
// "foo.(bar.baz).qux".
|
||||
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
|
||||
// "foo.(bar.baz).moo".
|
||||
message NamePart {
|
||||
required string name_part = 1;
|
||||
required bool is_extension = 2;
|
||||
required string name_part = 1;
|
||||
required bool is_extension = 2;
|
||||
}
|
||||
repeated NamePart name = 2;
|
||||
|
||||
// The value of the uninterpreted option, in whatever type the tokenizer
|
||||
// identified it as during parsing. Exactly one of these should be set.
|
||||
optional string identifier_value = 3;
|
||||
optional string identifier_value = 3;
|
||||
optional uint64 positive_int_value = 4;
|
||||
optional int64 negative_int_value = 5;
|
||||
optional double double_value = 6;
|
||||
optional bytes string_value = 7;
|
||||
optional string aggregate_value = 8;
|
||||
optional int64 negative_int_value = 5;
|
||||
optional double double_value = 6;
|
||||
optional bytes string_value = 7;
|
||||
optional string aggregate_value = 8;
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
@@ -782,13 +808,13 @@ message SourceCodeInfo {
|
||||
// ignore those that it doesn't understand, as more types of locations could
|
||||
// be recorded in the future.
|
||||
repeated Location location = 1;
|
||||
message Location {
|
||||
message Location {
|
||||
// Identifies which part of the FileDescriptorProto was defined at this
|
||||
// location.
|
||||
//
|
||||
// Each element is a field number or an index. They form a path from
|
||||
// the root FileDescriptorProto to the place where the definition. For
|
||||
// example, this path:
|
||||
// the root FileDescriptorProto to the place where the definition occurs.
|
||||
// For example, this path:
|
||||
// [ 4, 3, 2, 7, 1 ]
|
||||
// refers to:
|
||||
// file.message_type(3) // 4, 3
|
||||
@@ -842,13 +868,13 @@ message SourceCodeInfo {
|
||||
// // Comment attached to baz.
|
||||
// // Another line attached to baz.
|
||||
//
|
||||
// // Comment attached to qux.
|
||||
// // Comment attached to moo.
|
||||
// //
|
||||
// // Another line attached to qux.
|
||||
// optional double qux = 4;
|
||||
// // Another line attached to moo.
|
||||
// optional double moo = 4;
|
||||
//
|
||||
// // Detached comment for corge. This is not leading or trailing comments
|
||||
// // to qux or corge because there are blank lines separating it from
|
||||
// // to moo or corge because there are blank lines separating it from
|
||||
// // both.
|
||||
//
|
||||
// // Detached comment for corge paragraph 2.
|
||||
@@ -862,8 +888,8 @@ message SourceCodeInfo {
|
||||
// optional int32 grault = 6;
|
||||
//
|
||||
// // ignored detached comments.
|
||||
optional string leading_comments = 3;
|
||||
optional string trailing_comments = 4;
|
||||
optional string leading_comments = 3;
|
||||
optional string trailing_comments = 4;
|
||||
repeated string leading_detached_comments = 6;
|
||||
}
|
||||
}
|
||||
@@ -875,7 +901,7 @@ message GeneratedCodeInfo {
|
||||
// An Annotation connects some span of text in generated code to an element
|
||||
// of its generating .proto file.
|
||||
repeated Annotation annotation = 1;
|
||||
message Annotation {
|
||||
message Annotation {
|
||||
// Identifies the element in the original source .proto file. This field
|
||||
// is formatted the same as SourceCodeInfo.Location.path.
|
||||
repeated int32 path = 1 [packed = true];
|
||||
|
||||
@@ -32,13 +32,13 @@ syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "google.golang.org/protobuf/types/known/durationpb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "DurationProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
|
||||
// A Duration represents a signed, fixed-length span of time represented
|
||||
// as a count of seconds and fractions of seconds at nanosecond
|
||||
@@ -99,6 +99,7 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
||||
// microsecond should be expressed in JSON format as "3.000001s".
|
||||
//
|
||||
//
|
||||
message Duration {
|
||||
// Signed seconds of the span of time. Must be from -315,576,000,000
|
||||
// to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
||||
|
||||
@@ -32,13 +32,13 @@ syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "google.golang.org/protobuf/types/known/timestamppb";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "TimestampProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
|
||||
// A Timestamp represents a point in time independent of any time zone or local
|
||||
// calendar, encoded as a count of seconds and fractions of seconds at
|
||||
@@ -90,6 +90,7 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
||||
// .setNanos((int) ((millis % 1000) * 1000000)).build();
|
||||
//
|
||||
//
|
||||
// Example 5: Compute Timestamp from Java `Instant.now()`.
|
||||
//
|
||||
// Instant now = Instant.now();
|
||||
@@ -98,6 +99,7 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
||||
// .setNanos(now.getNano()).build();
|
||||
//
|
||||
//
|
||||
// Example 6: Compute Timestamp from current time in Python.
|
||||
//
|
||||
// timestamp = Timestamp()
|
||||
@@ -127,9 +129,10 @@ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
||||
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
||||
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
||||
// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
||||
// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
||||
// ) to obtain a formatter capable of generating timestamps in this format.
|
||||
//
|
||||
//
|
||||
message Timestamp {
|
||||
// Represents seconds of UTC time since Unix epoch
|
||||
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.auction.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "vulcanize/auction/v1beta1/types.proto";
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/auction/types";
|
||||
|
||||
// GenesisState defines the genesis state of the auction module
|
||||
message GenesisState {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
repeated Auction auctions = 2 [
|
||||
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
|
||||
];
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.bond.v1beta1;
|
||||
|
||||
option go_package = "github.com/tharsis/ethermint/x/bond/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// Msg defines the bond Msg service.
|
||||
service Msg {
|
||||
// CreateBond defines a method for creating a new bond.
|
||||
rpc CreateBond(MsgCreateBond) returns (MsgCreateBondResponse);
|
||||
|
||||
// RefillBond defines a method for refilling amount for bond.
|
||||
rpc RefillBond(MsgRefillBond) returns (MsgRefillBondResponse);
|
||||
|
||||
// WithdrawBond defines a method for withdrawing amount from bond.
|
||||
rpc WithdrawBond(MsgWithdrawBond) returns (MsgWithdrawBondResponse);
|
||||
|
||||
// CancelBond defines a method for cancelling a bond.
|
||||
rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse);
|
||||
}
|
||||
|
||||
// MsgCreateBond defines a SDK message for creating a new bond.
|
||||
message MsgCreateBond{
|
||||
string signer = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgCreateBondResponse defines the Msg/CreateBond response type.
|
||||
message MsgCreateBondResponse{
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// MsgRefillBond defines a SDK message for refill the amount for bond.
|
||||
message MsgRefillBond{
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgRefillBondResponse defines the Msg/RefillBond response type.
|
||||
message MsgRefillBondResponse{
|
||||
}
|
||||
|
||||
// MsgWithdrawBond defines a SDK message for withdrawing amount from bond.
|
||||
message MsgWithdrawBond {
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type.
|
||||
message MsgWithdrawBondResponse{
|
||||
}
|
||||
|
||||
// MsgCancelBond defines a SDK message for the cancel the bond.
|
||||
message MsgCancelBond{
|
||||
string id = 1;
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
||||
message MsgCancelBondResponse{
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.registry.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "vulcanize/registry/v1beta1/registry.proto";
|
||||
|
||||
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
||||
|
||||
// GenesisState defines the registry module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the params of registry module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
// records
|
||||
repeated Record records = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"records\" yaml:\"records\""];
|
||||
// authorities
|
||||
repeated AuthorityEntry authorities = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"authorities\" yaml:\"authorities\""];
|
||||
// names
|
||||
repeated NameEntry names = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.registry.v1beta1;
|
||||
|
||||
import "vulcanize/registry/v1beta1/registry.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
||||
|
||||
// Query defines the gRPC querier service for registry module
|
||||
service Query {
|
||||
// Params queries the registry module params.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/params";
|
||||
}
|
||||
// List records
|
||||
rpc ListRecords(QueryListRecordsRequest) returns (QueryListRecordsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/records";
|
||||
}
|
||||
// Get record by id
|
||||
rpc GetRecord(QueryRecordByIDRequest) returns (QueryRecordByIDResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/records/{id}";
|
||||
}
|
||||
// Get records by bond id
|
||||
rpc GetRecordByBondID(QueryRecordByBondIDRequest) returns (QueryRecordByBondIDResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/records-by-bond-id/{id}";
|
||||
}
|
||||
// Get registry module balance
|
||||
rpc GetRegistryModuleBalance(GetRegistryModuleBalanceRequest) returns (GetRegistryModuleBalanceResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/balance";
|
||||
}
|
||||
// List name records
|
||||
rpc ListNameRecords(QueryListNameRecordsRequest) returns (QueryListNameRecordsResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/names";
|
||||
}
|
||||
// Whois method retrieve the name authority info
|
||||
rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/whois/{name}";
|
||||
}
|
||||
// LookupCrn
|
||||
rpc LookupCrn(QueryLookupCrn) returns (QueryLookupCrnResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/lookup";
|
||||
}
|
||||
// ResolveCrn
|
||||
rpc ResolveCrn(QueryResolveCrn) returns (QueryResolveCrnResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/resolve";
|
||||
}
|
||||
// GetRecordExpiryQueue
|
||||
rpc GetRecordExpiryQueue(QueryGetRecordExpiryQueue) returns (QueryGetRecordExpiryQueueResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/record-expiry";
|
||||
}
|
||||
// GetAuthorityExpiryQueue
|
||||
rpc GetAuthorityExpiryQueue(QueryGetAuthorityExpiryQueue) returns (QueryGetAuthorityExpiryQueueResponse) {
|
||||
option (google.api.http).get = "/vulcanize/registry/v1beta1/authority-expiry";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request type for registry params
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse is response type for registry params
|
||||
message QueryParamsResponse {
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// QueryListRecordsRequest is request type for registry records list
|
||||
message QueryListRecordsRequest {
|
||||
message LinkInput {
|
||||
string id = 1;
|
||||
}
|
||||
message ArrayInput {
|
||||
repeated ValueInput values = 1;
|
||||
}
|
||||
message MapInput {
|
||||
map<string, ValueInput> values = 1;
|
||||
}
|
||||
message ValueInput {
|
||||
oneof value {
|
||||
string string = 1;
|
||||
int64 int = 2;
|
||||
double float = 3;
|
||||
bool boolean = 4;
|
||||
string link = 5;
|
||||
ArrayInput array = 6;
|
||||
MapInput map = 7;
|
||||
}
|
||||
}
|
||||
message KeyValueInput {
|
||||
string key = 1;
|
||||
ValueInput value = 2;
|
||||
}
|
||||
repeated KeyValueInput attributes = 1;
|
||||
|
||||
bool all = 2;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
||||
}
|
||||
|
||||
// QueryListRecordsResponse is response type for registry records list
|
||||
message QueryListRecordsResponse {
|
||||
repeated Record records = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryRecordByIDRequest is request type for registry records by id
|
||||
message QueryRecordByIDRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// QueryRecordByIDResponse is response type for registry records by id
|
||||
message QueryRecordByIDResponse {
|
||||
Record record = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryRecordByBondIdRequest is request type for get the records by bond-id
|
||||
message QueryRecordByBondIDRequest {
|
||||
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
|
||||
message QueryRecordByBondIDResponse {
|
||||
repeated Record records = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// GetRegistryModuleBalanceRequest is request type for registry module accounts balance
|
||||
message GetRegistryModuleBalanceRequest {}
|
||||
|
||||
// GetRegistryModuleBalanceResponse is response type for registry module accounts balance
|
||||
message GetRegistryModuleBalanceResponse {
|
||||
repeated AccountBalance balances = 1;
|
||||
}
|
||||
|
||||
// AccountBalance is registry module account balance
|
||||
message AccountBalance {
|
||||
string account_name = 1 [(gogoproto.moretags) = "json:\"accountName\" yaml:\"accountName\""];
|
||||
repeated cosmos.base.v1beta1.Coin balance = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "json:\"balance\" yaml:\"balance\""
|
||||
];
|
||||
}
|
||||
|
||||
// QueryListNameRecordsRequest is request type for registry names records
|
||||
message QueryListNameRecordsRequest {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryListNameRecordsResponse is response type for registry names records
|
||||
message QueryListNameRecordsResponse {
|
||||
repeated NameEntry names = 1 [(gogoproto.nullable) = false];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryWhoisRequest is request type for Get NameAuthority
|
||||
message QueryWhoisRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// QueryWhoisResponse is response type for whois request
|
||||
message QueryWhoisResponse {
|
||||
NameAuthority name_authority = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"nameAuthority\" yaml:\"nameAuthority\""];
|
||||
}
|
||||
|
||||
// QueryLookupCrn is request type for LookupCrn
|
||||
message QueryLookupCrn {
|
||||
string crn = 1;
|
||||
}
|
||||
|
||||
// QueryLookupCrnResponse is response type for QueryLookupCrn
|
||||
message QueryLookupCrnResponse {
|
||||
NameRecord name = 1;
|
||||
}
|
||||
|
||||
// QueryResolveCrn is request type for ResolveCrn
|
||||
message QueryResolveCrn {
|
||||
string crn = 1;
|
||||
}
|
||||
|
||||
// QueryResolveCrnResponse is response type for QueryResolveCrn
|
||||
message QueryResolveCrnResponse {
|
||||
Record record = 1;
|
||||
}
|
||||
|
||||
// QueryGetRecordExpiryQueue
|
||||
message QueryGetRecordExpiryQueue {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryGetRecordExpiryQueueResponse
|
||||
message QueryGetRecordExpiryQueueResponse {
|
||||
repeated ExpiryQueueRecord records = 1;
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// ExpiryQueueRecord
|
||||
message ExpiryQueueRecord {
|
||||
string id = 1;
|
||||
repeated string value = 2;
|
||||
}
|
||||
|
||||
// QueryGetAuthorityExpiryQueue
|
||||
message QueryGetAuthorityExpiryQueue {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryGetAuthorityExpiryQueueResponse
|
||||
message QueryGetAuthorityExpiryQueueResponse {
|
||||
repeated ExpiryQueueRecord authorities = 1;
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vulcanize.registry.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "vulcanize/registry/v1beta1/registry.proto";
|
||||
|
||||
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
||||
|
||||
// Msg
|
||||
service Msg {
|
||||
// SetRecord will records a new record with given payload and bond id
|
||||
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {}
|
||||
// Renew Record will renew the expire record
|
||||
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {}
|
||||
// AssociateBond
|
||||
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {}
|
||||
// DissociateBond
|
||||
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {}
|
||||
// DissociateRecords
|
||||
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse) {}
|
||||
// ReAssociateRecords
|
||||
rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse) {}
|
||||
// SetName will store the name with given crn and name
|
||||
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {}
|
||||
// Reserve name
|
||||
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse) {}
|
||||
// Delete Name method will remove authority name
|
||||
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse) {}
|
||||
// SetAuthorityBond
|
||||
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse) {}
|
||||
}
|
||||
|
||||
// MsgSetRecord
|
||||
message MsgSetRecord {
|
||||
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string signer = 2;
|
||||
Payload payload = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgSetRecordResponse
|
||||
message MsgSetRecordResponse {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
// Payload
|
||||
message Payload {
|
||||
Record record = 1;
|
||||
repeated Signature signatures = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""];
|
||||
}
|
||||
|
||||
// MsgSetName
|
||||
message MsgSetName {
|
||||
string crn = 1;
|
||||
string cid = 2;
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgSetNameResponse
|
||||
message MsgSetNameResponse {}
|
||||
|
||||
// MsgReserveName
|
||||
message MsgReserveAuthority {
|
||||
string name = 1;
|
||||
string signer = 2;
|
||||
// if creating a sub-authority.
|
||||
string owner = 3;
|
||||
}
|
||||
|
||||
// MsgReserveNameResponse
|
||||
message MsgReserveAuthorityResponse {}
|
||||
|
||||
// MsgSetAuthorityBond is SDK message for SetAuthorityBond
|
||||
message MsgSetAuthorityBond {
|
||||
string name = 1;
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgSetAuthorityBondResponse
|
||||
message MsgSetAuthorityBondResponse {}
|
||||
|
||||
// MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
|
||||
message MsgDeleteNameAuthority {
|
||||
string crn = 1;
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDeleteNameAuthorityResponse
|
||||
message MsgDeleteNameAuthorityResponse {}
|
||||
|
||||
// MsgRenewRecord is SDK message for Renew a record
|
||||
message MsgRenewRecord {
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgRenewRecordResponse
|
||||
message MsgRenewRecordResponse {}
|
||||
|
||||
// MsgAssociateBond
|
||||
message MsgAssociateBond {
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgAssociateBondResponse
|
||||
message MsgAssociateBondResponse {}
|
||||
|
||||
// MsgDissociateBond is SDK message for Msg/DissociateBond
|
||||
message MsgDissociateBond {
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateBondResponse is response type for MsgDissociateBond
|
||||
message MsgDissociateBondResponse {}
|
||||
|
||||
// MsgDissociateRecords is SDK message for Msg/DissociateRecords
|
||||
message MsgDissociateRecords {
|
||||
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateRecordsResponse is response type for MsgDissociateRecords
|
||||
message MsgDissociateRecordsResponse {}
|
||||
|
||||
// MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
|
||||
message MsgReAssociateRecords {
|
||||
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""];
|
||||
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
|
||||
message MsgReAssociateRecordsResponse {}
|
||||
Reference in New Issue
Block a user