Skip to main content

Submit a block.

POST 

/api/core/v3/blocks

Submit a block or a payload. This endpoint will return the identifier of the built block. Only full block is accepted.

Request

Body

required
    allOf Block

    A block is the object nodes gossip around in the network. It always references 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.

    header required
    protocolVersion numberrequired

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

    networkId stringrequired

    Network version identifier. It also tells which network the node is running.

    issuingTime stringrequired

    The timestamp of issuing this block, a uint64 string in nanosecond-precision.

    slotCommitmentId stringrequired

    The slot commitment ID contains in this block.

    latestFinalizedSlot integerrequired

    The latest finalized slot of issuing node.

    issuerId stringrequired

    The identifier of the issuer.

    body object required

    The block content.

    oneOf
    type integerrequired

    Set to value 0 to denote a Basic Block.

    strongParents string[]required

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

    weakParents string[]

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

    shallowLikeParents string[]

    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 1 to denote a Signed Transaction Payload.

    transaction object required
    oneOf
    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.

    creationSlot integerrequired

    The slot index in which the transaction was created.

    contextInputs object[]required
  • Array [
  • anyOf
    type integerrequired

    Set to value 1 to denote a Commitment Input.

    commitmentId stringrequired

    The commitment identifier to reference.

  • ]
  • inputs object[]required

    The inputs of this transaction.

  • Array [
  • oneOf
    type integerrequired

    Set to value 0 to denote a 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.

  • ]
  • allotments object[]required

    The accounts map with corresponding allotment values.

  • Array [
  • oneOf
    accountId string

    The account ID to allot the mana to.

    mana string

    The amount of mana to allot.

  • ]
  • capabilities stringrequired

    The capabilities of this transaction.

    payload object

    The optional embedded payload.

    oneOf
    type integerrequired

    Set to value 0 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 stringrequired

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

    outputs object[]required

    The outputs of this transaction.

  • Array [
  • anyOf
    type integerrequired

    Set to value 0 to denote a Basic Output.

    amount stringrequired

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

    mana stringrequired

    The stored mana held by the output.

    unlockConditions object[]

    Unlock conditions that define how the output can be unlocked in a transaction.

  • Array [
  • anyOf
    type integerrequired

    Set to value 0 to denote an Address Unlock Condition.

    address object required
    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[]

    The features on the output

  • Array [
  • anyOf
    type integerrequired

    Set to value 0 to denote a Sender Feature.

    address object required
    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

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

    Denotes a Signature Unlock.

    signature object required
    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.

  • ]
  • maxBurnedMana stringrequired

    The mana burned in this block.

    signature object required

    The signature of entire block, signed by the issuer.

    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.

Responses

Successful operation.

Response Headers
  • Location string

    The blockId of the newly created block.

Schema
    blockId stringrequired

    The block identifier of the submitted block. Hex-encoded with 0x prefix.

Loading...