Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

lightning community – EstimateFee – Invalid Size Vacation spot Key

Background
I’ve setup a regnet check community with two LND nodes. One to ship cash and the second (lnd2) to generate invoices on. I’m writing code to simulate a cellular app. I am at present attempting to calculate the price to pay an bill and trying to name /v2/router/route/estimatefee

I am getting this error once I execute the code beneath:
{‘code’: 2, ‘message’: ‘invalid size vacation spot key’, ‘particulars’: []}

I am going to admit the byte to uncooked to decode has me a bit confused. However I am unsure I am feeding the proper tackle.

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)
knowledge = {
             'dest': base64.b64encode(payment_alias).decode(),
             'amt_sat': 200
         }

cert_path="./tls.cert"


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


r = requests.publish(url, knowledge=json.dumps(
    knowledge), headers=headers, confirm=cert_path)
    
print(r.json())

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

Steps to breed
Create an bill.
Run above code
Anticipated behaviour
I ought to get a price again however simply get error.

Leave a Reply

Your email address will not be published. Required fields are marked *