Full fee control and easy lightning.
Fee control:
Now you can pass fee parameter to pay_to function to specify manual fee, or
callback function like:
python
def fee_calc(size):
return size/4
btc.pay_to(address, amount, fee=fee_calc)
Getting size as argument and returning fee, it can be any function of your choice.
Another parameter, broadcast, was added. By default transaction is submitted to network, but if you set broadcast to False raw transaction will be returned. See API reference in docs for details.
**Easy lightning:**
Now lightning is part of btc daemon and BTC coin class, just launch the same daemon and use all lightning functions!
After upgrade, try for example, this:
python
>>> btc.node_id
'030ff29580149a366bdddf148713fa808f0f4b934dccd5f7820f3d613e03c86e55'
Lightning is enabled in your daemon by default, disable it with BTC_LIGTNING=false environment variable.
If lightning is disabled, `rdwv.errors.LightningDisabledError` is raised.