Simple and fast http client for dogecoin. Should work for Bitcoin and forks/friends.
If available in Hex, the package can be installed
by adding dogex
to your list of dependencies in mix.exs
:
def deps do
[
{:dogex, "~> 0.1.1"}
]
end
def application do
[applications: [:dogex]]
end
These variables are used to generate the RPC url. Make sure you have them set in ~/.dogecoin/dogecoin.conf
.
Go here for a well documented example of the possible dogecoin config settings.
Set the elixir application's config:
config :dogex,
username: "rpcusername",
password: "rpcpassword",
port: 4242
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/dogex.
We can download the latest release of dogecoin here. This will have precompiled binaries that we can use.
If you want to add the binaries to your path, it would look something like this in Linux:
echo 'export PATH=$PATH:$HOME/dogecoin-1.14.0/bin' >> ~/.bashrc
Start the local dogecoin regtest (regression test), like this:
dogecoind -regtest -daemon -conf="$HOME/projects/dogex/test.conf"
You must give the absolute path or else it will think you are in the .dogecoin directory.
Now if you run mix test
everything should work!