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

Documentation for ArkEcosystem.Client.API.One.Delegates

Link to this section Summary

Functions

Get the count of delegates

Get a single delegate

Get Delegate Fee

Get the amount of ARKs forged by an account

Get a delegate’s forging status

Get the next forgers

Search for specific delegates

Get a list of voters for a delegate

Link to this section Functions

Get the count of delegates.

Examples

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

Get a single delegate.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.delegate(client)
{:ok,
 %ArkEcosystem.Client.API.One.Models.Delegate{
   address: "DQCZQzibtABoggT9ygSzFNQ3A7PJyxttPP",
   approval: 0.09,
   missedblocks: 1748,
   producedblocks: 3473,
   productivity: 66.52,
   public_key: "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec",
   rate: 17,
   username: "arkoar.group",
   vote: "12385839821762"
 }}
Link to this function delegates(client, parameters \\ []) View Source

Get all delegates.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.delegates(client)
{:ok,
 [
   %ArkEcosystem.Client.API.One.Models.Delegate{
     address: "DARiJqhogp2Lu6bxufUFQQMuMyZbxjCydN",
     approval: 4.32,
     missedblocks: 1722,
     producedblocks: 61445,
     productivity: 97.27,
     public_key: "022cca9529ec97a772156c152a00aad155ee6708243e65c9d211a589cb5d43234d",
     rate: 1,
     username: "boldninja",
     vote: "566475956800532"
   },
   %ArkEcosystem.Client.API.One.Models.Delegate{...},
   %ArkEcosystem.Client.API.One.Models.Delegate{...},
   %ArkEcosystem.Client.API.One.Models.Delegate{...},
   ...
 ]}

Get Delegate Fee

Examples

iex> ArkEcosystem.Client.API.One.Delegates.fee(client)
 {:ok, 2500000000}
Link to this function forged_by_account(client, generatorPublicKey) View Source

Get the amount of ARKs forged by an account.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.forged_by_account(client, "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec")
{:ok,
 %{
   "fees" => "190000000",
   "forged" => "695190000000",
   "rewards" => "695000000000",
   "success" => true
 }}
Link to this function forging_status(client, public_key, parameters \\ []) View Source

Get a delegate’s forging status

Examples

iex> ArkEcosystem.Client.API.One.Delegates.forging_status(client, "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec")
{:ok, true}

Get the next forgers.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.next_forgers(client)
{:ok,
 %{
   "currentBlock" => 3102247,
   "currentSlot" => 4185367,
   "delegates" => ["02845161cfca4d6ddde8e0d53538b6f881fb3ad9383cd77cebc55375dd6fd17663",
    "02ce086b1e1609c691c0d2e0670a15248a7244195798bcc578b12133fe04defe59",
    "033f28ad2e9b897d46f1e67c7c52070e9ca46b04c0679ebb21fb236719e38aade3",
    "031e195f2ba9afcfbea54866b0dac663f568620fb098fdea239f87b4e36c282e44",
    "0200af8a7a8572bcb3fcd305248343358198c8ed5bd004bbacfb16e7f0b09e532b",
    "03794e95585ab18fd95c963cfb2ec24f37ad159f6a43e05dd826577b58a32de309",
    "0326580718fc86ba609799ac95fcd2721af259beb5afa81bfce0ab7d9fe95de991",
    "02a9a0ac34a94f9d27fd9b4b56eb3c565a9a3f61e660f269775fb456f7f3301586",
    "0257b7724e97cd832e0c28533a86da5220656f9b5122141daab20e8526decce01f",
    "035f47535447d5511ba08fc4d805ea662a1f47bfba9204cc9dee77199c6f98a505"],
   "success" => true
 }}

Search for specific delegates.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.search(client, "arkoar")
{:ok,
 [
   %ArkEcosystem.Client.API.One.Models.Delegate{
     address: "DQCZQzibtABoggT9ygSzFNQ3A7PJyxttPP",
     approval: nil,
     missedblocks: 1748,
     producedblocks: 3476,
     productivity: nil,
     public_key: "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec",
     rate: nil,
     username: "arkoar.group",
     vote: "12385839821762"
   }
 ]}

Get a list of voters for a delegate.

Examples

iex> ArkEcosystem.Client.API.One.Delegates.voters(client, "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec")
iex(10)> ArkEcosystem.Client.API.One.Delegates.voters(client, "02d21954fb256662f82560cdced947af040e5190d9a08e65ee29443090499b22ec")
{:ok,
 [
   %ArkEcosystem.Client.API.One.Models.Account{
     address: "DP8SxqSnCV3Rsdvjeqrum2HA2CAgymCPJP",
     balance: "200000000",
     multisignatures: nil,
     public_key: "023050fa9cea524bb908ffc8836c888ffd1b00d6fb863624c2340f828ac40b4fd1",
     second_public_key: nil,
     second_signature: nil,
     u_multisignatures: nil,
     unconfirmed_balance: nil,
     unconfirmed_signature: nil
   },
   %ArkEcosystem.Client.API.One.Models.Account{...},
   %ArkEcosystem.Client.API.One.Models.Account{...},
   ...
 ]}