BlockchainBlockData

BlockchainBlockData["hash"]

gives information about the block with the specified hash on the blockchain specified by $BlockchainBase.

BlockchainBlockData[n]

gives information about block n on the blockchain.

BlockchainBlockData[-n]

gives information about the block n elements from the end of the blockchain.

BlockchainBlockData[bspec,prop]

gives the specified property of the block.

Details and Options

  • BlockchainBlockData has the option BlockchainBase, with default setting $BlockchainBase.
  • BlockchainBlockData[-1] gives information on the latest block in a blockchain.
  • Basic properties include:
  • "BlockHash"hash of this block
    "BlockNumber"number (height) of this block in the blockchain
    "TimeMined"time this block was mined
    "ByteCount"byte count for this block
    "Nonce"nonce used in the hash for this block
    "Version"version of the block
    "Confirmations"number of confirmations
    "PreviousBlockHash"hash of the previous block
    "MerkleRoot"Merkle root hash of the transactions
    "TransactionList"list of transaction IDs in this block

Examples

open all close all

Basic Examples  (2)

Get information about a block from the Bitcoin blockchain using its height:

In[1]:=
Click for copyable input
Out[1]=

Get information about a block from the Ethereum blockchain using its hash:

In[1]:=
Click for copyable input
Out[1]=

Scope  (5)

Options  (4)

Applications  (1)

Possible Issues  (2)

Neat Examples  (1)

Introduced in 2018
(11.3)