Blockchain
CGP
GET http://127.0.0.1:31567/blockchain/cgp
Get the current CGP status of the Blockchain
{
"interval": 2391,
"allocation": 90,
"payout": {
"recipient": "tzn1q7fnh47xftwr2zpxtpxepf022l9u5k0kusahactcn099vlumxy58s4kzzx6",
"spendlist": [{
"asset": "00",
"amount": "12300000000"
}]
}
}CGP History
GET http://127.0.0.1:31567/blockchain/cgp/history
Get the history of the CGP up to the previous interval
CGP Info
GET http://127.0.0.1:31567/blockchain/contract/cgp
Provide info on how to execute the cgp contract
Total ZP
GET http://127.0.0.1:31567/blockchain/totalzp
Get the total minted ZP up to a precise block
Path Parameters
blockNumber
string
Block headers
GET http://127.0.0.1:31567/blockchain/headers
Returns a list of some information about each header on the main chain in JSON format
Query Parameters
blockNumber
string
start to take from blockNumber. Must be used with take
take
string
take the first n blocks instead of all of the headers
Blockchain Info
GET http://127.0.0.1:31567/blockchain/info
Returns information about the current status of the blockchain
Block
GET http://127.0.0.1:31567/blockchain/block
Return the content of a block by providing either the block number or the hash of the block
Path Parameters
blockNumber
string
block number wanted
hash
string
hash of block
Block Reward
GET http://127.0.0.1:31567/blockchain/blockreward
Return the reward at a given block
Path Parameters
blockNumber*
string
Number of block to check
Get Transaction
GET http://127.0.0.1:31567/blockchain/transaction
Return the data of the provided transaction
Query Parameters
hash*
string
Hash of a transaction
hex
string
if true it returns the tx in hex format
Publish Block
POST http://127.0.0.1:31567/blockchain/publishblock
Publish a block only provide block in hex format or header and body
Request Body
body
string
in hex format
header
string
in hex format
block
string
in hex format
Submit Header
POST http://127.0.0.1:31567/blockchain/submitheader
Submit hex formatted header to add the block
Request Body
header
string
The header to submit
Block Template
POST http://127.0.0.1:31567/blockchain/blocktemplate
Request a block template to add on top the mempool transaction
Path Parameters
address
string
Miner coinbase address
Publish Transaction
POST http://127.0.0.1:31567/blockchain/publishtransaction
Publish an hex encoded transaction into the mempool
Request Body
tx*
string
transaction in hex format
Execute Contract
POST http://127.0.0.1:31567/blockchain/contract/execute
Execute a contract by given different data
Request Body
command
string
command provided to the contract
messageBody
string
message body in hex format
otion.sender
string
bip39 path
tx
string
Tx in hex format
address
string
Contract Address
Last updated