Wolfram Research

Function Repository Resource:

RandomBlockchainBlockData

Source Notebook

Retrieve information about a random block on a blockchain

Contributed by: Bob Sandheinrich

ResourceFunction["RandomBlockchainBlockData"][]

gives information about a random block on the blockchain specified by $BlockchainBase.

ResourceFunction["RandomBlockchainBlockData"][prop]

retrieves the specified property of the block.

ResourceFunction["RandomBlockchainBlockData"][{prop1,prop2,}]

retrieves a list of property values.

Details and Options

ResourceFunction["RandomBlockchainBlockData"] accepts the BlockchainBase option.
Available properties are the same as for BlockchainBlockData.

Examples

Basic Examples

Get data on a random block from $BlockchainBase:

In[1]:=
Short /@ ResourceFunction["RandomBlockchainBlockData"][]
Out[1]=

Specify a blockchain:

In[2]:=
ResourceFunction["RandomBlockchainBlockData"][
 BlockchainBase -> "Ethereum"]
Out[2]=

Get just the size of the block:

In[3]:=
ResourceFunction["RandomBlockchainBlockData"]["ByteCount", BlockchainBase -> "Bitcoin"]
Out[3]=

Scope

Get several properties:

In[4]:=
ResourceFunction[
 "RandomBlockchainBlockData"][{"TimeMined", "Nonce", "PreviousBlockHash"}, BlockchainBase -> "Ethereum"]
Out[4]=

Options

BlockchainBase

Get block information from the Wolfram blockchain:

In[5]:=
ResourceFunction["RandomBlockchainBlockData"][
 BlockchainBase -> {"MultiChain", "Wolfram"}]
Out[5]=

Resource History

License Information