2024-02-02 09:39:10 +00:00
|
|
|
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";
|
|
|
|
|
2024-04-01 09:57:26 +00:00
|
|
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
|
2024-02-15 07:08:32 +00:00
|
|
|
|
2024-02-02 09:39:10 +00:00
|
|
|
// 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";
|
|
|
|
};
|
|
|
|
|
2024-02-08 13:23:20 +00:00
|
|
|
// 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";
|
|
|
|
};
|
2024-02-02 09:39:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateBond defines a SDK message for creating a new bond.
|
|
|
|
message MsgCreateBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string signer = 1;
|
2024-02-02 09:39:10 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2024-02-02 09:39:10 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2024-02-02 09:39:10 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateBondResponse defines the Msg/CreateBond response type.
|
2024-03-07 11:25:15 +00:00
|
|
|
message MsgCreateBondResponse { string id = 1; }
|
2024-02-08 13:23:20 +00:00
|
|
|
|
|
|
|
// MsgRefillBond defines a SDK message for refill the amount for bond.
|
|
|
|
message MsgRefillBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string id = 1;
|
|
|
|
string signer = 2;
|
2024-02-08 13:23:20 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2024-02-08 13:23:20 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2024-02-08 13:23:20 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string id = 1;
|
|
|
|
string signer = 2;
|
2024-02-08 13:23:20 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2024-02-08 13:23:20 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2024-03-07 11:25:15 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2024-02-08 13:23:20 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string id = 1;
|
2024-02-08 13:23:20 +00:00
|
|
|
string signer = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
|
|
|
message MsgCancelBondResponse {}
|