Skip to main content

iota_sdk.types.output

OutputType Objects

class OutputType(IntEnum)

Output types.

Attributes:

  • Treasury 2 - A treasury output.
  • Basic 3 - A basic output.
  • Alias 4 - An alias output.
  • Foundry 5 - A foundry output.
  • Nft 6 - An NFT output.

Output Objects

@dataclass
class Output()

An output in a UTXO ledger.

TreasuryOutput Objects

@dataclass
class TreasuryOutput(Output)

Describes a treasury output.

Attributes:

amount : The base coin amount of the output. type : The type of output.

BasicOutput Objects

@dataclass
class BasicOutput(Output)

Describes a basic output.

Attributes:

amount : The base coin amount of the output. unlockConditions : The conditions to unlock the output. features : Features that add utility to the output but do not impose unlocking conditions. nativeTokens : Native tokens added to the new output. type : The type of output.

AliasOutput Objects

@dataclass
class AliasOutput(Output)

Describes an alias output.

Attributes:

amount : The base coin amount of the output. unlockConditions : The conditions to unlock the output. aliasId : The alias ID if it's an alias output. stateIndex : A counter that must increase by 1 every time the alias is state transitioned. stateMetadata : Metadata that can only be changed by the state controller. foundryCounter : A counter that denotes the number of foundries created by this alias account. features : Features that add utility to the output but do not impose unlocking conditions. nativeTokens : Native tokens added to the new output. immutableFeatures : 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. type : The type of output.

FoundryOutput Objects

@dataclass
class FoundryOutput(Output)

Describes a foundry output.

Attributes:

amount : The base coin amount of the output. unlockConditions : The conditions to unlock the output. features : Features that add utility to the output but do not impose unlocking conditions. nativeTokens : Native tokens added to the new output. immutableFeatures : 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. serialNumber : The serial number of the foundry with respect to the controlling alias. tokenScheme : Defines the supply control scheme of the tokens controlled by the foundry. Currently only a simple scheme is supported. type : The type of output.

NftOutput Objects

@dataclass
class NftOutput(Output)

Describes an NFT output.

Attributes:

amount : The base coin amount of the output. unlockConditions : The conditions to unlock the output. nftId : The NFT ID if it's an NFT output. features : Features that add utility to the output but do not impose unlocking conditions. nativeTokens : Native tokens added to the new output. immutableFeatures : 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. type : The type of output.

OutputMetadata Objects

@dataclass
class OutputMetadata()

Metadata about an output.

Attributes:

  • blockId - The ID of the block in which the output appeared in.
  • transactionId - The ID of the transaction in which the output was created.
  • outputIndex - The index of the output within the corresponding transaction.
  • isSpent - Whether the output is already spent.
  • milestoneIndexBooked - The index of the milestone which booked/created the output.
  • milestoneTimestampBooked - The timestamp of the milestone which booked/created the output.
  • ledgerIndex - The current ledger index.
  • milestoneIndexSpent - The index of the milestone which spent the output.
  • milestoneTimestampSpent - The timestamp of the milestone which spent the output.
  • transactionIdSpent - The ID of the transaction that spent the output.

OutputWithMetadata Objects

@dataclass
class OutputWithMetadata()

An output with its metadata.

Attributes:

  • metadata - The OutputMetadata object that belongs to output.
  • output - An Output object.