Installation and usage of the platform
REST API: information about network participants¶
There are three groups of methods for obtaining information about network participants:
addresses
– the methods designed to get information about the network members’ addresses;alias
– getting the participant’s address by the alias set for him or the alias by the participant’s address;leasing
– theGET /leasing/active/{address}
query that outputs a list of leasing transactions in which the address was involved as a sender or receiver.
addresses
group:¶
GET /addresses¶
Obtaining all participant addresses, whose key pairs are stored in the keystore of the node.
Response example:
GET /addresses/seq/{from}/{to}¶
Obtaining addresses of the participants, which are stored in the keystore of a node in a given range: from the address {from}
to the address {to}
.
The format of the method response is identical to that of GET /addresses
.
GET /addresses/balance/{address}¶
Getting the balance for the address {address}
.
Response example:
POST /addresses/balance/details¶
Get detailed balance information for the list of addresses, which is specified as an array in the addresses
field when prompted.
Parameters returned in the method response:
regular
– number of tokens owned directly by the participant (R);available
– participant’s total balance, excluding funds leased by the participant (A = R - L);effective
– participant’s total balance, including funds leased to the participant and minus funds that the participant himself has leased (E = R + F - L);generating
– participant’s generating balance, including leased funds, for the last 1,000 blocks.
Variables in parentheses: L – funds leased by the participant to other participants, F – funds leased by the participant from other participants.
Response example for one address:
GET /addresses/balance/details/{address}¶
Get detailed balance information for an individual address. The information in the response is identical to the POST /addresses/balance/details
method.
Response example:
GET /addresses/effectiveBalance/{address}¶
Obtaining the total balance of the address, including leased funds.
Response example:
GET /addresses/effectiveBalance/{address}/{confirmations}¶
Retrieves the balance for {address}
after the number of confirmations >= {confirmations}
. The participant’s total balance is returned, including funds leased to the participant.
Response example for confirmations >= 1:
GET /addresses/generatingBalance/{address}/at/{height}¶
Obtaining the generating address balance at the specified block height {height}
.
Response example:
GET /addresses/scriptInfo/{address}¶
Obtaining data about the script installed on the address.
Parameters returned in the method response:
address
– address in base58 format;script
– script body in base64 format;scriptText
– the source code of the script;complexity
– complexity of the script;extraFee
– fee for outgoing transactions set by the script.
Script complexity – a number from 1 to 100 representing the amount of computing resources required to execute the script.
Response example:
GET /addresses/publicKey/{publicKey}¶
The method returns the participant’s address based on its public key.
Response example:
GET /addresses/data/{address}¶
The method returns data written to the specified address using transaction 12.
Response example:
GET /addresses/data/{address}/{key}¶
The method returns data recorded at the specified address with key {key}
. This key is specified in the transaction 12 in the data.key
field.
Response example:
alias
group:¶
GET /alias/by-alias/{alias}¶
Obtaining a participant’s address by his {alias}
.
Response example:
GET /alias/by-address/{address}¶
Obtaining a participant’s alias from his {address}
.
Response example:
leasing
group:¶
GET /leasing/active/{address}¶
The method returns a list of lease creation transactions in which the address participated as sender or recipient.
Response example with one transaction: