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 all blocks
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
Link to this function
block(client, id)
View Source
block(Tesla.Client.t(), String.t()) :: ArkEcosystem.Client.response()
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
}}
Link to this function
blocks(client, parameters \\ [])
View Source
blocks(Tesla.Client.t(), Keyword.t()) :: ArkEcosystem.Client.response()
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{...},
...
]}
Link to this function
epoch(client)
View Source
epoch(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the blockchain epoch.
Examples
iex> ArkEcosystem.Client.API.One.Blocks.epoch(client)
{:ok, "2017-03-21T13:00:00.000Z"}
Link to this function
fee(client)
View Source
fee(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the transaction fee for sending “normal” transactions
Examples
iex> ArkEcosystem.Client.API.One.Blocks.fee(client)
{:ok, 10000000}
Link to this function
fees(client)
View Source
fees(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the network fees.
Examples
iex> ArkEcosystem.Client.API.One.Blocks.fees(client)
{:ok,
%{
"delegate" => 2500000000,
"multisignature" => 500000000,
"secondsignature" => 500000000,
"send" => 10000000,
"vote" => 100000000
}}
Link to this function
height(client)
View Source
height(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the blockchain height.
Examples
iex> ArkEcosystem.Client.API.One.Blocks.height(client)
{:ok, %{"height" => 3102123, "id" => "6065299679901800950", "success" => true}}
Link to this function
milestone(client)
View Source
milestone(Tesla.Client.t()) :: ArkEcosystem.Client.response()
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"}
Link to this function
reward(client)
View Source
reward(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the blockchain reward.
Examples
iex> ArkEcosystem.Client.API.One.Blocks.reward(client)
{:ok, 200000000}
Link to this function
status(client)
View Source
status(Tesla.Client.t()) :: ArkEcosystem.Client.response()
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
}}
Link to this function
supply(client)
View Source
supply(Tesla.Client.t()) :: ArkEcosystem.Client.response()
Get the blockchain supply.
Examples
iex> ArkEcosystem.Client.API.One.Blocks.supply(client)
{:ok, 13120431600000000}