Documentation ¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMMApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMMApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MMApiClient) error
- func RegisterMMApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMMApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MMApiServer) error
- func RegisterMMApiServer(s grpc.ServiceRegistrar, srv MMApiServer)
- func RegisterUserApiServer(s grpc.ServiceRegistrar, srv UserApiServer)
- type ErrCode
- type GetConfigsRequest
- type GetConfigsResponse
- func (*GetConfigsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetConfigsResponse) GetContractAddrs() map[uint64]string
- func (x *GetConfigsResponse) GetTokens() []*common.Token
- func (*GetConfigsResponse) ProtoMessage()
- func (x *GetConfigsResponse) ProtoReflect() protoreflect.Message
- func (x *GetConfigsResponse) Reset()
- func (x *GetConfigsResponse) String() string
- type GetHistoryRequest
- func (*GetHistoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetHistoryRequest) GetNextPageToken() string
- func (x *GetHistoryRequest) GetPageSize() uint64
- func (x *GetHistoryRequest) GetUserAddr() string
- func (*GetHistoryRequest) ProtoMessage()
- func (x *GetHistoryRequest) ProtoReflect() protoreflect.Message
- func (x *GetHistoryRequest) Reset()
- func (x *GetHistoryRequest) String() string
- type GetHistoryResponse
- func (*GetHistoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetHistoryResponse) GetOrders() []*UserOrder
- func (*GetHistoryResponse) ProtoMessage()
- func (x *GetHistoryResponse) ProtoReflect() protoreflect.Message
- func (x *GetHistoryResponse) Reset()
- func (x *GetHistoryResponse) String() string
- type GetMarketMakersRequest
- type GetMarketMakersResponse
- func (*GetMarketMakersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetMarketMakersResponse) GetMarketMakers() []*MarketMaker
- func (*GetMarketMakersResponse) ProtoMessage()
- func (x *GetMarketMakersResponse) ProtoReflect() protoreflect.Message
- func (x *GetMarketMakersResponse) Reset()
- func (x *GetMarketMakersResponse) String() string
- type GetOrdersRequest
- type GetOrdersResponse
- func (*GetOrdersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrdersResponse) GetOrders() []*UserOrder
- func (*GetOrdersResponse) ProtoMessage()
- func (x *GetOrdersResponse) ProtoReflect() protoreflect.Message
- func (x *GetOrdersResponse) Reset()
- func (x *GetOrdersResponse) String() string
- type GetRefundExecMsgCallDataRequest
- func (*GetRefundExecMsgCallDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRefundExecMsgCallDataRequest) GetQuoteHash() string
- func (*GetRefundExecMsgCallDataRequest) ProtoMessage()
- func (x *GetRefundExecMsgCallDataRequest) ProtoReflect() protoreflect.Message
- func (x *GetRefundExecMsgCallDataRequest) Reset()
- func (x *GetRefundExecMsgCallDataRequest) String() string
- type GetRefundExecMsgCallDataResponse
- func (*GetRefundExecMsgCallDataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetRefundExecMsgCallDataResponse) GetExecMsgCallData() []byte
- func (x *GetRefundExecMsgCallDataResponse) GetQuote() *proto.Quote
- func (x *GetRefundExecMsgCallDataResponse) GetSrcNative() bool
- func (*GetRefundExecMsgCallDataResponse) ProtoMessage()
- func (x *GetRefundExecMsgCallDataResponse) ProtoReflect() protoreflect.Message
- func (x *GetRefundExecMsgCallDataResponse) Reset()
- func (x *GetRefundExecMsgCallDataResponse) String() string
- type MMApiClient
- type MMApiServer
- type MarketMaker
- type OrderStatus
- func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderStatus) Enum() *OrderStatus
- func (OrderStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderStatus) Number() protoreflect.EnumNumber
- func (x OrderStatus) String() string
- func (OrderStatus) Type() protoreflect.EnumType
- type OrderUpdates
- func (*OrderUpdates) Descriptor() ([]byte, []int)deprecated
- func (x *OrderUpdates) GetExecTxHash() string
- func (x *OrderUpdates) GetOrderStatus() OrderStatus
- func (x *OrderUpdates) GetQuoteHash() string
- func (*OrderUpdates) ProtoMessage()
- func (x *OrderUpdates) ProtoReflect() protoreflect.Message
- func (x *OrderUpdates) Reset()
- func (x *OrderUpdates) String() string
- type PendingOrder
- func (*PendingOrder) Descriptor() ([]byte, []int)deprecated
- func (x *PendingOrder) GetDstNative() bool
- func (x *PendingOrder) GetExecMsgCallData() []byte
- func (x *PendingOrder) GetQuote() *proto.Quote
- func (x *PendingOrder) GetQuoteSig() string
- func (x *PendingOrder) GetSrcDepositTxHash() string
- func (x *PendingOrder) GetStatus() OrderStatus
- func (*PendingOrder) ProtoMessage()
- func (x *PendingOrder) ProtoReflect() protoreflect.Message
- func (x *PendingOrder) Reset()
- func (x *PendingOrder) String() string
- type PendingOrdersRequest
- type PendingOrdersResponse
- func (*PendingOrdersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PendingOrdersResponse) GetOrders() []*PendingOrder
- func (*PendingOrdersResponse) ProtoMessage()
- func (x *PendingOrdersResponse) ProtoReflect() protoreflect.Message
- func (x *PendingOrdersResponse) Reset()
- func (x *PendingOrdersResponse) String() string
- type PriceRequest
- func (*PriceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PriceRequest) GetDstAmount() string
- func (r *PriceRequest) GetDstAmt() *big.Int
- func (x *PriceRequest) GetDstNative() bool
- func (x *PriceRequest) GetDstToken() *common.Token
- func (x *PriceRequest) GetSrcAmount() string
- func (r *PriceRequest) GetSrcAmt() *big.Int
- func (x *PriceRequest) GetSrcToken() *common.Token
- func (*PriceRequest) ProtoMessage()
- func (x *PriceRequest) ProtoReflect() protoreflect.Message
- func (x *PriceRequest) Reset()
- func (x *PriceRequest) String() string
- type PriceResponse
- func (*PriceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PriceResponse) GetErr() *common.Err
- func (x *PriceResponse) GetFee() string
- func (x *PriceResponse) GetMmId() string
- func (x *PriceResponse) GetPrice() *proto.Price
- func (x *PriceResponse) GetTxMsgFee() string
- func (*PriceResponse) ProtoMessage()
- func (x *PriceResponse) ProtoReflect() protoreflect.Message
- func (x *PriceResponse) Reset()
- func (x *PriceResponse) String() string
- type QuoteRequest
- func (*QuoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QuoteRequest) GetDstDeadline() int64
- func (x *QuoteRequest) GetDstNative() bool
- func (x *QuoteRequest) GetMmId() string
- func (x *QuoteRequest) GetPrice() *proto.Price
- func (x *QuoteRequest) GetReceiver() string
- func (r *QuoteRequest) GetReceiverAddr() eth.Addr
- func (x *QuoteRequest) GetRefundTo() string
- func (r *QuoteRequest) GetRefundToAddr() eth.Addr
- func (x *QuoteRequest) GetSender() string
- func (r *QuoteRequest) GetSenderAddr() eth.Addr
- func (x *QuoteRequest) GetSrcDeadline() int64
- func (x *QuoteRequest) GetSrcNative() bool
- func (*QuoteRequest) ProtoMessage()
- func (x *QuoteRequest) ProtoReflect() protoreflect.Message
- func (x *QuoteRequest) Reset()
- func (x *QuoteRequest) String() string
- type QuoteResponse
- func (*QuoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QuoteResponse) GetDstTokenUsdPrice() float64
- func (x *QuoteResponse) GetErr() *common.Err
- func (x *QuoteResponse) GetQuote() *proto.Quote
- func (x *QuoteResponse) GetSrcTokenUsdPrice() float64
- func (*QuoteResponse) ProtoMessage()
- func (x *QuoteResponse) ProtoReflect() protoreflect.Message
- func (x *QuoteResponse) Reset()
- func (x *QuoteResponse) String() string
- type UnimplementedMMApiServer
- func (UnimplementedMMApiServer) PendingOrders(context.Context, *PendingOrdersRequest) (*PendingOrdersResponse, error)
- func (UnimplementedMMApiServer) UpdateConfigs(context.Context, *UpdateConfigsRequest) (*UpdateConfigsResponse, error)
- func (UnimplementedMMApiServer) UpdateOrders(context.Context, *UpdateOrdersRequest) (*UpdateOrdersResponse, error)
- type UnimplementedUserApiServer
- func (UnimplementedUserApiServer) GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error)
- func (UnimplementedUserApiServer) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
- func (UnimplementedUserApiServer) GetMarketMakers(context.Context, *GetMarketMakersRequest) (*GetMarketMakersResponse, error)
- func (UnimplementedUserApiServer) GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error)
- func (UnimplementedUserApiServer) GetRefundExecMsgCallData(context.Context, *GetRefundExecMsgCallDataRequest) (*GetRefundExecMsgCallDataResponse, error)
- func (UnimplementedUserApiServer) Price(context.Context, *PriceRequest) (*PriceResponse, error)
- func (UnimplementedUserApiServer) Quote(context.Context, *QuoteRequest) (*QuoteResponse, error)
- type UnsafeMMApiServer
- type UnsafeUserApiServer
- type UpdateConfigsRequest
- func (*UpdateConfigsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateConfigsRequest) GetConfig() *proto.Config
- func (*UpdateConfigsRequest) ProtoMessage()
- func (x *UpdateConfigsRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateConfigsRequest) Reset()
- func (x *UpdateConfigsRequest) String() string
- type UpdateConfigsResponse
- type UpdateOrdersRequest
- func (*UpdateOrdersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrdersRequest) GetUpdates() []*OrderUpdates
- func (*UpdateOrdersRequest) ProtoMessage()
- func (x *UpdateOrdersRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateOrdersRequest) Reset()
- func (x *UpdateOrdersRequest) String() string
- type UpdateOrdersResponse
- type UserApiClient
- type UserApiServer
- type UserOrder
- func (*UserOrder) Descriptor() ([]byte, []int)deprecated
- func (x *UserOrder) GetDstNative() bool
- func (x *UserOrder) GetDstRefundInitTxHash() string
- func (x *UserOrder) GetDstTransferTxHash() string
- func (x *UserOrder) GetLastUpdated() int64
- func (x *UserOrder) GetMmAddr() string
- func (x *UserOrder) GetMmId() string
- func (x *UserOrder) GetQuote() *proto.Quote
- func (x *UserOrder) GetSrcDepositTxHash() string
- func (x *UserOrder) GetSrcRefundTxHash() string
- func (x *UserOrder) GetSrcReleaseTxHash() string
- func (x *UserOrder) GetStatus() OrderStatus
- func (*UserOrder) ProtoMessage()
- func (x *UserOrder) ProtoReflect() protoreflect.Message
- func (x *UserOrder) Reset()
- func (x *UserOrder) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ErrCode_name = map[int32]string{ 0: "ERROR_UNDEFINED", 1: "ERROR_COMMON", 2: "ERROR_INVALID_REQUEST", 3: "ERROR_MM_REJECTED_QUOTE", 4: "ERROR_PRICE_DEADLINE", 5: "ERROR_INVALID_SIG", 6: "ERROR_INVALID_DEADLINE", } ErrCode_value = map[string]int32{ "ERROR_UNDEFINED": 0, "ERROR_COMMON": 1, "ERROR_INVALID_REQUEST": 2, "ERROR_MM_REJECTED_QUOTE": 3, "ERROR_PRICE_DEADLINE": 4, "ERROR_INVALID_SIG": 5, "ERROR_INVALID_DEADLINE": 6, } )
Enum value maps for ErrCode.
var ( OrderStatus_name = map[int32]string{ 0: "STATUS_PENDING", 10: "STATUS_SRC_DEPOSITED", 20: "STATUS_MM_REJECTED", 30: "STATUS_MM_DST_EXECUTED", 40: "STATUS_DST_TRANSFERRED", 50: "STATUS_MM_SRC_EXECUTED", 60: "STATUS_REFUND_INITIATED", 70: "STATUS_SRC_RELEASED", 80: "STATUS_REFUNDED", } OrderStatus_value = map[string]int32{ "STATUS_PENDING": 0, "STATUS_SRC_DEPOSITED": 10, "STATUS_MM_REJECTED": 20, "STATUS_MM_DST_EXECUTED": 30, "STATUS_DST_TRANSFERRED": 40, "STATUS_MM_SRC_EXECUTED": 50, "STATUS_REFUND_INITIATED": 60, "STATUS_SRC_RELEASED": 70, "STATUS_REFUNDED": 80, } )
Enum value maps for OrderStatus.
var File_service_rfq_error_proto protoreflect.FileDescriptor
var File_service_rfq_mm_proto protoreflect.FileDescriptor
var File_service_rfq_model_proto protoreflect.FileDescriptor
var File_service_rfq_user_proto protoreflect.FileDescriptor
var MMApi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.rfq.MMApi", HandlerType: (*MMApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PendingOrders", Handler: _MMApi_PendingOrders_Handler, }, { MethodName: "UpdateOrders", Handler: _MMApi_UpdateOrders_Handler, }, { MethodName: "UpdateConfigs", Handler: _MMApi_UpdateConfigs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/rfq/mm.proto", }
MMApi_ServiceDesc is the grpc.ServiceDesc for MMApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserApi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.rfq.UserApi", HandlerType: (*UserApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetConfigs", Handler: _UserApi_GetConfigs_Handler, }, { MethodName: "Price", Handler: _UserApi_Price_Handler, }, { MethodName: "Quote", Handler: _UserApi_Quote_Handler, }, { MethodName: "GetOrders", Handler: _UserApi_GetOrders_Handler, }, { MethodName: "GetHistory", Handler: _UserApi_GetHistory_Handler, }, { MethodName: "GetMarketMakers", Handler: _UserApi_GetMarketMakers_Handler, }, { MethodName: "GetRefundExecMsgCallData", Handler: _UserApi_GetRefundExecMsgCallData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/rfq/user.proto", }
UserApi_ServiceDesc is the grpc.ServiceDesc for UserApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMMApiHandler ¶
RegisterMMApiHandler registers the http handlers for service MMApi to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMMApiHandlerClient ¶
func RegisterMMApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MMApiClient) error
RegisterMMApiHandlerClient registers the http handlers for service MMApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MMApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MMApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MMApiClient" to call the correct interceptors.
func RegisterMMApiHandlerFromEndpoint ¶
func RegisterMMApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMMApiHandlerFromEndpoint is same as RegisterMMApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMMApiHandlerServer ¶
func RegisterMMApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MMApiServer) error
RegisterMMApiHandlerServer registers the http handlers for service MMApi to "mux". UnaryRPC :call MMApiServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMMApiHandlerFromEndpoint instead.
func RegisterMMApiServer ¶
func RegisterMMApiServer(s grpc.ServiceRegistrar, srv MMApiServer)
func RegisterUserApiServer ¶
func RegisterUserApiServer(s grpc.ServiceRegistrar, srv UserApiServer)
Types ¶
type ErrCode ¶
type ErrCode int32
const ( ErrCode_ERROR_UNDEFINED ErrCode = 0 ErrCode_ERROR_COMMON ErrCode = 1 // generic error code for all invalid requests that are not specified below ErrCode_ERROR_INVALID_REQUEST ErrCode = 2 // returned in Quote() if the MM rejects the quote ErrCode_ERROR_MM_REJECTED_QUOTE ErrCode = 3 // returned in Quote() if the price's valid_thru is passed ErrCode_ERROR_PRICE_DEADLINE ErrCode = 4 // returned in Quote() if the price sig is invalid ErrCode_ERROR_INVALID_SIG ErrCode = 5 // returned in Quote() if the src/dst deadline is invalid ErrCode_ERROR_INVALID_DEADLINE ErrCode = 6 )
func (ErrCode) Descriptor ¶
func (ErrCode) Descriptor() protoreflect.EnumDescriptor
func (ErrCode) EnumDescriptor
deprecated
func (ErrCode) Number ¶
func (x ErrCode) Number() protoreflect.EnumNumber
func (ErrCode) Type ¶
func (ErrCode) Type() protoreflect.EnumType
type GetConfigsRequest ¶
type GetConfigsRequest struct {
// contains filtered or unexported fields
}
func (*GetConfigsRequest) Descriptor
deprecated
func (*GetConfigsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetConfigsRequest.ProtoReflect.Descriptor instead.
func (*GetConfigsRequest) ProtoMessage ¶
func (*GetConfigsRequest) ProtoMessage()
func (*GetConfigsRequest) ProtoReflect ¶
func (x *GetConfigsRequest) ProtoReflect() protoreflect.Message
func (*GetConfigsRequest) Reset ¶
func (x *GetConfigsRequest) Reset()
func (*GetConfigsRequest) String ¶
func (x *GetConfigsRequest) String() string
type GetConfigsResponse ¶
type GetConfigsResponse struct { ContractAddrs map[uint64]string `` /* 189-byte string literal not displayed */ Tokens []*common.Token `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"` // contains filtered or unexported fields }
func (*GetConfigsResponse) Descriptor
deprecated
func (*GetConfigsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetConfigsResponse.ProtoReflect.Descriptor instead.
func (*GetConfigsResponse) GetContractAddrs ¶
func (x *GetConfigsResponse) GetContractAddrs() map[uint64]string
func (*GetConfigsResponse) GetTokens ¶
func (x *GetConfigsResponse) GetTokens() []*common.Token
func (*GetConfigsResponse) ProtoMessage ¶
func (*GetConfigsResponse) ProtoMessage()
func (*GetConfigsResponse) ProtoReflect ¶
func (x *GetConfigsResponse) ProtoReflect() protoreflect.Message
func (*GetConfigsResponse) Reset ¶
func (x *GetConfigsResponse) Reset()
func (*GetConfigsResponse) String ¶
func (x *GetConfigsResponse) String() string
type GetHistoryRequest ¶
type GetHistoryRequest struct { // use empty string for first page NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` PageSize uint64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` UserAddr string `protobuf:"bytes,3,opt,name=user_addr,json=userAddr,proto3" json:"user_addr,omitempty"` // contains filtered or unexported fields }
func (*GetHistoryRequest) Descriptor
deprecated
func (*GetHistoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetHistoryRequest.ProtoReflect.Descriptor instead.
func (*GetHistoryRequest) GetNextPageToken ¶
func (x *GetHistoryRequest) GetNextPageToken() string
func (*GetHistoryRequest) GetPageSize ¶
func (x *GetHistoryRequest) GetPageSize() uint64
func (*GetHistoryRequest) GetUserAddr ¶
func (x *GetHistoryRequest) GetUserAddr() string
func (*GetHistoryRequest) ProtoMessage ¶
func (*GetHistoryRequest) ProtoMessage()
func (*GetHistoryRequest) ProtoReflect ¶
func (x *GetHistoryRequest) ProtoReflect() protoreflect.Message
func (*GetHistoryRequest) Reset ¶
func (x *GetHistoryRequest) Reset()
func (*GetHistoryRequest) String ¶
func (x *GetHistoryRequest) String() string
type GetHistoryResponse ¶
type GetHistoryResponse struct { Orders []*UserOrder `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*GetHistoryResponse) Descriptor
deprecated
func (*GetHistoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetHistoryResponse.ProtoReflect.Descriptor instead.
func (*GetHistoryResponse) GetOrders ¶
func (x *GetHistoryResponse) GetOrders() []*UserOrder
func (*GetHistoryResponse) ProtoMessage ¶
func (*GetHistoryResponse) ProtoMessage()
func (*GetHistoryResponse) ProtoReflect ¶
func (x *GetHistoryResponse) ProtoReflect() protoreflect.Message
func (*GetHistoryResponse) Reset ¶
func (x *GetHistoryResponse) Reset()
func (*GetHistoryResponse) String ¶
func (x *GetHistoryResponse) String() string
type GetMarketMakersRequest ¶
type GetMarketMakersRequest struct {
// contains filtered or unexported fields
}
func (*GetMarketMakersRequest) Descriptor
deprecated
func (*GetMarketMakersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMarketMakersRequest.ProtoReflect.Descriptor instead.
func (*GetMarketMakersRequest) ProtoMessage ¶
func (*GetMarketMakersRequest) ProtoMessage()
func (*GetMarketMakersRequest) ProtoReflect ¶
func (x *GetMarketMakersRequest) ProtoReflect() protoreflect.Message
func (*GetMarketMakersRequest) Reset ¶
func (x *GetMarketMakersRequest) Reset()
func (*GetMarketMakersRequest) String ¶
func (x *GetMarketMakersRequest) String() string
type GetMarketMakersResponse ¶
type GetMarketMakersResponse struct { MarketMakers []*MarketMaker `protobuf:"bytes,1,rep,name=market_makers,json=marketMakers,proto3" json:"market_makers,omitempty"` // contains filtered or unexported fields }
func (*GetMarketMakersResponse) Descriptor
deprecated
func (*GetMarketMakersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetMarketMakersResponse.ProtoReflect.Descriptor instead.
func (*GetMarketMakersResponse) GetMarketMakers ¶
func (x *GetMarketMakersResponse) GetMarketMakers() []*MarketMaker
func (*GetMarketMakersResponse) ProtoMessage ¶
func (*GetMarketMakersResponse) ProtoMessage()
func (*GetMarketMakersResponse) ProtoReflect ¶
func (x *GetMarketMakersResponse) ProtoReflect() protoreflect.Message
func (*GetMarketMakersResponse) Reset ¶
func (x *GetMarketMakersResponse) Reset()
func (*GetMarketMakersResponse) String ¶
func (x *GetMarketMakersResponse) String() string
type GetOrdersRequest ¶
type GetOrdersRequest struct { QuoteHashes []string `protobuf:"bytes,1,rep,name=quote_hashes,json=quoteHashes,proto3" json:"quote_hashes,omitempty"` // contains filtered or unexported fields }
func (*GetOrdersRequest) Descriptor
deprecated
func (*GetOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrdersRequest.ProtoReflect.Descriptor instead.
func (*GetOrdersRequest) GetQuoteHashes ¶
func (x *GetOrdersRequest) GetQuoteHashes() []string
func (*GetOrdersRequest) ProtoMessage ¶
func (*GetOrdersRequest) ProtoMessage()
func (*GetOrdersRequest) ProtoReflect ¶
func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message
func (*GetOrdersRequest) Reset ¶
func (x *GetOrdersRequest) Reset()
func (*GetOrdersRequest) String ¶
func (x *GetOrdersRequest) String() string
type GetOrdersResponse ¶
type GetOrdersResponse struct { Orders []*UserOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*GetOrdersResponse) Descriptor
deprecated
func (*GetOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrdersResponse.ProtoReflect.Descriptor instead.
func (*GetOrdersResponse) GetOrders ¶
func (x *GetOrdersResponse) GetOrders() []*UserOrder
func (*GetOrdersResponse) ProtoMessage ¶
func (*GetOrdersResponse) ProtoMessage()
func (*GetOrdersResponse) ProtoReflect ¶
func (x *GetOrdersResponse) ProtoReflect() protoreflect.Message
func (*GetOrdersResponse) Reset ¶
func (x *GetOrdersResponse) Reset()
func (*GetOrdersResponse) String ¶
func (x *GetOrdersResponse) String() string
type GetRefundExecMsgCallDataRequest ¶
type GetRefundExecMsgCallDataRequest struct { QuoteHash string `protobuf:"bytes,1,opt,name=quote_hash,json=quoteHash,proto3" json:"quote_hash,omitempty"` // contains filtered or unexported fields }
func (*GetRefundExecMsgCallDataRequest) Descriptor
deprecated
func (*GetRefundExecMsgCallDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRefundExecMsgCallDataRequest.ProtoReflect.Descriptor instead.
func (*GetRefundExecMsgCallDataRequest) GetQuoteHash ¶
func (x *GetRefundExecMsgCallDataRequest) GetQuoteHash() string
func (*GetRefundExecMsgCallDataRequest) ProtoMessage ¶
func (*GetRefundExecMsgCallDataRequest) ProtoMessage()
func (*GetRefundExecMsgCallDataRequest) ProtoReflect ¶
func (x *GetRefundExecMsgCallDataRequest) ProtoReflect() protoreflect.Message
func (*GetRefundExecMsgCallDataRequest) Reset ¶
func (x *GetRefundExecMsgCallDataRequest) Reset()
func (*GetRefundExecMsgCallDataRequest) String ¶
func (x *GetRefundExecMsgCallDataRequest) String() string
type GetRefundExecMsgCallDataResponse ¶
type GetRefundExecMsgCallDataResponse struct { ExecMsgCallData []byte `protobuf:"bytes,1,opt,name=exec_msg_call_data,json=execMsgCallData,proto3" json:"exec_msg_call_data,omitempty"` Quote *proto.Quote `protobuf:"bytes,2,opt,name=quote,proto3" json:"quote,omitempty"` // indicates whether the user deposits native token or not SrcNative bool `protobuf:"varint,3,opt,name=src_native,json=srcNative,proto3" json:"src_native,omitempty"` // contains filtered or unexported fields }
func (*GetRefundExecMsgCallDataResponse) Descriptor
deprecated
func (*GetRefundExecMsgCallDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetRefundExecMsgCallDataResponse.ProtoReflect.Descriptor instead.
func (*GetRefundExecMsgCallDataResponse) GetExecMsgCallData ¶
func (x *GetRefundExecMsgCallDataResponse) GetExecMsgCallData() []byte
func (*GetRefundExecMsgCallDataResponse) GetQuote ¶
func (x *GetRefundExecMsgCallDataResponse) GetQuote() *proto.Quote
func (*GetRefundExecMsgCallDataResponse) GetSrcNative ¶
func (x *GetRefundExecMsgCallDataResponse) GetSrcNative() bool
func (*GetRefundExecMsgCallDataResponse) ProtoMessage ¶
func (*GetRefundExecMsgCallDataResponse) ProtoMessage()
func (*GetRefundExecMsgCallDataResponse) ProtoReflect ¶
func (x *GetRefundExecMsgCallDataResponse) ProtoReflect() protoreflect.Message
func (*GetRefundExecMsgCallDataResponse) Reset ¶
func (x *GetRefundExecMsgCallDataResponse) Reset()
func (*GetRefundExecMsgCallDataResponse) String ¶
func (x *GetRefundExecMsgCallDataResponse) String() string
type MMApiClient ¶
type MMApiClient interface { // APIs for market makers. All rpc methods require API key authentication. PendingOrders(ctx context.Context, in *PendingOrdersRequest, opts ...grpc.CallOption) (*PendingOrdersResponse, error) UpdateOrders(ctx context.Context, in *UpdateOrdersRequest, opts ...grpc.CallOption) (*UpdateOrdersResponse, error) UpdateConfigs(ctx context.Context, in *UpdateConfigsRequest, opts ...grpc.CallOption) (*UpdateConfigsResponse, error) }
MMApiClient is the client API for MMApi service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMMApiClient ¶
func NewMMApiClient(cc grpc.ClientConnInterface) MMApiClient
type MMApiServer ¶
type MMApiServer interface { // APIs for market makers. All rpc methods require API key authentication. PendingOrders(context.Context, *PendingOrdersRequest) (*PendingOrdersResponse, error) UpdateOrders(context.Context, *UpdateOrdersRequest) (*UpdateOrdersResponse, error) UpdateConfigs(context.Context, *UpdateConfigsRequest) (*UpdateConfigsResponse, error) }
MMApiServer is the server API for MMApi service. All implementations should embed UnimplementedMMApiServer for forward compatibility
type MarketMaker ¶
type MarketMaker struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*MarketMaker) Descriptor
deprecated
func (*MarketMaker) Descriptor() ([]byte, []int)
Deprecated: Use MarketMaker.ProtoReflect.Descriptor instead.
func (*MarketMaker) GetId ¶
func (x *MarketMaker) GetId() string
func (*MarketMaker) GetName ¶
func (x *MarketMaker) GetName() string
func (*MarketMaker) ProtoMessage ¶
func (*MarketMaker) ProtoMessage()
func (*MarketMaker) ProtoReflect ¶
func (x *MarketMaker) ProtoReflect() protoreflect.Message
func (*MarketMaker) Reset ¶
func (x *MarketMaker) Reset()
func (*MarketMaker) String ¶
func (x *MarketMaker) String() string
type OrderStatus ¶
type OrderStatus int32
const ( // an order first enters the pending status when an MM returns a firm quote upon a user's quote request. OrderStatus_STATUS_PENDING OrderStatus = 0 // reached after the user's call to the RFQ contract to deposit funds OrderStatus_STATUS_SRC_DEPOSITED OrderStatus = 10 // reached only if an MM actively calls back to the RFQ server to mark the order as rejected. once marked as rejected, // the same order will not appear in the PendingOrders() anymore. // note that MMs can choose to not implement this active call and hence this status will never be reached. OrderStatus_STATUS_MM_REJECTED OrderStatus = 20 // reached only if an MM actively calls back to the RFQ server to mark the order as dst executed // when they finish submitting the tx on the dst chain to transfer fund to user. // note that MMs can choose to not implement this active call and hence this status will never be reached. OrderStatus_STATUS_MM_DST_EXECUTED OrderStatus = 30 // this status marks the observation of the on-chain event DstTransferred // this also means that msg2 is on its way but not yet arrived on the src chain // note that to the user, when an order reaches this status, it can be considered completed OrderStatus_STATUS_DST_TRANSFERRED OrderStatus = 40 // reached only if an MM actively calls back to the RFQ server to mark the order as src executed // when they finish submitting the tx on the src chain to release fund to MM. // note that MMs can choose to not implement this active call and hence this status will never be reached. OrderStatus_STATUS_MM_SRC_EXECUTED OrderStatus = 50 // this status marks the observation of the on-chain event RefundInitiated upon msg1 execution OrderStatus_STATUS_REFUND_INITIATED OrderStatus = 60 // this status marks the observation of the on-chain event SrcReleased upon msg2 execution OrderStatus_STATUS_SRC_RELEASED OrderStatus = 70 // this status marks the observation of the on-chain event Refunded upon msg3 execution OrderStatus_STATUS_REFUNDED OrderStatus = 80 )
func (OrderStatus) Descriptor ¶
func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderStatus) Enum ¶
func (x OrderStatus) Enum() *OrderStatus
func (OrderStatus) EnumDescriptor
deprecated
func (OrderStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderStatus.Descriptor instead.
func (OrderStatus) Number ¶
func (x OrderStatus) Number() protoreflect.EnumNumber
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (OrderStatus) Type ¶
func (OrderStatus) Type() protoreflect.EnumType
type OrderUpdates ¶
type OrderUpdates struct { QuoteHash string `protobuf:"bytes,1,opt,name=quote_hash,json=quoteHash,proto3" json:"quote_hash,omitempty"` OrderStatus OrderStatus `protobuf:"varint,2,opt,name=order_status,json=orderStatus,proto3,enum=service.rfq.OrderStatus" json:"order_status,omitempty"` ExecTxHash string `protobuf:"bytes,3,opt,name=exec_tx_hash,json=execTxHash,proto3" json:"exec_tx_hash,omitempty"` // contains filtered or unexported fields }
func (*OrderUpdates) Descriptor
deprecated
func (*OrderUpdates) Descriptor() ([]byte, []int)
Deprecated: Use OrderUpdates.ProtoReflect.Descriptor instead.
func (*OrderUpdates) GetExecTxHash ¶
func (x *OrderUpdates) GetExecTxHash() string
func (*OrderUpdates) GetOrderStatus ¶
func (x *OrderUpdates) GetOrderStatus() OrderStatus
func (*OrderUpdates) GetQuoteHash ¶
func (x *OrderUpdates) GetQuoteHash() string
func (*OrderUpdates) ProtoMessage ¶
func (*OrderUpdates) ProtoMessage()
func (*OrderUpdates) ProtoReflect ¶
func (x *OrderUpdates) ProtoReflect() protoreflect.Message
func (*OrderUpdates) Reset ¶
func (x *OrderUpdates) Reset()
func (*OrderUpdates) String ¶
func (x *OrderUpdates) String() string
type PendingOrder ¶
type PendingOrder struct { Quote *proto.Quote `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote,omitempty"` SrcDepositTxHash string `protobuf:"bytes,2,opt,name=src_deposit_tx_hash,json=srcDepositTxHash,proto3" json:"src_deposit_tx_hash,omitempty"` // indicates whether the user wants native token on the dst chain (only applicable if the dst token is a native wrap) DstNative bool `protobuf:"varint,3,opt,name=dst_native,json=dstNative,proto3" json:"dst_native,omitempty"` // unix epoch seconds ExecMsgCallData []byte `protobuf:"bytes,4,opt,name=exec_msg_call_data,json=execMsgCallData,proto3" json:"exec_msg_call_data,omitempty"` QuoteSig string `protobuf:"bytes,5,opt,name=quote_sig,json=quoteSig,proto3" json:"quote_sig,omitempty"` Status OrderStatus `protobuf:"varint,6,opt,name=status,proto3,enum=service.rfq.OrderStatus" json:"status,omitempty"` // contains filtered or unexported fields }
for MM use
func (*PendingOrder) Descriptor
deprecated
func (*PendingOrder) Descriptor() ([]byte, []int)
Deprecated: Use PendingOrder.ProtoReflect.Descriptor instead.
func (*PendingOrder) GetDstNative ¶
func (x *PendingOrder) GetDstNative() bool
func (*PendingOrder) GetExecMsgCallData ¶
func (x *PendingOrder) GetExecMsgCallData() []byte
func (*PendingOrder) GetQuote ¶
func (x *PendingOrder) GetQuote() *proto.Quote
func (*PendingOrder) GetQuoteSig ¶
func (x *PendingOrder) GetQuoteSig() string
func (*PendingOrder) GetSrcDepositTxHash ¶
func (x *PendingOrder) GetSrcDepositTxHash() string
func (*PendingOrder) GetStatus ¶
func (x *PendingOrder) GetStatus() OrderStatus
func (*PendingOrder) ProtoMessage ¶
func (*PendingOrder) ProtoMessage()
func (*PendingOrder) ProtoReflect ¶
func (x *PendingOrder) ProtoReflect() protoreflect.Message
func (*PendingOrder) Reset ¶
func (x *PendingOrder) Reset()
func (*PendingOrder) String ¶
func (x *PendingOrder) String() string
type PendingOrdersRequest ¶
type PendingOrdersRequest struct {
// contains filtered or unexported fields
}
func (*PendingOrdersRequest) Descriptor
deprecated
func (*PendingOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use PendingOrdersRequest.ProtoReflect.Descriptor instead.
func (*PendingOrdersRequest) ProtoMessage ¶
func (*PendingOrdersRequest) ProtoMessage()
func (*PendingOrdersRequest) ProtoReflect ¶
func (x *PendingOrdersRequest) ProtoReflect() protoreflect.Message
func (*PendingOrdersRequest) Reset ¶
func (x *PendingOrdersRequest) Reset()
func (*PendingOrdersRequest) String ¶
func (x *PendingOrdersRequest) String() string
type PendingOrdersResponse ¶
type PendingOrdersResponse struct { Orders []*PendingOrder `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*PendingOrdersResponse) Descriptor
deprecated
func (*PendingOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use PendingOrdersResponse.ProtoReflect.Descriptor instead.
func (*PendingOrdersResponse) GetOrders ¶
func (x *PendingOrdersResponse) GetOrders() []*PendingOrder
func (*PendingOrdersResponse) ProtoMessage ¶
func (*PendingOrdersResponse) ProtoMessage()
func (*PendingOrdersResponse) ProtoReflect ¶
func (x *PendingOrdersResponse) ProtoReflect() protoreflect.Message
func (*PendingOrdersResponse) Reset ¶
func (x *PendingOrdersResponse) Reset()
func (*PendingOrdersResponse) String ¶
func (x *PendingOrdersResponse) String() string
type PriceRequest ¶
type PriceRequest struct { SrcToken *common.Token `protobuf:"bytes,1,opt,name=src_token,json=srcToken,proto3" json:"src_token,omitempty"` DstToken *common.Token `protobuf:"bytes,2,opt,name=dst_token,json=dstToken,proto3" json:"dst_token,omitempty"` SrcAmount string `protobuf:"bytes,3,opt,name=src_amount,json=srcAmount,proto3" json:"src_amount,omitempty"` DstAmount string `protobuf:"bytes,4,opt,name=dst_amount,json=dstAmount,proto3" json:"dst_amount,omitempty"` // indicates whether the user wants native token on the dst chain (only applicable if the dst token is a native wrap) DstNative bool `protobuf:"varint,5,opt,name=dst_native,json=dstNative,proto3" json:"dst_native,omitempty"` // contains filtered or unexported fields }
func (*PriceRequest) Descriptor
deprecated
func (*PriceRequest) Descriptor() ([]byte, []int)
Deprecated: Use PriceRequest.ProtoReflect.Descriptor instead.
func (*PriceRequest) GetDstAmount ¶
func (x *PriceRequest) GetDstAmount() string
func (*PriceRequest) GetDstAmt ¶
func (r *PriceRequest) GetDstAmt() *big.Int
func (*PriceRequest) GetDstNative ¶
func (x *PriceRequest) GetDstNative() bool
func (*PriceRequest) GetDstToken ¶
func (x *PriceRequest) GetDstToken() *common.Token
func (*PriceRequest) GetSrcAmount ¶
func (x *PriceRequest) GetSrcAmount() string
func (*PriceRequest) GetSrcAmt ¶
func (r *PriceRequest) GetSrcAmt() *big.Int
func (*PriceRequest) GetSrcToken ¶
func (x *PriceRequest) GetSrcToken() *common.Token
func (*PriceRequest) ProtoMessage ¶
func (*PriceRequest) ProtoMessage()
func (*PriceRequest) ProtoReflect ¶
func (x *PriceRequest) ProtoReflect() protoreflect.Message
func (*PriceRequest) Reset ¶
func (x *PriceRequest) Reset()
func (*PriceRequest) String ¶
func (x *PriceRequest) String() string
type PriceResponse ¶
type PriceResponse struct { Err *common.Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Price *proto.Price `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"` // protocol fee + mm charged fee Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` MmId string `protobuf:"bytes,4,opt,name=mm_id,json=mmId,proto3" json:"mm_id,omitempty"` TxMsgFee string `protobuf:"bytes,5,opt,name=tx_msg_fee,json=txMsgFee,proto3" json:"tx_msg_fee,omitempty"` // to pay for msg fee // contains filtered or unexported fields }
func (*PriceResponse) Descriptor
deprecated
func (*PriceResponse) Descriptor() ([]byte, []int)
Deprecated: Use PriceResponse.ProtoReflect.Descriptor instead.
func (*PriceResponse) GetErr ¶
func (x *PriceResponse) GetErr() *common.Err
func (*PriceResponse) GetFee ¶
func (x *PriceResponse) GetFee() string
func (*PriceResponse) GetMmId ¶
func (x *PriceResponse) GetMmId() string
func (*PriceResponse) GetPrice ¶
func (x *PriceResponse) GetPrice() *proto.Price
func (*PriceResponse) GetTxMsgFee ¶
func (x *PriceResponse) GetTxMsgFee() string
func (*PriceResponse) ProtoMessage ¶
func (*PriceResponse) ProtoMessage()
func (*PriceResponse) ProtoReflect ¶
func (x *PriceResponse) ProtoReflect() protoreflect.Message
func (*PriceResponse) Reset ¶
func (x *PriceResponse) Reset()
func (*PriceResponse) String ¶
func (x *PriceResponse) String() string
type QuoteRequest ¶
type QuoteRequest struct { Price *proto.Price `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"` MmId string `protobuf:"bytes,2,opt,name=mm_id,json=mmId,proto3" json:"mm_id,omitempty"` Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` RefundTo string `protobuf:"bytes,5,opt,name=refund_to,json=refundTo,proto3" json:"refund_to,omitempty"` // unix epoch seconds // deadlines are defined by the user. if no deadline is specified when quoting, // default values will be supplied by the server. SrcDeadline int64 `protobuf:"varint,6,opt,name=src_deadline,json=srcDeadline,proto3" json:"src_deadline,omitempty"` DstDeadline int64 `protobuf:"varint,7,opt,name=dst_deadline,json=dstDeadline,proto3" json:"dst_deadline,omitempty"` // indicates whether the user wants to receive native token on the dst chain // (only applicable if the dst_token in price is a native wrap) DstNative bool `protobuf:"varint,8,opt,name=dst_native,json=dstNative,proto3" json:"dst_native,omitempty"` // indicates whether the user deposits native token or not SrcNative bool `protobuf:"varint,9,opt,name=src_native,json=srcNative,proto3" json:"src_native,omitempty"` // contains filtered or unexported fields }
func (*QuoteRequest) Descriptor
deprecated
func (*QuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use QuoteRequest.ProtoReflect.Descriptor instead.
func (*QuoteRequest) GetDstDeadline ¶
func (x *QuoteRequest) GetDstDeadline() int64
func (*QuoteRequest) GetDstNative ¶
func (x *QuoteRequest) GetDstNative() bool
func (*QuoteRequest) GetMmId ¶
func (x *QuoteRequest) GetMmId() string
func (*QuoteRequest) GetPrice ¶
func (x *QuoteRequest) GetPrice() *proto.Price
func (*QuoteRequest) GetReceiver ¶
func (x *QuoteRequest) GetReceiver() string
func (*QuoteRequest) GetReceiverAddr ¶
func (r *QuoteRequest) GetReceiverAddr() eth.Addr
func (*QuoteRequest) GetRefundTo ¶
func (x *QuoteRequest) GetRefundTo() string
func (*QuoteRequest) GetRefundToAddr ¶
func (r *QuoteRequest) GetRefundToAddr() eth.Addr
func (*QuoteRequest) GetSender ¶
func (x *QuoteRequest) GetSender() string
func (*QuoteRequest) GetSenderAddr ¶
func (r *QuoteRequest) GetSenderAddr() eth.Addr
func (*QuoteRequest) GetSrcDeadline ¶
func (x *QuoteRequest) GetSrcDeadline() int64
func (*QuoteRequest) GetSrcNative ¶
func (x *QuoteRequest) GetSrcNative() bool
func (*QuoteRequest) ProtoMessage ¶
func (*QuoteRequest) ProtoMessage()
func (*QuoteRequest) ProtoReflect ¶
func (x *QuoteRequest) ProtoReflect() protoreflect.Message
func (*QuoteRequest) Reset ¶
func (x *QuoteRequest) Reset()
func (*QuoteRequest) String ¶
func (x *QuoteRequest) String() string
type QuoteResponse ¶
type QuoteResponse struct { Err *common.Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` SrcTokenUsdPrice float64 `protobuf:"fixed64,2,opt,name=src_token_usd_price,json=srcTokenUsdPrice,proto3" json:"src_token_usd_price,omitempty"` DstTokenUsdPrice float64 `protobuf:"fixed64,3,opt,name=dst_token_usd_price,json=dstTokenUsdPrice,proto3" json:"dst_token_usd_price,omitempty"` Quote *proto.Quote `protobuf:"bytes,4,opt,name=quote,proto3" json:"quote,omitempty"` // contains filtered or unexported fields }
func (*QuoteResponse) Descriptor
deprecated
func (*QuoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use QuoteResponse.ProtoReflect.Descriptor instead.
func (*QuoteResponse) GetDstTokenUsdPrice ¶
func (x *QuoteResponse) GetDstTokenUsdPrice() float64
func (*QuoteResponse) GetErr ¶
func (x *QuoteResponse) GetErr() *common.Err
func (*QuoteResponse) GetQuote ¶
func (x *QuoteResponse) GetQuote() *proto.Quote
func (*QuoteResponse) GetSrcTokenUsdPrice ¶
func (x *QuoteResponse) GetSrcTokenUsdPrice() float64
func (*QuoteResponse) ProtoMessage ¶
func (*QuoteResponse) ProtoMessage()
func (*QuoteResponse) ProtoReflect ¶
func (x *QuoteResponse) ProtoReflect() protoreflect.Message
func (*QuoteResponse) Reset ¶
func (x *QuoteResponse) Reset()
func (*QuoteResponse) String ¶
func (x *QuoteResponse) String() string
type UnimplementedMMApiServer ¶
type UnimplementedMMApiServer struct { }
UnimplementedMMApiServer should be embedded to have forward compatible implementations.
func (UnimplementedMMApiServer) PendingOrders ¶
func (UnimplementedMMApiServer) PendingOrders(context.Context, *PendingOrdersRequest) (*PendingOrdersResponse, error)
func (UnimplementedMMApiServer) UpdateConfigs ¶
func (UnimplementedMMApiServer) UpdateConfigs(context.Context, *UpdateConfigsRequest) (*UpdateConfigsResponse, error)
func (UnimplementedMMApiServer) UpdateOrders ¶
func (UnimplementedMMApiServer) UpdateOrders(context.Context, *UpdateOrdersRequest) (*UpdateOrdersResponse, error)
type UnimplementedUserApiServer ¶
type UnimplementedUserApiServer struct { }
UnimplementedUserApiServer should be embedded to have forward compatible implementations.
func (UnimplementedUserApiServer) GetConfigs ¶
func (UnimplementedUserApiServer) GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error)
func (UnimplementedUserApiServer) GetHistory ¶
func (UnimplementedUserApiServer) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
func (UnimplementedUserApiServer) GetMarketMakers ¶
func (UnimplementedUserApiServer) GetMarketMakers(context.Context, *GetMarketMakersRequest) (*GetMarketMakersResponse, error)
func (UnimplementedUserApiServer) GetOrders ¶
func (UnimplementedUserApiServer) GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error)
func (UnimplementedUserApiServer) GetRefundExecMsgCallData ¶
func (UnimplementedUserApiServer) GetRefundExecMsgCallData(context.Context, *GetRefundExecMsgCallDataRequest) (*GetRefundExecMsgCallDataResponse, error)
func (UnimplementedUserApiServer) Price ¶
func (UnimplementedUserApiServer) Price(context.Context, *PriceRequest) (*PriceResponse, error)
func (UnimplementedUserApiServer) Quote ¶
func (UnimplementedUserApiServer) Quote(context.Context, *QuoteRequest) (*QuoteResponse, error)
type UnsafeMMApiServer ¶
type UnsafeMMApiServer interface {
// contains filtered or unexported methods
}
UnsafeMMApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MMApiServer will result in compilation errors.
type UnsafeUserApiServer ¶
type UnsafeUserApiServer interface {
// contains filtered or unexported methods
}
UnsafeUserApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserApiServer will result in compilation errors.
type UpdateConfigsRequest ¶
type UpdateConfigsRequest struct { Config *proto.Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
func (*UpdateConfigsRequest) Descriptor
deprecated
func (*UpdateConfigsRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateConfigsRequest.ProtoReflect.Descriptor instead.
func (*UpdateConfigsRequest) GetConfig ¶
func (x *UpdateConfigsRequest) GetConfig() *proto.Config
func (*UpdateConfigsRequest) ProtoMessage ¶
func (*UpdateConfigsRequest) ProtoMessage()
func (*UpdateConfigsRequest) ProtoReflect ¶
func (x *UpdateConfigsRequest) ProtoReflect() protoreflect.Message
func (*UpdateConfigsRequest) Reset ¶
func (x *UpdateConfigsRequest) Reset()
func (*UpdateConfigsRequest) String ¶
func (x *UpdateConfigsRequest) String() string
type UpdateConfigsResponse ¶
type UpdateConfigsResponse struct {
// contains filtered or unexported fields
}
func (*UpdateConfigsResponse) Descriptor
deprecated
func (*UpdateConfigsResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateConfigsResponse.ProtoReflect.Descriptor instead.
func (*UpdateConfigsResponse) ProtoMessage ¶
func (*UpdateConfigsResponse) ProtoMessage()
func (*UpdateConfigsResponse) ProtoReflect ¶
func (x *UpdateConfigsResponse) ProtoReflect() protoreflect.Message
func (*UpdateConfigsResponse) Reset ¶
func (x *UpdateConfigsResponse) Reset()
func (*UpdateConfigsResponse) String ¶
func (x *UpdateConfigsResponse) String() string
type UpdateOrdersRequest ¶
type UpdateOrdersRequest struct { Updates []*OrderUpdates `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrdersRequest) Descriptor
deprecated
func (*UpdateOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrdersRequest.ProtoReflect.Descriptor instead.
func (*UpdateOrdersRequest) GetUpdates ¶
func (x *UpdateOrdersRequest) GetUpdates() []*OrderUpdates
func (*UpdateOrdersRequest) ProtoMessage ¶
func (*UpdateOrdersRequest) ProtoMessage()
func (*UpdateOrdersRequest) ProtoReflect ¶
func (x *UpdateOrdersRequest) ProtoReflect() protoreflect.Message
func (*UpdateOrdersRequest) Reset ¶
func (x *UpdateOrdersRequest) Reset()
func (*UpdateOrdersRequest) String ¶
func (x *UpdateOrdersRequest) String() string
type UpdateOrdersResponse ¶
type UpdateOrdersResponse struct {
// contains filtered or unexported fields
}
func (*UpdateOrdersResponse) Descriptor
deprecated
func (*UpdateOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrdersResponse.ProtoReflect.Descriptor instead.
func (*UpdateOrdersResponse) ProtoMessage ¶
func (*UpdateOrdersResponse) ProtoMessage()
func (*UpdateOrdersResponse) ProtoReflect ¶
func (x *UpdateOrdersResponse) ProtoReflect() protoreflect.Message
func (*UpdateOrdersResponse) Reset ¶
func (x *UpdateOrdersResponse) Reset()
func (*UpdateOrdersResponse) String ¶
func (x *UpdateOrdersResponse) String() string
type UserApiClient ¶
type UserApiClient interface { GetConfigs(ctx context.Context, in *GetConfigsRequest, opts ...grpc.CallOption) (*GetConfigsResponse, error) // gets prices from all market makers and returns the one with the highest amount out Price(ctx context.Context, in *PriceRequest, opts ...grpc.CallOption) (*PriceResponse, error) // performs a "firm quote" at the MM using a price that is previously signed by the MM // this API causes market maker to freeze up their fund therefore should only be used when necessary // returns ERROR_PRICE_DEADLINE if the valid_thru in Price has passed Quote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersResponse, error) GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error) GetMarketMakers(ctx context.Context, in *GetMarketMakersRequest, opts ...grpc.CallOption) (*GetMarketMakersResponse, error) GetRefundExecMsgCallData(ctx context.Context, in *GetRefundExecMsgCallDataRequest, opts ...grpc.CallOption) (*GetRefundExecMsgCallDataResponse, error) }
UserApiClient is the client API for UserApi service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserApiClient ¶
func NewUserApiClient(cc grpc.ClientConnInterface) UserApiClient
type UserApiServer ¶
type UserApiServer interface { GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error) // gets prices from all market makers and returns the one with the highest amount out Price(context.Context, *PriceRequest) (*PriceResponse, error) // performs a "firm quote" at the MM using a price that is previously signed by the MM // this API causes market maker to freeze up their fund therefore should only be used when necessary // returns ERROR_PRICE_DEADLINE if the valid_thru in Price has passed Quote(context.Context, *QuoteRequest) (*QuoteResponse, error) GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersResponse, error) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) GetMarketMakers(context.Context, *GetMarketMakersRequest) (*GetMarketMakersResponse, error) GetRefundExecMsgCallData(context.Context, *GetRefundExecMsgCallDataRequest) (*GetRefundExecMsgCallDataResponse, error) }
UserApiServer is the server API for UserApi service. All implementations should embed UnimplementedUserApiServer for forward compatibility
type UserOrder ¶
type UserOrder struct { Quote *proto.Quote `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote,omitempty"` // indicates whether the user wants native token on the dst chain (only applicable if the dst token is a native wrap) DstNative bool `protobuf:"varint,2,opt,name=dst_native,json=dstNative,proto3" json:"dst_native,omitempty"` // unix epoch seconds LastUpdated int64 `protobuf:"varint,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` Status OrderStatus `protobuf:"varint,4,opt,name=status,proto3,enum=service.rfq.OrderStatus" json:"status,omitempty"` MmId string `protobuf:"bytes,5,opt,name=mm_id,json=mmId,proto3" json:"mm_id,omitempty"` MmAddr string `protobuf:"bytes,6,opt,name=mm_addr,json=mmAddr,proto3" json:"mm_addr,omitempty"` // the tx in which the user deposits the fund on the src chain SrcDepositTxHash string `protobuf:"bytes,7,opt,name=src_deposit_tx_hash,json=srcDepositTxHash,proto3" json:"src_deposit_tx_hash,omitempty"` // the tx in which the fund is transferred from MMs address to the user on the dst chain DstTransferTxHash string `protobuf:"bytes,8,opt,name=dst_transfer_tx_hash,json=dstTransferTxHash,proto3" json:"dst_transfer_tx_hash,omitempty"` // the tx in which the fund is released to the MM on the src chain SrcReleaseTxHash string `protobuf:"bytes,9,opt,name=src_release_tx_hash,json=srcReleaseTxHash,proto3" json:"src_release_tx_hash,omitempty"` // the tx in which the refund is initiated on the dst chain DstRefundInitTxHash string `protobuf:"bytes,10,opt,name=dst_refund_init_tx_hash,json=dstRefundInitTxHash,proto3" json:"dst_refund_init_tx_hash,omitempty"` // the tx in which the fund is refunded to the user on the src chain SrcRefundTxHash string `protobuf:"bytes,11,opt,name=src_refund_tx_hash,json=srcRefundTxHash,proto3" json:"src_refund_tx_hash,omitempty"` // contains filtered or unexported fields }
func (*UserOrder) Descriptor
deprecated
func (*UserOrder) GetDstNative ¶
func (*UserOrder) GetDstRefundInitTxHash ¶
func (*UserOrder) GetDstTransferTxHash ¶
func (*UserOrder) GetLastUpdated ¶
func (*UserOrder) GetSrcDepositTxHash ¶
func (*UserOrder) GetSrcRefundTxHash ¶
func (*UserOrder) GetSrcReleaseTxHash ¶
func (*UserOrder) GetStatus ¶
func (x *UserOrder) GetStatus() OrderStatus
func (*UserOrder) ProtoMessage ¶
func (*UserOrder) ProtoMessage()
func (*UserOrder) ProtoReflect ¶
func (x *UserOrder) ProtoReflect() protoreflect.Message