I use the newaddr method of clightning, how do I view the password for this address in wallet.bat?
Do you mean the private key for the returned address?
c-lightning doesn't have a wallet.bat file, nor is there a wallet.dat file if that's what you meant. The private keys are generated from a common seed that is located in hsm_secret, so don't lose that file :wink:
@SimonVrouwe yes
@cdecker how to get the private key from hsm_secret?
@wedao1 clightning has no command to retrieve the private key of its addresses. Theoretically it is possible to derive the private key from the hsm_secret, using BIP32 derivation scheme, but it is quite involved and I am not sure how to do that (you will need the key index of the address).
But if you're just interested in getting your funds out of clightning's internal wallet, you can use the withdraw command and send it to any desired destination address.
@SimonVrouwe Thanks for your reply!
Most helpful comment
@wedao1
clightninghas no command to retrieve the private key of its addresses. Theoretically it is possible to derive the private key from thehsm_secret, using BIP32 derivation scheme, but it is quite involved and I am not sure how to do that (you will need the key index of the address).But if you're just interested in getting your funds out of clightning's internal wallet, you can use the
withdrawcommand and send it to any desired destination address.