Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Latest commit

 

History

History
1177 lines (721 loc) · 18.5 KB

api-documentation.md

File metadata and controls

1177 lines (721 loc) · 18.5 KB
id title
api-documentation
API Documentation

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.Blockchain;

Blockchain()

public Blockchain(Client client)

Blockchain class constructor.

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>

search()

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.Bridgechains;

Bridgechains()

public Bridgechians(Client client)

Bridgechains class constructor.

Parameters

Type Name Required Description
Client client Yes Client

all()

public LinkedTreeMap<String, Object> all()

Get all bridgechains.

Return Value

LinkedTreeMap<String, Object>

show()

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

Get a bridgechain by genesis hash.

Parameters

Type Name Required Description
String id Yes Bridgechain identifier

Return Value

LinkedTreeMap<String, Object>

search()

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

Filter all bridgechains by the given parameters.

Parameters

Type Name Required Description
Map parameters Yes Query parameters

org.arkecosystem.client.api.Businesses

Business()

public Businesses(Client client)

Businesses class constructor.

Parameters

Type Name Required Description
Client client Yes Client

all()

public LinkedTreeMap<String, Object> all()

Get all business wallets.

Return Value

LinkedTreeMap<String, Object>

show()

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

Get a business by wallet address.

Parameters

Type Name Required Description
String id Yes Business identifier

showBridgechians()

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

Get all bridgechains of a wallet.

Parameters

Type Name Required Description
String id Yes Business identifier

search()

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

Filter all businesses by the given parameters.

Parameters

Type Name Required Description
Map parameters Yes Query parameters

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.Locks;

Locks()

public Locks(Client client)

Locks class constructor.

Parameters

Type Name Required Description
Client client Yes Client

all()

public LinkedTreeMap<String, Object> all()

Get all locks.

Return Value

LinkedTreeMap<String, Object>

show()

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

Return all locks by a given wallet address.

Parameters

Type Name Required Description
String id Yes Wallet address

search()

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

Filter all locks by the given parameters.

Parameters

Type Name Required Description
Map parameters Yes Query parameters

search()

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

Filter all unlocked locks by the given parameters.

Parameters

Type Name Required Description
Map parameters Yes Query parameters

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>

fees()

public LinkedTreeMap<String, Object> fees(Integer... days)

Get fees by days.

Return Value

LinkedTreeMap<String, Object>

debug()

public LinkedTreeMap<String, Object> debug()

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.Rounds;

Rounds()

public Rounds(Client client)

Rounds class constructor.

Parameters

Type Name Required Description
Client client Yes Client

delegater()

public LinkedTreeMap<String, Object> delegates(int id)

Returns delegates by given round.

Parameters

Type Name Required Description
String id Yes Round identifier

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>

schemas()

public LinkedTreeMap<String, Object> schemas()

Get a list of transactions schemas.

Return Value

LinkedTreeMap<String, Object>

fees()

public LinkedTreeMap<String, Object> fees()

Get a list of transactions fees.

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>