2022-04-05 07:09:27 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package vulcanize.bond.v1beta1;
|
|
|
|
|
2022-09-07 06:36:11 +00:00
|
|
|
option go_package = "github.com/cerc-io/laconicd/x/bond/types";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
2023-01-09 06:49:11 +00:00
|
|
|
import "google/api/annotations.proto";
|
2022-04-05 07:09:27 +00:00
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
|
|
|
|
// Msg defines the bond Msg service.
|
|
|
|
service Msg {
|
|
|
|
// CreateBond defines a method for creating a new bond.
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc CreateBond(MsgCreateBond) returns (MsgCreateBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/bond/v1beta1/create_bond";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// RefillBond defines a method for refilling amount for bond.
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc RefillBond(MsgRefillBond) returns (MsgRefillBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/bond/v1beta1/refill_bond";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// WithdrawBond defines a method for withdrawing amount from bond.
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc WithdrawBond(MsgWithdrawBond) returns (MsgWithdrawBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/bond/v1beta1/withdraw_bond";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// CancelBond defines a method for cancelling a bond.
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/bond/v1beta1/cancel_bond";
|
|
|
|
};
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateBond defines a SDK message for creating a new bond.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgCreateBond {
|
|
|
|
string signer = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateBondResponse defines the Msg/CreateBond response type.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgCreateBondResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRefillBond defines a SDK message for refill the amount for bond.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgRefillBond {
|
|
|
|
string id = 1;
|
|
|
|
string signer = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRefillBondResponse defines the Msg/RefillBond response type.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgRefillBondResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// MsgWithdrawBond defines a SDK message for withdrawing amount from bond.
|
|
|
|
message MsgWithdrawBond {
|
2022-10-10 10:38:33 +00:00
|
|
|
string id = 1;
|
|
|
|
string signer = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 3 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgWithdrawBondResponse defines the Msg/WithdrawBond response type.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgWithdrawBondResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// MsgCancelBond defines a SDK message for the cancel the bond.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgCancelBond {
|
|
|
|
string id = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
string signer = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgCancelBondResponse {}
|