• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

lightning network – EstimateFee – Invalid Length Destination Key

Moussa by Moussa
February 14, 2026
in Bitcoin
0
How do Bitcoin mining pools typically handle payout frequency versus thresholds?
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


Background
I have setup a regnet test network with two LND nodes. One to send money and the second (lnd2) to generate invoices on. I am writing code to simulate a mobile app. I’m currently trying to calculate the fee to pay an invoice and attempting to call /v2/router/route/estimatefee

I’m getting this error when I execute the code below:
{‘code’: 2, ‘message’: ‘invalid length destination key’, ‘details’: []}

I’ll admit the byte to raw to decode has me a bit confused. But I’m not sure I’m feeding the correct address.

import base64
import codecs
import json
import requests
r_hash="UOpjz7mxf2r5gv7MNkoEBZL84CwM3CjJI8TFfPfkInA="
payment_alias = b'02183a81bfb5ce3a221d'
payment_destination = '02183a81bfb5ce3a221d15ffa67c2a1d796746ac89f1c81850577b52ec1633e339'

payment_addr = "iDPo2lElCqV9qx0GMB0SMfraU9CGOoGU4xSTNN9hYoM="
qrinvoice = "lnbcrt7u1psa67zapp52r4x8naek9lk47vzlmxrvjsyqkf0ecpvpnwz3jfrcnzhealyyfcqdqlw3jhxapqw35xjueqda6hggr5wfujqdqcqzpgxqyz5vqsp53qe73kj3y5922ldtr5rrq8gjx8ad557sscagr98rzjfnfhmpv2ps9qyyssq2sn9wg448t083sxqzsckc2l3jt26k5zy5l8g4ufeqgg53kxhule3p7dcwmd77v324jmd4z8r87tx9fal3a47vv344qsx03pjy43m2ysqy58usq"

lnd2 = "10.142.0.21:8180"
lnd1 = "10.142.0.21:8080"

url="https://{}/v2/router/route/estimatefee".format(lnd1)
data = {
             'dest': base64.b64encode(payment_alias).decode(),
             'amt_sat': 200
         }

cert_path="./tls.cert"


macaroonhex =  
headers = {'Grpc-Metadata-macaroon': macaroonhex}


r = requests.post(url, data=json.dumps(
    data), headers=headers, verify=cert_path)
    
print(r.json())

Your environment
Two LND nodes on Debian 10.
Linux #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
LND “version”: “0.14.0-beta commit=v0.14.0-beta”,
bitcoind version: 220000

Steps to reproduce
Create an invoice.
Run above code
Expected behaviour
I should get a fee back but just get error.



Source link

Related articles

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

cryptography – Can Bob steal funds from a Musig2 multisig if he conducts a second multisig tx with the same participants?

March 19, 2026
ZEC Price Prediction: ZCash Rally Shows No Signs of Slowdown

ZEC Price Prediction: ZCash Rally Shows No Signs of Slowdown

March 19, 2026
Share76Tweet47

Related Posts

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

cryptography – Can Bob steal funds from a Musig2 multisig if he conducts a second multisig tx with the same participants?

by Moussa
March 19, 2026
0

What happens if Bob keeps the Musig2 nonces used in the last multisig transaction? Can Bob use Alice's disclosed nonces...

ZEC Price Prediction: ZCash Rally Shows No Signs of Slowdown

ZEC Price Prediction: ZCash Rally Shows No Signs of Slowdown

by Moussa
March 19, 2026
0

ZCash (ZEC) is staging a serious comeback. Trading above $280 during Wednesday’s peak, the privacy-focused coin has surged over +25%...

TRUMP Memecoin Whale Count Hits 5-Month High As Mar-a-Lago Gala Nears

TRUMP Memecoin Whale Count Hits 5-Month High As Mar-a-Lago Gala Nears

by Moussa
March 19, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Multiple bills meant to stop federal officials...

Bitcoin Long-Term MVRV Remains In ‘Opportunity’ Zone: Data

Bitcoin Long-Term MVRV Remains In ‘Opportunity’ Zone: Data

by Moussa
March 19, 2026
0

On-chain data shows the 365-day Bitcoin MVRV Ratio has recently been sitting deep inside the negative zone, implying long-term buyers...

SEC Approves Nasdaq Rule To Trade Tokenized Securities, Paving Way For Blockchain Integration

SEC Approves Nasdaq Rule To Trade Tokenized Securities, Paving Way For Blockchain Integration

by Moussa
March 19, 2026
0

The U.S. Securities and Exchange Commission (SEC) has approved a Nasdaq rule change that allows certain securities to be traded...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTI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lM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News