lnrpc/invoicesrpc: expose new lookup modifier to LookupInvoiceV2
This commit is contained in:
4 files changed
+199
-60
No files matched your search
@@ -21,6 +21,64 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type LookupModifier int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
// The default look up modifier, no look up behavior is changed.
|
||||||
|
LookupModifier_DEFAULT LookupModifier = 0
|
||||||
|
//
|
||||||
|
//Indicates that when a look up is done based on a set_id, then only that set
|
||||||
|
//of HTLCs related to that set ID should be returned.
|
||||||
|
LookupModifier_HTLC_SET_ONLY LookupModifier = 1
|
||||||
|
//
|
||||||
|
//Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||||
|
//related to the payment_addr should be returned. This is useful when one
|
||||||
|
//wants to be able to obtain the set of associated setIDs with a given
|
||||||
|
//invoice, then look up the sub-invoices "projected" by that set ID.
|
||||||
|
LookupModifier_HTLC_SET_BLANK LookupModifier = 2
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for LookupModifier.
|
||||||
|
var (
|
||||||
|
LookupModifier_name = map[int32]string{
|
||||||
|
0: "DEFAULT",
|
||||||
|
1: "HTLC_SET_ONLY",
|
||||||
|
2: "HTLC_SET_BLANK",
|
||||||
|
}
|
||||||
|
LookupModifier_value = map[string]int32{
|
||||||
|
"DEFAULT": 0,
|
||||||
|
"HTLC_SET_ONLY": 1,
|
||||||
|
"HTLC_SET_BLANK": 2,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x LookupModifier) Enum() *LookupModifier {
|
||||||
|
p := new(LookupModifier)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x LookupModifier) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (LookupModifier) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_invoicesrpc_invoices_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (LookupModifier) Type() protoreflect.EnumType {
|
||||||
|
return &file_invoicesrpc_invoices_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x LookupModifier) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LookupModifier.Descriptor instead.
|
||||||
|
func (LookupModifier) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_invoicesrpc_invoices_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
type CancelInvoiceMsg struct {
|
type CancelInvoiceMsg struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -471,7 +529,8 @@ type LookupInvoiceMsg struct {
|
|||||||
// *LookupInvoiceMsg_PaymentHash
|
// *LookupInvoiceMsg_PaymentHash
|
||||||
// *LookupInvoiceMsg_PaymentAddr
|
// *LookupInvoiceMsg_PaymentAddr
|
||||||
// *LookupInvoiceMsg_SetId
|
// *LookupInvoiceMsg_SetId
|
||||||
InvoiceRef isLookupInvoiceMsg_InvoiceRef `protobuf_oneof:"invoice_ref"`
|
InvoiceRef isLookupInvoiceMsg_InvoiceRef `protobuf_oneof:"invoice_ref"`
|
||||||
|
LookupModifier LookupModifier `protobuf:"varint,4,opt,name=lookup_modifier,json=lookupModifier,proto3,enum=invoicesrpc.LookupModifier" json:"lookup_modifier,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LookupInvoiceMsg) Reset() {
|
func (x *LookupInvoiceMsg) Reset() {
|
||||||
@@ -534,6 +593,13 @@ func (x *LookupInvoiceMsg) GetSetId() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *LookupInvoiceMsg) GetLookupModifier() LookupModifier {
|
||||||
|
if x != nil {
|
||||||
|
return x.LookupModifier
|
||||||
|
}
|
||||||
|
return LookupModifier_DEFAULT
|
||||||
|
}
|
||||||
|
|
||||||
type isLookupInvoiceMsg_InvoiceRef interface {
|
type isLookupInvoiceMsg_InvoiceRef interface {
|
||||||
isLookupInvoiceMsg_InvoiceRef()
|
isLookupInvoiceMsg_InvoiceRef()
|
||||||
}
|
}
|
||||||
@@ -604,45 +670,54 @@ var file_invoicesrpc_invoices_proto_rawDesc = []byte{
|
|||||||
0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
||||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61,
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x5f, 0x68, 0x61,
|
||||||
0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x4a,
|
0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x48, 0x61, 0x73, 0x68, 0x4a,
|
||||||
0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70,
|
0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70,
|
||||||
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x23, 0x0a, 0x0c, 0x70, 0x61,
|
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x23, 0x0a, 0x0c, 0x70, 0x61,
|
||||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
|
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
|
||||||
0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12,
|
0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12,
|
||||||
0x23, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18,
|
0x23, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x41, 0x64, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03,
|
0x41, 0x64, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03,
|
||||||
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x42, 0x0d, 0x0a,
|
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x44, 0x0a,
|
||||||
0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x32, 0x9b, 0x03, 0x0a,
|
0x0f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72,
|
||||||
0x08, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x16, 0x53, 0x75, 0x62,
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||||
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f,
|
0x73, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x6f, 0x64, 0x69, 0x66,
|
||||||
0x69, 0x63, 0x65, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70,
|
0x69, 0x65, 0x72, 0x52, 0x0e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x6f, 0x64, 0x69, 0x66,
|
||||||
0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c,
|
0x69, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x72,
|
||||||
0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x65, 0x66, 0x2a, 0x44, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x4d, 0x6f, 0x64, 0x69,
|
||||||
0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x30,
|
0x66, 0x69, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10,
|
||||||
0x01, 0x12, 0x4e, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69,
|
0x00, 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x4e,
|
||||||
0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63,
|
0x4c, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x54,
|
||||||
0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73,
|
0x5f, 0x42, 0x4c, 0x41, 0x4e, 0x4b, 0x10, 0x02, 0x32, 0x9b, 0x03, 0x0a, 0x08, 0x49, 0x6e, 0x76,
|
||||||
0x67, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e,
|
0x6f, 0x69, 0x63, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||||
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73,
|
0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12,
|
||||||
0x70, 0x12, 0x55, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f,
|
0x2a, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75,
|
||||||
0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70,
|
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x76,
|
||||||
|
0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e,
|
||||||
|
0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x30, 0x01, 0x12, 0x4e, 0x0a,
|
||||||
|
0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1d,
|
||||||
|
0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e,
|
||||||
|
0x63, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x1e, 0x2e,
|
||||||
|
0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63,
|
||||||
|
0x65, 0x6c, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a,
|
||||||
|
0x0e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12,
|
||||||
|
0x22, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64,
|
||||||
|
0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70,
|
||||||
0x63, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
0x63, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e,
|
||||||
0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x49, 0x6e, 0x76,
|
0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73,
|
||||||
0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74,
|
0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
||||||
0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x6f,
|
0x65, 0x4d, 0x73, 0x67, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72,
|
||||||
0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e,
|
0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||||
0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69,
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e,
|
||||||
0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x76,
|
0x76, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x32, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63,
|
||||||
0x6f, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0f, 0x4c, 0x6f, 0x6f, 0x6b,
|
0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x6f,
|
||||||
0x75, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x32, 0x12, 0x1d, 0x2e, 0x69, 0x6e,
|
0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x49,
|
||||||
0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70,
|
0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||||
0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x0e, 0x2e, 0x6c, 0x6e, 0x72,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65,
|
||||||
0x70, 0x63, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69,
|
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69,
|
0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e,
|
0x74, 0x6f, 0x33,
|
||||||
0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x72, 0x70, 0x63, 0x62,
|
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -657,36 +732,39 @@ func file_invoicesrpc_invoices_proto_rawDescGZIP() []byte {
|
|||||||
return file_invoicesrpc_invoices_proto_rawDescData
|
return file_invoicesrpc_invoices_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var file_invoicesrpc_invoices_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_invoicesrpc_invoices_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
var file_invoicesrpc_invoices_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||||
var file_invoicesrpc_invoices_proto_goTypes = []interface{}{
|
var file_invoicesrpc_invoices_proto_goTypes = []interface{}{
|
||||||
(*CancelInvoiceMsg)(nil), // 0: invoicesrpc.CancelInvoiceMsg
|
(LookupModifier)(0), // 0: invoicesrpc.LookupModifier
|
||||||
(*CancelInvoiceResp)(nil), // 1: invoicesrpc.CancelInvoiceResp
|
(*CancelInvoiceMsg)(nil), // 1: invoicesrpc.CancelInvoiceMsg
|
||||||
(*AddHoldInvoiceRequest)(nil), // 2: invoicesrpc.AddHoldInvoiceRequest
|
(*CancelInvoiceResp)(nil), // 2: invoicesrpc.CancelInvoiceResp
|
||||||
(*AddHoldInvoiceResp)(nil), // 3: invoicesrpc.AddHoldInvoiceResp
|
(*AddHoldInvoiceRequest)(nil), // 3: invoicesrpc.AddHoldInvoiceRequest
|
||||||
(*SettleInvoiceMsg)(nil), // 4: invoicesrpc.SettleInvoiceMsg
|
(*AddHoldInvoiceResp)(nil), // 4: invoicesrpc.AddHoldInvoiceResp
|
||||||
(*SettleInvoiceResp)(nil), // 5: invoicesrpc.SettleInvoiceResp
|
(*SettleInvoiceMsg)(nil), // 5: invoicesrpc.SettleInvoiceMsg
|
||||||
(*SubscribeSingleInvoiceRequest)(nil), // 6: invoicesrpc.SubscribeSingleInvoiceRequest
|
(*SettleInvoiceResp)(nil), // 6: invoicesrpc.SettleInvoiceResp
|
||||||
(*LookupInvoiceMsg)(nil), // 7: invoicesrpc.LookupInvoiceMsg
|
(*SubscribeSingleInvoiceRequest)(nil), // 7: invoicesrpc.SubscribeSingleInvoiceRequest
|
||||||
(*lnrpc.RouteHint)(nil), // 8: lnrpc.RouteHint
|
(*LookupInvoiceMsg)(nil), // 8: invoicesrpc.LookupInvoiceMsg
|
||||||
(*lnrpc.Invoice)(nil), // 9: lnrpc.Invoice
|
(*lnrpc.RouteHint)(nil), // 9: lnrpc.RouteHint
|
||||||
|
(*lnrpc.Invoice)(nil), // 10: lnrpc.Invoice
|
||||||
}
|
}
|
||||||
var file_invoicesrpc_invoices_proto_depIdxs = []int32{
|
var file_invoicesrpc_invoices_proto_depIdxs = []int32{
|
||||||
8, // 0: invoicesrpc.AddHoldInvoiceRequest.route_hints:type_name -> lnrpc.RouteHint
|
9, // 0: invoicesrpc.AddHoldInvoiceRequest.route_hints:type_name -> lnrpc.RouteHint
|
||||||
6, // 1: invoicesrpc.Invoices.SubscribeSingleInvoice:input_type -> invoicesrpc.SubscribeSingleInvoiceRequest
|
0, // 1: invoicesrpc.LookupInvoiceMsg.lookup_modifier:type_name -> invoicesrpc.LookupModifier
|
||||||
0, // 2: invoicesrpc.Invoices.CancelInvoice:input_type -> invoicesrpc.CancelInvoiceMsg
|
7, // 2: invoicesrpc.Invoices.SubscribeSingleInvoice:input_type -> invoicesrpc.SubscribeSingleInvoiceRequest
|
||||||
2, // 3: invoicesrpc.Invoices.AddHoldInvoice:input_type -> invoicesrpc.AddHoldInvoiceRequest
|
1, // 3: invoicesrpc.Invoices.CancelInvoice:input_type -> invoicesrpc.CancelInvoiceMsg
|
||||||
4, // 4: invoicesrpc.Invoices.SettleInvoice:input_type -> invoicesrpc.SettleInvoiceMsg
|
3, // 4: invoicesrpc.Invoices.AddHoldInvoice:input_type -> invoicesrpc.AddHoldInvoiceRequest
|
||||||
7, // 5: invoicesrpc.Invoices.LookupInvoiceV2:input_type -> invoicesrpc.LookupInvoiceMsg
|
5, // 5: invoicesrpc.Invoices.SettleInvoice:input_type -> invoicesrpc.SettleInvoiceMsg
|
||||||
9, // 6: invoicesrpc.Invoices.SubscribeSingleInvoice:output_type -> lnrpc.Invoice
|
8, // 6: invoicesrpc.Invoices.LookupInvoiceV2:input_type -> invoicesrpc.LookupInvoiceMsg
|
||||||
1, // 7: invoicesrpc.Invoices.CancelInvoice:output_type -> invoicesrpc.CancelInvoiceResp
|
10, // 7: invoicesrpc.Invoices.SubscribeSingleInvoice:output_type -> lnrpc.Invoice
|
||||||
3, // 8: invoicesrpc.Invoices.AddHoldInvoice:output_type -> invoicesrpc.AddHoldInvoiceResp
|
2, // 8: invoicesrpc.Invoices.CancelInvoice:output_type -> invoicesrpc.CancelInvoiceResp
|
||||||
5, // 9: invoicesrpc.Invoices.SettleInvoice:output_type -> invoicesrpc.SettleInvoiceResp
|
4, // 9: invoicesrpc.Invoices.AddHoldInvoice:output_type -> invoicesrpc.AddHoldInvoiceResp
|
||||||
9, // 10: invoicesrpc.Invoices.LookupInvoiceV2:output_type -> lnrpc.Invoice
|
6, // 10: invoicesrpc.Invoices.SettleInvoice:output_type -> invoicesrpc.SettleInvoiceResp
|
||||||
6, // [6:11] is the sub-list for method output_type
|
10, // 11: invoicesrpc.Invoices.LookupInvoiceV2:output_type -> lnrpc.Invoice
|
||||||
1, // [1:6] is the sub-list for method input_type
|
7, // [7:12] is the sub-list for method output_type
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
2, // [2:7] is the sub-list for method input_type
|
||||||
1, // [1:1] is the sub-list for extension extendee
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
0, // [0:1] is the sub-list for field type_name
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
|
0, // [0:2] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_invoicesrpc_invoices_proto_init() }
|
func init() { file_invoicesrpc_invoices_proto_init() }
|
||||||
@@ -802,13 +880,14 @@ func file_invoicesrpc_invoices_proto_init() {
|
|||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_invoicesrpc_invoices_proto_rawDesc,
|
RawDescriptor: file_invoicesrpc_invoices_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 1,
|
||||||
NumMessages: 8,
|
NumMessages: 8,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_invoicesrpc_invoices_proto_goTypes,
|
GoTypes: file_invoicesrpc_invoices_proto_goTypes,
|
||||||
DependencyIndexes: file_invoicesrpc_invoices_proto_depIdxs,
|
DependencyIndexes: file_invoicesrpc_invoices_proto_depIdxs,
|
||||||
|
EnumInfos: file_invoicesrpc_invoices_proto_enumTypes,
|
||||||
MessageInfos: file_invoicesrpc_invoices_proto_msgTypes,
|
MessageInfos: file_invoicesrpc_invoices_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_invoicesrpc_invoices_proto = out.File
|
File_invoicesrpc_invoices_proto = out.File
|
||||||
|
|||||||
@@ -142,10 +142,31 @@ message SubscribeSingleInvoiceRequest {
|
|||||||
bytes r_hash = 2;
|
bytes r_hash = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum LookupModifier {
|
||||||
|
// The default look up modifier, no look up behavior is changed.
|
||||||
|
DEFAULT = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Indicates that when a look up is done based on a set_id, then only that set
|
||||||
|
of HTLCs related to that set ID should be returned.
|
||||||
|
*/
|
||||||
|
HTLC_SET_ONLY = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||||
|
related to the payment_addr should be returned. This is useful when one
|
||||||
|
wants to be able to obtain the set of associated setIDs with a given
|
||||||
|
invoice, then look up the sub-invoices "projected" by that set ID.
|
||||||
|
*/
|
||||||
|
HTLC_SET_BLANK = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message LookupInvoiceMsg {
|
message LookupInvoiceMsg {
|
||||||
oneof invoice_ref {
|
oneof invoice_ref {
|
||||||
bytes payment_hash = 1;
|
bytes payment_hash = 1;
|
||||||
bytes payment_addr = 2;
|
bytes payment_addr = 2;
|
||||||
bytes set_id = 3;
|
bytes set_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LookupModifier lookup_modifier = 4;
|
||||||
}
|
}
|
||||||
@@ -121,6 +121,19 @@
|
|||||||
"required": false,
|
"required": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "byte"
|
"format": "byte"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lookup_modifier",
|
||||||
|
"description": " - DEFAULT: The default look up modifier, no look up behavior is changed.\n - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set\nof HTLCs related to that set ID should be returned.\n - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs\nrelated to the payment_addr should be returned. This is useful when one\nwants to be able to obtain the set of associated setIDs with a given\ninvoice, then look up the sub-invoices \"projected\" by that set ID.",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"DEFAULT",
|
||||||
|
"HTLC_SET_ONLY",
|
||||||
|
"HTLC_SET_BLANK"
|
||||||
|
],
|
||||||
|
"default": "DEFAULT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -303,6 +316,16 @@
|
|||||||
"invoicesrpcCancelInvoiceResp": {
|
"invoicesrpcCancelInvoiceResp": {
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"invoicesrpcLookupModifier": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"DEFAULT",
|
||||||
|
"HTLC_SET_ONLY",
|
||||||
|
"HTLC_SET_BLANK"
|
||||||
|
],
|
||||||
|
"default": "DEFAULT",
|
||||||
|
"description": " - DEFAULT: The default look up modifier, no look up behavior is changed.\n - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set\nof HTLCs related to that set ID should be returned.\n - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs\nrelated to the payment_addr should be returned. This is useful when one\nwants to be able to obtain the set of associated setIDs with a given\ninvoice, then look up the sub-invoices \"projected\" by that set ID."
|
||||||
|
},
|
||||||
"invoicesrpcSettleInvoiceMsg": {
|
"invoicesrpcSettleInvoiceMsg": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -393,12 +393,28 @@ func (s *Server) LookupInvoiceV2(ctx context.Context,
|
|||||||
|
|
||||||
invoiceRef = channeldb.InvoiceRefByHash(payHash)
|
invoiceRef = channeldb.InvoiceRefByHash(payHash)
|
||||||
|
|
||||||
|
case req.GetPaymentAddr() != nil &&
|
||||||
|
req.LookupModifier == LookupModifier_HTLC_SET_BLANK:
|
||||||
|
|
||||||
|
var payAddr [32]byte
|
||||||
|
copy(payAddr[:], req.GetPaymentAddr())
|
||||||
|
|
||||||
|
invoiceRef = channeldb.InvoiceRefByAddrBlankHtlc(payAddr)
|
||||||
|
|
||||||
case req.GetPaymentAddr() != nil:
|
case req.GetPaymentAddr() != nil:
|
||||||
var payAddr [32]byte
|
var payAddr [32]byte
|
||||||
copy(payAddr[:], req.GetPaymentAddr())
|
copy(payAddr[:], req.GetPaymentAddr())
|
||||||
|
|
||||||
invoiceRef = channeldb.InvoiceRefByAddr(payAddr)
|
invoiceRef = channeldb.InvoiceRefByAddr(payAddr)
|
||||||
|
|
||||||
|
case req.GetSetId() != nil &&
|
||||||
|
req.LookupModifier == LookupModifier_HTLC_SET_ONLY:
|
||||||
|
|
||||||
|
var setID [32]byte
|
||||||
|
copy(setID[:], req.GetSetId())
|
||||||
|
|
||||||
|
invoiceRef = channeldb.InvoiceRefBySetIDFiltered(setID)
|
||||||
|
|
||||||
case req.GetSetId() != nil:
|
case req.GetSetId() != nil:
|
||||||
var setID [32]byte
|
var setID [32]byte
|
||||||
copy(setID[:], req.GetSetId())
|
copy(setID[:], req.GetSetId())
|
||||||
|
|||||||
Reference in new issue
Block a user