swapserverrpc: add instantout quote req

pull/697/head
sputn1ck 3 months ago
parent c6e8664281
commit 85e74adf5a
No known key found for this signature in database
GPG Key ID: 671103D881A5F0E4

@ -746,6 +746,102 @@ func (*CancelInstantSwapResponse) Descriptor() ([]byte, []int) {
return file_instantout_proto_rawDescGZIP(), []int{11}
}
type GetInstantOutQuoteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The amount to swap in satoshis.
Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
}
func (x *GetInstantOutQuoteRequest) Reset() {
*x = GetInstantOutQuoteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_instantout_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInstantOutQuoteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInstantOutQuoteRequest) ProtoMessage() {}
func (x *GetInstantOutQuoteRequest) ProtoReflect() protoreflect.Message {
mi := &file_instantout_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInstantOutQuoteRequest.ProtoReflect.Descriptor instead.
func (*GetInstantOutQuoteRequest) Descriptor() ([]byte, []int) {
return file_instantout_proto_rawDescGZIP(), []int{12}
}
func (x *GetInstantOutQuoteRequest) GetAmount() uint64 {
if x != nil {
return x.Amount
}
return 0
}
type GetInstantOutQuoteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The swap fee in satoshis.
SwapFee uint64 `protobuf:"varint,1,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"`
}
func (x *GetInstantOutQuoteResponse) Reset() {
*x = GetInstantOutQuoteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_instantout_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInstantOutQuoteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInstantOutQuoteResponse) ProtoMessage() {}
func (x *GetInstantOutQuoteResponse) ProtoReflect() protoreflect.Message {
mi := &file_instantout_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInstantOutQuoteResponse.ProtoReflect.Descriptor instead.
func (*GetInstantOutQuoteResponse) Descriptor() ([]byte, []int) {
return file_instantout_proto_rawDescGZIP(), []int{13}
}
func (x *GetInstantOutQuoteResponse) GetSwapFee() uint64 {
if x != nil {
return x.SwapFee
}
return 0
}
var File_instantout_proto protoreflect.FileDescriptor
var file_instantout_proto_rawDesc = []byte{
@ -822,49 +918,62 @@ var file_instantout_proto_rawDesc = []byte{
0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22,
0x1b, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x51, 0x0a, 0x19,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x53,
0x54, 0x41, 0x4e, 0x54, 0x4f, 0x55, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1f,
0x0a, 0x1b, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x4f, 0x55, 0x54, 0x5f, 0x46, 0x55, 0x4c,
0x4c, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x32,
0x8c, 0x04, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x15, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x1e,
0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x60, 0x0a, 0x13, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63,
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63,
0x2e, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65,
0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f,
0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x48, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67,
0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48,
0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x74, 0x6c, 0x63,
0x53, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x50,
0x75, 0x73, 0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f,
0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70,
0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65,
0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e,
0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75,
0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70,
0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53,
0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f,
0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d,
0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67,
0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f,
0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x19,
0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
0x74, 0x22, 0x37, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f,
0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x19, 0x0a, 0x08, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x07, 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x2a, 0x51, 0x0a, 0x19, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x53, 0x54, 0x41,
0x4e, 0x54, 0x4f, 0x55, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b,
0x49, 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x54, 0x4f, 0x55, 0x54, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x5f,
0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x32, 0xeb, 0x04,
0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x77, 0x61, 0x70, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x15, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e,
0x73, 0x74, 0x61, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x1e, 0x2e, 0x6c,
0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4c, 0x6f,
0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c,
0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4c, 0x6f,
0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a,
0x13, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65,
0x70, 0x74, 0x65, 0x64, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50,
0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74,
0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70,
0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x6c, 0x6c, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41,
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x48, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x12, 0x1b,
0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x74, 0x6c,
0x63, 0x53, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f,
0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x50, 0x75, 0x73,
0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72,
0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e,
0x50, 0x75, 0x73, 0x68, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75,
0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68,
0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e,
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x77, 0x61,
0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72,
0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12,
0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f,
0x74, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74,
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63,
0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75,
0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e,
0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61,
0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -880,7 +989,7 @@ func file_instantout_proto_rawDescGZIP() []byte {
}
var file_instantout_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_instantout_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_instantout_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_instantout_proto_goTypes = []interface{}{
(InstantOutProtocolVersion)(0), // 0: looprpc.InstantOutProtocolVersion
(*InstantLoopOutRequest)(nil), // 1: looprpc.InstantLoopOutRequest
@ -895,6 +1004,8 @@ var file_instantout_proto_goTypes = []interface{}{
(*PushPreimageResponse)(nil), // 10: looprpc.PushPreimageResponse
(*CancelInstantSwapRequest)(nil), // 11: looprpc.CancelInstantSwapRequest
(*CancelInstantSwapResponse)(nil), // 12: looprpc.CancelInstantSwapResponse
(*GetInstantOutQuoteRequest)(nil), // 13: looprpc.GetInstantOutQuoteRequest
(*GetInstantOutQuoteResponse)(nil), // 14: looprpc.GetInstantOutQuoteResponse
}
var file_instantout_proto_depIdxs = []int32{
0, // 0: looprpc.InstantLoopOutRequest.protocol_version:type_name -> looprpc.InstantOutProtocolVersion
@ -904,14 +1015,16 @@ var file_instantout_proto_depIdxs = []int32{
7, // 4: looprpc.InstantSwapServer.PushHtlcSig:input_type -> looprpc.PushHtlcSigRequest
9, // 5: looprpc.InstantSwapServer.PushPreimage:input_type -> looprpc.PushPreimageRequest
11, // 6: looprpc.InstantSwapServer.CancelInstantSwap:input_type -> looprpc.CancelInstantSwapRequest
2, // 7: looprpc.InstantSwapServer.RequestInstantLoopOut:output_type -> looprpc.InstantLoopOutResponse
4, // 8: looprpc.InstantSwapServer.PollPaymentAccepted:output_type -> looprpc.PollPaymentAcceptedResponse
6, // 9: looprpc.InstantSwapServer.InitHtlcSig:output_type -> looprpc.InitHtlcSigResponse
8, // 10: looprpc.InstantSwapServer.PushHtlcSig:output_type -> looprpc.PushHtlcSigResponse
10, // 11: looprpc.InstantSwapServer.PushPreimage:output_type -> looprpc.PushPreimageResponse
12, // 12: looprpc.InstantSwapServer.CancelInstantSwap:output_type -> looprpc.CancelInstantSwapResponse
7, // [7:13] is the sub-list for method output_type
1, // [1:7] is the sub-list for method input_type
13, // 7: looprpc.InstantSwapServer.GetInstantOutQuote:input_type -> looprpc.GetInstantOutQuoteRequest
2, // 8: looprpc.InstantSwapServer.RequestInstantLoopOut:output_type -> looprpc.InstantLoopOutResponse
4, // 9: looprpc.InstantSwapServer.PollPaymentAccepted:output_type -> looprpc.PollPaymentAcceptedResponse
6, // 10: looprpc.InstantSwapServer.InitHtlcSig:output_type -> looprpc.InitHtlcSigResponse
8, // 11: looprpc.InstantSwapServer.PushHtlcSig:output_type -> looprpc.PushHtlcSigResponse
10, // 12: looprpc.InstantSwapServer.PushPreimage:output_type -> looprpc.PushPreimageResponse
12, // 13: looprpc.InstantSwapServer.CancelInstantSwap:output_type -> looprpc.CancelInstantSwapResponse
14, // 14: looprpc.InstantSwapServer.GetInstantOutQuote:output_type -> looprpc.GetInstantOutQuoteResponse
8, // [8:15] is the sub-list for method output_type
1, // [1:8] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
@ -1067,6 +1180,30 @@ func file_instantout_proto_init() {
return nil
}
}
file_instantout_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInstantOutQuoteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_instantout_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInstantOutQuoteResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -1074,7 +1211,7 @@ func file_instantout_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_instantout_proto_rawDesc,
NumEnums: 1,
NumMessages: 12,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},

@ -33,6 +33,11 @@ service InstantSwapServer {
// called if the swap has not been accepted yet.
rpc CancelInstantSwap (CancelInstantSwapRequest)
returns (CancelInstantSwapResponse);
// GetInstantOutQuote returns the absolute fee in satoshis for the swap and
// the pubkey to query the route to estimate offchain payment fees.
rpc GetInstantOutQuote (GetInstantOutQuoteRequest)
returns (GetInstantOutQuoteResponse);
}
message InstantLoopOutRequest {
@ -130,6 +135,16 @@ message CancelInstantSwapRequest {
message CancelInstantSwapResponse {
}
message GetInstantOutQuoteRequest {
// The amount to swap in satoshis.
uint64 amount = 1;
}
message GetInstantOutQuoteResponse {
// The swap fee in satoshis.
uint64 swap_fee = 1;
}
enum InstantOutProtocolVersion {
INSTANTOUT_NONE = 0;
INSTANTOUT_FULL_RESERVATION = 1;

@ -34,6 +34,9 @@ type InstantSwapServerClient interface {
// CancelInstantSwap tries to cancel the instant swap. This can only be
// called if the swap has not been accepted yet.
CancelInstantSwap(ctx context.Context, in *CancelInstantSwapRequest, opts ...grpc.CallOption) (*CancelInstantSwapResponse, error)
// GetInstantOutQuote returns the absolute fee in satoshis for the swap and
// the pubkey to query the route to estimate offchain payment fees.
GetInstantOutQuote(ctx context.Context, in *GetInstantOutQuoteRequest, opts ...grpc.CallOption) (*GetInstantOutQuoteResponse, error)
}
type instantSwapServerClient struct {
@ -98,6 +101,15 @@ func (c *instantSwapServerClient) CancelInstantSwap(ctx context.Context, in *Can
return out, nil
}
func (c *instantSwapServerClient) GetInstantOutQuote(ctx context.Context, in *GetInstantOutQuoteRequest, opts ...grpc.CallOption) (*GetInstantOutQuoteResponse, error) {
out := new(GetInstantOutQuoteResponse)
err := c.cc.Invoke(ctx, "/looprpc.InstantSwapServer/GetInstantOutQuote", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// InstantSwapServerServer is the server API for InstantSwapServer service.
// All implementations must embed UnimplementedInstantSwapServerServer
// for forward compatibility
@ -118,6 +130,9 @@ type InstantSwapServerServer interface {
// CancelInstantSwap tries to cancel the instant swap. This can only be
// called if the swap has not been accepted yet.
CancelInstantSwap(context.Context, *CancelInstantSwapRequest) (*CancelInstantSwapResponse, error)
// GetInstantOutQuote returns the absolute fee in satoshis for the swap and
// the pubkey to query the route to estimate offchain payment fees.
GetInstantOutQuote(context.Context, *GetInstantOutQuoteRequest) (*GetInstantOutQuoteResponse, error)
mustEmbedUnimplementedInstantSwapServerServer()
}
@ -143,6 +158,9 @@ func (UnimplementedInstantSwapServerServer) PushPreimage(context.Context, *PushP
func (UnimplementedInstantSwapServerServer) CancelInstantSwap(context.Context, *CancelInstantSwapRequest) (*CancelInstantSwapResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelInstantSwap not implemented")
}
func (UnimplementedInstantSwapServerServer) GetInstantOutQuote(context.Context, *GetInstantOutQuoteRequest) (*GetInstantOutQuoteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInstantOutQuote not implemented")
}
func (UnimplementedInstantSwapServerServer) mustEmbedUnimplementedInstantSwapServerServer() {}
// UnsafeInstantSwapServerServer may be embedded to opt out of forward compatibility for this service.
@ -264,6 +282,24 @@ func _InstantSwapServer_CancelInstantSwap_Handler(srv interface{}, ctx context.C
return interceptor(ctx, in, info, handler)
}
func _InstantSwapServer_GetInstantOutQuote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetInstantOutQuoteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InstantSwapServerServer).GetInstantOutQuote(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.InstantSwapServer/GetInstantOutQuote",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InstantSwapServerServer).GetInstantOutQuote(ctx, req.(*GetInstantOutQuoteRequest))
}
return interceptor(ctx, in, info, handler)
}
// InstantSwapServer_ServiceDesc is the grpc.ServiceDesc for InstantSwapServer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -295,6 +331,10 @@ var InstantSwapServer_ServiceDesc = grpc.ServiceDesc{
MethodName: "CancelInstantSwap",
Handler: _InstantSwapServer_CancelInstantSwap_Handler,
},
{
MethodName: "GetInstantOutQuote",
Handler: _InstantSwapServer_GetInstantOutQuote_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "instantout.proto",

Loading…
Cancel
Save