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
This commit is contained in:
2025-08-01 13:25:31 -07:00
parent 183806da6d
commit d270d56366
29 changed files with 375 additions and 46 deletions

View File

@@ -2,7 +2,7 @@
# docker-finance | modern accounting for the power-user
#
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -67,9 +67,19 @@ function lib_fetch::__parse_args()
api${global_arg_delim_2}<mobula|coingecko>
Support account(s):
Account(s):
account${global_arg_delim_2}<coinbase|coinbase-wallet|coinomi|gemini|ledger|metamask|pera-wallet>
account${global_arg_delim_2}<account1${global_arg_delim_3}account2${global_arg_delim_3}...>
Supported account(s):
- coinbase
- coinbase-wallet
- coinomi
- gemini
- ledger
- metamask
- pera-wallet
Fetch year:
@@ -79,6 +89,15 @@ function lib_fetch::__parse_args()
(block)chain${global_arg_delim_2}<blockchain[${global_arg_delim_3}blockchain${global_arg_delim_1}subaccount]>
Supported blockchain(s):
- algorand
- arbitrum
- base
- ethereum
- optimism
- tezos
Tor (proxy):
tor${global_arg_delim_2}<{on|true}|{off|false}> (default 'off')
@@ -129,20 +148,20 @@ function lib_fetch::__parse_args()
\e[37;2m# Fetch ethereum/polygon subaccounts for account metamask, year 2022\e[0m
$ $global_usage account${global_arg_delim_2}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon year${global_arg_delim_2}2022
\e[37;2m# Fetch multiple blockchains' subaccounts for account ledger, and ethereum for metamask, year 2023\e[0m
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
\e[37;2m# Fetch multiple blockchains' subaccounts for account ledger and metamask, year 2023\e[0m
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}base${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
\e[37;2m# Same as previous command but with shorthand option 'chain'\e[0m
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask chain${global_arg_delim_2}ethereum${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
$ $global_usage account${global_arg_delim_2}ledger${global_arg_delim_3}metamask chain${global_arg_delim_2}ethereum${global_arg_delim_3}base${global_arg_delim_3}tezos${global_arg_delim_3}algorand year${global_arg_delim_2}2023
\e[37;2m# Fetch multiple blockchains/subaccounts for ledger\e[0m
$ $global_usage account${global_arg_delim_2}ledger chain${global_arg_delim_2}ethereum/nano:x-1${global_arg_delim_3}tezos${global_arg_delim_1}nano:s-plus${global_arg_delim_3}algorand${global_arg_delim_1}nano:x-2
\e[37;2m# Fetch specific blockchain/subaccount/address for metamask\e[0m
$ $global_usage account${global_arg_delim_2}metamask chain${global_arg_delim_2}ethereum/phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969
$ $global_usage account${global_arg_delim_2}metamask chain${global_arg_delim_2}ethereum/phone:wallet-1/0x236ba53B56FEE4901cdac3170D17f827DF43E969${global_arg_delim_3}optimism/phone:wallet-3/0x18BFAa3f9Fa06123985d0456b4a911730382009D
\e[37;2m# Fetch given blochchain-based subaccounts for current year, over the Tor network\e[0m
$ $global_usage account${global_arg_delim_2}metamask${global_arg_delim_3}ledger blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon${global_arg_delim_3}tezos${global_arg_delim_3}algorand tor${global_arg_delim_2}on
$ $global_usage account${global_arg_delim_2}metamask${global_arg_delim_3}ledger blockchain${global_arg_delim_2}ethereum${global_arg_delim_3}polygon${global_arg_delim_3}arbitrum${global_arg_delim_3}tezos${global_arg_delim_3}algorand tor${global_arg_delim_2}on
\e[32mNotes:\e[0m