iota_sdk.types.block
Block Objects
@dataclass
class Block()
Represent the object that nodes gossip around the network.
Attributes:
protocolVersion
- The protocol version with which this block was issued.parents
- The parents of this block.nonce
- The nonce of this block.payload
- The optional payload of this block.
LedgerInclusionState Objects
class LedgerInclusionState(str, Enum)
Represents whether a block is included in the ledger.
Attributes:
noTransaction
- The block does not contain a transaction.included
- The block contains an included transaction.conflicting
- The block contains a conflicting transaction.
ConflictReason Objects
class ConflictReason(Enum)
Represents the possible reasons for a conflicting transaction.
Attributes:
none
0 - The transaction does not conflict with the ledger.inputUTXOAlreadySpent
1 - The input UTXO is already spent.inputUTXOAlreadySpentInThisMilestone
2 - The input UTXO is already spent in this milestone.inputUTXONotFound
3 - The input UTXO was not found.inputOutputSumMismatch
4 - The sum of input and output amounts is not equal.invalidSignature
5 - The signature is invalid.invalidTimelock
6 - The timelock is invalid.invalidNativeTokens
7 - The native tokens are invalid.returnAmountMismatch
8 - The return amount is invalid.invalidInputUnlock
9 - Not all inputs can be unlocked.inputUTXOAlreadySpent
0 10 - The inputs commitment hash is invalid.inputUTXOAlreadySpent
1 11 - The sender is invalid.inputUTXOAlreadySpent
2 12 - The chain state is invalid.inputUTXOAlreadySpent
3 255 - The semantic validation failed.
BlockMetadata Objects
@dataclass
class BlockMetadata()
Block Metadata.
Attributes:
blockId
- The id of the block.parents
- The parents of the block.isSolid
- Whether the block is solid.referencedByMilestoneIndex
- The milestone index referencing the block.milestoneIndex
- The milestone index if the block contains a milestone payload.ledgerInclusionState
- The ledger inclusion state of the block.conflictReason
- The optional conflict reason of the block.shouldPromote
- Whether the block should be promoted.shouldReattach
- Whether the block should be reattached.