API Documentation

ArkEcosystem.Client.API.Base

initialize()

1def initialize(client)

Create a new resource instance.

Parameters

Type Name Required Description
[Object] client Yes Client

Return Value

Base

ArkEcosystem.Client.Connection

initialize()

1def initialize(config, client = nil)

Create a new connection instance.

Parameters

Type Name Required Description
[Hash] config Yes Configuration
Client client No Client

Return Value

[ArkEcosystem::Client::Connection]

blocks()

1def blocks

Return the Blocks API resource.

Return Value

[Object]

delegates()

1def delegates

Return the Delegates API resource.

Return Value

[Object]

node()

1def node

Return the Node API resource.

Return Value

[Object]

peers()

1def peers

Return the Peers API resource.

Return Value

[Object]

transactions()

1def transactions

Return the Transactions API resource.

Return Value

[Object]

votes()

1def votes

Return the Votes API resource.

Return Value

[Object]

wallets()

1def wallets

Return the Wallets API resource.

Return Value

[Object]

ArkEcosystem.Client.ConnectionManager

def initialize

1def initialize

Create a new client instance.

Return Value

[Faraday::Response]

connect()

1def connect(connection, name = 'main')

Connect to the given connection.

Parameters

Type Name Required Description
[ArkEcosystem::Client::Connection] connection Yes Connection instance
[String] name No Connection name

Return Value

[Faraday::Response]

disconnect()

1def disconnect(name)

Disconnect from the given connection.

Parameters

Type Name Required Description
[String] name Yes Connection name

Return Value

[nil]

connection()

1def connection(name)

Get a connection instance.

Parameters

Type Name Required Description
[String] name Yes Connection name

Return Value

[ArkEcosystem::Client::Connection]

ArkEcosystem.Client.API.Blocks

all()

1def all(parameters = {})

Get all blocks.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

1def show(id)

Get a block by the given id.

Parameters

Type Name Required Description
[String] id Yes Block ID

Return Value

[Faraday::Response]

transactions()

1def transactions(id, parameters = {})

Get all transactions by the given block.

Parameters

Type Name Required Description
[String] id Yes Block ID
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

search()

1def search(parameters)

Filter all blocks by the given parameters.

Parameters

Type Name Required Description
[Hash] parameters Yes Search parameters

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Delegates

all()

1def all(parameters = {})

Get all accounts.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

1def show(client, id)

Get a delegate by the given id.

Parameters

Type Name Required Description
[String] id No Delegate identifier

Return Value

[Faraday::Response]

blocks()

1def blocks(id, parameters = {})

Get all blocks for the given delegate.

Parameters

Type Name Required Description
[String] id No Delegate identifier
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

voters()

1def voters(id, parameters = {})

Get all voters for the given delegate.

Parameters

Type Name Required Description
[String] id No Delegate identifier
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Node

configuration()

1def configuration

Get the node configuration.

Return Value

[Faraday::Response]

status()

1def status

Get the node status.

Return Value

[Faraday::Response]

syncing()

1def syncing

Get the node syncing status.

Return Value

[Faraday::Response]

fees()

1def fees

Get the loader fee statistics.

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Peers

all()

1def all(parameters = {})

Get all peers.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

1def show(ip_addr)

Get a peer by the given IP address.

Parameters

Type Name Required Description
[String] ip_addr Yes IP address

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Transactions

create()

1def create(parameters)

Create a new transaction.

Parameters

Type Name Required Description
[Hash] parameters Yes Transaction to broadcast

Return Value

[Faraday::Response]

show()

1def show(id)

Get a transaction by the given id.

Parameters

Type Name Required Description
[String] id Yes Transaction ID

Return Value

[Faraday::Response]

all()

1def all(parameters = {})

Get all transactions.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

all_unconfirmed()

1def all_unconfirmed(parameters = {})

Get all unconfirmed transactions.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show_unconfirmed()

1def show_unconfirmed(client, id)

Get an unconfirmed transaction by the given id.

Parameters

Type Name Required Description
[String] id Yes Transaction ID

Return Value

[Faraday::Response]

search()

1def search(parameters)

Filter all transactions by the given parameters.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

types()

1def types

Get a list of valid transaction types.

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Votes

all()

1def all(parameters = {})

Get all votes.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show()

1def show(id)

Get a vote by the given id.

Parameters

Type Name Required Description
[String] id Yes Vote ID

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Wallets

all()

1def all(parameters = {})

Get all wallets.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show()

1def show(id)

Get a wallet by the given id.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier

Return Value

[Faraday::Response]

transactions()

1def transactions(id, parameters = {})

Get all transactions for the given wallet.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

received_transactions()

1def received_transactions(id, parameters = {})

Get all transactions received by the given wallet.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

sent_transactions()

1def sent_transactions(id, parameters = {})

Get all transactions sent by the given wallet.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

votes()

1def votes(id)

Get all votes by the given wallet.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier

Return Value

[Faraday::Response]

top()

1def top(parameters = {})

Get all wallets sorted by balance in descending order.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

search()

1def search(parameters)

Filter all wallets by the given parameters.

Parameters

Type Name Required Description
[Hash] parameters No Search parameters

Return Value

[Faraday::Response]

ArkEcosystem.Client.HTTP.Client

initialize()

1def initialize(config)

Create a new resource instance.

Parameters

Type Name Required Description
[Hash] config Yes Configuration

Return Value

[ArkEcosystem::Client]

get()

1def get(url, query = {})

Create and send a HTTP “GET” request.

Parameters

Type Name Required Description
[String] url Yes Endpoint
[Hash] query No Query parameters

Return Value

[Faraday::Response]

post()

1def post(url, payload = {})

Create and send a HTTP “POST” request.

Parameters

Type Name Required Description
[String] url Yes Endpoint
[Hash] payload No Query parameters

Return Value

[Faraday::Response]

put()

1def put(url, payload = {})

Create and send a HTTP “PUT” request.

Parameters

Type Name Required Description
[String] url Yes Endpoint
[Hash] payload No Query parameters

Return Value

[Faraday::Response]

delete()

1def delete(url, query = {})

Create and send a HTTP “DELETE” request.

Parameters

Type Name Required Description
[String] url Yes Endpoint
[Hash] query No Query parameters

Return Value

[Faraday::Response]

ArkEcosystem.Client.HTTP.Response

initialize()

1def initialize(response)

Create a new resource instance.

Parameters

Type Name Required Description
[String] response Yes Response

Return Value

[ArkEcosystem::Response]

body()

1def body

Get the body from the Response.

Return Value

[String]

url()

1def url

Get url from the Response.

Return Value

[String]

to_hash()

1def to_hash

Convert the Response to a hash.

Return Value

[String]

Last updated 3 years ago
Edit Page
Share: