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[-1] gives information on the latest block in a blockchain.
  • The option BlockchainBase can be used to specify which blockchain to give information about.
  • Possible settings for BlockchainBase include "Wolfram", "Bitcoin" and "Ethereum".
  • The default setting for BlockchainBase is $BlockchainBase.
  • 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

Basic Examples  (3)

Get information about the last block from the (default) "Wolfram" blockchain using its height:

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

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]=

See Also

$BlockchainBase  BlockchainPut  BlockchainGet  BlockchainData  BlockchainTransactionData  Hash

Introduced in 2018
(11.3)