Block APIs

GetBlock

This API returns the details of the block being queried with height.

REST Uri: /block/{height}

Returns

epoch: epoch of the block

height: height of the block

parent: hash of the parent block

transactions_hash: root hash of the transaction Merkle-Patricia trie

state_hash: root hash of the state Merkle-Patricia trie

timestamp: timestamp when the block was proposed

proposer: address of the proposer validator

hash: the block hash

transactions: json representation of the transactions contained in the block

raw: transaction details

type: type of the transaction

hash: hash of the transaction

status: status of the block

Request

// curl 
https://explorer.script.tv
/api/block/1
// Result
{
 "type":"block",
 "body":{
 "epoch":"1",
 "status":5,
 "height":1,
 "timestamp":"1550089775",
 "hash":"0x705b74cde1ad4afefb8cae883327b216dd11c3a4b592b4487a40337e5e27a7bd",
 "parent_hash":"0x8ce72f57b6ef53c7d5d144a40d6faacc444e9cd60d79043ea5ab978f44c120c6",
 "proposer":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "state_hash":"0xcb9b1641ecb9f1fb372a9ac9184c811c07bda3d061ce63b2c2e2f1fafc42c789",
 "transactions_hash":"0x36449d6d0523379a6799843cea98c0a4d708a7c314d0536496a78dee57fcb672",
 "num_txs":1,
 "txs":[
 {
 "raw":{
 "proposer":{
 "address":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "coins":{
 "SCPTWei":"0",
 "SPAYWei":"0"
 },
 "sequence":"0",
 "signature":"0xe54784005c1c321092d24ba50a32228b7b7b6d4e5ad41aa968e96123f1996f623aa609ab7414995aaa25eb8897ca2bb3809695e31829d5de2ee94eead3907eda00"
 },
 "outputs":[
 {
 "address":"0x2e833968e5bb786ae419c4d13189fb081cc43bab",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0x350ddef232565b32e66a9fb69780e85b686a9e1d",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0x5f74e3d5cc77b66f0030c5501cfbd39dcb8ff5b6",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0x7631958d57cf6a5605635a5f06aa2ae2e000820e",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0xc15e24083152dd76ae6fc2aeb5269ff23d70330b",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 },
 {
 "address":"0xdfb095b990c98a96dd434fe45cd040ec2167c228",
 "coins":{
 " SCPTWei ":"0",
 " SPAYWei ":"0"
 }
 }
 ],
 "block_height":"0"
 },
 "type":0,
 "hash":"0x72738626b99c6942daea0a04eaaca4d83d1d72e1620a0c55d35a886dcb0f56b1"
 }
 ]
 },
 "totalBlocksNumber":17164
}

GetBlocksByRange

This API returns a list of blocks given the page number and limit number.

REST Uri: /blocks/top_blocks

Query Parameters

pageNumber: the page number, 1 stands for the latest

limit: the limit size of each page

Returns

currentPageNumber: the number of current page

For each block it is similar to the returns of the GetBlock API.

// Request
curl 
https://explorer.script.tv
/api/blocks/top_blocks?pageNumber=1&limit=10
// Result
{
 "type":"block_list",
 "body":[
 {
 "epoch":"17475",
 "status":4,
 "height":17449,
 "timestamp":"1550199501",
 "hash":"0x4756f30fa538769e4dcaae9fcbd19f6612b05abc843aa9c07a28983121fb3b1d",
 "parent_hash":"0xdd3fde69f68d8b9522adab25f04459f84072a160c2ab3ceeb086777550378e7f",
 "proposer":"0xc15e24083152dd76ae6fc2aeb5269ff23d70330b",
 "state_hash":"0x9711aadb58db9b33ac2f8e29584d772184b01b8406bc2c7cda52a024eeabba8a",
 "transactions_hash":"0xa90c99ab4a3861cfd2a71280a2f74f4aadda5727b72f046687681adfe31c3b5e",
 "num_txs":7,
 "txs":[...]
 },
 {
 "epoch":"17476",
 "status":4,
 "height":17450,
 "timestamp":"1550199507",
 "hash":"0xb5997adcd3daf6c249b2e4ae79945d36fc1aa262fc344a5c665193460c4c2fec",
 "parent_hash":"0x4756f30fa538769e4dcaae9fcbd19f6612b05abc843aa9c07a28983121fb3b1d",
 "proposer":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "state_hash":"0x69407583b370cbc8c27c63f975e0a3145f05068f8a488d7411ed634f1544fefc",
 "transactions_hash":"0x1ff24e55b5c2e1a9e01ced5d7f92fe2dde90511e7b5cb28e93ed8751df721bda",
 "num_txs":5,
 "txs":[...]
 },
 {
 "epoch":"17477",
 "status":4,
 "height":17451,
 "timestamp":"1550199513",
 "hash":"0x082b3653ccc74b26612da4a7666b2c3e9c2ce2222dd90c6083884892a0e3f1c6",
 "parent_hash":"0xb5997adcd3daf6c249b2e4ae79945d36fc1aa262fc344a5c665193460c4c2fec",
 "proposer":"0x7631958d57cf6a5605635a5f06aa2ae2e000820e",
 "state_hash":"0x10931619d1986b4b62f816c11643dbe66aeccbb48e2995b81fbf0786ceb312d1",
 "transactions_hash":"0x0cabb62272efeac14a06eb323c5b7e8b87271a948a619e5ead4a4fd284c094cf",
 "num_txs":7,
 "txs":[...]
 },
 {
 "epoch":"17478",
 "status":4,
 "height":17452,
 "timestamp":"1550199520",
 "hash":"0x2ff868bf9c8aab3c2482a91b090530f430c8afb94fd66c60b9c8fd845899a00a",
 "parent_hash":"0x082b3653ccc74b26612da4a7666b2c3e9c2ce2222dd90c6083884892a0e3f1c6",
 "proposer":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "state_hash":"0x4d78020673af830a92ff5fc78a9d1859ecee3b07bf7cbda8d3ae74d61e0fee50",
 "transactions_hash":"0x1d77c10d77a8380f07ade4474816332d347f8739913aee03ae81f1f02391d3ae",
 "num_txs":3,
 "txs":[...]
 },
 {
 "epoch":"17479",
 "status":4,
 "height":17453,
 "timestamp":"1550199526",
 "hash":"0x7953f10d559405dad20db498947148a73781546209485a803e414574e3439255",
 "parent_hash":"0x2ff868bf9c8aab3c2482a91b090530f430c8afb94fd66c60b9c8fd845899a00a",
 "proposer":"0x2e833968e5bb786ae419c4d13189fb081cc43bab",
 "state_hash":"0x62e34301225525c3dd44ee951e45a97a1590303aa9ba3586cf0c1791b1f8ebc4",
 "transactions_hash":"0x404e4a202f4e621ccf0abe824c318edf012b5a52b5c52d3509e050b996185f53",
 "num_txs":6,
 "txs":[...]
 },
 {
 "epoch":"17480",
 "status":4,
 "height":17454,
 "timestamp":"1550199532",
 "hash":"0xe752c9e9dd0b5bca6aefe31c5d84845ba7e3d469eb56f1a91300b316ffc5ce4c",
 "parent_hash":"0x7953f10d559405dad20db498947148a73781546209485a803e414574e3439255",
 "proposer":"0xdfb095b990c98a96dd434fe45cd040ec2167c228",
 "state_hash":"0x2a2b68e13f0bb27b3adbef5ab54d1a8ef07a6e16afa8172684c5f5e8771f43ba",
 "transactions_hash":"0x679095a23b223847c197005d0b6e1995012bb381f49fc3c36bda40af6143149d",
 "num_txs":5,
 "txs":[...]
 },
 {
 "epoch":"17481",
 "status":4,
 "height":17455,
 "timestamp":"1550199539",
 "hash":"0x05b6b8bd715f600242208710081395a050e37d6af0fa9789f74b50d37c696ca6",
 "parent_hash":"0xe752c9e9dd0b5bca6aefe31c5d84845ba7e3d469eb56f1a91300b316ffc5ce4c",
 "proposer":"0x2e833968e5bb786ae419c4d13189fb081cc43bab",
 "state_hash":"0xa6ad424d8d3d02c52f8f4aefa8c7d92a746e9b1368bb723e56805827d4b757f4",
 "transactions_hash":"0x016e5c9a7e43cb5d869d3a65a03da6e87e91fe5da3bb2bc9319b262532cfab42",
 "num_txs":5,
 "txs":[...]
 },
 {
 "epoch":"17482",
 "status":4,
 "height":17456,
 "timestamp":"1550199545",
 "hash":"0x16b6d178380af8fb580f6d055919744f8dbee0c850d685f7f9dc34507db8f716",
 "parent_hash":"0x05b6b8bd715f600242208710081395a050e37d6af0fa9789f74b50d37c696ca6",
 "proposer":"0xc15e24083152dd76ae6fc2aeb5269ff23d70330b",
 "state_hash":"0xd97a3238cd3f97c2e3db9f4c825a6bb59ba2bb02112029c83f53b9495ef282ac",
 "transactions_hash":"0xbbd09b8bd634d59b44f810a72c2adb836eef3c4f83ef01033281c556bbe35342",
 "num_txs":3,
 "txs":[...]
 },
 {
 "epoch":"17483",
 "status":4,
 "height":17457,
 "timestamp":"1550199551",
 "hash":"0x9b9cd1306346a692258f9b2c1ee2a0cdb66956efbf41e9c43658cf078fc2c229",
 "parent_hash":"0x16b6d178380af8fb580f6d055919744f8dbee0c850d685f7f9dc34507db8f716",
 "proposer":"0x9f1233798e905e173560071255140b4a8abd3ec6",
 "state_hash":"0xbb018c8e3b6c7d94bc8d1e547fe748296df5ef8f5734a9abfd5faaa54d11c858",
 "transactions_hash":"0x06d08fc4e13b021868f1394af440d53f4eca60e55015eb3dea7e8fcdf5d595ea",
 "num_txs":4,
 "txs":[...]
 },
 {
 "epoch":"17484",
 "status":4,
 "height":17458,
 "timestamp":"1550199557",
 "hash":"0x70e1102013273079484dff737c36850765eb9794e2fde402fa3c4c2ddb45fc7b",
 "parent_hash":"0x9b9cd1306346a692258f9b2c1ee2a0cdb66956efbf41e9c43658cf078fc2c229",
 "proposer":"0x7631958d57cf6a5605635a5f06aa2ae2e000820e",
 "state_hash":"0xd3915c55728a568c6272de77dbea60aa20a1c1fb6c096a7fd4eecdb0bdde005d",
 "transactions_hash":"0xe51b8bea2fa6e9ff2c28bf488913c66d081647dbcf0c85311099b84fcc3769be",
 "num_txs":4,
 "txs":[...]
 }
 ],
 "totalPageNumber":1746,
 "currentPageNumber":"1"
}

Last updated