public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Christopher Allen <ChristopherA@lifewithalacrity.com>
To: Ali Sherief <ali@notatether.com>,
	 Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>
Cc: Nicholas Ochiel <nochiel@gmail.com>
Subject: Re: [bitcoin-dev] BIP Proposal: Wallet Labels Export Format
Date: Mon, 29 Aug 2022 11:19:07 -0700	[thread overview]
Message-ID: <CACrqygDR4sGX8oY=BT9K_RSYCjsG0P-YBpi-sY5cuM8LBvsQtQ@mail.gmail.com> (raw)
In-Reply-To: <20220829154603.fec7mlm526vdfo2i@artanis>

[-- Attachment #1: Type: text/plain, Size: 3693 bytes --]

On Mon, Aug 29, 2022 at 9:12 AM Ali Sherief via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> I am aware that business processes are mostly CSV file oriented


I disagree that business processes are mostly CSV.  Amateur processes
maybe, but professional accounting, no. Trying to do my business accounting
with CSV files from various exchanges is PITA.


> so you can make a statement akin to BIP174 in the Goal 2 BIP, that expects
> the medium of exchange to be in files ending in .csv. I wouldn't mind if
> you require .csv file extension in a BIP for Goal 2. But such a statement
> is not appropriate in the Goal 1 BIP which is only concerned with the
> wallet label format itself.


I too would like to see some separation of layers here, as there are other
possible output formats. Maybe expanding on another use case for this data
would help.

I've been working with @nochiel <https://github.com/nochiel> on export
to a Plain-Text
Accounting <https://plaintextaccounting.org> friendly format,
initially the beancount
python app <https://github.com/beancount/beancount/>: (our prototype is
current at /beancounter.py but it is being refactored into new repo).

Basically what the final tool will do is: given a descriptor, get any
transactions for that descriptor from a random explora via Tor (initially
ours and Blockstream's), and then get price information from a random
Spotbit price server via Tor (initially just ours, but seeking more hosts),
and export a beancount compatible file.

```

python app.py beancount
"wpkh(tpubD9hudZxy8Uj3453QrsEbr8KiyXTYC5ExHjJ5sNDVW7yKJ8wc7acKQcpdbvZX6dFerHK6MfVvs78VvGfotjN28yC4ij6nr4uSVhX2qorUV8V/0/*)"
Outputs: spotbit.beancount

2008-10-31 commodity BTC
  name: "Bitcoin"
  asset-class: "cryptocurrency"

2018-04-02 open Assets:BTC BTC
2018-04-02 open Liabilities:Cash:USDT USDT

2018-04-02 * "tb1qcrekknrspx28t9vl53ltsag5gqgqdj066ydf75" "Transaction
hash: 2a2f7f24761fa54cb6e559efea5678415d9cbbabc42e6a4e2ce463ee3c446230"
Assets:BTC 1.00000000 BTC { 6935.16 USDT }
Liabilities:Cash:USDT - 6935.16 USDT

2018-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" "Transaction
hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89"
Assets:BTC - 0.36300616 BTC @  6935.16 USDT
Liabilities:Cash:USDT 2517.51 USDT

2018-04-02 * "tb1qgv5484m83e2mzz3n8tf4snvnwj5qgqgampnhvv" "Transaction
hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89"
Assets:BTC - 0.63699243 BTC @  6935.16 USDT
Liabilities:Cash:USDT 4417.64 USDT

2018-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" "Transaction
hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89"
Assets:BTC 0.36300616 BTC { 6935.16 USDT }
Liabilities:Cash:USDT - 2517.51 USDT
```

I can then use the beancount cli app (or it's fava webapp) to easily add
other details to this file to do my bitcoin accounting (and any other
accounting I need). In particular, as beancount support lots, it solves a
problem for me with US taxes which is unrealized capital gain (I get 1 BTC
from donor at $20K, the price goes up to $30K and I pay it to an engineer,
my BTC balance is 0 but my unrealized capital gain for US tax purposes  is
$10K).

More ideally, if there were additional details that I could merge in from
my wallet export, such as payer and payee, notes, etc. it would make my
accounting much easier.

Thus I'd like to see an easier and interoperable way to merge these details
(my account details from an Esplora and price details from Spotbit), with
what my different wallets may (or may not) have available.

I hope that this might inspire some ideas from the people working on this
wallet export format.

-- Christopher Allen

[-- Attachment #2: Type: text/html, Size: 5072 bytes --]

  reply	other threads:[~2022-08-29 18:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.13106.1661772392.956.bitcoin-dev@lists.linuxfoundation.org>
2022-08-29 15:46 ` [bitcoin-dev] BIP Proposal: Wallet Labels Export Format Ali Sherief
2022-08-29 18:19   ` Christopher Allen [this message]
     [not found] <mailman.12565.1661634459.956.bitcoin-dev@lists.linuxfoundation.org>
2022-08-27 21:26 ` Ali Sherief
     [not found] <mailman.11604.1661435396.956.bitcoin-dev@lists.linuxfoundation.org>
2022-08-26  6:06 ` Ali Sherief
     [not found] <mailman.9.1661342403.3868.bitcoin-dev@lists.linuxfoundation.org>
2022-08-24 19:10 ` Ali Sherief
2022-08-27 21:03   ` Billy Tetrud
2022-08-29 11:25   ` Craig Raw
2022-09-21  6:07     ` Hugo Nguyen
2022-08-24  9:18 Craig Raw
2022-08-24 13:53 ` Clark Moody
2022-08-25  8:59   ` Craig Raw
2022-08-24 15:57 ` Brandon Black
2022-08-24 19:01 ` rhavar
2022-08-24 20:18   ` Pavol Rusnak
2022-08-25  8:59   ` Craig Raw
2022-08-25 13:48     ` rhavar
2022-08-25 22:54     ` Clark Moody
2022-08-27 22:20       ` Billy Tetrud
2022-08-29 19:52 ` NVK
2022-09-26  8:23 ` Craig Raw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACrqygDR4sGX8oY=BT9K_RSYCjsG0P-YBpi-sY5cuM8LBvsQtQ@mail.gmail.com' \
    --to=christophera@lifewithalacrity.com \
    --cc=ali@notatether.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=nochiel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox