Skip to main content

Returns block data as JSON by its identifier.

GET 

/api/core/v2/blocks/:blockId

Find a block by its identifier. This endpoint returns the given block as JSON.

Request

Path Parameters

    blockId stringrequired

    Identifier of the block.

    Example: 0xf532a53545103276b46876c473846d98648ee418468bce76df4868648dd73e5d

Responses

Successful operation.

Schema
    allOf Block

    A block is the object nodes gossip around in the network. It always references two other blocks that are known as parents. It is stored as a vertex on the tangle data structure that the nodes maintain. A block can have a maximum size of 32Kb.

    protocolVersion numberrequired

    Protocol version identifier. It also tells which protocol rules apply to the block.

    parents string[]required

    The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.

    payload object

    The inner payload of the block. Can be nil.

    oneOf
    type integerrequired

    Set to value 6 to denote a Transaction Payload.

    essence objectrequired
    oneOf
    type integerrequired

    Set to value 1 to denote a Transaction Essence.

    networkId stringrequired

    Network identifier. Plain string encoded number. This field signals for which network the block is meant for. It is computed out of the first 8 bytes of the BLAKE2b-256 hash of the concatenation of the network name and protocol version string.

    inputsCommitment stringrequired

    BLAKE2b-256 hash of the BLAKE2b-256 hashes of the serialized outputs referenced in Inputs by their outputIds (transactionId || outputIndex). Hex-encoded data with 0x prefix.

    inputs object[]required

    The inputs of this transaction.

  • Array [
  • oneOf
    type integerrequired

    Set to value 0 to denote an UTXO Input.

    transactionId stringrequired

    The BLAKE2b-256 hash of the transaction from which the UTXO comes from. Hex-encoded data with 0x prefix.

    transactionOutputIndex integerrequired

    The index of the output on the referenced transaction to consume.

  • ]
  • outputs object[]required

    The outputs of this transaction.

  • Array [
  • anyOf
    type integerrequired

    Set to value 3 to denote a Basic Output.

    amount stringrequired

    The amount of IOTA tokens to deposit with this BasicOutput output. Plain string encoded number.

    nativeTokens object[]

    Native tokens held by the otuput.

  • Array [
  • anyOf
    id stringrequired

    Hex-encoded identifier with 0x prefix of the native token. Same as foundryId of the controlling foundry.

    amount stringrequired

    Amount of native tokens (up to uint256). Hex-encoded number with 0x prefix.

  • ]
  • unlockConditions object[]required

    Unlock condtions that define how the output an be unlocked in a transaction.

  • Array [
  • anyOf
    type integerrequired

    Set to value 0 to denote an Address Unlock Condition.

    address objectrequired
    oneOf
    type integerrequired

    Set to value 0 to denote an Ed25519 Address.

    pubKeyHash stringrequired

    The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key

  • ]
  • features object[]

    Features that add utility to the output but do not impose unlocking conditions.

  • Array [
  • anyOf
    type integerrequired

    Set to value 0 to denote a Sender Feature.

    address objectrequired
    oneOf
    type integerrequired

    Set to value 0 to denote an Ed25519 Address.

    pubKeyHash stringrequired

    The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key

  • ]
  • ]
  • payload object

    The optional embedded payload.

    oneOf
    type integerrequired

    Set to value 5 to denote a Tagged Data Payload.

    tag string

    The tag to allow external tools to find/look up this block. It has a size between 0 and 64 bytes and must be encoded as a hex-string with 0x prefix. Network nodes do not index blocks with Tagged Data Payload by the tag field by default.

    data string

    The optional data to attach. This may have a length of 0. Hex-encoded with 0x prefix.

    unlocks object[]required
  • Array [
  • oneOf
    type integerrequired

    Denotes a Signature Unlock.

    signature objectrequired
    oneOf
    type integerrequired

    Set to value 0 to denote an Ed25519 Signature.

    publicKey stringrequired

    The public key of the Ed25519 keypair which is used to verify the signature. Hex-encoded with 0x prefix.

    signature stringrequired

    The signature signing the serialized Transaction Essence. Hex-encoded with 0x prefix.

  • ]
  • nonce stringrequired

    The nonce which lets this block fulfill the Proof-of-Work requirement. Plain string encoded number.

Loading...