289 Commits

Author SHA1 Message Date
d270d56366 client/container: ethereum-based: support Etherscan V2, add more L2 chains
- Implements support for unified API via Etherscan V2 (ethereum-based)
  * All ethereum-based L2s are now accessed via single API endpoint
    - Chains are now available via chain ID
  * Updates API key requirement for `fetch` ethereum-based subaccounts
    - The API key's value must now be prepended with "etherscan"
      * Previously was prepended per-chain ("ethereum" or "polygon")
    - The API key is now *required* (can be generated at etherscan.io)
      * Resolves fatal error in Etherscan::parse_response()
      * Impl will now handle if:
        - Config's API key/value is malformed
        - Etherscan API key was not given
        - Etherscan response is fatal

- Adds support for more L2s
  * Arbitrum (One)
  * Optimism
  * Base

- Adds more L2s to existing accounts
  * Coinbase Wallet
  * Ledger Live
  * MetaMask

- Updates documentation
  * Update default generated `fetch` config
  * Update `fetch` usage help
  * Update README
2025-08-04 15:07:10 -07:00
f8226cdccb container: hledger-flow: paypal-business: update mockup
Use generic business name to avoid possibility of infringement.
2025-07-03 14:21:11 -07:00
4718fcd0c4 container: hledger-flow: paypal: update fiat mockup
Reflects latest header and impl changes.
2025-07-03 14:13:31 -07:00
6fc4a1527d container: hledger-flow: paypal: support latest fiat header
- Breaking changes due to additional columns (not backwards-compatible).
- Adds 'fees' subaccount and new tags from the additional columns.
2025-07-03 14:09:23 -07:00
84ec085b8a container: src: finance: change visidata default dir
The container environment's $DOCKER_FINANCE_CONTAINER_CONF is
bind-mounted and, by default, points to ~/.config/docker-finance.d

The parent dir (~/.config) is subsequently owned by root (Docker-ism).
Ergo, with visidata v3.2, visidata cannot create its default dir:

    "PermissionError: [Errno 13] Permission denied: for visidata config"

This commit fixes that by setting visidata's default dir to use the
calling profile's docker-finance.d (where profile customization occurs).

Also included is some related refactoring.
2025-06-25 12:07:51 -07:00
88d254d752 container: src: completion: add more hledger commands 2025-05-27 15:16:43 -07:00
98adf3d87d container: fetch: prices: crypto: mobula: isolate given year
- Will now only parse given year (or 'all', if given).

  * No longer parses all subsequent years after given year
    (unless 'all' is given).

- Now prints most recent daily average for given year instead of most
  recent daily average for current year.
2025-03-24 12:36:37 -07:00
4add7c234c hledger-flow: ethereum-based: add to Ethereum spam rules 2025-03-19 17:48:42 -07:00
99c7075742 hledger-flow: btcpayserver: add local timezone support 2025-03-05 03:26:23 -08:00
338053e0db hledger-flow: btcpayserver: add taxed_as INCOME tag
All 'IN' direction is INCOME by default.
2025-03-05 02:44:11 -08:00
0a2d16098c hledger-flow: ethereum-based: add DeFi swapper tag
Adds the protocol or platform that conducts the swap.
2025-02-07 21:54:43 -08:00
7ed6bc1287 hledger-flow: btcpayserver: add prelim v2 mockups
- Removes previous format (fully deprecated)
- Adds "Legacy Invoice" and "Wallets" mockups
2025-02-07 21:22:54 -08:00
5352e34196 hledger-flow: btcpayserver: add prelim support for v2 reports
- Removes previous format (fully deprecated)
- Adds support for "Legacy Invoice" and "Wallets" reports

See code notes regarding caveats and TODOs.
2025-02-07 21:22:54 -08:00
9380f03b88 hledger-flow: lib_preprocess: allow testing of single / multiple columns 2025-02-06 18:39:24 -08:00
09322467d6 hledger-flow: lib: symlink to finance's lib_utils
Although this would usually break modularity, this may be the exception.
2025-02-06 18:38:53 -08:00
21967e711d container: lib_taxes: remove unused arg expansion, appease the linter
shellcheck will complain about the need for expansions but the
asked-for expansions will not actually be used (thus the TODO).
2025-01-31 19:23:18 -08:00
08c1de5d9d container: lib_taxes: optimize record printing, add checks and logging
- When applicable, as the stream progresses, exit each successive gawk
  iteration when no applicable records are present (no taxable events
  found for the given tag in the given year).

  Previously, when no records were found, a reports file was produced
  with either a single header-only row or junk data that resulted from
  the assumption there would be real data.

  A preexisting hack prevented the junk data from being written after
  production but this commit will resolve that hack by preventing the
  printing of junk data while also preventing the production of a
  header-only file.

- Print warnings when no taxable events are found for the given year.

- Add checks:
  * Only verify patched files if the patched files are not empty.
  * Empty variable checks.
2025-01-31 19:23:18 -08:00
6c6ab9c41d hledger-flow: ethereum-based: add COMP rewards 2025-01-31 19:19:50 -08:00
7c78e9e647 hledger-flow: ledger: skip COMP token
Supported by `fetch` (ethereum-based).
2025-01-31 19:19:50 -08:00
36c0c93390 container: lib_taxes: reorder obfs columns
Sorted raw values take legibility precedence over sorted obfs keys.
2025-01-08 23:55:05 -08:00
3f7e8569fe container: fetch: coinbase: reinstate sort (remove pessimization)
Without this sort, transactions will not actually be written...
2025-01-08 20:51:33 -08:00
95c7212a3d container: fetch: coinbase: remove sort (optimize)
Received transactions are already sorted.
2025-01-07 20:44:48 -08:00
80039297a3 container: fetch: coinbase: fix/update pagination
- Don't break before advancing 'starting_after' cursor
  * Only save given year instead of breaking when not given year

- The 'next_starting_after' cursor now exists within 'info' object
2025-01-07 18:03:13 -08:00
9034346426 container: fetch: remove bittrex 2025-01-04 01:16:05 -08:00
c7ba59cfa1 container: lib_fetch: remove bittrex 2025-01-04 01:16:05 -08:00
f7cf8ca960 container: fetch: remove coinbase-pro 2025-01-04 01:16:05 -08:00
ae3caef110 container: lib_fetch: remove coinbase-pro 2025-01-04 01:16:04 -08:00
58e860dd94 container: fetch: remove celsius 2025-01-04 01:16:02 -08:00
d8a1b4cff1 container: lib_fetch: remove celsius 2025-01-04 01:15:59 -08:00
69421e2423 container: hledger-flow: electrum: use transaction label for tax memo
Even though the transaction label is already included as a notes tag,
having this information as a memo for tax reports is incredibly helpful.
2025-01-03 21:45:47 -08:00
6ea1e56317 container: hledger-flow: ethereum-based: add to Polygon spam rules 2025-01-03 21:43:25 -08:00
467cfa2f36 container: hledger-flow: coinbase-pro: fix default account2 for sells 2025-01-03 21:41:24 -08:00
da57805c79 container: hledger-flow: trezor: fix fees subaccount ordering
Keep consistent with all other rules.
2025-01-03 21:39:11 -08:00
7b65d5d6e2 container: hledger-flow: ledger: fix fees subaccount ordering
Keep consistent with all other rules.
2025-01-03 21:39:11 -08:00
fc1691e727 container: hledger-flow: blockfi: fix fees subaccount ordering
Keep consistent with all other rules.
2025-01-03 21:39:11 -08:00
c8e80e0c19 container: hledger-flow: ledger: add more compound tokens 2025-01-02 20:43:56 -08:00
e74590ced2 container: hledger-flow: ethereum-based: re-order blockchain/subaccounts
For consistency (ethereum-based and all other supported networks).
2025-01-02 20:30:32 -08:00
226a62ac31 container: hledger-flow: tezos: add network to subaccounts
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28

- Needed for wallets that may share the same subaccount name on the same
  device but are entirely different wallets that support different
  networks and/or assets within that network.
2025-01-02 20:30:32 -08:00
d602d78621 container: hledger-flow: algorand: add network to subaccounts
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28

- Needed for wallets that may share the same subaccount name on the same
  device but are entirely different wallets that support different
  networks and/or assets within that network.
2025-01-02 20:30:32 -08:00
ab602a036d container: hledger-flow: electrum: add tax related to rules 2025-01-02 20:30:32 -08:00
2b3b09dafa container: lib_taxes: add support for IRS Rev. Proc. 2024-28
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28

  * Obfuscated keymap now creates a unique indentifier per-wallet /
    per-account where all trades, spends and income are now clearly
    tied to their respective wallets / accounts.

- Removes support for anonymized ("universal pool") reports.
2025-01-02 20:30:32 -08:00
499c171d73 container: hledger-flow: add subaccount/network to tax rules
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28
2025-01-02 20:30:32 -08:00
6a4c2da99b hledger-flow: ethereum-based: add to Ethereum spam rules 2024-12-27 18:19:34 -08:00
a7834160ec hledger-flow: algorand: add to spam rules 2024-12-27 02:34:45 -08:00
ed57dc0749 client/container: use 'dfi' as global basename
Aligned with installation, will make usage help clearer.
2024-12-24 01:46:20 -08:00
a29426b910 container: finance: lib_hledger: remove -w from hledger-ui
Workaround for "hledger-ui: user error (Error: couldn't start native file manager: fdType: unsupported operation (unknown file type))"
2024-12-12 23:38:05 -08:00
c8611edacb client/container: src: completion: plugins enhancements
- Re-enables space after completion for plugin arguments
- Ignores internal/implementation files when completing
  * Files must be within an 'internal'/'impl' directory
2024-10-09 21:13:36 -07:00
ceaca332dd container: src: fetch: gemini: add debug logging 2024-10-08 19:05:40 -07:00
249ebe03d6 container: lib_edit: add hledger 'add' command 2024-10-01 19:38:35 -07:00
4bec30f600 container: hledger-flow: vultr: add sales tax rule
Vultr has now added Sales Tax to their CSV invoice.
2024-10-01 19:34:15 -07:00