Bitcoin Accounting
Mix.install([
{:bitcoin_accounting, "~> 0.1.6"}
])
Start the electrum server
ip = System.fetch_env!("LB_ELECTRUM_CLIENT_IP")
port = System.fetch_env!("LB_ELECTRUM_CLIENT_PORT") |> Integer.parse() |> elem(0)
ElectrumClient.start_link(ip, port)
Get credits and debits from a vpub
vpub =
"vpub5ZQ9mcm9jHj3j52uiuhRiFiijB9DDHwiNpC3ppnbQPrmdqjdZN1sJyjStVBDTY2mU3ZFxaoNL3GUKAUARQk27xN3LW79ptfooLR7AiH6pHa"
BitcoinAccounting.get_book_entries(vpub)