Elixir

Elixir Installation

Elixir can be installed by following this guide

Installation

The package can be installed by adding arkecosystem_client to your list of dependencies in mix.exs:

def deps do
  {:arkecosystem_client, "~> 0.1.0"}
end

Once installed, you should run the following command to install the dependencies :

$ mix deps.get

Usage

Initializing the Client

First step is to initialize the Client, the nethash and version values might be different :

iex > client = ArkEcosystem.Client.new(%{
... >             host: "http://my.node.ip:myport/api",
... >             nethash: "578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23",
... >             version: "1.1.1"
... > })

Accounts - V1

iex> ArkEcosystem.Client.API.One.Accounts.account(client, "DQCZQzibtABoggT9ygSzFNQ3A7PJyxttPP")
... > {:ok,
... > ...
... > }

More details

Blocks V1 and V2

iex> ArkEcosystem.Client.API.One.Blocks.block(client, "887102556000070987")
... > {:ok,
... > ...
... > }

More details

iex> ArkEcosystem.Client.API.Two.Blocks.list(client)
... > {:ok,
... > ...
... > }

More details

Delegates V1 and V2

iex> ArkEcosystem.Client.API.One.Delegates.count(client)
... > {:ok,
... > ...
... > }

More details

iex> ArkEcosystem.Client.API.Two.Delegates.list(client)
... > {:ok,
... > ...
... > }

More details

Loader - V1

iex> ArkEcosystem.Client.API.One.Loader.autoconfigure(client)
... > {:ok,
... > ...
... > }

More details

Node - V2

iex> ArkEcosystem.Client.API.Two.Node.status(client)
... > {:ok,
... > ...
... > }

More details

Peers - V1 and V2

iex> ArkEcosystem.Client.API.One.Peers.peer(client, "167.114.29.35", 4002)
... > {:ok,
... > ...
... > }

More details

iex> ArkEcosystem.Client.API.Two.Peers.list(client)
... > {:ok,
... > ...
... > }

More details

Signatures - V1

iex> ArkEcosystem.Client.API.One.Signatures.fee(client)
... > {:ok, 500000000}

More details

Transactions - V1 and V2

iex> ArkEcosystem.Client.API.One.Transactions.transaction(client, "4a5f96b24091b747fb7fd34952ef465d9b8ec5f73d1b234405bf2718d2a87d56")
... > {:ok,
... > ...
... > }

More details

iex> ArkEcosystem.Client.API.Two.Transactions.list(client)
... > {:ok,
... > ...
... > }

More details

Votes - V2

iex> ArkEcosystem.Client.API.Two.Votes.list(client)
... > {:ok,
... > ...
... > }

More details

Wallets - V2

iex> ArkEcosystem.Client.API.Two.Wallets.list(client)
... > {:ok,
... > ...
... > }

More details

Last Updated: 12/7/2018, 1:05:34 AM