API Documentation

org.arkecosystem.client.http.Client;

Client()

public Client(String host, String version)

Create a new Client class instance.

Parameters

Type

Name

Required

Description

String

host

Yes

Node url

String

version

Yes

Version to use

get()

public LinkedTreeMap<String, Object> get(String url, Map<String, Object> params)

Send a GET request with query parameters.

Parameters

Type

Name

Required

Description

String

url

Yes

Endpoint

Map

params

No

Query parameters

Return Value

LinkedTreeMap<String, Object>

get()

public LinkedTreeMap<String, Object> get(String url)

Send a GET request without query parameters.

Parameters

Type

Name

Required

Description

String

url

Yes

Endpoint

Return Value

LinkedTreeMap<String, Object>

post()

public LinkedTreeMap<String, Object> post(String url, Map payload)

Send a POST request with JSON-encoded parameters.

Parameters

Type

Name

Required

Description

String

url

Yes

Endpoint

Map

payload

Yes

Transaction(s) to post

Return Value

LinkedTreeMap<String, Object>

getClient()

public OkHttpClient getClient()

Get Client instance.

Return Value

OkHttpClient

setClient()

public void setClient(OkHttpClient client)

Set client instance.

Parameters

Type

Name

Required

Description

OkHttpClient

client

Yes

Client

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.Connection;

Connection()

public Connection(Map<String, Object> config)

Connection class constructor.

Parameters

Type

Name

Required

Description

Map

config

Yes

Configuration

api()

public T api()

Instantiate new Api.

Parameters

Type

Name

Required

Description

Map

config

Yes

Configuration

Return Value

T

org.arkecosystem.client.ConnectionManager;

ConnectionManager()

public ConnectionManager()

ConnectionManager class constructor.

getDefaultConnection()

public String getDefaultConnection()

Get the default connection name.

Return Value

String

setDefaultConnection()

public void setDefaultConnection(String name)

Set the default connection.

Parameters

Type

Name

Required

Description

String

name

Yes

Connection name

Return Value

void

getConnections()

public Map<String, Connection<? extends AbstractAPI>> getConnections()

Get a map of connections.

Return Value

Map<String, Connection<? extends AbstractAPI>>

connect()

public <T extends AbstractAPI> Connection<T> connect(Map config, String name)

Connect to the given connection.

Parameters

Type

Name

Required

Description

Map

config

Yes

Configuration

String

name

Yes

Connection name

Return Value

<T extends AbstractAPI>

connect()

public <T extends AbstractAPI> Connection<T> connect(Map config)

Connect to the given connection.

Parameters

Type

Name

Required

Description

Map

config

Yes

Configuration

Return Value

<T extends AbstractAPI>

disconnect()

public void disconnect(String name)

Disconnect from given connection.

Parameters

Type

Name

Required

Description

String

name

Yes

Connection name

Return Value

void

disconnect()

public void disconnect()

Disconnect from given connection.

connection()

public <T extends AbstractAPI> Connection<T> connection(String name)

Get a connection instance.

Parameters

Type

Name

Required

Description

String

name

Yes

Connection name

Return Value

<T extends AbstractAPI>

connection()

public Connection connection()

Get a connection instance.

Return Value

Connection

org.arkecosystem.client.api.AbstractAPI;

AbstractAPI()

public AbstractAPI(Client client) {

Create a new API class instance.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

org.arkecosystem.client.api.Blocks;

Blocks()

public Blocks(Client client)

Blocks class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

all()

public LinkedTreeMap<String, Object> all()

Get all blocks.

Return Value

LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String id)

Get a block by the given id.

Parameters

Type

Name

Required

Description

String

id

Yes

Block ID

Return Value

LinkedTreeMap<String, Object>

transactions()

public LinkedTreeMap<String, Object> transactions(String id)

Get all transactions by the given block.

Parameters

Type

Name

Required

Description

String

id

Yes

Block ID

Return Value

LinkedTreeMap<String, Object>

public LinkedTreeMap<String, Object> search(Map<String, Object> parameters)

Filter all blocks by the given parameters.

Parameters

Type

Name

Required

Description

Map

parameters

Yes

Query parameters

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.api.Delegates;

Delegates()

public Delegates(Client client)

Delegates class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

all()

public LinkedTreeMap<String, Object> all()

Get all accounts.

Return Value

LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String id)

Get a delegate by the given id.

Parameters

Type

Name

Required

Description

String

id

Yes

Delegate identifier

Return Value

LinkedTreeMap<String, Object>

blocks()

public LinkedTreeMap<String, Object> blocks(String id)

Get all blocks for the given delegate.

Parameters

Type

Name

Required

Description

String

id

Yes

Delegate identifier

Return Value

LinkedTreeMap<String, Object>

voters()

public LinkedTreeMap<String, Object> voters(String id)

Get all voters for the given delegate.

Parameters

Type

Name

Required

Description

String

id

Yes

Delegate identifier

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.api.Node;

Node()

public Node(Client client)

Node class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

configuration()

public LinkedTreeMap<String, Object> configuration()

Get the node configuration.

Return Value

LinkedTreeMap<String, Object>

status()

public LinkedTreeMap<String, Object> status()

Get the node status.

Return Value

LinkedTreeMap<String, Object>

syncing()

public LinkedTreeMap<String, Object> syncing()

Get the node syncing status.

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.api.peers;

Peers()

public Peers(Client client)

Peers class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

all()

public LinkedTreeMap<String, Object> all()

Get all peers.

Return Value

public LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String ip)

Get a peer by the given IP address.

Parameters

Type

Name

Required

Description

String

ip

Yes

IP address

Return Value

public LinkedTreeMap<String, Object>

org.arkecosystem.client.api.Transactions;

Transactions()

public Transactions(Client client)

Transactions class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

create()

public LinkedTreeMap<String, Object> create(List<HashMap> transactions)

Create a new transaction.

Parameters

Type

Name

Required

Description

List

transactions

Yes

Transaction(s) to broadcast

Return Value

LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String id)

Get a transaction by the given id.

Parameters

Type

Name

Required

Description

String

id

Yes

Transaction ID

Return Value

LinkedTreeMap<String, Object>

all()

public LinkedTreeMap<String, Object> all()

Get all transactions.

Return Value

LinkedTreeMap<String, Object>

allUnconfirmed()

public LinkedTreeMap<String, Object> allUnconfirmed()

Get all unconfirmed transactions.

Return Value

LinkedTreeMap<String, Object>

showUnconfirmed()

public LinkedTreeMap<String, Object> showUnconfirmed(String id)

Get an unconfirmed transaction by the given id.

Parameters

Type

Name

Required

Description

String

id

No

Unconfirmed transaction ID

Return Value

LinkedTreeMap<String, Object>

search()

public LinkedTreeMap<String, Object> search(Map<String, Object> parameters)

Filter all transactions by the given parameters.

Parameters

Type

Name

Required

Description

Map

parameters

Yes

Query parameters

Return Value

LinkedTreeMap<String, Object>

types()

public LinkedTreeMap<String, Object> types()

Get a list of valid transaction types.

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.api.Votes;

Votes()

public Votes(Client client)

Votes class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

all()

public LinkedTreeMap<String, Object> all()

Get all votes.

Return Value

LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String id)

Get a vote by the given id.

Parameters

Type

Name

Required

Description

String

id

Yes

Vote identifier

Return Value

LinkedTreeMap<String, Object>

org.arkecosystem.client.api.Wallets;

Wallets()

public Wallets(Client client)

Wallets class constructor.

Parameters

Type

Name

Required

Description

Client

client

Yes

Client

all()

public LinkedTreeMap<String, Object> all()

Get all wallets.

Return Value

LinkedTreeMap<String, Object>

show()

public LinkedTreeMap<String, Object> show(String id)

Get a wallet by the given id.

Parameters

Type

Name

Required

Description

String

id

Yes

Wallet identifier

Return Value

LinkedTreeMap<String, Object>

transactions()

public LinkedTreeMap<String, Object> transactions(String id)

Get all transactions for the given wallet.

Parameters

Type

Name

Required

Description

String

id

Yes

Wallet identifier

Return Value

LinkedTreeMap<String, Object>

receivedTransactions()

public LinkedTreeMap<String, Object> receivedTransactions(String id)

Get all transactions received by the given wallet.

Parameters

Type

Name

Required

Description

String

id

Yes

Wallet identifier

Return Value

LinkedTreeMap<String, Object>

sentTransactions()

public LinkedTreeMap<String, Object> sentTransactions(String id)

Get all transactions sent by the given wallet.

Parameters

Type

Name

Required

Description

String

id

Yes

Wallet identifier

Return Value

LinkedTreeMap<String, Object>

votes()

public LinkedTreeMap<String, Object> votes(String id)

Get all votes by the given wallet.

Parameters

Type

Name

Required

Description

String

id

Yes

Wallet identifier

Return Value

LinkedTreeMap<String, Object>

top()

public LinkedTreeMap<String, Object> top()

Get all wallets sorted by balance in descending order.

Return Value

LinkedTreeMap<String, Object>

search()

public LinkedTreeMap<String, Object> search(Map<String, Object> parameters)

Filter all wallets by the given parameters.

Parameters

Type

Name

Required

Description

Map

parameters

Yes

Search query parameters

Return Value

LinkedTreeMap<String, Object>