ArkEcosystem Elixir Client v0.1.0 ArkEcosystem.Client.API.One.Blocks View Source

Documentation for ArkEcosystem.Client.API.One.Blocks

Link to this section Summary

Functions

Get block by id

Get the blockchain epoch

Get the transaction fee for sending “normal” transactions

Get the network fees

Get the blockchain height

Get the blockchain milestone

Get the blockchain nethash

Get the blockchain reward

Get the blockchain status

Get the blockchain supply

Link to this section Functions

Get block by id.

Examples

iex(3)> ArkEcosystem.Client.API.One.Blocks.block(client, "887102556000070987")
{:ok,
 %ArkEcosystem.Client.API.One.Models.Block{
   block_signature: "3045022100cf25e7aa0ad979b8a681930dda181337f6aec2f45f95fc15f8082a0acab7d501022061e66f303278245abeb30ec63e9cf282d6180d1f10439f0b11741bafa52a8e18",
   confirmations: 27,
   generator_id: "DHQ4Fjsyiop3qBR4otAjAu6cBHkgRELqGA",
   generator_public_key: "0275776018638e5c40f1b922901e96cac2caa734585ef302b4a2801ee9a338a456",
   height: 3102078,
   id: "887102556000070987",
   number_of_transactions: 0,
   payload_hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
   payload_length: 0,
   previous_block: "4763192919900613939",
   reward: 200000000,
   timestamp: 33481344,
   total_amount: 0,
   total_fee: 0,
   total_forged: "200000000",
   version: 0
 }}

Get all blocks.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.blocks(client)
{:ok,
 [
   %ArkEcosystem.Client.API.One.Models.Block{
     block_signature: "3045022100cf25e7aa0ad979b8a681930dda181337f6aec2f45f95fc15f8082a0acab7d501022061e66f303278245abeb30ec63e9cf282d6180d1f10439f0b11741bafa52a8e18",
     confirmations: 1,
     generator_id: "DHQ4Fjsyiop3qBR4otAjAu6cBHkgRELqGA",
     generator_public_key: "0275776018638e5c40f1b922901e96cac2caa734585ef302b4a2801ee9a338a456",
     height: 3102078,
     id: "887102556000070987",
     number_of_transactions: 0,
     payload_hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
     payload_length: 0,
     previous_block: "4763192919900613939",
     reward: 200000000,
     timestamp: 33481344,
     total_amount: 0,
     total_fee: 0,
     total_forged: "200000000",
     version: 0
   },
   %ArkEcosystem.Client.API.One.Models.Block{...},
   %ArkEcosystem.Client.API.One.Models.Block{...},
   %ArkEcosystem.Client.API.One.Models.Block{...},
   %ArkEcosystem.Client.API.One.Models.Block{...},
   ...
 ]}

Get the blockchain epoch.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.epoch(client)
{:ok, "2017-03-21T13:00:00.000Z"}

Get the transaction fee for sending “normal” transactions

Examples

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

Get the network fees.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.fees(client)
{:ok,
 %{
   "delegate" => 2500000000,
   "multisignature" => 500000000,
   "secondsignature" => 500000000,
   "send" => 10000000,
   "vote" => 100000000
 }}

Get the blockchain height.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.height(client)
{:ok, %{"height" => 3102123, "id" => "6065299679901800950", "success" => true}}

Get the blockchain milestone.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.milestone(client)
{:ok, 1}
Link to this function nethash(client) View Source
nethash(Tesla.Client) :: ArkEcosystem.Client.response()

Get the blockchain nethash.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.nethash(client)
{:ok, "578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23"}

Get the blockchain reward.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.reward(client)
{:ok, 200000000}

Get the blockchain status.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.status(client)
{:ok,
 %{
   "epoch" => "2017-03-21T13:00:00.000Z",
   "fee" => 10000000,
   "height" => 3102147,
   "milestone" => 1,
   "nethash" => "578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23",
   "reward" => 200000000,
   "success" => true,
   "supply" => 13120429400000000
 }}

Get the blockchain supply.

Examples

iex> ArkEcosystem.Client.API.One.Blocks.supply(client)
{:ok, 13120431600000000}