Description Usage Arguments Details Value Author(s) References Examples
Full block information can be retrieved by either block height or hash.
1 2 |
height |
int; the block's height. |
hash |
chr; the block's hash. |
ip |
daemon ip address |
port |
daemon port |
Provide either the height
parameter or hash
parameter, but
not both.
blob - string; Hexadecimal blob of block information.
block_header - A structure containing block header information. See getlastblockheader.
block_size
depth
difficulty
hash
height
major_version
minero_version
nonce
num_txes
orphan_status
prev_hash
reward
timestamp
json - json string; JSON formatted block details:
major_version - Same as in block header.
minor_version - Same as in block header.
timestamp - Same as in block header.
prev_id - Same as prev_hash in block header.
nonce - Same as in block header.
miner_tx - Miner transaction information
version - Transaction version number.
unlock_time - The block height when the coinbase transaction becomes spendable.
vin - List of transaction inputs:
gen - Miner txs are coinbase txs, or "gen". height - This block height, a.k.a. when the coinbase is generated.
vout - List of transaction outputs. Each output contains:
amount - The amount of the output, in atomic units.
target -
key -
extra - Usually called the "transaction ID" but can be used to include any random 32 byte/64 character hex string.
signatures - Contain signatures of tx signers. Coinbased txs do not have signatures.
tx_hashes - List of hashes of non-coinbase transactions in the block. If there are no other transactions, this will be an empty list.
status - string; General RPC error code. "OK" means everything looks good.
Garrett See
https://getmonero.org/knowledge-base/developer-guides/daemon-rpc#getblock
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Look up by height:
# In the following example, block 912345 is looked up by its height.
# Note that block 912345 does not have any non-coinbase transactions.
# (See the next example for a block with extra transactions):
## Not run:
getBlock(912345)
## End(Not run)
# Look up by hash:
# In the following example, block 993056 is looked up by its hash. Note that
# block 993056 has 3 non-coinbase transactions:
## Not run:
getBlock(hash="510ee3c4e14330a7b96e883c323a60ebd1b5556ac1262d0bc03c24a3b785516f")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.