import { UiBalanceForCurrency, UiBalanceForWallet, UiCurrencySummary, UiPortfolio, UiTaxReport, UiTransaction, UiTransactionSource, UiTransactionType, UiWallet } from "./structs.slint"; export global TestData { out property <[UiTransaction]> transactions : [{ id: 0, from: "Exchange Foo", to: "Exchange Foo", date: "2013-10-30", time: "12:34:56", tx_type: UiTransactionType.trade, received-cmc-id: 1, received: "1 BTC", sent-cmc-id: -1, sent: "300 €", fee: "", value: "300 €", gain: 0.0, gain_error: "", description: "Invest in Bitcoin", tx_hash: "", }, { id: 1, from: "Exchange Foo", to: "Wallet Bar", date: "2013-11-01", time: "12:34:56", tx_type: UiTransactionType.transfer, received-cmc-id: 1, received: "0.5 BTC", sent-cmc-id: 1, sent: "0.5 BTC", fee: "0.0001 BTC", value: "300 €", gain: 0.0, gain_error: "", description: "Sent some to hardware wallet", tx_hash: "0x0000000000000000000000000000000000000000000000000000000000000000", }, { id: 2, from: "Exchange Foo", to: "Exchange Foo", date: "2013-10-30", time: "12:34:56", tx_type: UiTransactionType.trade, received-cmc-id: 1, received: "200 €", sent-cmc-id: -1, sent: "1 BTC", fee: "", value: "200 €", gain: 50.0, gain_error: "", description: "Made some profit", tx_hash: "", }]; out property <[UiWallet]> wallets : [{ name: "Binance", enabled: true, transaction_count: 2, sources: root.sources, },{ name: "Bitstamp", enabled: true, transaction_count: 0, sources: root.sources, }]; out property <[UiTransactionSource]> sources : [{ source_type: "ExchangeCsv", name: "Exchange", path: "/foo/bar/exchange.csv", enabled: true, transaction_count: 2, }]; out property <[StandardListViewItem]> report-years: [ { text: "2013" }, ]; out property <[UiTaxReport]> reports : [{ year: 2013, short_term_capital_gains: "5,080.28", short_term_capital_losses: "1,021.83", short_term_net_capital_gains: "4,058.46", long_term_capital_gains: "0", long_term_capital_losses: "0", long_term_net_capital_gains: "0", total_capital_gains: "5,080.28", total_capital_losses: "1,021.83", total_net_capital_gains: "4,058.46", // ordinary_income: string, // derivative_trading_income: string, // expenses: string, currencies: [{ currency-cmc-id: 1, currency: "BTC", balance_start: "0", balance_end: "1", quantity_disposed: "1", cost: "300", fees: "0", proceeds: "300", capital_profit_loss: "300", income: "0", total_profit_loss: "300", }, { currency-cmc-id: 5, currency: "PPC", balance_start: "0", balance_end: "294", quantity_disposed: "554", cost: "144", fees: "0", proceeds: "1460", capital_profit_loss: "1316", income: "0", total_profit_loss: "1316", }], gains: [{ currency-cmc-id: 1, bought_date: "2013-09-24", bought_time: "12:00:42", bought-tx-id: 0, sold_date: "2013-09-25", sold_time: "12:34:56", sold-tx-id: 2, amount: "0.04013 BTC", cost: 3.82, proceeds: 3.80, gain_or_loss: -0.02, long_term: false, }] }]; out property portfolio : { file-name: "portfolio.json", balance: 1000.00, cost_base: 1500.00, unrealized_gains: -500.00, holdings: [{ currency-cmc-id: 1, currency: "BTC", quantity: "1", cost: 1500.00, value: 1000.00, roi: "-33.33%", is-profit: false, unrealized_gain: -500.00, percentage_of_portfolio: 50.00, },{ currency-cmc-id: 2, currency: "LTC", quantity: "2", cost: 100.00, value: 1000.00, roi: "900.00%", is-profit: true, unrealized_gain: 900.00, percentage_of_portfolio: 50.00, },{ currency-cmc-id: 5, currency: "PPC", quantity: "100", cost: 500.00, value: 0.00, roi: "-100.00%", is-profit: false, unrealized_gain: -500.00, percentage_of_portfolio: 0.00, }], }; out property <[UiBalanceForWallet]> balances-for-wallet : [{ currency-cmc-id: 1, currency: "BTC", balance: "1.234", }]; out property <[UiBalanceForCurrency]> balances-for-currency : [{ source: "Bitstamp", balance: "1.234", },{ source: "Binance", balance: "0.5", }]; }