0g-chain/proto/zgc/bep3/v1beta1/tx.proto
2024-04-25 15:31:20 +08:00

70 lines
2.4 KiB
Protocol Buffer

syntax = "proto3";
package zgc.bep3.v1beta1;
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/0glabs/0g-chain/x/bep3/types";
// Msg defines the bep3 Msg service.
service Msg {
// CreateAtomicSwap defines a method for creating an atomic swap
rpc CreateAtomicSwap(MsgCreateAtomicSwap) returns (MsgCreateAtomicSwapResponse);
// ClaimAtomicSwap defines a method for claiming an atomic swap
rpc ClaimAtomicSwap(MsgClaimAtomicSwap) returns (MsgClaimAtomicSwapResponse);
// RefundAtomicSwap defines a method for refunding an atomic swap
rpc RefundAtomicSwap(MsgRefundAtomicSwap) returns (MsgRefundAtomicSwapResponse);
}
// MsgCreateAtomicSwap defines the Msg/CreateAtomicSwap request type.
message MsgCreateAtomicSwap {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string to = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string recipient_other_chain = 3;
string sender_other_chain = 4;
string random_number_hash = 5;
int64 timestamp = 6;
repeated cosmos.base.v1beta1.Coin amount = 7 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.nullable) = false
];
uint64 height_span = 8;
}
// MsgCreateAtomicSwapResponse defines the Msg/CreateAtomicSwap response type.
message MsgCreateAtomicSwapResponse {}
// MsgClaimAtomicSwap defines the Msg/ClaimAtomicSwap request type.
message MsgClaimAtomicSwap {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string swap_id = 2 [(gogoproto.customname) = "SwapID"];
string random_number = 3;
}
// MsgClaimAtomicSwapResponse defines the Msg/ClaimAtomicSwap response type.
message MsgClaimAtomicSwapResponse {}
// MsgRefundAtomicSwap defines the Msg/RefundAtomicSwap request type.
message MsgRefundAtomicSwap {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string swap_id = 2 [(gogoproto.customname) = "SwapID"];
}
// MsgRefundAtomicSwapResponse defines the Msg/RefundAtomicSwap response type.
message MsgRefundAtomicSwapResponse {}