Open raucao opened 2 years ago
depending how You deployed LndHub on what kind of distro, the config is pointing to a bitcoind wallet that for ex. Umbrel and the like do not have initialized and therefore error, most "user" nodes only use and have need for the LND wallet but for BIG deployments as for ex. lndhub.io, it would offload address lookup to bitcoind direct instead using LND for address lockup ? and changes been made to not use that function any more for some or other reason.
so lets go back to that You do not se Your tx in BlueWallet or in LND ?
Thanks. I don't quite see how what you're saying is relevant to commenting the function and thus not accounting for on-chain balances altogeher, no matter the on-chain wallet backend.
so lets go back to that You do not se Your tx in BlueWallet or in LND ?
Blue Wallet is irrelevant to this issue. The tx is visible in LND, but not accounting for the user balance in the lndhub API.
when You enable the disabled function it says :
"Requested wallet does not exist or is not loaded"
and i tried explain to You depending on Your distro and configuration it might not have a initialized bitcoind wallet but are only using the LND wallet.
the user account wallet(card) will have a bitcoin address You can get by :
LndHub-URL/getbtc
header { content-type: application/json, authorization: Bearer access_token }
LndHub-URL/getbalance
header { content-type: application/json, authorization: Bearer access_token }
will return amount sats in paid invoices and tx of bitcoind address shown in the user account wallet(card)
so Your refill should reflect in amount sats in associated account shown in the user account wallet(card)
and if You use :
LndHub-URL/gettxs
header { content-type: application/json, authorization: Bearer access_token }
You will see tx´s for the associated bitcoin address
My entire issue is about the associated bitcoin address's incoming transactions not showing up in the balance.
My entire issue is about the associated bitcoin address's incoming transactions not showing up in the balance.
I have the exact same problem and none of the answers of xraid made any smarter as to what might be going on. @raucao did you manage to solve the issue? I am sending on-chain using BlueWallet trying to top up a newly created lndhub lightning wallet and it's no updating. The LND on-chain wallet receives the transaction but LNDhub cannot see it. I get the same error in the logs: listtransactions error: { Error: {"result":null,"error":{"code":-32601,"message":"Method not found"},
in Your config.js can You comment out : // bitcoind: { // rpc: 'http://login:password@1.1.1.1:8332/wallet/wallet.dat', // }, restart and report back
@Javihache I'm not sure what @xraid thinks is happening, but those replies are not addressing the issue I reported. Nothing you change in the config can magically remove a return statement in the code.
@raucao hehe and You would know
i checked the code, and accountForPosibleTxids()
is deprecated and should be deleted
error "Requested wallet does not exist or is not loaded"
suggests that bitcoind
is misconfigured.
for a very basic usage scenario, you dont need to use bitcoind with LNDHUB, as it wil just fetch onchain data from LND.
Thanks.
i checked the code, and
accountForPosibleTxids()
is deprecated and should be deleted
What does that mean exactly for on-chain balance accounting? And where is that documented? We're simply trying to top up accounts with BlueWallet, and there's no error message anywhere, until you remove that undocumented return
statement.
error
"Requested wallet does not exist or is not loaded"
suggests thatbitcoind
is misconfigured. for a very basic usage scenario, you dont need to use bitcoind with LNDHUB, as it wil just fetch onchain data from LND.
If it's misconfigured, then why does BlueWallet show us valid LND on-chain addresses, which we can successfully receive money on that can then be used to open channels?
The answers to these questions would be helpful for fixing the problem for everyone running into it. However, as it is, the released version simply ignores incoming transactions to the on-chain address that is generated from the other endpoint, without telling the user (i.e. provider) why.
We use this config line from the release's code, just with a valid username, password and localhost IP:
https://github.com/BlueWallet/LndHub/blob/64adcfc279484c984e511d9b2a376a790ffb2e9e/config.js#L8
(The values we use mirror exactly LND's own [bitcoind]
RPC config.)
lndhub takes an onchain address from lnd, and if bitcoind is configured, registers it in bitcoind so its tracked and we can fetch related transactions from bitcoind. if bitcoind is not configured, we fallback to checking onchain transactions from lnd (which uses neutrino). so, your onchain coins always land on lnd successfully, its just a matter of seeing those transactions or not.
relevant code: class/User.js:406
to configure your bitcoind, look into why it didnt load default wallet, or maybe your default wallet is called differently or smth. i rarely touch this part so not super familiar with it.
again, if you dont plan to switch lnd on-the-fly as a failover for better service availability, its better to just remove bitcoind configuration and rely on lnd here.
Thanks. There is nothing wrong with the default wallet of that bitcoind node per se. I can use it via bitcoin-cli
, for example to list transactions with it. I guess it could still be an issue with the RPC URL in the example, but haven't looked into it further.
Removing the bitcoind config entirely works. (However, it still requires removing the return
statement that is marked as TODO
in the released code, of course.)
I was wondering why my on-chain refill from Blue Wallet didn't show up in my lndhub account balance. Didn't have to go far to find out that the code is just disabled with a return and a "TODO" comment to re-activate it.
As there's no issue for this, I'm creating one. Maybe one of the core developers could let us know why it's disabled, and what needs to be done in order to remove the return statement again?
https://github.com/BlueWallet/LndHub/blob/9563cb97142bdf52347745459d1755d281928c91/class/User.js#L506-L508
Edit: simply removing the line results in the following exception when calculating the balance: