lnrpc+routerrpc+lncli: add amt and fee limit msat fields
This commit is contained in:
9 files changed
+931
-710
No files matched your search
@@ -1,10 +1,20 @@
|
|||||||
package lnrpc
|
package lnrpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
|
||||||
"github.com/btcsuite/btcutil"
|
"github.com/btcsuite/btcutil"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// ErrSatMsatMutualExclusive is returned when both a sat and an msat
|
||||||
|
// amount are set.
|
||||||
|
ErrSatMsatMutualExclusive = errors.New(
|
||||||
|
"sat and msat arguments are mutually exclusive",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
// CalculateFeeLimit returns the fee limit in millisatoshis. If a percentage
|
// CalculateFeeLimit returns the fee limit in millisatoshis. If a percentage
|
||||||
// based fee limit has been requested, we'll factor in the ratio provided with
|
// based fee limit has been requested, we'll factor in the ratio provided with
|
||||||
// the amount of the payment.
|
// the amount of the payment.
|
||||||
@@ -18,6 +28,9 @@ func CalculateFeeLimit(feeLimit *FeeLimit,
|
|||||||
btcutil.Amount(feeLimit.GetFixed()),
|
btcutil.Amount(feeLimit.GetFixed()),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
case *FeeLimit_FixedMsat:
|
||||||
|
return lnwire.MilliSatoshi(feeLimit.GetFixedMsat())
|
||||||
|
|
||||||
case *FeeLimit_Percent:
|
case *FeeLimit_Percent:
|
||||||
return amount * lnwire.MilliSatoshi(feeLimit.GetPercent()) / 100
|
return amount * lnwire.MilliSatoshi(feeLimit.GetPercent()) / 100
|
||||||
|
|
||||||
@@ -28,3 +41,16 @@ func CalculateFeeLimit(feeLimit *FeeLimit,
|
|||||||
return amount
|
return amount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnmarshallAmt returns a strong msat type for a sat/msat pair of rpc fields.
|
||||||
|
func UnmarshallAmt(amtSat, amtMsat int64) (lnwire.MilliSatoshi, error) {
|
||||||
|
if amtSat != 0 && amtMsat != 0 {
|
||||||
|
return 0, ErrSatMsatMutualExclusive
|
||||||
|
}
|
||||||
|
|
||||||
|
if amtSat != 0 {
|
||||||
|
return lnwire.NewMSatFromSatoshis(btcutil.Amount(amtSat)), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return lnwire.MilliSatoshi(amtMsat), nil
|
||||||
|
}
|
||||||
+158
-123
@@ -180,8 +180,16 @@ func (Failure_FailureCode) EnumDescriptor() ([]byte, []int) {
|
|||||||
type SendPaymentRequest struct {
|
type SendPaymentRequest struct {
|
||||||
/// The identity pubkey of the payment recipient
|
/// The identity pubkey of the payment recipient
|
||||||
Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
|
Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"`
|
||||||
/// Number of satoshis to send.
|
//*
|
||||||
|
//Number of satoshis to send.
|
||||||
|
//
|
||||||
|
//The fields amt and amt_msat are mutually exclusive.
|
||||||
Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"`
|
Amt int64 `protobuf:"varint,2,opt,name=amt,proto3" json:"amt,omitempty"`
|
||||||
|
//*
|
||||||
|
//Number of millisatoshis to send.
|
||||||
|
//
|
||||||
|
//The fields amt and amt_msat are mutually exclusive.
|
||||||
|
AmtMsat int64 `protobuf:"varint,12,opt,name=amt_msat,json=amtMsat,proto3" json:"amt_msat,omitempty"`
|
||||||
/// The hash to use within the payment's HTLC
|
/// The hash to use within the payment's HTLC
|
||||||
PaymentHash []byte `protobuf:"bytes,3,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
PaymentHash []byte `protobuf:"bytes,3,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
|
||||||
//*
|
//*
|
||||||
@@ -206,8 +214,19 @@ type SendPaymentRequest struct {
|
|||||||
//If this field is left to the default value of 0, only zero-fee routes will
|
//If this field is left to the default value of 0, only zero-fee routes will
|
||||||
//be considered. This usually means single hop routes connecting directly to
|
//be considered. This usually means single hop routes connecting directly to
|
||||||
//the destination. To send the payment without a fee limit, use max int here.
|
//the destination. To send the payment without a fee limit, use max int here.
|
||||||
|
//
|
||||||
|
//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
FeeLimitSat int64 `protobuf:"varint,7,opt,name=fee_limit_sat,json=feeLimitSat,proto3" json:"fee_limit_sat,omitempty"`
|
FeeLimitSat int64 `protobuf:"varint,7,opt,name=fee_limit_sat,json=feeLimitSat,proto3" json:"fee_limit_sat,omitempty"`
|
||||||
//*
|
//*
|
||||||
|
//The maximum number of millisatoshis that will be paid as a fee of the
|
||||||
|
//payment. If this field is left to the default value of 0, only zero-fee
|
||||||
|
//routes will be considered. This usually means single hop routes connecting
|
||||||
|
//directly to the destination. To send the payment without a fee limit, use
|
||||||
|
//max int here.
|
||||||
|
//
|
||||||
|
//The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
|
FeeLimitMsat int64 `protobuf:"varint,13,opt,name=fee_limit_msat,json=feeLimitMsat,proto3" json:"fee_limit_msat,omitempty"`
|
||||||
|
//*
|
||||||
//The channel id of the channel that must be taken to the first hop. If zero,
|
//The channel id of the channel that must be taken to the first hop. If zero,
|
||||||
//any channel may be used.
|
//any channel may be used.
|
||||||
OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
|
OutgoingChanId uint64 `protobuf:"varint,8,opt,name=outgoing_chan_id,json=outgoingChanId,proto3" json:"outgoing_chan_id,omitempty"`
|
||||||
@@ -268,6 +287,13 @@ func (m *SendPaymentRequest) GetAmt() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *SendPaymentRequest) GetAmtMsat() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.AmtMsat
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (m *SendPaymentRequest) GetPaymentHash() []byte {
|
func (m *SendPaymentRequest) GetPaymentHash() []byte {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.PaymentHash
|
return m.PaymentHash
|
||||||
@@ -303,6 +329,13 @@ func (m *SendPaymentRequest) GetFeeLimitSat() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *SendPaymentRequest) GetFeeLimitMsat() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.FeeLimitMsat
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (m *SendPaymentRequest) GetOutgoingChanId() uint64 {
|
func (m *SendPaymentRequest) GetOutgoingChanId() uint64 {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.OutgoingChanId
|
return m.OutgoingChanId
|
||||||
@@ -1412,128 +1445,130 @@ 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{
|
||||||
// 1931 bytes of a gzipped FileDescriptorProto
|
// 1957 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0x4f, 0x73, 0x22, 0xc7,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xdd, 0x72, 0x1a, 0xc9,
|
||||||
0x15, 0xf7, 0x08, 0x10, 0xf0, 0x00, 0x69, 0xd4, 0x92, 0xb5, 0xb3, 0x48, 0xf2, 0xca, 0xb3, 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|
0x92, 0x8c, 0x69, 0x38, 0xae, 0xa4, 0xa5, 0xa1, 0x62, 0x84, 0x9d, 0xd1, 0x70, 0x8c, 0x8e, 0x41,
|
||||||
0x12, 0x6f, 0x78, 0xfc, 0x7d, 0x53, 0xa0, 0xe8, 0x2b, 0xd8, 0x4e, 0x8c, 0x85, 0xca, 0x0b, 0x23,
|
0xbf, 0x72, 0x3c, 0xea, 0x92, 0xa1, 0xcb, 0x3f, 0x92, 0x11, 0x73, 0x39, 0xad, 0x64, 0x8e, 0xb4,
|
||||||
0x77, 0xac, 0x9d, 0x14, 0xf1, 0xd6, 0x74, 0xd9, 0xb7, 0xaf, 0x60, 0x9b, 0xbb, 0x13, 0x16, 0xcc,
|
0xe3, 0x2c, 0xde, 0x94, 0x78, 0xc3, 0xe5, 0x1f, 0x9b, 0x02, 0x45, 0x5f, 0xc1, 0x56, 0x6c, 0x2c,
|
||||||
0x38, 0x89, 0xd8, 0x30, 0xf0, 0x47, 0x91, 0xb1, 0xa9, 0x2c, 0xc6, 0x70, 0x4f, 0xa1, 0xc8, 0x84,
|
0x50, 0x0e, 0x56, 0xb2, 0x47, 0xda, 0x71, 0x01, 0x6f, 0x4e, 0x97, 0xdd, 0xfe, 0x0a, 0xb6, 0xb8,
|
||||||
0xca, 0x35, 0x63, 0xc4, 0x73, 0x27, 0x2e, 0x27, 0x11, 0xe5, 0x46, 0x5e, 0xba, 0x5e, 0xba, 0x66,
|
0x33, 0x61, 0xfe, 0x8c, 0x93, 0x90, 0x0d, 0x7d, 0x6f, 0x14, 0x56, 0x36, 0x94, 0xc5, 0x08, 0xee,
|
||||||
0xac, 0x2d, 0xb0, 0x1e, 0xe5, 0xe8, 0x39, 0xe8, 0xc1, 0x8c, 0xdf, 0x04, 0xae, 0x7f, 0x43, 0x86,
|
0x29, 0x14, 0x19, 0x50, 0xbe, 0x62, 0x8c, 0xb8, 0xce, 0xc4, 0xe1, 0x44, 0xb8, 0x9f, 0x93, 0xee,
|
||||||
0x63, 0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xdc, 0x09, 0xbd, 0x49, 0xdc, 0x9a, 0xaf, 0x91, 0x09, 0x39, 0xb9, 0x59, 0x56, 0x55, 0xa9,
|
0x0d, 0x18, 0x7f, 0x82, 0x72, 0xb4, 0xa9, 0xc7, 0x29, 0x9f, 0x85, 0xe8, 0x6b, 0xc8, 0x86, 0x9c,
|
||||||
0x56, 0x4e, 0x87, 0x11, 0x2b, 0x91, 0xf9, 0x5b, 0xd8, 0x96, 0xeb, 0x16, 0x63, 0x1f, 0xab, 0xdc,
|
0x72, 0x26, 0x95, 0x37, 0x6b, 0x8f, 0x13, 0x57, 0x49, 0x28, 0x32, 0xac, 0xb4, 0x50, 0x15, 0xf2,
|
||||||
0x47, 0x90, 0xa7, 0x13, 0x55, 0x02, 0xaa, 0x7a, 0x37, 0xe9, 0x44, 0x64, 0xdf, 0x1c, 0x81, 0xbe,
|
0xd3, 0x80, 0x39, 0x13, 0x7a, 0x1d, 0xbb, 0x35, 0x5f, 0x23, 0x03, 0xb2, 0x72, 0xb3, 0xac, 0xbd,
|
||||||
0xd8, 0x1f, 0x4d, 0x03, 0x3f, 0x62, 0xa2, 0x62, 0x85, 0x71, 0x51, 0x10, 0xa2, 0x7a, 0x26, 0x62,
|
0x62, 0xad, 0x94, 0x0c, 0x23, 0x56, 0x22, 0xe3, 0xb7, 0xb0, 0x25, 0xd7, 0x2d, 0xc6, 0x1e, 0x2a,
|
||||||
0x97, 0x26, 0x77, 0x6d, 0xc5, 0x78, 0x8b, 0xb1, 0x4e, 0x44, 0x39, 0xfa, 0x52, 0x15, 0x22, 0xf1,
|
0xfd, 0xc7, 0x20, 0x0a, 0x5b, 0x16, 0x8a, 0x2a, 0xff, 0x0d, 0x3a, 0x11, 0x35, 0x62, 0x8c, 0x40,
|
||||||
0x82, 0xe1, 0xad, 0x28, 0x6d, 0x7a, 0x17, 0x9b, 0xaf, 0x08, 0xb8, 0x1d, 0x0c, 0x6f, 0x9b, 0x02,
|
0x5f, 0xec, 0x0f, 0xa7, 0xbe, 0x17, 0x32, 0x51, 0xd7, 0xc2, 0xb8, 0x28, 0x08, 0x51, 0x3f, 0xb2,
|
||||||
0x34, 0x7f, 0x52, 0x2d, 0xd6, 0x0f, 0x94, 0xef, 0xff, 0x77, 0x78, 0x17, 0x21, 0xd8, 0x78, 0x38,
|
0x72, 0x34, 0xb9, 0x6b, 0x33, 0xc2, 0x5b, 0x8c, 0xc9, 0xda, 0xf9, 0x52, 0x95, 0x2b, 0x71, 0xfd,
|
||||||
0x04, 0x04, 0x76, 0x97, 0x8c, 0xc7, 0xb7, 0x48, 0x47, 0x56, 0x5b, 0x89, 0xec, 0x73, 0xc8, 0x5f,
|
0xe1, 0x8d, 0x68, 0x00, 0x7a, 0x1b, 0x99, 0x2f, 0x0b, 0xb8, 0xed, 0x0f, 0x6f, 0x9a, 0x02, 0x34,
|
||||||
0x53, 0xd7, 0x9b, 0x85, 0x89, 0x61, 0x94, 0x4a, 0x53, 0x4b, 0x49, 0x70, 0xa2, 0x62, 0xfe, 0x37,
|
0x7e, 0x52, 0x3d, 0xda, 0xf7, 0x95, 0xef, 0xff, 0x77, 0x78, 0x17, 0x21, 0x48, 0xdd, 0x1f, 0x02,
|
||||||
0x0f, 0xf9, 0x18, 0x44, 0x35, 0xc8, 0x0e, 0x83, 0x51, 0x92, 0xdd, 0xcf, 0xee, 0x6f, 0x4b, 0xfe,
|
0x02, 0x3b, 0x4b, 0xc6, 0xa3, 0x5b, 0x24, 0x23, 0xab, 0xad, 0x44, 0xf6, 0x25, 0xe4, 0xae, 0xa8,
|
||||||
0x36, 0x82, 0x11, 0xc3, 0x52, 0x17, 0xfd, 0x0e, 0xb6, 0x44, 0x63, 0xf9, 0xcc, 0x23, 0xb3, 0xe9,
|
0xe3, 0xce, 0x82, 0xd8, 0x30, 0x4a, 0xa4, 0xa9, 0xa5, 0x24, 0x38, 0x56, 0x31, 0xfe, 0x9b, 0x83,
|
||||||
0x88, 0xce, 0x13, 0x6a, 0xa4, 0x76, 0x37, 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b5, 0x2d, 0xee, 0x17, 0xa7, 0xd4, 0x36, 0x7f, 0xec, 0x93, 0x0b, 0xd3,
|
||||||
0x11, 0x82, 0xad, 0x54, 0x56, 0x5a, 0x75, 0xac, 0xef, 0xa3, 0x3d, 0xd8, 0x4e, 0x3c, 0x48, 0x14,
|
0xc4, 0x3a, 0x42, 0x55, 0xd8, 0x5b, 0x1c, 0xaf, 0x0e, 0x88, 0xce, 0xde, 0x11, 0xb2, 0x0b, 0x13,
|
||||||
0xff, 0x9d, 0x47, 0x8f, 0x00, 0x0d, 0x1c, 0x6c, 0xd5, 0x9b, 0x22, 0x20, 0x73, 0xc1, 0x7f, 0xf2,
|
0x77, 0xea, 0xb6, 0x48, 0xf0, 0x92, 0x6c, 0x57, 0xb8, 0xbd, 0x90, 0xad, 0xba, 0xfd, 0x08, 0x21,
|
||||||
0x17, 0xd9, 0xc2, 0x86, 0x9e, 0x31, 0xff, 0x95, 0x81, 0xca, 0x52, 0x5f, 0xa2, 0x43, 0x28, 0x46,
|
0xd8, 0x4c, 0x64, 0xa5, 0x55, 0xc7, 0xfa, 0x1e, 0xda, 0x85, 0xad, 0xd8, 0x83, 0x58, 0xf1, 0xdf,
|
||||||
0xee, 0x8d, 0x4f, 0xb9, 0x60, 0x0e, 0x45, 0x2a, 0x0b, 0x40, 0xbe, 0x8d, 0x63, 0xea, 0xfa, 0x8a,
|
0x39, 0xf4, 0x18, 0xd0, 0xc0, 0xc6, 0x66, 0xbd, 0x29, 0x02, 0x32, 0x17, 0xfc, 0x27, 0x77, 0x9e,
|
||||||
0xcd, 0x14, 0x9b, 0x17, 0x25, 0x22, 0xb9, 0xec, 0x00, 0xf2, 0xc9, 0xfb, 0x9a, 0x99, 0xbf, 0xaf,
|
0xc9, 0xa7, 0xf4, 0xb4, 0xf1, 0xcf, 0x34, 0x94, 0x97, 0xfa, 0x12, 0x1d, 0x40, 0x21, 0x74, 0xae,
|
||||||
0x9b, 0x43, 0xf5, 0xae, 0x1e, 0x42, 0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0xbd, 0x80, 0x6d, 0x45, 0x39, 0x8e, 0xe7, 0x4c,
|
||||||
0x4f, 0x48, 0x28, 0x48, 0x4f, 0x31, 0x42, 0xfe, 0x9a, 0x31, 0x2c, 0x62, 0x39, 0x3f, 0x81, 0x7e,
|
0x66, 0x13, 0x45, 0x3d, 0x39, 0x49, 0x3d, 0x5b, 0x92, 0x7a, 0x14, 0x2e, 0x19, 0xe8, 0x09, 0xe4,
|
||||||
0x58, 0x9c, 0x50, 0x4a, 0x9d, 0xa0, 0x70, 0x79, 0xc2, 0x33, 0xd8, 0x61, 0x1f, 0x78, 0x48, 0x49,
|
0x2f, 0x69, 0xc8, 0xc4, 0x63, 0x11, 0x51, 0x43, 0x4e, 0xac, 0x5b, 0x8c, 0x09, 0x91, 0x78, 0x42,
|
||||||
0x30, 0xa5, 0x3f, 0xcf, 0x18, 0x19, 0x51, 0x4e, 0x8d, 0xb2, 0x0c, 0xf0, 0xb6, 0x14, 0x74, 0x25,
|
0x02, 0x41, 0x7a, 0x8a, 0x11, 0x72, 0x57, 0x8c, 0x61, 0x11, 0xcb, 0xf9, 0x09, 0xf4, 0xd3, 0xe2,
|
||||||
0xde, 0xa4, 0x9c, 0x9a, 0x87, 0x50, 0xc5, 0x2c, 0x62, 0xbc, 0xe3, 0x46, 0x91, 0x1b, 0xf8, 0x8d,
|
0x84, 0x62, 0xe2, 0x04, 0x85, 0xcb, 0x13, 0x5e, 0xc0, 0x36, 0xfb, 0xc4, 0x03, 0x4a, 0xfc, 0x29,
|
||||||
0xc0, 0xe7, 0x61, 0xe0, 0xc5, 0x6f, 0x8e, 0x79, 0x04, 0x07, 0x6b, 0xa5, 0xea, 0xd1, 0x10, 0x9b,
|
0xfd, 0x79, 0xc6, 0xc8, 0x88, 0x72, 0x2a, 0x07, 0xb6, 0x12, 0xde, 0x92, 0x82, 0xae, 0xc4, 0x9b,
|
||||||
0xdf, 0xcc, 0x58, 0x78, 0xb7, 0x7e, 0xf3, 0x1b, 0x38, 0x58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df, 0x9f, 0xdd, 0xb8, 0x7c, 0x3c, 0xbb, 0x3a, 0x1d, 0x06, 0x93,
|
0x32, 0x56, 0xf7, 0xde, 0x25, 0x9d, 0xea, 0xb3, 0x07, 0x75, 0x22, 0xe3, 0x16, 0xc0, 0xa2, 0x5d,
|
||||||
0x33, 0x4f, 0x0c, 0xd5, 0xbe, 0xeb, 0xdf, 0xf8, 0x8c, 0xff, 0x21, 0x08, 0x6f, 0xcf, 0x3c, 0x7f,
|
0xd0, 0x41, 0x62, 0xcb, 0x9d, 0x76, 0xaf, 0x1e, 0xde, 0x23, 0x55, 0xa6, 0xde, 0xfc, 0xfa, 0xf7,
|
||||||
0x74, 0x26, 0xbb, 0xee, 0x6c, 0x6e, 0xe5, 0x6a, 0x53, 0xfe, 0x7f, 0xe3, 0x37, 0xff, 0x0b, 0x00,
|
0xa7, 0xd7, 0x0e, 0x1f, 0xcf, 0x2e, 0x4f, 0x86, 0xfe, 0xe4, 0xd4, 0x15, 0x43, 0xb5, 0xe7, 0x78,
|
||||||
0x00, 0xff, 0xff, 0x1d, 0x08, 0x9a, 0xb8, 0x0f, 0x11, 0x00, 0x00,
|
0xd7, 0x1e, 0xe3, 0x7f, 0xf0, 0x83, 0x9b, 0x53, 0xd7, 0x1b, 0x9d, 0xca, 0xae, 0x3b, 0x9d, 0x5b,
|
||||||
|
0xb9, 0xdc, 0x90, 0xff, 0x20, 0xf9, 0xcd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x21, 0xc7, 0x78,
|
||||||
|
0xa5, 0x50, 0x11, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
|||||||
@@ -10,9 +10,20 @@ message SendPaymentRequest {
|
|||||||
/// The identity pubkey of the payment recipient
|
/// The identity pubkey of the payment recipient
|
||||||
bytes dest = 1;
|
bytes dest = 1;
|
||||||
|
|
||||||
/// Number of satoshis to send.
|
/**
|
||||||
|
Number of satoshis to send.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
int64 amt = 2;
|
int64 amt = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Number of millisatoshis to send.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 amt_msat = 12;
|
||||||
|
|
||||||
/// The hash to use within the payment's HTLC
|
/// The hash to use within the payment's HTLC
|
||||||
bytes payment_hash = 3;
|
bytes payment_hash = 3;
|
||||||
|
|
||||||
@@ -44,9 +55,22 @@ message SendPaymentRequest {
|
|||||||
If this field is left to the default value of 0, only zero-fee routes will
|
If this field is left to the default value of 0, only zero-fee routes will
|
||||||
be considered. This usually means single hop routes connecting directly to
|
be considered. This usually means single hop routes connecting directly to
|
||||||
the destination. To send the payment without a fee limit, use max int here.
|
the destination. To send the payment without a fee limit, use max int here.
|
||||||
|
|
||||||
|
The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
*/
|
*/
|
||||||
int64 fee_limit_sat = 7;
|
int64 fee_limit_sat = 7;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The maximum number of millisatoshis that will be paid as a fee of the
|
||||||
|
payment. If this field is left to the default value of 0, only zero-fee
|
||||||
|
routes will be considered. This usually means single hop routes connecting
|
||||||
|
directly to the destination. To send the payment without a fee limit, use
|
||||||
|
max int here.
|
||||||
|
|
||||||
|
The fields fee_limit_sat and fee_limit_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 fee_limit_msat = 13;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The channel id of the channel that must be taken to the first hop. If zero,
|
The channel id of the channel that must be taken to the first hop. If zero,
|
||||||
any channel may be used.
|
any channel may be used.
|
||||||
|
|||||||
@@ -128,15 +128,17 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
|
|||||||
// Currently, within the bootstrap phase of the network, we limit the
|
// Currently, within the bootstrap phase of the network, we limit the
|
||||||
// largest payment size allotted to (2^32) - 1 mSAT or 4.29 million
|
// largest payment size allotted to (2^32) - 1 mSAT or 4.29 million
|
||||||
// satoshis.
|
// satoshis.
|
||||||
amt := btcutil.Amount(in.Amt)
|
amt, err := lnrpc.UnmarshallAmt(in.Amt, in.AmtMsat)
|
||||||
amtMSat := lnwire.NewMSatFromSatoshis(amt)
|
if err != nil {
|
||||||
if amtMSat > r.MaxPaymentMSat {
|
return nil, err
|
||||||
|
}
|
||||||
|
if amt > r.MaxPaymentMSat {
|
||||||
return nil, fmt.Errorf("payment of %v is too large, max payment "+
|
return nil, fmt.Errorf("payment of %v is too large, max payment "+
|
||||||
"allowed is %v", amt, r.MaxPaymentMSat.ToSatoshis())
|
"allowed is %v", amt, r.MaxPaymentMSat.ToSatoshis())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unmarshall restrictions from request.
|
// Unmarshall restrictions from request.
|
||||||
feeLimit := lnrpc.CalculateFeeLimit(in.FeeLimit, amtMSat)
|
feeLimit := lnrpc.CalculateFeeLimit(in.FeeLimit, amt)
|
||||||
|
|
||||||
ignoredNodes := make(map[route.Vertex]struct{})
|
ignoredNodes := make(map[route.Vertex]struct{})
|
||||||
for _, ignorePubKey := range in.IgnoredNodes {
|
for _, ignorePubKey := range in.IgnoredNodes {
|
||||||
@@ -239,7 +241,7 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
|
|||||||
// can carry `in.Amt` satoshis _including_ the total fee required on
|
// can carry `in.Amt` satoshis _including_ the total fee required on
|
||||||
// the route.
|
// the route.
|
||||||
route, err := r.FindRoute(
|
route, err := r.FindRoute(
|
||||||
sourcePubKey, targetPubKey, amtMSat, restrictions,
|
sourcePubKey, targetPubKey, amt, restrictions,
|
||||||
destTlvRecords, finalCLTVDelta,
|
destTlvRecords, finalCLTVDelta,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -505,9 +507,12 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
payIntent.CltvLimit = cltvLimit
|
payIntent.CltvLimit = cltvLimit
|
||||||
|
|
||||||
// Take fee limit from request.
|
// Take fee limit from request.
|
||||||
payIntent.FeeLimit = lnwire.NewMSatFromSatoshis(
|
payIntent.FeeLimit, err = lnrpc.UnmarshallAmt(
|
||||||
btcutil.Amount(rpcPayReq.FeeLimitSat),
|
rpcPayReq.FeeLimitSat, rpcPayReq.FeeLimitMsat,
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// Set payment attempt timeout.
|
// Set payment attempt timeout.
|
||||||
if rpcPayReq.TimeoutSeconds == 0 {
|
if rpcPayReq.TimeoutSeconds == 0 {
|
||||||
@@ -535,6 +540,14 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
}
|
}
|
||||||
payIntent.RouteHints = routeHints
|
payIntent.RouteHints = routeHints
|
||||||
|
|
||||||
|
// Unmarshall either sat or msat amount from request.
|
||||||
|
reqAmt, err := lnrpc.UnmarshallAmt(
|
||||||
|
rpcPayReq.Amt, rpcPayReq.AmtMsat,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// 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.
|
||||||
@@ -572,17 +585,15 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
// We override the amount to pay with the amount provided from
|
// We override the amount to pay with the amount provided from
|
||||||
// the payment request.
|
// the payment request.
|
||||||
if payReq.MilliSat == nil {
|
if payReq.MilliSat == nil {
|
||||||
if rpcPayReq.Amt == 0 {
|
if reqAmt == 0 {
|
||||||
return nil, errors.New("amount must be " +
|
return nil, errors.New("amount must be " +
|
||||||
"specified when paying a zero amount " +
|
"specified when paying a zero amount " +
|
||||||
"invoice")
|
"invoice")
|
||||||
}
|
}
|
||||||
|
|
||||||
payIntent.Amount = lnwire.NewMSatFromSatoshis(
|
payIntent.Amount = reqAmt
|
||||||
btcutil.Amount(rpcPayReq.Amt),
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
if rpcPayReq.Amt != 0 {
|
if reqAmt != 0 {
|
||||||
return nil, errors.New("amount must not be " +
|
return nil, errors.New("amount must not be " +
|
||||||
"specified when paying a non-zero " +
|
"specified when paying a non-zero " +
|
||||||
" amount invoice")
|
" amount invoice")
|
||||||
@@ -620,13 +631,11 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Amount.
|
// Amount.
|
||||||
if rpcPayReq.Amt == 0 {
|
if reqAmt == 0 {
|
||||||
return nil, errors.New("amount must be specified")
|
return nil, errors.New("amount must be specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
payIntent.Amount = lnwire.NewMSatFromSatoshis(
|
payIntent.Amount = reqAmt
|
||||||
btcutil.Amount(rpcPayReq.Amt),
|
|
||||||
)
|
|
||||||
|
|
||||||
// Payment hash.
|
// Payment hash.
|
||||||
copy(payIntent.PaymentHash[:], rpcPayReq.PaymentHash)
|
copy(payIntent.PaymentHash[:], rpcPayReq.PaymentHash)
|
||||||
|
|||||||
@@ -34,14 +34,17 @@ var (
|
|||||||
// and passed onto path finding.
|
// and passed onto path finding.
|
||||||
func TestQueryRoutes(t *testing.T) {
|
func TestQueryRoutes(t *testing.T) {
|
||||||
t.Run("no mission control", func(t *testing.T) {
|
t.Run("no mission control", func(t *testing.T) {
|
||||||
testQueryRoutes(t, false)
|
testQueryRoutes(t, false, false)
|
||||||
|
})
|
||||||
|
t.Run("no mission control and msat", func(t *testing.T) {
|
||||||
|
testQueryRoutes(t, false, true)
|
||||||
})
|
})
|
||||||
t.Run("with mission control", func(t *testing.T) {
|
t.Run("with mission control", func(t *testing.T) {
|
||||||
testQueryRoutes(t, true)
|
testQueryRoutes(t, true, false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func testQueryRoutes(t *testing.T, useMissionControl bool) {
|
func testQueryRoutes(t *testing.T, useMissionControl bool, useMsat bool) {
|
||||||
ignoreNodeBytes, err := hex.DecodeString(ignoreNodeKey)
|
ignoreNodeBytes, err := hex.DecodeString(ignoreNodeKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -57,14 +60,8 @@ func testQueryRoutes(t *testing.T, useMissionControl bool) {
|
|||||||
|
|
||||||
request := &lnrpc.QueryRoutesRequest{
|
request := &lnrpc.QueryRoutesRequest{
|
||||||
PubKey: destKey,
|
PubKey: destKey,
|
||||||
Amt: 100000,
|
|
||||||
FinalCltvDelta: 100,
|
FinalCltvDelta: 100,
|
||||||
FeeLimit: &lnrpc.FeeLimit{
|
IgnoredNodes: [][]byte{ignoreNodeBytes},
|
||||||
Limit: &lnrpc.FeeLimit_Fixed{
|
|
||||||
Fixed: 250,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
IgnoredNodes: [][]byte{ignoreNodeBytes},
|
|
||||||
IgnoredEdges: []*lnrpc.EdgeLocator{{
|
IgnoredEdges: []*lnrpc.EdgeLocator{{
|
||||||
ChannelId: 555,
|
ChannelId: 555,
|
||||||
DirectionReverse: true,
|
DirectionReverse: true,
|
||||||
@@ -76,12 +73,29 @@ func testQueryRoutes(t *testing.T, useMissionControl bool) {
|
|||||||
UseMissionControl: useMissionControl,
|
UseMissionControl: useMissionControl,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
amtSat := int64(100000)
|
||||||
|
if useMsat {
|
||||||
|
request.AmtMsat = amtSat * 1000
|
||||||
|
request.FeeLimit = &lnrpc.FeeLimit{
|
||||||
|
Limit: &lnrpc.FeeLimit_FixedMsat{
|
||||||
|
FixedMsat: 250000,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
request.Amt = amtSat
|
||||||
|
request.FeeLimit = &lnrpc.FeeLimit{
|
||||||
|
Limit: &lnrpc.FeeLimit_Fixed{
|
||||||
|
Fixed: 250,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
findRoute := func(source, target route.Vertex,
|
findRoute := func(source, target route.Vertex,
|
||||||
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
|
amt lnwire.MilliSatoshi, restrictions *routing.RestrictParams,
|
||||||
_ []tlv.Record,
|
_ []tlv.Record,
|
||||||
finalExpiry ...uint16) (*route.Route, error) {
|
finalExpiry ...uint16) (*route.Route, error) {
|
||||||
|
|
||||||
if int64(amt) != request.Amt*1000 {
|
if int64(amt) != amtSat*1000 {
|
||||||
t.Fatal("unexpected amount")
|
t.Fatal("unexpected amount")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+593
-546
File diff suppressed because it is too large.
Load diff
+36
-3
@@ -852,9 +852,20 @@ message TransactionDetails {
|
|||||||
|
|
||||||
message FeeLimit {
|
message FeeLimit {
|
||||||
oneof limit {
|
oneof limit {
|
||||||
/// The fee limit expressed as a fixed amount of satoshis.
|
/**
|
||||||
|
The fee limit expressed as a fixed amount of satoshis.
|
||||||
|
|
||||||
|
The fields fixed and fixed_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
int64 fixed = 1;
|
int64 fixed = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The fee limit expressed as a fixed amount of millisatoshis.
|
||||||
|
|
||||||
|
The fields fixed and fixed_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 fixed_msat = 3;
|
||||||
|
|
||||||
/// The fee limit expressed as a percentage of the payment amount.
|
/// The fee limit expressed as a percentage of the payment amount.
|
||||||
int64 percent = 2;
|
int64 percent = 2;
|
||||||
}
|
}
|
||||||
@@ -873,9 +884,20 @@ message SendRequest {
|
|||||||
*/
|
*/
|
||||||
string dest_string = 2 [deprecated = true];
|
string dest_string = 2 [deprecated = true];
|
||||||
|
|
||||||
/// Number of satoshis to send.
|
/**
|
||||||
|
The amount to send expressed in satoshis.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
int64 amt = 3;
|
int64 amt = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The amount to send expressed in millisatoshis.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 amt_msat = 12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The hash to use within the payment's HTLC. When using REST, this field
|
The hash to use within the payment's HTLC. When using REST, this field
|
||||||
must be encoded as base64.
|
must be encoded as base64.
|
||||||
@@ -1766,9 +1788,20 @@ message QueryRoutesRequest {
|
|||||||
/// The 33-byte hex-encoded public key for the payment destination
|
/// The 33-byte hex-encoded public key for the payment destination
|
||||||
string pub_key = 1;
|
string pub_key = 1;
|
||||||
|
|
||||||
/// The amount to send expressed in satoshis
|
/**
|
||||||
|
The amount to send expressed in satoshis.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
int64 amt = 2;
|
int64 amt = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The amount to send expressed in millisatoshis.
|
||||||
|
|
||||||
|
The fields amt and amt_msat are mutually exclusive.
|
||||||
|
*/
|
||||||
|
int64 amt_msat = 12;
|
||||||
|
|
||||||
reserved 3;
|
reserved 3;
|
||||||
|
|
||||||
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
|
/// An optional CLTV delta from the current height that should be used for the timelock of the final hop
|
||||||
|
|||||||
+30
-4
@@ -725,12 +725,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amt",
|
"name": "amt",
|
||||||
"description": "/ The amount to send expressed in satoshis",
|
"description": "*\nThe amount to send expressed in satoshis.\n\nThe fields amt and amt_msat are mutually exclusive.",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "amt_msat",
|
||||||
|
"description": "*\nThe amount to send expressed in millisatoshis.\n\nThe fields amt and amt_msat are mutually exclusive.",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "final_cltv_delta",
|
"name": "final_cltv_delta",
|
||||||
"description": "/ An optional CLTV delta from the current height that should be used for the timelock of the final hop.",
|
"description": "/ An optional CLTV delta from the current height that should be used for the timelock of the final hop.",
|
||||||
@@ -741,7 +749,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fee_limit.fixed",
|
"name": "fee_limit.fixed",
|
||||||
"description": "/ The fee limit expressed as a fixed amount of satoshis.",
|
"description": "*\nThe fee limit expressed as a fixed amount of satoshis.\n\nThe fields fixed and fixed_msat are mutually exclusive.",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fee_limit.fixed_msat",
|
||||||
|
"description": "*\nThe fee limit expressed as a fixed amount of millisatoshis.\n\nThe fields fixed and fixed_msat are mutually exclusive.",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2217,7 +2233,12 @@
|
|||||||
"fixed": {
|
"fixed": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"description": "/ The fee limit expressed as a fixed amount of satoshis."
|
"description": "*\nThe fee limit expressed as a fixed amount of satoshis.\n\nThe fields fixed and fixed_msat are mutually exclusive."
|
||||||
|
},
|
||||||
|
"fixed_msat": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64",
|
||||||
|
"description": "*\nThe fee limit expressed as a fixed amount of millisatoshis.\n\nThe fields fixed and fixed_msat are mutually exclusive."
|
||||||
},
|
},
|
||||||
"percent": {
|
"percent": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -3599,7 +3620,12 @@
|
|||||||
"amt": {
|
"amt": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"description": "/ Number of satoshis to send."
|
"description": "*\nThe amount to send expressed in satoshis.\n\nThe fields amt and amt_msat are mutually exclusive."
|
||||||
|
},
|
||||||
|
"amt_msat": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64",
|
||||||
|
"description": "*\nThe amount to send expressed in millisatoshis.\n\nThe fields amt and amt_msat are mutually exclusive."
|
||||||
},
|
},
|
||||||
"payment_hash": {
|
"payment_hash": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
+13
-6
@@ -3079,15 +3079,19 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
|
|||||||
// We override the amount to pay with the amount provided from
|
// We override the amount to pay with the amount provided from
|
||||||
// the payment request.
|
// the payment request.
|
||||||
if payReq.MilliSat == nil {
|
if payReq.MilliSat == nil {
|
||||||
if rpcPayReq.Amt == 0 {
|
amt, err := lnrpc.UnmarshallAmt(
|
||||||
|
rpcPayReq.Amt, rpcPayReq.AmtMsat,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return payIntent, err
|
||||||
|
}
|
||||||
|
if amt == 0 {
|
||||||
return payIntent, errors.New("amount must be " +
|
return payIntent, errors.New("amount must be " +
|
||||||
"specified when paying a zero amount " +
|
"specified when paying a zero amount " +
|
||||||
"invoice")
|
"invoice")
|
||||||
}
|
}
|
||||||
|
|
||||||
payIntent.msat = lnwire.NewMSatFromSatoshis(
|
payIntent.msat = amt
|
||||||
btcutil.Amount(rpcPayReq.Amt),
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
payIntent.msat = *payReq.MilliSat
|
payIntent.msat = *payReq.MilliSat
|
||||||
}
|
}
|
||||||
@@ -3128,9 +3132,12 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error
|
|||||||
// 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
|
||||||
// from the other fields.
|
// from the other fields.
|
||||||
payIntent.msat = lnwire.NewMSatFromSatoshis(
|
payIntent.msat, err = lnrpc.UnmarshallAmt(
|
||||||
btcutil.Amount(rpcPayReq.Amt),
|
rpcPayReq.Amt, rpcPayReq.AmtMsat,
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return payIntent, err
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate the fee limit that should be used for this payment.
|
// Calculate the fee limit that should be used for this payment.
|
||||||
payIntent.feeLimit = lnrpc.CalculateFeeLimit(
|
payIntent.feeLimit = lnrpc.CalculateFeeLimit(
|
||||||
|
|||||||
Reference in new issue
Block a user