Commit Graph

189 Commits

Author SHA1 Message Date
ad903387c8 Merge pull request #96 into master
731a8c9 hledger-flow: changelly: cost-basis comments for bitcoin.tax (Aaron Fiore)
f228da9 hledger-flow: bittrex: cost-basis work-around for bitcoin.tax (Aaron Fiore)
1975e1d hledger-flow: coinbase: cost-basis work-around for bitcoin.tax (Aaron Fiore)
2c1b896 hledger-flow: gemini: exchange: cost-basis work-around for bitcoin.tax (Aaron Fiore)
6d119df container: lib_taxes: cost-basis work-around for bitcoin.tax (Aaron Fiore)
2024-07-29 16:21:51 -07:00
731a8c9563 hledger-flow: changelly: cost-basis comments for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-29 16:15:50 -07:00
f228da98d8 hledger-flow: bittrex: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-29 16:15:50 -07:00
1975e1dbbb hledger-flow: coinbase: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-27 00:20:40 -07:00
2c1b896951 hledger-flow: gemini: exchange: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-27 00:20:31 -07:00
6d119df31b container: lib_taxes: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-27 00:20:22 -07:00
5b3693ebc1 Merge pull request #95 into master
e7eb92c root: macro: rootlogon.C: update usage (Aaron Fiore)
7901421 root: macro: crypto: add random.C (Aaron Fiore)
480b42e root: test: Random: assert multiple types (Aaron Fiore)
879eb6f root: src: Random: support multiple types (Aaron Fiore)
1092cd4 root: macro: crypto: add hash.C (Aaron Fiore)
b08187a root: macro: common: crypto: use type aliases (Aaron Fiore)
2024-07-24 15:06:35 -07:00
e7eb92cb33 root: macro: rootlogon.C: update usage
- Adds crypto examples
- Updates/clarifies comments
2024-07-24 15:02:21 -07:00
7901421fd4 root: macro: crypto: add random.C
Generates CSPRNG numbers of various types (impl-specific).
2024-07-24 15:02:21 -07:00
480b42e273 root: test: Random: assert multiple types
- Add test cases for multiple types
- Rewrite to include new interface/impl
- Fix assertion test to not exceed error boundary
2024-07-23 22:21:41 -07:00
879eb6f785 root: src: Random: support multiple types
Allows signed/alternative-unsigned types (impl-specific).
2024-07-23 22:21:41 -07:00
1092cd4adc root: macro: crypto: add hash.C
Generates encoded digests using all available cryptographic libraries.
2024-07-23 20:28:59 -07:00
b08187abba root: macro: common: crypto: use type aliases
Will make accessing scoped tag types a breeze.
2024-07-23 20:27:20 -07:00
3b204c5ccc Merge pull request #94 into master
0b15857 root: macro: test: reorg/refactor unit/benchmark (Aaron Fiore)
5c47cee root: macro: crypto: namespace refactor into common (Aaron Fiore)
c3aee1d root: macro: web: namespace refactor into common (Aaron Fiore)
a009142 root: macro: utility: namespace refactor into common (Aaron Fiore)
8eda51c root: macro: web: crypto: refactor class name (Aaron Fiore)
aeacc69 root: macro: web: namespace/class name refactor (Aaron Fiore)
f8494c1 root: macro: web/server common code refactor (Aaron Fiore)
fbf8b7f root: macro: factor out common code into utility (Aaron Fiore)
09c45c7 root: macro: layout reorg, related refactor (Aaron Fiore)
2024-07-23 15:24:44 -07:00
0b15857414 root: macro: test: reorg/refactor unit/benchmark 2024-07-23 15:16:33 -07:00
5c47cee552 root: macro: crypto: namespace refactor into common 2024-07-23 15:16:33 -07:00
c3aee1dee8 root: macro: web: namespace refactor into common 2024-07-23 15:16:33 -07:00
a0091423d1 root: macro: utility: namespace refactor into common 2024-07-23 15:16:33 -07:00
8eda51c6bc root: macro: web: crypto: refactor class name
Intended to be used only for RNG.
2024-07-23 15:16:33 -07:00
aeacc69788 root: macro: web: namespace/class name refactor 2024-07-23 15:16:33 -07:00
f8494c18b4 root: macro: web/server common code refactor 2024-07-23 15:16:33 -07:00
fbf8b7ffae root: macro: factor out common code into utility 2024-07-22 17:41:34 -07:00
09c45c794b root: macro: layout reorg, related refactor 2024-07-22 17:41:33 -07:00
d2788cc511 Merge pull request #93 into master
c332e71 hledger-flow: capital-one: bank: mockup: reorder columns (Aaron Fiore)
ba0e6f7 hledger-flow: ledger: mockup: add Status column (Aaron Fiore)
2024-07-20 00:33:35 -07:00
c332e71fda hledger-flow: capital-one: bank: mockup: reorder columns
New column order was introduced in #80.
2024-07-20 00:31:30 -07:00
ba0e6f7f2d hledger-flow: ledger: mockup: add Status column
New column was introduced in #73.
2024-07-20 00:31:30 -07:00
cc1abfffd9 Merge pull request #92 into master
cbe5a10 client: lib_gen: fix custom Dockerfile path (Aaron Fiore)
2024-07-20 00:26:28 -07:00
29c61b21fc Merge pull request #91 into master
64ada34 hledger-flow: ethereum-based: add to Ethereum spam rules (Aaron Fiore)
2024-07-20 00:23:45 -07:00
cbe5a107ee client: lib_gen: fix custom Dockerfile path
Fixup to #90.
2024-07-19 23:24:13 -07:00
64ada34fd4 hledger-flow: ethereum-based: add to Ethereum spam rules 2024-07-19 22:27:20 -07:00
723266186e Merge pull request #90 into master
c34fd15 client: lib_gen: fix environment reader/resetter (Aaron Fiore)
af53346 client: lib_gen: rewrite/fix global env gen (Aaron Fiore)
7118a39 client: optimize/refactor repository path (Aaron Fiore)
cd96815 client: docker.bash: usage update/refactor (Aaron Fiore)
2024-07-19 18:03:24 -07:00
c34fd15a51 client: lib_gen: fix environment reader/resetter
- Fixes default env generation if current env exists
    * was not unsetting all previously exported env
- Adds debug output
2024-07-19 17:52:38 -07:00
af533460ec client: lib_gen: rewrite/fix global env gen
- Fixes resetting of globals after sourcing custom env file (location)
- Reorganizes flow logic
- Related refactoring
- Clarifies comments
- Adds debug output
2024-07-19 16:48:40 -07:00
7118a39f6d client: optimize/refactor repository path
- Reduces all calls into a single line
- Redefines path as root repository path
2024-07-18 22:57:31 -07:00
cd9681566b client: docker.bash: usage update/refactor
- Uses variable delimiters
- Adds current impl arguments
- Shortens 'dev-tools' example
2024-07-18 22:57:30 -07:00
51b9e15f08 Merge pull request #89 into master
de81eba container: root: macro: rootlogon.C: update usage (Aaron Fiore)
8d2389b container: root: refactor using internal throw/exception handler (Aaron Fiore)
9873e63 container: root: add unit test for internal throw/exception handler (Aaron Fiore)
612f9e5 container: root: add internal throw/exception handler (Aaron Fiore)
2024-07-18 16:29:03 -07:00
de81ebac84 container: root: macro: rootlogon.C: update usage
API headers are now loaded automatically.
2024-07-17 21:34:51 -07:00
8d2389bee2 container: root: refactor using internal throw/exception handler 2024-07-17 21:34:51 -07:00
9873e63d56 container: root: add unit test for internal throw/exception handler 2024-07-17 21:34:51 -07:00
612f9e5499 container: root: add internal throw/exception handler 2024-07-17 19:45:06 -07:00
cc832c6f77 Merge pull request #88 into master
371c295 README: remove DOCKER_FINANCE_VERSION from `gen` (Aaron Fiore)
2024-07-16 18:00:38 -07:00
371c2950ca README: remove DOCKER_FINANCE_VERSION from gen
Capability from configuration was removed in #84.
2024-07-16 17:58:21 -07:00
0abe930c84 Merge pull request #87 into master
f0561d1 client: lib_gen: superscript: append subprofile before generating (Aaron Fiore)
2024-07-16 17:56:46 -07:00
f0561d1ebe client: lib_gen: superscript: append subprofile before generating
- Append new subprofile before potentially generating new file
- Simplifies backup/writing process
- Related refactoring
2024-07-16 17:54:25 -07:00
90e7d0adb2 Merge pull request #86 into master
37fcba1 client: lib_docker: `build`: use 'experimental' path (Aaron Fiore)
9975d34 client: remove `ghc` package requirement (Aaron Fiore)
b7900f1 client: reorg/factoring for 'experimental' builds (Aaron Fiore)
2024-07-16 17:49:56 -07:00
37fcba1586 client: lib_docker: build: use 'experimental' path 2024-07-16 17:44:17 -07:00
9975d3471c client: remove ghc package requirement
Will be managed by `stack` via respective source builds.
2024-07-16 17:44:16 -07:00
b7900f1eef client: reorg/factoring for 'experimental' builds
- Dockerfiles: separation of concerns for build types
- Dockerfiles: pull from respective hledger-based branches/tags
- Dockerfiles: move hledger-based test building into experimental
- docker-finance.yaml: add commented package 'unuran' (experimental)
2024-07-16 17:44:16 -07:00
2662937a47 Merge pull request #85 into master
e58bc57 client: Dockerfiles: ubuntu: fix botan dependency (Aaron Fiore)
dd4100a container: lib_finance: root: remove call via $ROOTSYS (Aaron Fiore)
2024-07-15 16:14:12 -07:00
e58bc578cd client: Dockerfiles: ubuntu: fix botan dependency
- The library is needed, not the utility binary
- Fixes `root` loading errors about missing headers
2024-07-13 19:06:20 -07:00