phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Feature: More Detailed Export

Open lnbc1QWFyb24 opened this issue 1 year ago • 5 comments

#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.

lnbc1QWFyb24 avatar Dec 01 '24 23:12 lnbc1QWFyb24

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.

dpad85 avatar Dec 02 '24 12:12 dpad85

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!

lnbc1QWFyb24 avatar Dec 02 '24 18:12 lnbc1QWFyb24

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.

dpad85 avatar Apr 09 '25 16:04 dpad85

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.

lnbc1QWFyb24 avatar Apr 09 '25 19:04 lnbc1QWFyb24