smartvaults / smartvaults-js-client

SmartVaults javascript client
https://smartvaults.github.io/smartvaults-js-client/
2 stars 2 forks source link

Feature/transaction details #41

Closed Dreyhh closed 9 months ago

Dreyhh commented 9 months ago

Updates downloadTransactions() and related methods to allow choosing between HIFO, LIFO, and FIFO accounting methods, as well as to enable specifying date periods and cost basis/proceeds for each transaction.

sebastianmontero commented 9 months ago

@Dreyhh what is the difference between the Actual and the other accounting methods? Why is it that a whole new method is required?

Dreyhh commented 9 months ago

@Dreyhh what is the difference between the Actual and the other accounting methods? Why is it that a whole new method is required?

Maybe I should have used its common name SpecID (Specific Identification) instead of 'Actual', but it is the method that keeps track of the actual UTXOS (and their associated cost basis) used on a transaction, so it doesn't share that much logic with the other methods since in the others the order is determined by the method itself, and in the SpecID method the order is not predefined but instead we need to check each of the inputs o a transaction and get their corresponding cost basis