Home | SDKs

API Documentation

ArkEcosystem.Client.API.Base

initialize()

def initialize(client)

Create a new resource instance.

Parameters

Type Name Required Description
[Object] client Yes Client

Return Value

Base

ArkEcosystem.Client.Connection

initialize()

def 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()

def blocks

Return the Blocks API resource.

Return Value

[Object]

delegates()

def delegates

Return the Delegates API resource.

Return Value

[Object]

node()

def node

Return the Node API resource.

Return Value

[Object]

peers()

def peers

Return the Peers API resource.

Return Value

[Object]

transactions()

def transactions

Return the Transactions API resource.

Return Value

[Object]

votes()

def votes

Return the Votes API resource.

Return Value

[Object]

wallets()

def wallets

Return the Wallets API resource.

Return Value

[Object]

ArkEcosystem.Client.ConnectionManager

def initialize

def initialize

Create a new client instance.

Return Value

[Faraday::Response]

connect()

def 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()

def disconnect(name)

Disconnect from the given connection.

Parameters

Type Name Required Description
[String] name Yes Connection name

Return Value

[nil]

connection()

def 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()

def all(parameters = {})

Get all blocks.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

def show(id)

Get a block by the given id.

Parameters

Type Name Required Description
[String] id Yes Block ID

Return Value

[Faraday::Response]

transactions()

def 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()

def 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()

def all(parameters = {})

Get all accounts.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

def 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()

def 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()

def 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()

def configuration

Get the node configuration.

Return Value

[Faraday::Response]

status()

def status

Get the node status.

Return Value

[Faraday::Response]

syncing()

def syncing

Get the node syncing status.

Return Value

[Faraday::Response]

fees()

def fees

Get the loader fee statistics.

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Peers

all()

def all(parameters = {})

Get all peers.

Parameters

Type Name Required Description
[Hash] parameters No Query parameters

Return Value

[Faraday::Response]

show()

def 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()

def create(parameters)

Create a new transaction.

Parameters

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

Return Value

[Faraday::Response]

show()

def show(id)

Get a transaction by the given id.

Parameters

Type Name Required Description
[String] id Yes Transaction ID

Return Value

[Faraday::Response]

all()

def all(parameters = {})

Get all transactions.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

all_unconfirmed()

def all_unconfirmed(parameters = {})

Get all unconfirmed transactions.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show_unconfirmed()

def 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()

def search(parameters)

Filter all transactions by the given parameters.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

types()

def types

Get a list of valid transaction types.

Return Value

[Faraday::Response]

ArkEcosystem.Client.API.Votes

all()

def all(parameters = {})

Get all votes.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show()

def 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()

def all(parameters = {})

Get all wallets.

Parameters

Type Name Required Description
[Hash] parameters Yes Query parameters

Return Value

[Faraday::Response]

show()

def show(id)

Get a wallet by the given id.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier

Return Value

[Faraday::Response]

transactions()

def 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()

def 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()

def 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()

def votes(id)

Get all votes by the given wallet.

Parameters

Type Name Required Description
[String] id Yes Wallet identifier

Return Value

[Faraday::Response]

top()

def 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()

def 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()

def initialize(config)

Create a new resource instance.

Parameters

Type Name Required Description
[Hash] config Yes Configuration

Return Value

[ArkEcosystem::Client]

get()

def 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()

def 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()

def 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()

def 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()

def initialize(response)

Create a new resource instance.

Parameters

Type Name Required Description
[String] response Yes Response

Return Value

[ArkEcosystem::Response]

body()

def body

Get the body from the Response.

Return Value

[String]

url()

def url

Get url from the Response.

Return Value

[String]

to_hash()

def to_hash

Convert the Response to a hash.

Return Value

[String]


2020 © ARK.io | All rights reserved | An ARK.io Product