// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: swap.proto

package lib

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// *****************************************************************************************************
// This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf)
//
// Protobuf is a language-neutral, platform-neutral serialization format. It allows users
// to define objects in a way that’s both efficient to store and fast to transmit over the network.
// These definitions are compiled into code that *enables different systems and programming languages
// to communicate in a byte-perfect manner*
//
// To update these structures, make changes to the source .proto files, then recompile
// to regenerate this file.
// These auto-generated files are easily recognized by checking for a `.pb.go` ending
// *****************************************************************************************************
// _
// _
// _
// SWAP PROTOCOL: Facilitates a token swap between Bob (with Token A) and Alice (with Token B).
// The committee oversees the process while controlling Blockchain A and observing Blockchain B.
//
//  1. Bob creates a 'SellOrder' with the amount of "Token A" he wants to sell, the 'exchange rate', and his
//     'Token B address'. Token A is escrowed in a committee-controlled address. Bob can reverse this order by submitting
//     a transaction on Blockchain A.
//
//  2. Alice accepts Bob's offer by sending a transaction on Blockchain B, referencing Bob’s offer hash and providing her
//     'Token A address' in the memo field.
//
//  3. The committee updates the recipient of Bob’s sell order to Alice’s "Token A" address, verifying that Alice has
//     enough "aged Token B" in her Blockchain B address.
//
// 4. Alice sends "Token B" to Bob, with a memo linking to the 'Request to Sell'.
//
// 5. The committee witnesses Alice’s transaction and releases Bob’s "Token A" to Alice.
//
//  6. If Alice does not send "Token B" within N Blockchain B blocks, the committee resets Bob’s 'Request to Sell'
//     recipient.
//
// SellOrder is a structure that holds relevant data to complete a token swap. It's created by a 'request to sell'
// then populated by an 'intent to buy', and finally closed when the committee witnesses the transfer of funds.
type SellOrder struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// id: the unique identifier of the order
	Id []byte `protobuf:"bytes,1,opt,name=Id,proto3" json:"id"` // @gotags: json:"id"
	// committee: the id of the committee that is in-charge of escrow for the swap
	Committee uint64 `protobuf:"varint,2,opt,name=Committee,proto3" json:"committee"` // @gotags: json:"committee"
	// data: a generic data field which can allow a committee to execute specific functionality for the swap
	Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"data"` // @gotags: json:"data"
	// amount_for_sale: amount of CNPY for sale
	AmountForSale uint64 `protobuf:"varint,4,opt,name=AmountForSale,proto3" json:"amountForSale"` // @gotags: json:"amountForSale"
	// requested_amount: amount of 'counter-asset' to receive
	RequestedAmount uint64 `protobuf:"varint,5,opt,name=RequestedAmount,proto3" json:"requestedAmount"` // @gotags: json:"requestedAmount"
	// seller_receive_address: the external chain address to receive the 'counter-asset'
	SellerReceiveAddress []byte `protobuf:"bytes,6,opt,name=SellerReceiveAddress,proto3" json:"sellerReceiveAddress"` // @gotags: json:"sellerReceiveAddress"
	// buyer_send_address: the address the buyer will be transferring the funds from
	BuyerSendAddress []byte `protobuf:"bytes,7,opt,name=BuyerSendAddress,proto3" json:"buyerSendAddress"` // @gotags: json:"buyerSendAddress"
	// buyer_receive_address: the buyer Canopy address to receive the CNPY
	BuyerReceiveAddress []byte `protobuf:"bytes,8,opt,name=BuyerReceiveAddress,proto3" json:"buyerReceiveAddress"` // @gotags: json:"buyerReceiveAddress"
	// buyer_chain_deadline: the external chain height deadline to send the 'tokens' to SellerReceiveAddress
	BuyerChainDeadline uint64 `protobuf:"varint,9,opt,name=BuyerChainDeadline,proto3" json:"buyerChainDeadline"` // @gotags: json:"buyerChainDeadline"
	// sellers_send_address: the signing address of seller who is selling the CNPY
	SellersSendAddress []byte `protobuf:"bytes,10,opt,name=SellersSendAddress,proto3" json:"sellersSendAddress"` // @gotags: json:"sellersSendAddress"
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *SellOrder) Reset() {
	*x = SellOrder{}
	mi := &file_swap_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SellOrder) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SellOrder) ProtoMessage() {}

func (x *SellOrder) ProtoReflect() protoreflect.Message {
	mi := &file_swap_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SellOrder.ProtoReflect.Descriptor instead.
func (*SellOrder) Descriptor() ([]byte, []int) {
	return file_swap_proto_rawDescGZIP(), []int{0}
}

func (x *SellOrder) GetId() []byte {
	if x != nil {
		return x.Id
	}
	return nil
}

func (x *SellOrder) GetCommittee() uint64 {
	if x != nil {
		return x.Committee
	}
	return 0
}

func (x *SellOrder) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *SellOrder) GetAmountForSale() uint64 {
	if x != nil {
		return x.AmountForSale
	}
	return 0
}

func (x *SellOrder) GetRequestedAmount() uint64 {
	if x != nil {
		return x.RequestedAmount
	}
	return 0
}

func (x *SellOrder) GetSellerReceiveAddress() []byte {
	if x != nil {
		return x.SellerReceiveAddress
	}
	return nil
}

func (x *SellOrder) GetBuyerSendAddress() []byte {
	if x != nil {
		return x.BuyerSendAddress
	}
	return nil
}

func (x *SellOrder) GetBuyerReceiveAddress() []byte {
	if x != nil {
		return x.BuyerReceiveAddress
	}
	return nil
}

func (x *SellOrder) GetBuyerChainDeadline() uint64 {
	if x != nil {
		return x.BuyerChainDeadline
	}
	return 0
}

func (x *SellOrder) GetSellersSendAddress() []byte {
	if x != nil {
		return x.SellersSendAddress
	}
	return nil
}

// OrderBooks: is a list of order book objects held in the blockchain state
type OrderBooks struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// OrderBooks: the actual list of order book objects
	OrderBooks    []*OrderBook `protobuf:"bytes,1,rep,name=OrderBooks,proto3" json:"orderBooks"` // @gotags: json:"orderBooks"
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *OrderBooks) Reset() {
	*x = OrderBooks{}
	mi := &file_swap_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *OrderBooks) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*OrderBooks) ProtoMessage() {}

func (x *OrderBooks) ProtoReflect() protoreflect.Message {
	mi := &file_swap_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use OrderBooks.ProtoReflect.Descriptor instead.
func (*OrderBooks) Descriptor() ([]byte, []int) {
	return file_swap_proto_rawDescGZIP(), []int{1}
}

func (x *OrderBooks) GetOrderBooks() []*OrderBook {
	if x != nil {
		return x.OrderBooks
	}
	return nil
}

// OrderBook: a list of sell orders associated with a particular committee held in the blockchain state
type OrderBook struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// chain_id: the unique identifier of the 'counter asset' committee
	ChainId uint64 `protobuf:"varint,1,opt,name=chainId,proto3" json:"chainID"` // @gotags: json:"chainID"
	// orders: the actual list of sell orders
	Orders        []*SellOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *OrderBook) Reset() {
	*x = OrderBook{}
	mi := &file_swap_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *OrderBook) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*OrderBook) ProtoMessage() {}

func (x *OrderBook) ProtoReflect() protoreflect.Message {
	mi := &file_swap_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use OrderBook.ProtoReflect.Descriptor instead.
func (*OrderBook) Descriptor() ([]byte, []int) {
	return file_swap_proto_rawDescGZIP(), []int{2}
}

func (x *OrderBook) GetChainId() uint64 {
	if x != nil {
		return x.ChainId
	}
	return 0
}

func (x *OrderBook) GetOrders() []*SellOrder {
	if x != nil {
		return x.Orders
	}
	return nil
}

var File_swap_proto protoreflect.FileDescriptor

const file_swap_proto_rawDesc = "" +
	"\n" +
	"\n" +
	"swap.proto\x12\x05types\"\x8f\x03\n" +
	"\tSellOrder\x12\x0e\n" +
	"\x02Id\x18\x01 \x01(\fR\x02Id\x12\x1c\n" +
	"\tCommittee\x18\x02 \x01(\x04R\tCommittee\x12\x12\n" +
	"\x04Data\x18\x03 \x01(\fR\x04Data\x12$\n" +
	"\rAmountForSale\x18\x04 \x01(\x04R\rAmountForSale\x12(\n" +
	"\x0fRequestedAmount\x18\x05 \x01(\x04R\x0fRequestedAmount\x122\n" +
	"\x14SellerReceiveAddress\x18\x06 \x01(\fR\x14SellerReceiveAddress\x12*\n" +
	"\x10BuyerSendAddress\x18\a \x01(\fR\x10BuyerSendAddress\x120\n" +
	"\x13BuyerReceiveAddress\x18\b \x01(\fR\x13BuyerReceiveAddress\x12.\n" +
	"\x12BuyerChainDeadline\x18\t \x01(\x04R\x12BuyerChainDeadline\x12.\n" +
	"\x12SellersSendAddress\x18\n" +
	" \x01(\fR\x12SellersSendAddress\">\n" +
	"\n" +
	"OrderBooks\x120\n" +
	"\n" +
	"OrderBooks\x18\x01 \x03(\v2\x10.types.OrderBookR\n" +
	"OrderBooks\"O\n" +
	"\tOrderBook\x12\x18\n" +
	"\achainId\x18\x01 \x01(\x04R\achainId\x12(\n" +
	"\x06orders\x18\x02 \x03(\v2\x10.types.SellOrderR\x06ordersB&Z$github.com/canopy-network/canopy/libb\x06proto3"

var (
	file_swap_proto_rawDescOnce sync.Once
	file_swap_proto_rawDescData []byte
)

func file_swap_proto_rawDescGZIP() []byte {
	file_swap_proto_rawDescOnce.Do(func() {
		file_swap_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_swap_proto_rawDesc), len(file_swap_proto_rawDesc)))
	})
	return file_swap_proto_rawDescData
}

var file_swap_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_swap_proto_goTypes = []any{
	(*SellOrder)(nil),  // 0: types.SellOrder
	(*OrderBooks)(nil), // 1: types.OrderBooks
	(*OrderBook)(nil),  // 2: types.OrderBook
}
var file_swap_proto_depIdxs = []int32{
	2, // 0: types.OrderBooks.OrderBooks:type_name -> types.OrderBook
	0, // 1: types.OrderBook.orders:type_name -> types.SellOrder
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_swap_proto_init() }
func file_swap_proto_init() {
	if File_swap_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_swap_proto_rawDesc), len(file_swap_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_swap_proto_goTypes,
		DependencyIndexes: file_swap_proto_depIdxs,
		MessageInfos:      file_swap_proto_msgTypes,
	}.Build()
	File_swap_proto = out.File
	file_swap_proto_goTypes = nil
	file_swap_proto_depIdxs = nil
}
