Web api reference

Overview

Version information

Version : 1.0

Paths

Get information about a given block by block hash. Otionally with the list of its transactions.

GET /api/blockChain/block

Parameters

Type

Name

Description

Schema

Default

Query

blockHash optional

block hash

string

Query

includeTransactions optional

include transactions or not

boolean

"false"

Responses

HTTP Code

Description

Schema

200

Success

BlockDto

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. Otionally with the list of its transactions.

GET /api/blockChain/blockByHeight

Parameters

Type

Name

Description

Schema

Default

Query

blockHeight optional

block height

integer (int64)

Query

includeTransactions optional

include transactions or not

boolean

"false"

Responses

HTTP Code

Description

Schema

200

Success

BlockDto

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

GET /api/blockChain/contractFileDescriptorSet

Parameters

Type

Name

Description

Schema

Query

address optional

contract address

string

Responses

HTTP Code

Description

Schema

200

Success

string (byte)

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 AEDPoS latest round information from last block header's consensus extra data of best chain.

GET /api/blockChain/currentRoundInformation

Responses

HTTP Code

Description

Schema

200

Success

RoundDto

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

GET /api/blockChain/roundFromBase64

Parameters

Type

Name

Schema

Query

str optional

string

Responses

HTTP Code

Description

Schema

200

Success

RoundDto

Produces

  • text/plain; v=1.0

  • application/json; v=1.0

  • text/json; v=1.0

  • application/x-protobuf; v=1.0

Tags

  • Deserialization

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

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

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

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

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

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"

Responses

HTTP Code

Description

Schema

200

Success

< PeerDto > array

Produces

  • text/plain; v=1.0

  • application/json; v=1.0

  • text/json; v=1.0

  • application/x-protobuf; v=1.0

Tags

  • Net

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

BlockHeaderDto

Name

Schema

Bloom optional

string

ChainId optional

string

Extra optional

string

Height optional

integer (int64)

MerkleTreeRootOfTransactions optional

string

MerkleTreeRootOfWorldState 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

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

RequestMetric

Name

Schema

Info optional

string

MethodName optional

string

RequestTime optional

Timestamp

RoundTripTime optional

integer (int64)

RoundDto

Name

Schema

ConfirmedIrreversibleBlockHeight optional

integer (int64)

ConfirmedIrreversibleBlockRoundNumber optional

integer (int64)

ExtraBlockProducerOfPreviousRound 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

ReadableReturnValue optional

string

ReturnValue optional

string

Status optional

string

Transaction optional

TransactionDto

TransactionId optional

string

Contents
Overview
Version information
Paths
Get information about a given block by block hash. Otionally with the list of its transactions.
Get information about a given block by block height. Otionally with the list of its transactions.
Get the height of the current chain.
Get the current state about a given block
Get the current status of the block chain.
Get the protobuf definitions related to a contract
Get AEDPoS latest round information from last block header's consensus extra data of best chain.
POST /api/blockChain/executeRawTransaction
Call a read-only method on a contract.
Get the merkle path of a transaction.
Creates an unsigned serialized transaction
GET /api/blockChain/roundFromBase64
send a transaction
Broadcast a transaction
Broadcast multiple transactions
GET /api/blockChain/taskQueueStatus
Get the transaction pool status.
Get the current status of a transaction
Get multiple transaction results.
Get information about the node’s connection to the network.
Attempts to add a node to the connected network nodes
Attempts to remove a node from the connected network nodes
Get peer info about the connected network nodes
Definitions
AddPeerInput
BlockBodyDto
BlockDto
BlockHeaderDto
BlockStateDto
ChainStatusDto
CreateRawTransactionInput
CreateRawTransactionOutput
ExecuteRawTransactionDto
ExecuteTransactionDto
GetNetworkInfoOutput
GetTransactionPoolStatusOutput
LogEventDto
MerklePathDto
MerklePathNodeDto
MinerInRoundDto
PeerDto
RequestMetric
RoundDto
SendRawTransactionInput
SendRawTransactionOutput
SendTransactionInput
SendTransactionOutput
SendTransactionsInput
TaskQueueInfoDto
Timestamp
TransactionDto
TransactionResultDto