routerrpc: accept route hints for SendPayment rpc
This commit is contained in:
parent
5ce04091d8
commit
1e79ddc9bc
@ -201,6 +201,9 @@ type SendPaymentRequest struct {
|
|||||||
//An optional maximum total time lock for the route. If zero, there is no
|
//An optional maximum total time lock for the route. If zero, there is no
|
||||||
//maximum enforced.
|
//maximum enforced.
|
||||||
CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
|
CltvLimit int32 `protobuf:"varint,9,opt,name=cltv_limit,json=cltvLimit,proto3" json:"cltv_limit,omitempty"`
|
||||||
|
//*
|
||||||
|
//Optional route hints to reach the destination through private channels.
|
||||||
|
RouteHints []*lnrpc.RouteHint `protobuf:"bytes,10,rep,name=route_hints,proto3" json:"route_hints,omitempty"`
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
XXX_sizecache int32 `json:"-"`
|
||||||
@ -294,6 +297,13 @@ func (m *SendPaymentRequest) GetCltvLimit() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *SendPaymentRequest) GetRouteHints() []*lnrpc.RouteHint {
|
||||||
|
if m != nil {
|
||||||
|
return m.RouteHints
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type TrackPaymentRequest struct {
|
type TrackPaymentRequest struct {
|
||||||
/// The hash of the payment to look up.
|
/// The hash of the payment to look up.
|
||||||
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||||
@ -1157,108 +1167,109 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
|
func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) }
|
||||||
|
|
||||||
var fileDescriptor_7a0613f69d37b0a5 = []byte{
|
var fileDescriptor_7a0613f69d37b0a5 = []byte{
|
||||||
// 1601 bytes of a gzipped FileDescriptorProto
|
// 1623 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xdd, 0x72, 0x1a, 0xc9,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xdd, 0x72, 0x1a, 0xc9,
|
||||||
0x15, 0x5e, 0x04, 0x08, 0x71, 0xf8, 0x1b, 0xb5, 0x64, 0x19, 0x23, 0xcb, 0xab, 0x9d, 0x24, 0x5e,
|
0x15, 0x5e, 0x04, 0x08, 0x71, 0xf8, 0x1b, 0xb5, 0x64, 0x79, 0x8c, 0x2c, 0xaf, 0x76, 0x92, 0x78,
|
||||||
0x95, 0x6b, 0x23, 0x25, 0xa4, 0xbc, 0xb5, 0x57, 0x49, 0x61, 0x68, 0x96, 0x89, 0x61, 0x46, 0xdb,
|
0x55, 0xae, 0x8d, 0x94, 0x90, 0xf2, 0xd6, 0x5e, 0x25, 0x85, 0xa1, 0x59, 0x26, 0x86, 0x19, 0x6d,
|
||||||
0x80, 0x77, 0x9d, 0x5c, 0x74, 0xb5, 0xa0, 0x05, 0x53, 0x1a, 0x66, 0xd8, 0x99, 0x66, 0x63, 0xe5,
|
0x03, 0xde, 0x75, 0x72, 0xd1, 0xd5, 0x82, 0x16, 0x4c, 0x09, 0x66, 0xd8, 0x99, 0x66, 0x63, 0xe5,
|
||||||
0x22, 0x77, 0xc9, 0x5d, 0x9e, 0x25, 0x79, 0x82, 0x5c, 0xe6, 0x1d, 0xf2, 0x36, 0xa9, 0xee, 0x1e,
|
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0x96, 0x73, 0xea,
|
0xfe, 0x28, 0x32, 0xf7, 0xb5, 0xc6, 0x18, 0xee, 0x69, 0x14, 0x59, 0x50, 0xba, 0xe5, 0x9c, 0x4e,
|
||||||
0xb9, 0x33, 0x57, 0xd0, 0x88, 0x89, 0x6a, 0x4e, 0xb9, 0x5e, 0xb8, 0xe5, 0xbc, 0x2b, 0xb1, 0x3e,
|
0xbd, 0x99, 0x27, 0x68, 0xc4, 0x84, 0x99, 0x53, 0xae, 0x17, 0x6e, 0x39, 0xef, 0x48, 0xac, 0xc7,
|
||||||
0x13, 0xd2, 0xbf, 0x60, 0x21, 0x26, 0x81, 0xeb, 0x4f, 0xe8, 0x68, 0xca, 0x7c, 0xea, 0x8e, 0xab,
|
0x84, 0xf4, 0x2f, 0x58, 0x88, 0x71, 0xe0, 0xf9, 0x63, 0x3a, 0x9c, 0x30, 0x9f, 0x7a, 0x23, 0xf3,
|
||||||
0x07, 0xe7, 0xa9, 0x8b, 0x0c, 0x29, 0x2f, 0xf1, 0xe6, 0x94, 0xf9, 0xd6, 0x18, 0x9d, 0x01, 0xa8,
|
0xe0, 0x3c, 0x75, 0x91, 0x21, 0xe5, 0x25, 0xde, 0x98, 0x30, 0xdf, 0x1e, 0xa1, 0x33, 0x00, 0x75,
|
||||||
0x3b, 0x28, 0x75, 0xd5, 0xbc, 0xb2, 0x98, 0x97, 0x88, 0xd2, 0x65, 0x7e, 0x03, 0x47, 0x83, 0x90,
|
0x07, 0xa5, 0xce, 0xcc, 0x2b, 0x8b, 0x79, 0x89, 0x28, 0x5d, 0xa8, 0x06, 0x05, 0x15, 0x60, 0x3a,
|
||||||
0x8d, 0xee, 0xb6, 0x02, 0xb9, 0x1d, 0xa2, 0xd4, 0x83, 0x10, 0x99, 0x7f, 0x83, 0x52, 0x7c, 0xa8,
|
0xf1, 0x7c, 0x11, 0x99, 0x70, 0x9e, 0xbe, 0x28, 0xd4, 0x8c, 0xcb, 0xa9, 0x2f, 0x63, 0x4d, 0xa4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c, 0xdf, 0x7d,
|
||||||
0x1d, 0x8c, 0x79, 0xc7, 0x8d, 0x44, 0x10, 0xde, 0x13, 0x4d, 0x32, 0xff, 0x93, 0x82, 0x42, 0x02,
|
0xf8, 0x2d, 0x9c, 0xee, 0x94, 0xc6, 0xe3, 0xff, 0x2b, 0xc8, 0xfa, 0xc1, 0x88, 0x47, 0x66, 0x4a,
|
||||||
0x46, 0x27, 0xb0, 0x1f, 0xcf, 0x68, 0x5d, 0x54, 0xf1, 0x17, 0x7a, 0x09, 0x65, 0x8f, 0x45, 0x82,
|
0x2d, 0x00, 0x27, 0x89, 0xb9, 0xe9, 0x04, 0x23, 0xde, 0xf6, 0x22, 0x11, 0x84, 0xf7, 0x44, 0x93,
|
||||||
0xca, 0x91, 0x4d, 0x65, 0x92, 0xe2, 0xf7, 0x6e, 0x0b, 0x45, 0xdf, 0xc0, 0xd3, 0x40, 0x4c, 0x79,
|
0xac, 0xff, 0xa4, 0xa0, 0x90, 0x80, 0xd1, 0x09, 0xec, 0xc7, 0x33, 0x5a, 0x17, 0x55, 0xfc, 0x85,
|
||||||
0xa8, 0xd7, 0x92, 0x68, 0x31, 0x1a, 0xf1, 0x28, 0xa2, 0xf3, 0x30, 0xb8, 0x51, 0xa5, 0xb6, 0x47,
|
0x5e, 0x42, 0x79, 0xca, 0x22, 0x41, 0xe5, 0xc8, 0xa6, 0x32, 0x49, 0xf1, 0x7b, 0xb7, 0x85, 0xa2,
|
||||||
0x1e, 0x13, 0xa3, 0xd7, 0x70, 0x10, 0xd7, 0x48, 0x54, 0xcd, 0x28, 0xd7, 0x9f, 0x3d, 0x1c, 0xf9,
|
0x6f, 0xe0, 0x69, 0x20, 0x26, 0x3c, 0xd4, 0xab, 0x4c, 0xb4, 0x18, 0x0e, 0x79, 0x14, 0xd1, 0x79,
|
||||||
0x4b, 0xef, 0x57, 0x54, 0xf3, 0xdf, 0x29, 0x28, 0x6f, 0x0a, 0xd1, 0x0b, 0x55, 0xfd, 0xaa, 0x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
0x09, 0xc2, 0xbb, 0x2b, 0xcf, 0x1f, 0x5f, 0xa9, 0x2d, 0xf4, 0x6a, 0xa5, 0xee, 0x66, 0x5f, 0xfd,
|
0x3f, 0x5d, 0x8d, 0x3d, 0x31, 0x59, 0xdc, 0x5c, 0x0e, 0x83, 0xd9, 0xd5, 0xd4, 0x1b, 0x4f, 0x84,
|
||||||
0x3f, 0xf6, 0xbb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x24, 0x56, 0xf2, 0xbf, 0x0d, 0x00,
|
0xef, 0xf9, 0x63, 0x9f, 0x8b, 0xbf, 0x04, 0xe1, 0xdd, 0xd5, 0xd4, 0x1f, 0x5d, 0xa9, 0x2d, 0xf4,
|
||||||
0x00,
|
0x6a, 0xa5, 0xee, 0x66, 0x5f, 0xfd, 0x0f, 0xf7, 0xbb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xb7,
|
||||||
|
0x0c, 0x44, 0x60, 0xf3, 0x0d, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -58,6 +58,11 @@ message SendPaymentRequest {
|
|||||||
maximum enforced.
|
maximum enforced.
|
||||||
*/
|
*/
|
||||||
int32 cltv_limit = 9;
|
int32 cltv_limit = 9;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Optional route hints to reach the destination through private channels.
|
||||||
|
*/
|
||||||
|
repeated lnrpc.RouteHint route_hints = 10 [json_name = "route_hints"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message TrackPaymentRequest {
|
message TrackPaymentRequest {
|
||||||
|
@ -6,6 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/btcsuite/btcd/btcec"
|
||||||
|
|
||||||
"github.com/btcsuite/btcd/chaincfg"
|
"github.com/btcsuite/btcd/chaincfg"
|
||||||
"github.com/btcsuite/btcutil"
|
"github.com/btcsuite/btcutil"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc"
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
@ -382,6 +384,15 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
payIntent.PayAttemptTimeout = time.Second *
|
payIntent.PayAttemptTimeout = time.Second *
|
||||||
time.Duration(rpcPayReq.TimeoutSeconds)
|
time.Duration(rpcPayReq.TimeoutSeconds)
|
||||||
|
|
||||||
|
// Route hints.
|
||||||
|
routeHints, err := unmarshallRouteHints(
|
||||||
|
rpcPayReq.RouteHints,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
payIntent.RouteHints = routeHints
|
||||||
|
|
||||||
// If the payment request field isn't blank, then the details of the
|
// If the payment request field isn't blank, then the details of the
|
||||||
// invoice are encoded entirely within the encoded payReq. So we'll
|
// invoice are encoded entirely within the encoded payReq. So we'll
|
||||||
// attempt to decode it, populating the payment accordingly.
|
// attempt to decode it, populating the payment accordingly.
|
||||||
@ -443,7 +454,9 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
copy(payIntent.Target[:], destKey)
|
copy(payIntent.Target[:], destKey)
|
||||||
|
|
||||||
payIntent.FinalCLTVDelta = uint16(payReq.MinFinalCLTVExpiry())
|
payIntent.FinalCLTVDelta = uint16(payReq.MinFinalCLTVExpiry())
|
||||||
payIntent.RouteHints = payReq.RouteHints
|
payIntent.RouteHints = append(
|
||||||
|
payIntent.RouteHints, payReq.RouteHints...,
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, If the payment request field was not specified
|
// Otherwise, If the payment request field was not specified
|
||||||
// (and a custom route wasn't specified), construct the payment
|
// (and a custom route wasn't specified), construct the payment
|
||||||
@ -493,6 +506,50 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
return payIntent, nil
|
return payIntent, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unmarshallRouteHints unmarshalls a list of route hints.
|
||||||
|
func unmarshallRouteHints(rpcRouteHints []*lnrpc.RouteHint) (
|
||||||
|
[][]zpay32.HopHint, error) {
|
||||||
|
|
||||||
|
routeHints := make([][]zpay32.HopHint, 0, len(rpcRouteHints))
|
||||||
|
for _, rpcRouteHint := range rpcRouteHints {
|
||||||
|
routeHint := make(
|
||||||
|
[]zpay32.HopHint, 0, len(rpcRouteHint.HopHints),
|
||||||
|
)
|
||||||
|
for _, rpcHint := range rpcRouteHint.HopHints {
|
||||||
|
hint, err := unmarshallHopHint(rpcHint)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
routeHint = append(routeHint, hint)
|
||||||
|
}
|
||||||
|
routeHints = append(routeHints, routeHint)
|
||||||
|
}
|
||||||
|
|
||||||
|
return routeHints, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// unmarshallHopHint unmarshalls a single hop hint.
|
||||||
|
func unmarshallHopHint(rpcHint *lnrpc.HopHint) (zpay32.HopHint, error) {
|
||||||
|
pubBytes, err := hex.DecodeString(rpcHint.NodeId)
|
||||||
|
if err != nil {
|
||||||
|
return zpay32.HopHint{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
pubkey, err := btcec.ParsePubKey(pubBytes, btcec.S256())
|
||||||
|
if err != nil {
|
||||||
|
return zpay32.HopHint{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return zpay32.HopHint{
|
||||||
|
NodeID: pubkey,
|
||||||
|
ChannelID: rpcHint.ChanId,
|
||||||
|
FeeBaseMSat: rpcHint.FeeBaseMsat,
|
||||||
|
FeeProportionalMillionths: rpcHint.FeeProportionalMillionths,
|
||||||
|
CLTVExpiryDelta: uint16(rpcHint.CltvExpiryDelta),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// ValidatePayReqExpiry checks if the passed payment request has expired. In
|
// ValidatePayReqExpiry checks if the passed payment request has expired. In
|
||||||
// the case it has expired, an error will be returned.
|
// the case it has expired, an error will be returned.
|
||||||
func ValidatePayReqExpiry(payReq *zpay32.Invoice) error {
|
func ValidatePayReqExpiry(payReq *zpay32.Invoice) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user