Feature: More Detailed Export
#337 added a CSV export which is super handy. I am building a Bitcoin accounting app and am working on a feature for Phoenix wallet imports of the CSV file that is currently exported, but it is missing some key information for good accounting. Our app attempts to track transfers between a users' various wallets so that we can accurately track when a transaction is an income / expense event vs a simple transfer between wallets. So it would be great if the following columns could be added to the export:
Lightning Receive and Send
- payment invoice request (so the payment hash and other info can be extracted and for matching withdrawals from other services)
Onchain Receive and Send
- Deposit address
- Send address
I think the onchain send address might already be implemented, but I have not done a onchain send on my wallet yet to confirm.
We should use the code made for phoenixd (the server version of Phoenix), see https://github.com/ACINQ/phoenixd/pull/115
The Phoenixd version does contain the payment hash, though not on-chain details since phoenixd does not do on-chain payments, but that should be doable.
Yeah thinking about it some more, for lightning payments we would only need the payment hash (rather than the request) since the description is already included in the export. So if that is simple to copy over along with some extra logic to include the onchain addresses, that would be great!
The payment hash is included in the CSV export since v2.5.0, but the destination field was buggy. It's been fixed, and next version will contain the address for on-chain outgoing payments (or the node id for bolt11 outgoing payments).
However adding the deposit address for incoming on-chain is going to be difficult for technical reasons, we'll have to think about it.
Thanks @dpad85 for doing that, it will help make the experience a lot better! Fingers crossed the deposit address for onchain can be added at some point. For the moment we will probably instruct users to manually tag the send transaction and output that is going to Phoenix as a deposit / transfer.