AELF API 1.0¶
Chain API¶
Get information about a given block by block hash. Optionally with the list of its transactions.¶
GET /api/blockChain/block
Parameters¶
Type | Name | Description | Schema | Default | |
---|---|---|---|---|---|
Query | blockHash optional |
block hash | string | ||
Query | include Transactions optional |
include transactions or not | boolean | "false" |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get information about a given block by block height. Optionally with the list of its transactions.¶
GET /api/blockChain/blockByHeight
Parameters¶
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query | blockHeight
|
block height | integer (int64) | |
Query | include Transactions
|
include transactions or not | boolean | "false" |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the height of the current chain.¶
GET /api/blockChain/blockHeight
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | integer (int64) |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the current state about a given block¶
GET /api/blockChain/blockState
Parameters¶
Type | Name | Description | Schema |
---|---|---|---|
Query | blockHash optional | block hash | string |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | BlockStateDto |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the current status of the block chain.¶
GET /api/blockChain/chainStatus
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | ChainStatusDto |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
POST /api/blockChain/executeRawTransaction¶
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | ExecuteRawTransactionDto |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | string |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Call a read-only method on a contract.¶
POST /api/blockChain/executeTransaction
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | ExecuteTransactionDto |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | string |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the merkle path of a transaction.¶
GET /api/blockChain/merklePathByTransactionId
Parameters¶
Type | Name | Schema |
---|---|---|
Query | transactionId optional | string |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | MerklePathDto |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Creates an unsigned serialized transaction¶
POST /api/blockChain/rawTransaction
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | CreateRawTransactionInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | CreateRawTransactionOutput |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
send a transaction¶
POST /api/blockChain/sendRawTransaction
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | SendRawTransactionInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | SendRawTransactionOutput |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Broadcast a transaction¶
POST /api/blockChain/sendTransaction
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | SendTransactionInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | SendTransactionOutput |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Broadcast multiple transactions¶
POST /api/blockChain/sendTransactions
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | SendTransactionsInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | < string > array |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Estimate transaction fee¶
POST /api/blockChain/calculateTransactionFee
Parameters¶
Type | Name | Schema | Default |
---|---|---|---|
Body | Input optional | CalculateTransactionFeeInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | CalculateTransactionFeeOutput |
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
GET /api/blockChain/taskQueueStatus¶
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | < TaskQueueInfoDto > array |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the transaction pool status.¶
GET /api/blockChain/transactionPoolStatus
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | GetTransactionPoolStatusOutput |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get the current status of a transaction¶
GET /api/blockChain/transactionResult
Parameters¶
Type | Name | Description | Schema |
---|---|---|---|
Query | transactionId optional | transaction id | string |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | TransactionResultDto |
The transaction result DTO object returned contains the transaction that contains the parameter values used for the call. The node will return the byte array as a base64 encoded string if it can’t decode it.
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Get multiple transaction results.¶
GET /api/blockChain/transactionResults
Parameters¶
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query | blockHash optional | block hash | string | |
Query | limit optional | limit | integer (int32) | 10 |
Query | offset optional | offset | integer (int32) | 0 |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | < TransactionResultDto > array |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Net API¶
Get information about the node’s connection to the network.¶
GET /api/net/networkInfo
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | GetNetworkInfoOutput |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- Net
Attempts to add a node to the connected network nodes¶
POST /api/net/peer
Parameters¶
Type | Name | Schema |
---|---|---|
Body | input optional | AddPeerInput |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | boolean |
401 | Unauthorized |
Security¶
- Basic Authentication
Consumes¶
application/json-patch+json; v=1.0
application/json; v=1.0
text/json; v=1.0
application/*+json; v=1.0
application/x-protobuf; v=1.0
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- Net
Attempts to remove a node from the connected network nodes¶
DELETE /api/net/peer
Parameters¶
Type | Name | Description | Schema |
---|---|---|---|
Query | address optional | ip address | string |
Responses¶
HTTP Code | Description | Schema |
---|---|---|
200 | Success | boolean |
401 | Unauthorized |
Security¶
- Basic Authentication
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- Net
Get peer info about the connected network nodes¶
GET /api/net/peers
Parameters¶
Type | Name | Schema | Default |
---|---|---|---|
Query | withMetrics optional | boolean | "false" |
Produces¶
text/plain; v=1.0
application/json; v=1.0
text/json; v=1.0
application/x-protobuf; v=1.0
Tags¶
- BlockChain
Definitions¶
AddPeerInput¶
Name | Description | Schema |
---|---|---|
Address optional | ip address | string |
BlockBodyDto¶
Name | Schema |
---|---|
Transactions optional | < string > array |
TransactionsCount optional | integer (int32) |
BlockDto¶
Name | Schema |
---|---|
BlockHash optional | string |
Body optional | BlockBodyDto |
Header optional | BlockHeaderDto |
BlockSize optional | integer (int32) |
BlockHeaderDto¶
Name | Schema |
---|---|
Bloom optional | string |
ChainId optional | string |
Extra optional | string |
Height optional | integer (int64) |
MerkleTreeRootOfTransactions optional | string |
MerkleTreeRootOfWorldState optional | string |
MerkleTreeRootOfTransactionState optional | string |
PreviousBlockHash optional | string |
SignerPubkey optional | string |
Time optional | string (date-time) |
BlockStateDto¶
Name | Schema |
---|---|
BlockHash optional | string |
BlockHeight optional | integer (int64) |
Changes optional | < string, string > map |
Deletes optional | < string > array |
PreviousHash optional | string |
ChainStatusDto¶
Name | Schema |
---|---|
BestChainHash optional | string |
BestChainHeight optional | integer (int64) |
Branches optional | < string, integer (int64) > map |
ChainId optional | string |
GenesisBlockHash optional | string |
GenesisContractAddress optional | string |
LastIrreversibleBlockHash optional | string |
LastIrreversibleBlockHeight optional | integer (int64) |
LongestChainHash optional | string |
LongestChainHeight optional | integer (int64) |
NotLinkedBlocks optional | < string, string > map |
CreateRawTransactionInput¶
Name | Description | Schema |
---|---|---|
From required | from address | string |
MethodName required | contract method name | string |
Params required | contract method parameters | string |
RefBlockHash required | refer block hash | string |
RefBlockNumber required | refer block height | integer (int64) |
To required | to address | string |
CreateRawTransactionOutput¶
Name | Schema |
---|---|
RawTransaction optional | string |
ExecuteRawTransactionDto¶
Name | Description | Schema |
---|---|---|
RawTransaction optional | raw transaction | string |
Signature optional | signature | string |
ExecuteTransactionDto¶
Name | Description | Schema |
---|---|---|
RawTransaction optional | raw transaction | string |
GetNetworkInfoOutput¶
Name | Description | Schema |
---|---|---|
Connections optional | total number of open connections between this node and other nodes | integer (int32) |
ProtocolVersion optional | network protocol version | integer (int32) |
Version optional | node version | string |
GetTransactionPoolStatusOutput¶
Name | Schema |
---|---|
Queued optional | integer (int32) |
Validated optional | integer (int32) |
LogEventDto¶
Name | Schema |
---|---|
Address optional | string |
Indexed optional | < string > array |
Name optional | string |
NonIndexed optional | string |
MerklePathDto¶
Name | Schema |
---|---|
MerklePathNodes optional | < MerklePathNodeDto > array |
MerklePathNodeDto¶
Name | Schema |
---|---|
Hash optional | string |
IsLeftChildNode optional | boolean |
MinerInRoundDto¶
Name | Schema |
---|---|
ActualMiningTimes optional | < string (date-time) > array |
ExpectedMiningTime optional | string (date-time) |
ImpliedIrreversibleBlockHeight optional | integer (int64) |
InValue optional | string |
MissedBlocks optional | integer (int64) |
Order optional | integer (int32) |
OutValue optional | string |
PreviousInValue optional | string |
ProducedBlocks optional | integer (int64) |
ProducedTinyBlocks optional | integer (int32) |
PeerDto¶
Name | Schema |
---|---|
BufferedAnnouncementsCount optional | integer (int32) |
BufferedBlocksCount optional | integer (int32) |
BufferedTransactionsCount optional | integer (int32) |
ConnectionTime optional | integer (int64) |
Inbound optional | boolean |
IpAddress optional | string |
ProtocolVersion optional | integer (int32) |
RequestMetrics optional | < RequestMetric > array |
ConnectionStatus optional | string |
NodeVersion optional | string |
RequestMetric¶
Name | Schema |
---|---|
Info optional | string |
MethodName optional | string |
RequestTime optional | Timestamp |
RoundTripTime optional | integer (int64) |
RoundDto¶
Name | Schema |
---|---|
Co nfirmedIrreversibleBlockHeight optional | integer (int64) |
Confirm edIrreversibleBlockRoundNumber optional | integer (int64) |
Ext raBlockProducerOfPreviousRound optional | string |
IsMinerListJustChanged optional | boolean |
RealTimeMinerInformation optional | < string, MinerInRoundDto > map |
RoundId optional | integer (int64) |
RoundNumber optional | integer (int64) |
TermNumber optional | integer (int64) |
SendRawTransactionInput¶
Name | Description | Schema |
---|---|---|
ReturnTransaction optional | return transaction detail or not | boolean |
Signature optional | signature | string |
Transaction optional | raw transaction | string |
SendRawTransactionOutput¶
Name | Schema |
---|---|
Transaction optional | TransactionDto |
TransactionId optional | string |
SendTransactionInput¶
Name | Description | Schema |
---|---|---|
RawTransaction optional | raw transaction | string |
SendTransactionOutput¶
Name | Schema |
---|---|
TransactionId optional | string |
SendTransactionsInput¶
Name | Description | Schema |
---|---|---|
RawTransactions optional | raw transactions | string |
TaskQueueInfoDto¶
Name | Schema |
---|---|
Name optional | string |
Size optional | integer (int32) |
Timestamp¶
Name | Schema |
---|---|
Nanos optional | integer (int32) |
Seconds optional | integer (int64) |
TransactionDto¶
Name | Schema |
---|---|
From optional | string |
MethodName optional | string |
Params optional | string |
RefBlockNumber optional | integer (int64) |
RefBlockPrefix optional | string |
Signature optional | string |
To optional | string |
TransactionResultDto¶
Name | Schema |
---|---|
BlockHash optional | string |
BlockNumber optional | integer (int64) |
Bloom optional | string |
Error optional | string |
Logs optional | < LogEventDto > array |
ReturnValue optional | string |
Status optional | string |
Transaction optional | TransactionDto |
TransactionId optional | string |
TransactionSize optional | integer (int32) |
CalculateTransactionFeeInput¶
Name | Schema |
---|---|
RawTrasaction optional | string |
CalculateTransactionFeeOutput¶
Name | Schema |
---|---|
Success optional | bool |
TransactionFee optional | Dictionary<string, long> |
ResourceFee optional | Dictionary<string, long> |