A quick CLI application who can retrieve the balance of the specified Ark address.
- Elixir (1.5.0)
- Ark-Elixir
First you need to fetch the dependencies
def deps do
[
{:ark_elixir, "~> 0.1.2"}
]
end
Then you need to build them
$ mix deps.get
And add this line in your mix.exs for escript
def project do
[
app: :ark_elixir_example,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
escript: [main_module: ArkElixirExample], # This line
deps: deps()
]
end
You can run the example like this :
$ mix escript.build
>> Generated escript ark_elixir_example with MIX_ENV=dev
$ ./ark_elixir_example -a Acxb4Wxt2oUsXVViHJsenMuRDUjsMHHKeM
>> %{"balance" => "112013970754", "success" => true,
"unconfirmedBalance" => "112013970754"}
- Jolan Beer - Highjhacker
Ark_Elixir is under MIT license. See the LICENSE file for more informations.