forked from cerc-io/registry-sdk
Prathamesh Musale
1147b83f8c
Part of [Service provider auctions](https://www.notion.so/Service-provider-auctions-a7b63697d818479493ec145ea6ea3c1c) Co-authored-by: IshaVenikar <ishavenikar7@gmail.com> Co-authored-by: Isha Venikar <ishavenikar@Ishas-MacBook-Air.local> Reviewed-on: cerc-io/registry-sdk#28 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
118 lines
3.7 KiB
Protocol Buffer
118 lines
3.7 KiB
Protocol Buffer
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";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "cerc/bond/v1/bond.proto";
|
|
|
|
option go_package = "git.vdb.to/cerc-io/laconicd/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";
|
|
};
|
|
|
|
// UpdateParams defines an operation for updating the x/staking module
|
|
// parameters.
|
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
|
}
|
|
|
|
// 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 {}
|
|
|
|
// MsgUpdateParams is the Msg/UpdateParams request type.
|
|
message MsgUpdateParams {
|
|
option (cosmos.msg.v1.signer) = "authority";
|
|
|
|
// authority is the address that controls the module (defaults to x/gov unless
|
|
// overwritten).
|
|
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
|
|
|
// params defines the x/bond parameters to update.
|
|
//
|
|
// NOTE: All parameters must be supplied.
|
|
Params params = 2 [ (gogoproto.nullable) = false ];
|
|
}
|
|
|
|
// MsgUpdateParamsResponse defines the response structure for executing a
|
|
// MsgUpdateParams message.
|
|
message MsgUpdateParamsResponse {};
|