rfqrpc

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 16 Imported by: 3

Documentation

Overview

Package rfqrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	QuoteRespStatus_name = map[int32]string{
		0: "INVALID_RATE_TICK",
		1: "INVALID_EXPIRY",
		2: "PRICE_ORACLE_QUERY_ERR",
	}
	QuoteRespStatus_value = map[string]int32{
		"INVALID_RATE_TICK":      0,
		"INVALID_EXPIRY":         1,
		"PRICE_ORACLE_QUERY_ERR": 2,
	}
)

Enum value maps for QuoteRespStatus.

View Source
var File_rfqrpc_rfq_proto protoreflect.FileDescriptor
View Source
var Rfq_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rfqrpc.Rfq",
	HandlerType: (*RfqServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddAssetBuyOrder",
			Handler:    _Rfq_AddAssetBuyOrder_Handler,
		},
		{
			MethodName: "AddAssetSellOrder",
			Handler:    _Rfq_AddAssetSellOrder_Handler,
		},
		{
			MethodName: "AddAssetSellOffer",
			Handler:    _Rfq_AddAssetSellOffer_Handler,
		},
		{
			MethodName: "AddAssetBuyOffer",
			Handler:    _Rfq_AddAssetBuyOffer_Handler,
		},
		{
			MethodName: "QueryPeerAcceptedQuotes",
			Handler:    _Rfq_QueryPeerAcceptedQuotes_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeRfqEventNtfns",
			Handler:       _Rfq_SubscribeRfqEventNtfns_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "rfqrpc/rfq.proto",
}

Rfq_ServiceDesc is the grpc.ServiceDesc for Rfq service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRfqHandler

func RegisterRfqHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterRfqHandler registers the http handlers for service Rfq to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterRfqHandlerClient

func RegisterRfqHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RfqClient) error

RegisterRfqHandlerClient registers the http handlers for service Rfq to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RfqClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RfqClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RfqClient" to call the correct interceptors.

func RegisterRfqHandlerFromEndpoint

func RegisterRfqHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterRfqHandlerFromEndpoint is same as RegisterRfqHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterRfqHandlerServer

func RegisterRfqHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RfqServer) error

RegisterRfqHandlerServer registers the http handlers for service Rfq to "mux". UnaryRPC :call RfqServer 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 RegisterRfqHandlerFromEndpoint instead.

func RegisterRfqJSONCallbacks

func RegisterRfqJSONCallbacks(registry map[string]func(ctx context.Context,
	conn *grpc.ClientConn, reqJSON string, callback func(string, error)))

func RegisterRfqServer

func RegisterRfqServer(s grpc.ServiceRegistrar, srv RfqServer)

Types

type AcceptHtlcEvent

type AcceptHtlcEvent struct {

	// Unix timestamp in microseconds.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// scid is the short channel ID of the channel over which the payment for
	// the quote is made.
	Scid uint64 `protobuf:"varint,2,opt,name=scid,proto3" json:"scid,omitempty"`
	// contains filtered or unexported fields
}

func (*AcceptHtlcEvent) Descriptor deprecated

func (*AcceptHtlcEvent) Descriptor() ([]byte, []int)

Deprecated: Use AcceptHtlcEvent.ProtoReflect.Descriptor instead.

func (*AcceptHtlcEvent) GetScid

func (x *AcceptHtlcEvent) GetScid() uint64

func (*AcceptHtlcEvent) GetTimestamp

func (x *AcceptHtlcEvent) GetTimestamp() uint64

func (*AcceptHtlcEvent) ProtoMessage

func (*AcceptHtlcEvent) ProtoMessage()

func (*AcceptHtlcEvent) ProtoReflect

func (x *AcceptHtlcEvent) ProtoReflect() protoreflect.Message

func (*AcceptHtlcEvent) Reset

func (x *AcceptHtlcEvent) Reset()

func (*AcceptHtlcEvent) String

func (x *AcceptHtlcEvent) String() string

type AddAssetBuyOfferRequest

type AddAssetBuyOfferRequest struct {

	// asset_specifier is the subject asset.
	AssetSpecifier *AssetSpecifier `protobuf:"bytes,1,opt,name=asset_specifier,json=assetSpecifier,proto3" json:"asset_specifier,omitempty"`
	// max_units is the maximum amount of the asset to buy.
	MaxUnits uint64 `protobuf:"varint,2,opt,name=max_units,json=maxUnits,proto3" json:"max_units,omitempty"`
	// contains filtered or unexported fields
}

func (*AddAssetBuyOfferRequest) Descriptor deprecated

func (*AddAssetBuyOfferRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetBuyOfferRequest.ProtoReflect.Descriptor instead.

func (*AddAssetBuyOfferRequest) GetAssetSpecifier

func (x *AddAssetBuyOfferRequest) GetAssetSpecifier() *AssetSpecifier

func (*AddAssetBuyOfferRequest) GetMaxUnits

func (x *AddAssetBuyOfferRequest) GetMaxUnits() uint64

func (*AddAssetBuyOfferRequest) ProtoMessage

func (*AddAssetBuyOfferRequest) ProtoMessage()

func (*AddAssetBuyOfferRequest) ProtoReflect

func (x *AddAssetBuyOfferRequest) ProtoReflect() protoreflect.Message

func (*AddAssetBuyOfferRequest) Reset

func (x *AddAssetBuyOfferRequest) Reset()

func (*AddAssetBuyOfferRequest) String

func (x *AddAssetBuyOfferRequest) String() string

type AddAssetBuyOfferResponse

type AddAssetBuyOfferResponse struct {
	// contains filtered or unexported fields
}

func (*AddAssetBuyOfferResponse) Descriptor deprecated

func (*AddAssetBuyOfferResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetBuyOfferResponse.ProtoReflect.Descriptor instead.

func (*AddAssetBuyOfferResponse) ProtoMessage

func (*AddAssetBuyOfferResponse) ProtoMessage()

func (*AddAssetBuyOfferResponse) ProtoReflect

func (x *AddAssetBuyOfferResponse) ProtoReflect() protoreflect.Message

func (*AddAssetBuyOfferResponse) Reset

func (x *AddAssetBuyOfferResponse) Reset()

func (*AddAssetBuyOfferResponse) String

func (x *AddAssetBuyOfferResponse) String() string

type AddAssetBuyOrderRequest

type AddAssetBuyOrderRequest struct {

	// asset_specifier is the subject asset.
	AssetSpecifier *AssetSpecifier `protobuf:"bytes,1,opt,name=asset_specifier,json=assetSpecifier,proto3" json:"asset_specifier,omitempty"`
	// The minimum amount of the asset to buy.
	MinAssetAmount uint64 `protobuf:"varint,2,opt,name=min_asset_amount,json=minAssetAmount,proto3" json:"min_asset_amount,omitempty"`
	// The maximum amount BTC to spend (units: millisats).
	MaxBid uint64 `protobuf:"varint,3,opt,name=max_bid,json=maxBid,proto3" json:"max_bid,omitempty"`
	// The unix timestamp in seconds after which the order is no longer valid.
	Expiry uint64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// peer_pub_key is an optional field for specifying the public key of the
	// intended recipient peer for the order.
	PeerPubKey []byte `protobuf:"bytes,5,opt,name=peer_pub_key,json=peerPubKey,proto3" json:"peer_pub_key,omitempty"`
	// timeout_seconds is the number of seconds to wait for the peer to respond
	// with an accepted quote (or a rejection).
	TimeoutSeconds uint32 `protobuf:"varint,6,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
	// contains filtered or unexported fields
}

func (*AddAssetBuyOrderRequest) Descriptor deprecated

func (*AddAssetBuyOrderRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetBuyOrderRequest.ProtoReflect.Descriptor instead.

func (*AddAssetBuyOrderRequest) GetAssetSpecifier

func (x *AddAssetBuyOrderRequest) GetAssetSpecifier() *AssetSpecifier

func (*AddAssetBuyOrderRequest) GetExpiry

func (x *AddAssetBuyOrderRequest) GetExpiry() uint64

func (*AddAssetBuyOrderRequest) GetMaxBid

func (x *AddAssetBuyOrderRequest) GetMaxBid() uint64

func (*AddAssetBuyOrderRequest) GetMinAssetAmount

func (x *AddAssetBuyOrderRequest) GetMinAssetAmount() uint64

func (*AddAssetBuyOrderRequest) GetPeerPubKey

func (x *AddAssetBuyOrderRequest) GetPeerPubKey() []byte

func (*AddAssetBuyOrderRequest) GetTimeoutSeconds

func (x *AddAssetBuyOrderRequest) GetTimeoutSeconds() uint32

func (*AddAssetBuyOrderRequest) ProtoMessage

func (*AddAssetBuyOrderRequest) ProtoMessage()

func (*AddAssetBuyOrderRequest) ProtoReflect

func (x *AddAssetBuyOrderRequest) ProtoReflect() protoreflect.Message

func (*AddAssetBuyOrderRequest) Reset

func (x *AddAssetBuyOrderRequest) Reset()

func (*AddAssetBuyOrderRequest) String

func (x *AddAssetBuyOrderRequest) String() string

type AddAssetBuyOrderResponse

type AddAssetBuyOrderResponse struct {

	// Types that are assignable to Response:
	//
	//	*AddAssetBuyOrderResponse_AcceptedQuote
	//	*AddAssetBuyOrderResponse_InvalidQuote
	//	*AddAssetBuyOrderResponse_RejectedQuote
	Response isAddAssetBuyOrderResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

func (*AddAssetBuyOrderResponse) Descriptor deprecated

func (*AddAssetBuyOrderResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetBuyOrderResponse.ProtoReflect.Descriptor instead.

func (*AddAssetBuyOrderResponse) GetAcceptedQuote

func (x *AddAssetBuyOrderResponse) GetAcceptedQuote() *PeerAcceptedBuyQuote

func (*AddAssetBuyOrderResponse) GetInvalidQuote

func (x *AddAssetBuyOrderResponse) GetInvalidQuote() *InvalidQuoteResponse

func (*AddAssetBuyOrderResponse) GetRejectedQuote

func (x *AddAssetBuyOrderResponse) GetRejectedQuote() *RejectedQuoteResponse

func (*AddAssetBuyOrderResponse) GetResponse

func (m *AddAssetBuyOrderResponse) GetResponse() isAddAssetBuyOrderResponse_Response

func (*AddAssetBuyOrderResponse) ProtoMessage

func (*AddAssetBuyOrderResponse) ProtoMessage()

func (*AddAssetBuyOrderResponse) ProtoReflect

func (x *AddAssetBuyOrderResponse) ProtoReflect() protoreflect.Message

func (*AddAssetBuyOrderResponse) Reset

func (x *AddAssetBuyOrderResponse) Reset()

func (*AddAssetBuyOrderResponse) String

func (x *AddAssetBuyOrderResponse) String() string

type AddAssetBuyOrderResponse_AcceptedQuote

type AddAssetBuyOrderResponse_AcceptedQuote struct {
	// accepted_quote holds the quote received from the peer as a response
	// to our quote request.
	AcceptedQuote *PeerAcceptedBuyQuote `protobuf:"bytes,1,opt,name=accepted_quote,json=acceptedQuote,proto3,oneof"`
}

type AddAssetBuyOrderResponse_InvalidQuote

type AddAssetBuyOrderResponse_InvalidQuote struct {
	// invalid_quote is returned if the quote response received from the
	// peer was invalid or insufficient.
	InvalidQuote *InvalidQuoteResponse `protobuf:"bytes,2,opt,name=invalid_quote,json=invalidQuote,proto3,oneof"`
}

type AddAssetBuyOrderResponse_RejectedQuote

type AddAssetBuyOrderResponse_RejectedQuote struct {
	// rejected_quote is returned if the quote request was rejected by the
	// peer.
	RejectedQuote *RejectedQuoteResponse `protobuf:"bytes,3,opt,name=rejected_quote,json=rejectedQuote,proto3,oneof"`
}

type AddAssetSellOfferRequest

type AddAssetSellOfferRequest struct {

	// asset_specifier is the subject asset.
	AssetSpecifier *AssetSpecifier `protobuf:"bytes,1,opt,name=asset_specifier,json=assetSpecifier,proto3" json:"asset_specifier,omitempty"`
	// max_units is the maximum amount of the asset to sell.
	MaxUnits uint64 `protobuf:"varint,2,opt,name=max_units,json=maxUnits,proto3" json:"max_units,omitempty"`
	// contains filtered or unexported fields
}

func (*AddAssetSellOfferRequest) Descriptor deprecated

func (*AddAssetSellOfferRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetSellOfferRequest.ProtoReflect.Descriptor instead.

func (*AddAssetSellOfferRequest) GetAssetSpecifier

func (x *AddAssetSellOfferRequest) GetAssetSpecifier() *AssetSpecifier

func (*AddAssetSellOfferRequest) GetMaxUnits

func (x *AddAssetSellOfferRequest) GetMaxUnits() uint64

func (*AddAssetSellOfferRequest) ProtoMessage

func (*AddAssetSellOfferRequest) ProtoMessage()

func (*AddAssetSellOfferRequest) ProtoReflect

func (x *AddAssetSellOfferRequest) ProtoReflect() protoreflect.Message

func (*AddAssetSellOfferRequest) Reset

func (x *AddAssetSellOfferRequest) Reset()

func (*AddAssetSellOfferRequest) String

func (x *AddAssetSellOfferRequest) String() string

type AddAssetSellOfferResponse

type AddAssetSellOfferResponse struct {
	// contains filtered or unexported fields
}

func (*AddAssetSellOfferResponse) Descriptor deprecated

func (*AddAssetSellOfferResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetSellOfferResponse.ProtoReflect.Descriptor instead.

func (*AddAssetSellOfferResponse) ProtoMessage

func (*AddAssetSellOfferResponse) ProtoMessage()

func (*AddAssetSellOfferResponse) ProtoReflect

func (*AddAssetSellOfferResponse) Reset

func (x *AddAssetSellOfferResponse) Reset()

func (*AddAssetSellOfferResponse) String

func (x *AddAssetSellOfferResponse) String() string

type AddAssetSellOrderRequest

type AddAssetSellOrderRequest struct {

	// asset_specifier is the subject asset.
	AssetSpecifier *AssetSpecifier `protobuf:"bytes,1,opt,name=asset_specifier,json=assetSpecifier,proto3" json:"asset_specifier,omitempty"`
	// The maximum amount of the asset to sell.
	MaxAssetAmount uint64 `protobuf:"varint,2,opt,name=max_asset_amount,json=maxAssetAmount,proto3" json:"max_asset_amount,omitempty"`
	// The minimum amount of BTC to accept (units: millisats).
	MinAsk uint64 `protobuf:"varint,3,opt,name=min_ask,json=minAsk,proto3" json:"min_ask,omitempty"`
	// The unix timestamp in seconds after which the order is no longer valid.
	Expiry uint64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// peer_pub_key is an optional field for specifying the public key of the
	// intended recipient peer for the order.
	PeerPubKey []byte `protobuf:"bytes,5,opt,name=peer_pub_key,json=peerPubKey,proto3" json:"peer_pub_key,omitempty"`
	// timeout_seconds is the number of seconds to wait for the peer to respond
	// with an accepted quote (or a rejection).
	TimeoutSeconds uint32 `protobuf:"varint,6,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
	// contains filtered or unexported fields
}

func (*AddAssetSellOrderRequest) Descriptor deprecated

func (*AddAssetSellOrderRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetSellOrderRequest.ProtoReflect.Descriptor instead.

func (*AddAssetSellOrderRequest) GetAssetSpecifier

func (x *AddAssetSellOrderRequest) GetAssetSpecifier() *AssetSpecifier

func (*AddAssetSellOrderRequest) GetExpiry

func (x *AddAssetSellOrderRequest) GetExpiry() uint64

func (*AddAssetSellOrderRequest) GetMaxAssetAmount

func (x *AddAssetSellOrderRequest) GetMaxAssetAmount() uint64

func (*AddAssetSellOrderRequest) GetMinAsk

func (x *AddAssetSellOrderRequest) GetMinAsk() uint64

func (*AddAssetSellOrderRequest) GetPeerPubKey

func (x *AddAssetSellOrderRequest) GetPeerPubKey() []byte

func (*AddAssetSellOrderRequest) GetTimeoutSeconds

func (x *AddAssetSellOrderRequest) GetTimeoutSeconds() uint32

func (*AddAssetSellOrderRequest) ProtoMessage

func (*AddAssetSellOrderRequest) ProtoMessage()

func (*AddAssetSellOrderRequest) ProtoReflect

func (x *AddAssetSellOrderRequest) ProtoReflect() protoreflect.Message

func (*AddAssetSellOrderRequest) Reset

func (x *AddAssetSellOrderRequest) Reset()

func (*AddAssetSellOrderRequest) String

func (x *AddAssetSellOrderRequest) String() string

type AddAssetSellOrderResponse

type AddAssetSellOrderResponse struct {

	// Types that are assignable to Response:
	//
	//	*AddAssetSellOrderResponse_AcceptedQuote
	//	*AddAssetSellOrderResponse_InvalidQuote
	//	*AddAssetSellOrderResponse_RejectedQuote
	Response isAddAssetSellOrderResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

func (*AddAssetSellOrderResponse) Descriptor deprecated

func (*AddAssetSellOrderResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddAssetSellOrderResponse.ProtoReflect.Descriptor instead.

func (*AddAssetSellOrderResponse) GetAcceptedQuote

func (x *AddAssetSellOrderResponse) GetAcceptedQuote() *PeerAcceptedSellQuote

func (*AddAssetSellOrderResponse) GetInvalidQuote

func (x *AddAssetSellOrderResponse) GetInvalidQuote() *InvalidQuoteResponse

func (*AddAssetSellOrderResponse) GetRejectedQuote

func (x *AddAssetSellOrderResponse) GetRejectedQuote() *RejectedQuoteResponse

func (*AddAssetSellOrderResponse) GetResponse

func (m *AddAssetSellOrderResponse) GetResponse() isAddAssetSellOrderResponse_Response

func (*AddAssetSellOrderResponse) ProtoMessage

func (*AddAssetSellOrderResponse) ProtoMessage()

func (*AddAssetSellOrderResponse) ProtoReflect

func (*AddAssetSellOrderResponse) Reset

func (x *AddAssetSellOrderResponse) Reset()

func (*AddAssetSellOrderResponse) String

func (x *AddAssetSellOrderResponse) String() string

type AddAssetSellOrderResponse_AcceptedQuote

type AddAssetSellOrderResponse_AcceptedQuote struct {
	// accepted_quote holds the quote received from the peer as a response
	// to our quote request.
	AcceptedQuote *PeerAcceptedSellQuote `protobuf:"bytes,1,opt,name=accepted_quote,json=acceptedQuote,proto3,oneof"`
}

type AddAssetSellOrderResponse_InvalidQuote

type AddAssetSellOrderResponse_InvalidQuote struct {
	// invalid_quote is returned if the quote response received from the
	// peer was invalid or insufficient.
	InvalidQuote *InvalidQuoteResponse `protobuf:"bytes,2,opt,name=invalid_quote,json=invalidQuote,proto3,oneof"`
}

type AddAssetSellOrderResponse_RejectedQuote

type AddAssetSellOrderResponse_RejectedQuote struct {
	// rejected_quote is returned if the quote request was rejected by the
	// peer.
	RejectedQuote *RejectedQuoteResponse `protobuf:"bytes,3,opt,name=rejected_quote,json=rejectedQuote,proto3,oneof"`
}

type AssetSpecifier

type AssetSpecifier struct {

	// Types that are assignable to Id:
	//
	//	*AssetSpecifier_AssetId
	//	*AssetSpecifier_AssetIdStr
	//	*AssetSpecifier_GroupKey
	//	*AssetSpecifier_GroupKeyStr
	Id isAssetSpecifier_Id `protobuf_oneof:"id"`
	// contains filtered or unexported fields
}

func (*AssetSpecifier) Descriptor deprecated

func (*AssetSpecifier) Descriptor() ([]byte, []int)

Deprecated: Use AssetSpecifier.ProtoReflect.Descriptor instead.

func (*AssetSpecifier) GetAssetId

func (x *AssetSpecifier) GetAssetId() []byte

func (*AssetSpecifier) GetAssetIdStr

func (x *AssetSpecifier) GetAssetIdStr() string

func (*AssetSpecifier) GetGroupKey

func (x *AssetSpecifier) GetGroupKey() []byte

func (*AssetSpecifier) GetGroupKeyStr

func (x *AssetSpecifier) GetGroupKeyStr() string

func (*AssetSpecifier) GetId

func (m *AssetSpecifier) GetId() isAssetSpecifier_Id

func (*AssetSpecifier) ProtoMessage

func (*AssetSpecifier) ProtoMessage()

func (*AssetSpecifier) ProtoReflect

func (x *AssetSpecifier) ProtoReflect() protoreflect.Message

func (*AssetSpecifier) Reset

func (x *AssetSpecifier) Reset()

func (*AssetSpecifier) String

func (x *AssetSpecifier) String() string

type AssetSpecifier_AssetId

type AssetSpecifier_AssetId struct {
	// The 32-byte asset ID specified as raw bytes (gRPC only).
	AssetId []byte `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3,oneof"`
}

type AssetSpecifier_AssetIdStr

type AssetSpecifier_AssetIdStr struct {
	// The 32-byte asset ID encoded as a hex string (use this for REST).
	AssetIdStr string `protobuf:"bytes,2,opt,name=asset_id_str,json=assetIdStr,proto3,oneof"`
}

type AssetSpecifier_GroupKey

type AssetSpecifier_GroupKey struct {
	// The 32-byte asset group key specified as raw bytes (gRPC only).
	GroupKey []byte `protobuf:"bytes,3,opt,name=group_key,json=groupKey,proto3,oneof"`
}

type AssetSpecifier_GroupKeyStr

type AssetSpecifier_GroupKeyStr struct {
	// The 32-byte asset group key encoded as hex string (use this for
	// REST).
	GroupKeyStr string `protobuf:"bytes,4,opt,name=group_key_str,json=groupKeyStr,proto3,oneof"`
}

type InvalidQuoteResponse

type InvalidQuoteResponse struct {

	// status is the status of the quote response.
	Status QuoteRespStatus `protobuf:"varint,1,opt,name=status,proto3,enum=rfqrpc.QuoteRespStatus" json:"status,omitempty"`
	// peer is the quote counterparty peer.
	Peer string `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
	// id is the unique identifier of the quote request.
	Id []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

InvalidQuoteResponse is a message that is returned when a quote response is invalid or insufficient.

func (*InvalidQuoteResponse) Descriptor deprecated

func (*InvalidQuoteResponse) Descriptor() ([]byte, []int)

Deprecated: Use InvalidQuoteResponse.ProtoReflect.Descriptor instead.

func (*InvalidQuoteResponse) GetId

func (x *InvalidQuoteResponse) GetId() []byte

func (*InvalidQuoteResponse) GetPeer

func (x *InvalidQuoteResponse) GetPeer() string

func (*InvalidQuoteResponse) GetStatus

func (x *InvalidQuoteResponse) GetStatus() QuoteRespStatus

func (*InvalidQuoteResponse) ProtoMessage

func (*InvalidQuoteResponse) ProtoMessage()

func (*InvalidQuoteResponse) ProtoReflect

func (x *InvalidQuoteResponse) ProtoReflect() protoreflect.Message

func (*InvalidQuoteResponse) Reset

func (x *InvalidQuoteResponse) Reset()

func (*InvalidQuoteResponse) String

func (x *InvalidQuoteResponse) String() string

type PeerAcceptedBuyQuote

type PeerAcceptedBuyQuote struct {

	// Quote counterparty peer.
	Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
	// The unique identifier of the quote request.
	Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// scid is the short channel ID of the channel over which the payment for
	// the quote should be made.
	Scid uint64 `protobuf:"varint,3,opt,name=scid,proto3" json:"scid,omitempty"`
	// asset_amount is the amount of the subject asset.
	AssetAmount uint64 `protobuf:"varint,4,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// ask_price is the price in milli-satoshi per asset unit.
	AskPrice uint64 `protobuf:"varint,5,opt,name=ask_price,json=askPrice,proto3" json:"ask_price,omitempty"`
	// The unix timestamp in seconds after which the quote is no longer valid.
	Expiry uint64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerAcceptedBuyQuote) Descriptor deprecated

func (*PeerAcceptedBuyQuote) Descriptor() ([]byte, []int)

Deprecated: Use PeerAcceptedBuyQuote.ProtoReflect.Descriptor instead.

func (*PeerAcceptedBuyQuote) GetAskPrice

func (x *PeerAcceptedBuyQuote) GetAskPrice() uint64

func (*PeerAcceptedBuyQuote) GetAssetAmount

func (x *PeerAcceptedBuyQuote) GetAssetAmount() uint64

func (*PeerAcceptedBuyQuote) GetExpiry

func (x *PeerAcceptedBuyQuote) GetExpiry() uint64

func (*PeerAcceptedBuyQuote) GetId

func (x *PeerAcceptedBuyQuote) GetId() []byte

func (*PeerAcceptedBuyQuote) GetPeer

func (x *PeerAcceptedBuyQuote) GetPeer() string

func (*PeerAcceptedBuyQuote) GetScid

func (x *PeerAcceptedBuyQuote) GetScid() uint64

func (*PeerAcceptedBuyQuote) ProtoMessage

func (*PeerAcceptedBuyQuote) ProtoMessage()

func (*PeerAcceptedBuyQuote) ProtoReflect

func (x *PeerAcceptedBuyQuote) ProtoReflect() protoreflect.Message

func (*PeerAcceptedBuyQuote) Reset

func (x *PeerAcceptedBuyQuote) Reset()

func (*PeerAcceptedBuyQuote) String

func (x *PeerAcceptedBuyQuote) String() string

type PeerAcceptedBuyQuoteEvent

type PeerAcceptedBuyQuoteEvent struct {

	// Unix timestamp in microseconds.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The asset buy quote that was accepted by out peer.
	PeerAcceptedBuyQuote *PeerAcceptedBuyQuote `protobuf:"bytes,2,opt,name=peer_accepted_buy_quote,json=peerAcceptedBuyQuote,proto3" json:"peer_accepted_buy_quote,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerAcceptedBuyQuoteEvent) Descriptor deprecated

func (*PeerAcceptedBuyQuoteEvent) Descriptor() ([]byte, []int)

Deprecated: Use PeerAcceptedBuyQuoteEvent.ProtoReflect.Descriptor instead.

func (*PeerAcceptedBuyQuoteEvent) GetPeerAcceptedBuyQuote

func (x *PeerAcceptedBuyQuoteEvent) GetPeerAcceptedBuyQuote() *PeerAcceptedBuyQuote

func (*PeerAcceptedBuyQuoteEvent) GetTimestamp

func (x *PeerAcceptedBuyQuoteEvent) GetTimestamp() uint64

func (*PeerAcceptedBuyQuoteEvent) ProtoMessage

func (*PeerAcceptedBuyQuoteEvent) ProtoMessage()

func (*PeerAcceptedBuyQuoteEvent) ProtoReflect

func (*PeerAcceptedBuyQuoteEvent) Reset

func (x *PeerAcceptedBuyQuoteEvent) Reset()

func (*PeerAcceptedBuyQuoteEvent) String

func (x *PeerAcceptedBuyQuoteEvent) String() string

type PeerAcceptedSellQuote

type PeerAcceptedSellQuote struct {

	// Quote counterparty peer.
	Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
	// The unique identifier of the quote request.
	Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// scid is the short channel ID of the channel over which the payment for
	// the quote should be made.
	Scid uint64 `protobuf:"varint,3,opt,name=scid,proto3" json:"scid,omitempty"`
	// asset_amount is the amount of the subject asset.
	AssetAmount uint64 `protobuf:"varint,4,opt,name=asset_amount,json=assetAmount,proto3" json:"asset_amount,omitempty"`
	// bid_price is the price in milli-satoshi per asset unit.
	BidPrice uint64 `protobuf:"varint,5,opt,name=bid_price,json=bidPrice,proto3" json:"bid_price,omitempty"`
	// The unix timestamp in seconds after which the quote is no longer valid.
	Expiry uint64 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerAcceptedSellQuote) Descriptor deprecated

func (*PeerAcceptedSellQuote) Descriptor() ([]byte, []int)

Deprecated: Use PeerAcceptedSellQuote.ProtoReflect.Descriptor instead.

func (*PeerAcceptedSellQuote) GetAssetAmount

func (x *PeerAcceptedSellQuote) GetAssetAmount() uint64

func (*PeerAcceptedSellQuote) GetBidPrice

func (x *PeerAcceptedSellQuote) GetBidPrice() uint64

func (*PeerAcceptedSellQuote) GetExpiry

func (x *PeerAcceptedSellQuote) GetExpiry() uint64

func (*PeerAcceptedSellQuote) GetId

func (x *PeerAcceptedSellQuote) GetId() []byte

func (*PeerAcceptedSellQuote) GetPeer

func (x *PeerAcceptedSellQuote) GetPeer() string

func (*PeerAcceptedSellQuote) GetScid

func (x *PeerAcceptedSellQuote) GetScid() uint64

func (*PeerAcceptedSellQuote) ProtoMessage

func (*PeerAcceptedSellQuote) ProtoMessage()

func (*PeerAcceptedSellQuote) ProtoReflect

func (x *PeerAcceptedSellQuote) ProtoReflect() protoreflect.Message

func (*PeerAcceptedSellQuote) Reset

func (x *PeerAcceptedSellQuote) Reset()

func (*PeerAcceptedSellQuote) String

func (x *PeerAcceptedSellQuote) String() string

type PeerAcceptedSellQuoteEvent

type PeerAcceptedSellQuoteEvent struct {

	// Unix timestamp in microseconds.
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The asset sell quote that was accepted by out peer.
	PeerAcceptedSellQuote *PeerAcceptedSellQuote `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PeerAcceptedSellQuoteEvent) Descriptor deprecated

func (*PeerAcceptedSellQuoteEvent) Descriptor() ([]byte, []int)

Deprecated: Use PeerAcceptedSellQuoteEvent.ProtoReflect.Descriptor instead.

func (*PeerAcceptedSellQuoteEvent) GetPeerAcceptedSellQuote

func (x *PeerAcceptedSellQuoteEvent) GetPeerAcceptedSellQuote() *PeerAcceptedSellQuote

func (*PeerAcceptedSellQuoteEvent) GetTimestamp

func (x *PeerAcceptedSellQuoteEvent) GetTimestamp() uint64

func (*PeerAcceptedSellQuoteEvent) ProtoMessage

func (*PeerAcceptedSellQuoteEvent) ProtoMessage()

func (*PeerAcceptedSellQuoteEvent) ProtoReflect

func (*PeerAcceptedSellQuoteEvent) Reset

func (x *PeerAcceptedSellQuoteEvent) Reset()

func (*PeerAcceptedSellQuoteEvent) String

func (x *PeerAcceptedSellQuoteEvent) String() string

type QueryPeerAcceptedQuotesRequest

type QueryPeerAcceptedQuotesRequest struct {
	// contains filtered or unexported fields
}

func (*QueryPeerAcceptedQuotesRequest) Descriptor deprecated

func (*QueryPeerAcceptedQuotesRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryPeerAcceptedQuotesRequest.ProtoReflect.Descriptor instead.

func (*QueryPeerAcceptedQuotesRequest) ProtoMessage

func (*QueryPeerAcceptedQuotesRequest) ProtoMessage()

func (*QueryPeerAcceptedQuotesRequest) ProtoReflect

func (*QueryPeerAcceptedQuotesRequest) Reset

func (x *QueryPeerAcceptedQuotesRequest) Reset()

func (*QueryPeerAcceptedQuotesRequest) String

type QueryPeerAcceptedQuotesResponse

type QueryPeerAcceptedQuotesResponse struct {

	// buy_quotes is a list of asset buy quotes which were requested by our
	// node and have been accepted by our peers.
	BuyQuotes []*PeerAcceptedBuyQuote `protobuf:"bytes,1,rep,name=buy_quotes,json=buyQuotes,proto3" json:"buy_quotes,omitempty"`
	// sell_quotes is a list of asset sell quotes which were requested by our
	// node and have been accepted by our peers.
	SellQuotes []*PeerAcceptedSellQuote `protobuf:"bytes,2,rep,name=sell_quotes,json=sellQuotes,proto3" json:"sell_quotes,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryPeerAcceptedQuotesResponse) Descriptor deprecated

func (*QueryPeerAcceptedQuotesResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryPeerAcceptedQuotesResponse.ProtoReflect.Descriptor instead.

func (*QueryPeerAcceptedQuotesResponse) GetBuyQuotes

func (*QueryPeerAcceptedQuotesResponse) GetSellQuotes

func (*QueryPeerAcceptedQuotesResponse) ProtoMessage

func (*QueryPeerAcceptedQuotesResponse) ProtoMessage()

func (*QueryPeerAcceptedQuotesResponse) ProtoReflect

func (*QueryPeerAcceptedQuotesResponse) Reset

func (*QueryPeerAcceptedQuotesResponse) String

type QuoteRespStatus

type QuoteRespStatus int32

QuoteRespStatus is an enum that represents the status of a quote response.

const (
	// INVALID_RATE_TICK indicates that the rate tick in the quote response is
	// invalid.
	QuoteRespStatus_INVALID_RATE_TICK QuoteRespStatus = 0
	// INVALID_EXPIRY indicates that the expiry in the quote response is
	// invalid.
	QuoteRespStatus_INVALID_EXPIRY QuoteRespStatus = 1
	// PRICE_ORACLE_QUERY_ERR indicates that an error occurred when querying the
	// price oracle whilst evaluating the quote response.
	QuoteRespStatus_PRICE_ORACLE_QUERY_ERR QuoteRespStatus = 2
)

func (QuoteRespStatus) Descriptor

func (QuoteRespStatus) Enum

func (x QuoteRespStatus) Enum() *QuoteRespStatus

func (QuoteRespStatus) EnumDescriptor deprecated

func (QuoteRespStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use QuoteRespStatus.Descriptor instead.

func (QuoteRespStatus) Number

func (QuoteRespStatus) String

func (x QuoteRespStatus) String() string

func (QuoteRespStatus) Type

type RejectedQuoteResponse

type RejectedQuoteResponse struct {

	// peer is the quote counterparty peer.
	Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
	// id is the unique identifier of the quote request.
	Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// error_message is a human-readable error message.
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// error_code is a machine-readable error code.
	ErrorCode uint32 `protobuf:"varint,4,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	// contains filtered or unexported fields
}

RejectedQuoteResponse is a message that is returned when a quote request is rejected by the peer.

func (*RejectedQuoteResponse) Descriptor deprecated

func (*RejectedQuoteResponse) Descriptor() ([]byte, []int)

Deprecated: Use RejectedQuoteResponse.ProtoReflect.Descriptor instead.

func (*RejectedQuoteResponse) GetErrorCode

func (x *RejectedQuoteResponse) GetErrorCode() uint32

func (*RejectedQuoteResponse) GetErrorMessage

func (x *RejectedQuoteResponse) GetErrorMessage() string

func (*RejectedQuoteResponse) GetId

func (x *RejectedQuoteResponse) GetId() []byte

func (*RejectedQuoteResponse) GetPeer

func (x *RejectedQuoteResponse) GetPeer() string

func (*RejectedQuoteResponse) ProtoMessage

func (*RejectedQuoteResponse) ProtoMessage()

func (*RejectedQuoteResponse) ProtoReflect

func (x *RejectedQuoteResponse) ProtoReflect() protoreflect.Message

func (*RejectedQuoteResponse) Reset

func (x *RejectedQuoteResponse) Reset()

func (*RejectedQuoteResponse) String

func (x *RejectedQuoteResponse) String() string

type RfqClient

type RfqClient interface {
	// tapcli: `rfq buyorder`
	// AddAssetBuyOrder is used to add a buy order for a specific asset. If a buy
	// order already exists for the asset, it will be updated.
	AddAssetBuyOrder(ctx context.Context, in *AddAssetBuyOrderRequest, opts ...grpc.CallOption) (*AddAssetBuyOrderResponse, error)
	// tapcli: `rfq sellorder`
	// AddAssetSellOrder is used to add a sell order for a specific asset. If a
	// sell order already exists for the asset, it will be updated.
	AddAssetSellOrder(ctx context.Context, in *AddAssetSellOrderRequest, opts ...grpc.CallOption) (*AddAssetSellOrderResponse, error)
	// tapcli: `rfq selloffer`
	// AddAssetSellOffer is used to add a sell offer for a specific asset. If a
	// sell offer already exists for the asset, it will be updated.
	AddAssetSellOffer(ctx context.Context, in *AddAssetSellOfferRequest, opts ...grpc.CallOption) (*AddAssetSellOfferResponse, error)
	// tapcli: `rfq buyoffer`
	// AddAssetBuyOffer is used to add a buy offer for a specific asset. If a
	// buy offer already exists for the asset, it will be updated.
	//
	// A buy offer is used by the node to selectively accept or reject incoming
	// asset sell quote requests before price is considered.
	AddAssetBuyOffer(ctx context.Context, in *AddAssetBuyOfferRequest, opts ...grpc.CallOption) (*AddAssetBuyOfferResponse, error)
	// tapcli: `rfq acceptedquotes`
	// QueryPeerAcceptedQuotes is used to query for quotes that were requested by
	// our node and have been accepted our peers.
	QueryPeerAcceptedQuotes(ctx context.Context, in *QueryPeerAcceptedQuotesRequest, opts ...grpc.CallOption) (*QueryPeerAcceptedQuotesResponse, error)
	// SubscribeRfqEventNtfns is used to subscribe to RFQ events.
	SubscribeRfqEventNtfns(ctx context.Context, in *SubscribeRfqEventNtfnsRequest, opts ...grpc.CallOption) (Rfq_SubscribeRfqEventNtfnsClient, error)
}

RfqClient is the client API for Rfq 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 NewRfqClient

func NewRfqClient(cc grpc.ClientConnInterface) RfqClient

type RfqEvent

type RfqEvent struct {

	// Types that are assignable to Event:
	//
	//	*RfqEvent_PeerAcceptedBuyQuote
	//	*RfqEvent_PeerAcceptedSellQuote
	//	*RfqEvent_AcceptHtlc
	Event isRfqEvent_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

func (*RfqEvent) Descriptor deprecated

func (*RfqEvent) Descriptor() ([]byte, []int)

Deprecated: Use RfqEvent.ProtoReflect.Descriptor instead.

func (*RfqEvent) GetAcceptHtlc

func (x *RfqEvent) GetAcceptHtlc() *AcceptHtlcEvent

func (*RfqEvent) GetEvent

func (m *RfqEvent) GetEvent() isRfqEvent_Event

func (*RfqEvent) GetPeerAcceptedBuyQuote

func (x *RfqEvent) GetPeerAcceptedBuyQuote() *PeerAcceptedBuyQuoteEvent

func (*RfqEvent) GetPeerAcceptedSellQuote

func (x *RfqEvent) GetPeerAcceptedSellQuote() *PeerAcceptedSellQuoteEvent

func (*RfqEvent) ProtoMessage

func (*RfqEvent) ProtoMessage()

func (*RfqEvent) ProtoReflect

func (x *RfqEvent) ProtoReflect() protoreflect.Message

func (*RfqEvent) Reset

func (x *RfqEvent) Reset()

func (*RfqEvent) String

func (x *RfqEvent) String() string

type RfqEvent_AcceptHtlc

type RfqEvent_AcceptHtlc struct {
	// accept_htlc is an event that is sent when a HTLC is accepted by the
	// RFQ service.
	AcceptHtlc *AcceptHtlcEvent `protobuf:"bytes,3,opt,name=accept_htlc,json=acceptHtlc,proto3,oneof"`
}

type RfqEvent_PeerAcceptedBuyQuote

type RfqEvent_PeerAcceptedBuyQuote struct {
	// peer_accepted_buy_quote is an event that is emitted when a peer
	// accepted (incoming) asset buy quote message is received.
	PeerAcceptedBuyQuote *PeerAcceptedBuyQuoteEvent `protobuf:"bytes,1,opt,name=peer_accepted_buy_quote,json=peerAcceptedBuyQuote,proto3,oneof"`
}

type RfqEvent_PeerAcceptedSellQuote

type RfqEvent_PeerAcceptedSellQuote struct {
	// peer_accepted_sell_offer is an event that is emitted when a peer
	// accepted (incoming) asset sell quote message is received.
	PeerAcceptedSellQuote *PeerAcceptedSellQuoteEvent `protobuf:"bytes,2,opt,name=peer_accepted_sell_quote,json=peerAcceptedSellQuote,proto3,oneof"`
}

type RfqServer

type RfqServer interface {
	// tapcli: `rfq buyorder`
	// AddAssetBuyOrder is used to add a buy order for a specific asset. If a buy
	// order already exists for the asset, it will be updated.
	AddAssetBuyOrder(context.Context, *AddAssetBuyOrderRequest) (*AddAssetBuyOrderResponse, error)
	// tapcli: `rfq sellorder`
	// AddAssetSellOrder is used to add a sell order for a specific asset. If a
	// sell order already exists for the asset, it will be updated.
	AddAssetSellOrder(context.Context, *AddAssetSellOrderRequest) (*AddAssetSellOrderResponse, error)
	// tapcli: `rfq selloffer`
	// AddAssetSellOffer is used to add a sell offer for a specific asset. If a
	// sell offer already exists for the asset, it will be updated.
	AddAssetSellOffer(context.Context, *AddAssetSellOfferRequest) (*AddAssetSellOfferResponse, error)
	// tapcli: `rfq buyoffer`
	// AddAssetBuyOffer is used to add a buy offer for a specific asset. If a
	// buy offer already exists for the asset, it will be updated.
	//
	// A buy offer is used by the node to selectively accept or reject incoming
	// asset sell quote requests before price is considered.
	AddAssetBuyOffer(context.Context, *AddAssetBuyOfferRequest) (*AddAssetBuyOfferResponse, error)
	// tapcli: `rfq acceptedquotes`
	// QueryPeerAcceptedQuotes is used to query for quotes that were requested by
	// our node and have been accepted our peers.
	QueryPeerAcceptedQuotes(context.Context, *QueryPeerAcceptedQuotesRequest) (*QueryPeerAcceptedQuotesResponse, error)
	// SubscribeRfqEventNtfns is used to subscribe to RFQ events.
	SubscribeRfqEventNtfns(*SubscribeRfqEventNtfnsRequest, Rfq_SubscribeRfqEventNtfnsServer) error
	// contains filtered or unexported methods
}

RfqServer is the server API for Rfq service. All implementations must embed UnimplementedRfqServer for forward compatibility

type Rfq_SubscribeRfqEventNtfnsClient

type Rfq_SubscribeRfqEventNtfnsClient interface {
	Recv() (*RfqEvent, error)
	grpc.ClientStream
}

type Rfq_SubscribeRfqEventNtfnsServer

type Rfq_SubscribeRfqEventNtfnsServer interface {
	Send(*RfqEvent) error
	grpc.ServerStream
}

type SubscribeRfqEventNtfnsRequest

type SubscribeRfqEventNtfnsRequest struct {
	// contains filtered or unexported fields
}

func (*SubscribeRfqEventNtfnsRequest) Descriptor deprecated

func (*SubscribeRfqEventNtfnsRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeRfqEventNtfnsRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRfqEventNtfnsRequest) ProtoMessage

func (*SubscribeRfqEventNtfnsRequest) ProtoMessage()

func (*SubscribeRfqEventNtfnsRequest) ProtoReflect

func (*SubscribeRfqEventNtfnsRequest) Reset

func (x *SubscribeRfqEventNtfnsRequest) Reset()

func (*SubscribeRfqEventNtfnsRequest) String

type UnimplementedRfqServer

type UnimplementedRfqServer struct {
}

UnimplementedRfqServer must be embedded to have forward compatible implementations.

type UnsafeRfqServer

type UnsafeRfqServer interface {
	// contains filtered or unexported methods
}

UnsafeRfqServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RfqServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL