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
- application/json
- application/vnd.iota.serializer-v2
Body
required
- BasicBlock
- ValidationBlock
- SignedTransactionPayload
- TaggedDataPayload
- Transaction
- Array [
- CommitmentInput
- BlockIssuanceCreditInput
- RewardInput
- ]
- Array [
- UTXOInput
- ]
- Array [
- Allotment
- ]
- TaggedDataPayload
- Array [
- BasicOutput
- AccountOutput
- AnchorOutput
- FoundryOutput
- NFTOutput
- DelegationOutput
- Array [
- AddressUnlockCondition
- StorageDepositReturnUnlockCondition
- TimelockUnlockCondition
- ExpirationUnlockCondition
- Ed25519Address
- AccountAddress
- NFTAddress
- Ed25519Address
- AccountAddress
- NFTAddress
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- SenderFeature
- MetadataFeature
- TagFeature
- NativeTokenFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- AddressUnlockCondition
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- SenderFeature
- MetadataFeature
- BlockIssuerFeature
- StakingFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- Array [
- Ed25519PublicKey
- ]
- ]
- Array [
- IssuerFeature
- MetadataFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- StateControllerAddressUnlockCondition
- GovernorAddressUnlockCondition
- Ed25519Address
- AccountAddress
- NFTAddress
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- MetadataFeature
- StateMetadataFeature
- ]
- Array [
- IssuerFeature
- MetadataFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- SimpleTokenScheme
- ]
- Array [
- ImmutableAccountAddressUnlockCondition
- AccountAddress
- ]
- Array [
- MetadataFeature
- NativeTokenFeature
- ]
- Array [
- MetadataFeature
- ]
- Array [
- AddressUnlockCondition
- StorageDepositReturnUnlockCondition
- TimelockUnlockCondition
- ExpirationUnlockCondition
- Ed25519Address
- AccountAddress
- NFTAddress
- Ed25519Address
- AccountAddress
- NFTAddress
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- SenderFeature
- MetadataFeature
- TagFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- IssuerFeature
- MetadataFeature
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- Array [
- AddressUnlockCondition
- Ed25519Address
- AccountAddress
- NFTAddress
- ]
- ]
- Array [
- SignatureUnlock
- ReferenceUnlock
- AccountUnlock
- NFTUnlock
- Ed25519Signature
- ]
- Ed25519Signature
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
Protocol version identifier. It also tells which protocol rules apply to the block.
Network version identifier. It also tells which network the node is running.
The timestamp of issuing this block, a uint64 string in nanosecond-precision.
The slot commitment ID contains in this block.
The latest finalized slot of issuing node.
The identifier of the issuer.
body objectrequired
The block content.
Set to value 0 to denote a Basic Block.
The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.
The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.
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.
Set to value 1 to denote a Signed Transaction Payload.
transaction objectrequired
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.
The slot index in which the transaction was created.
contextInputs object[]required
Set to value 1 to denote a Commitment Input.
The commitment identifier to reference.
Set to value 2 to denote an BIC Input.
The account identifier.
Set to value 3 to denote a Reward Input.
The index of the transaction input for which to claim rewards.
inputs object[]required
The inputs of this transaction.
Set to value 0 to denote a UTXO Input.
The BLAKE2b-256 hash of the transaction from which the UTXO comes from. Hex-encoded data with 0x prefix.
The index of the output on the referenced transaction to consume.
allotments object[]required
The accounts map with corresponding allotment values.
The account ID to allot the mana to.
The amount of mana to allot.
The capabilities of this transaction.
payload object
The optional embedded payload.
Set to value 0 to denote a Tagged Data Payload.
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.
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.
Set to value 0 to denote a Basic Output.
The amount of IOTA tokens to deposit with this BasicOutput output. Plain string encoded number.
The stored mana held by the output.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 0 to denote an Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 1 to denote a Storage Deposit Return Unlock Condition.
returnAddress objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Amount of IOTA tokens the consuming transaction must deposit to the address defined in Return Address. Plain string encoded number.
Set to value 2 to denote a Timelock Unlock Condition.
The slot index until which the timelock applies (inclusive).
Set to value 3 to denote an Expiration Unlock Condition.
returnAddress objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
The slot index at which the expiration happens.
features object[]
The features on the output
Set to value 0 to denote a Sender Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 4 to denote a Tag Feature.
Hex-encoded binary indexation tag with 0x prefix.
Set to value 5 to denote a Native Token Feature.
The ID of the native token.
The amount of native token. Hex-encoded number with 0x prefix.
Set to value 1 to denote an Account Output.
The amount of IOTA tokens to deposit with this output. Plain string encoded number.
The stored mana held by the output.
The identifier of the account.
A counter that denotes the number of foundries created by this account.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 0 to denote an Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
features object[]
Features that add utility to the output but do not impose unlocking conditions.
Set to value 0 to denote a Sender Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 6 to denote a Block Issuer Feature.
blockIssuerKeys object[]required
The keys allowed to issue blocks from an account with a BlockIssuerFeature.
Set to value 0 to denote an Ed25519 Public key.
Ed25519 public key in Hex.
Indicates when the BlockIssuerKeys are expired.
Set to value 7 to denote a Staking Feature.
The amount of IOTA coins that are locked and staked in the containing account.
The fixed cost that the validator receives from the total pool reward.
The epoch index at which the staking starts.
The epoch index at which the staking ends.
immutableFeatures object[]
Immutable features that add utility to the output but do not impose unlocking conditions. These features need to be kept in future transitions of the UTXO state machine.
Set to value 1 to denote an Issuer Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 2 to denote an Anchor Output.
The amount of IOTA tokens to deposit with this output. Plain string encoded number.
The stored mana held by the output.
The identifier of the anchor.
A counter that must increase by 1 every time the account is state transitioned.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 4 to denote a State Controller Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 5 to denote a Governor Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
features object[]
Features that add utility to the output but do not impose unlocking conditions.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 3 to denote a State Metadata Feature.
entries objectrequired
immutableFeatures object[]
Immutable features that add utility to the output but do not impose unlocking conditions. These features need to be kept in future transitions of the UTXO state machine.
Set to value 1 to denote an Issuer Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 3 to denote a Foundry Output.
The amount of IOTA tokens to deposit with this output. Plain string encoded number.
The serial number of the foundry with respect to the controlling account.
tokenScheme object[]required
Defines the supply control scheme of the tokens controlled by the foundry.
Set to value 0 to denote a Simple Token Scheme.
Minted tokens controlled by this foundry. Hex-encoded number with 0x prefix.
Melted tokens controlled by this foundry. Hex-encoded number with 0x prefix.
Maximum supply of tokens controlled by this foundry. Hex-encoded number with 0x prefix.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 6 to denote an Immutable Account Address Unlock Condition.
address objectrequired
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
features object[]
Features that add utility to the output but do not impose unlocking conditions.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 5 to denote a Native Token Feature.
The ID of the native token.
The amount of native token. Hex-encoded number with 0x prefix.
immutableFeatures object[]
Immutable features that add utility to the output but do not impose unlocking conditions. These features need to be kept in future transitions of the UTXO state machine.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 4 to denote a NFT Output.
The amount of IOTA tokens to deposit with this output. Plain string encoded number.
The stored mana held by the output
Unique identifier of the NFT, which is the BLAKE2b-256 hash of the Output ID that created it. NFT Address = NFT Address Type || NFT ID. Hex-encoded data with 0x prefix.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 0 to denote an Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 1 to denote a Storage Deposit Return Unlock Condition.
returnAddress objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Amount of IOTA tokens the consuming transaction must deposit to the address defined in Return Address. Plain string encoded number.
Set to value 2 to denote a Timelock Unlock Condition.
The slot index until which the timelock applies (inclusive).
Set to value 3 to denote an Expiration Unlock Condition.
returnAddress objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
The slot index at which the expiration happens.
features object[]
Features that add utility to the output but do not impose unlocking conditions.
Set to value 0 to denote a Sender Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 4 to denote a Tag Feature.
Hex-encoded binary indexation tag with 0x prefix.
immutableFeatures object[]
Immutable features that add utility to the output but do not impose unlocking conditions. These features need to be kept in future transitions of the UTXO state machine.
Set to value 1 to denote an Issuer Feature.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
Set to value 2 to denote a Metadata Feature.
entries objectrequired
Set to value 5 to denote a Delegation Output.
The amount of IOTA tokens held by the output. Encoded as a plain string.
The amount of IOTA tokens that were delegated when the output was created.
The identifier for this delegation output.
The Account Address of the validator to which this output is delegating.
The index of the first epoch for which this output delegates.
The index of the last epoch for which this output delegates.
unlockConditions object[]
Unlock conditions that define how the output can be unlocked in a transaction.
Set to value 0 to denote an Address Unlock Condition.
address objectrequired
Set to value 0 to denote an Ed25519 Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Ed25519 public key
Set to value 8 to denote an Account Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the account.
Set to value 16 to denote an NFT Address.
The hex-encoded, 0x prefixed BLAKE2b-256 hash of the Output ID that created the NFT.
unlocks object[]required
Denotes a Signature Unlock.
signature objectrequired
Set to value 0 to denote an Ed25519 Signature.
The public key of the Ed25519 keypair which is used to verify the signature. Hex-encoded with 0x prefix.
The signature signing the serialized Transaction Essence. Hex-encoded with 0x prefix.
Set to value 1 to denote a Reference Unlock.
Represents the index of a previous unlock.
Set to value 2 to denote an Account Unlock.
Represents the index of a previous unlock.
Set to value 3 to denote an NFT Unlock.
Represents the index of a previous unlock.
Set to value 0 to denote a Tagged Data Payload.
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.
The optional data to attach. This may have a length of 0. Hex-encoded with 0x prefix.
The mana burned in this block.
Set to value 1 to denote a Validation Block.
The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.
The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.
The identifiers of the blocks this block references. Hex-encoded data with 0x prefix.
The highest supported version of the protocol.
The hash of the protocol parameters for the highestSupportedVersion.
signature objectrequired
The signature of entire block, signed by the issuer.
Set to value 0 to denote an Ed25519 Signature.
The public key of the Ed25519 keypair which is used to verify the signature. Hex-encoded with 0x prefix.
The signature signing the serialized Transaction Essence. Hex-encoded with 0x prefix.
Body
required
block in raw binary format
Responses
- 201
- 400
- 403
- 500
- 503
Successful operation.
Response Headers
Location string
The blockId of the newly created block.
- application/json
- Schema
- Example (from schema)
- default
Schema
The block identifier of the submitted block. Hex-encoded with 0x prefix.
{
"blockId": "string"
}
{
"blockId": "0x0482f0eba39a23c9a13072c93d828b55543132c47f5f57514d9e55535e9d4f4f35000000"
}
Unsuccessful operation: indicates that the provided data is invalid.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 400,
"message": "invalid data provided"
}
}
Unsuccessful operation: indicates that the endpoint is not available for public use.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 403,
"message": "not available for public use"
}
}
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 500,
"message": "internal server error"
}
}
Unsuccessful operation: indicates that the node can´t auto-fill the parents or perform Proof-of-Work.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
The application error code.
The error reason.
{
"error": {
"code": 503,
"message": "service unavailable"
}
}