modulepackage
3.0.0-rc.3
Repository: https://github.com/iotaledger/iota.go.git
Documentation: pkg.go.dev
# README
iota.go
Official Go library.
This library allows you to do the following:
- Create blocks with tagged data and transaction payloads
- Get blocks and outputs
- Sign transactions
- Generate addresses
- Interact with an IOTA node
- Act as a foundation for Go based node software
If you need to have more sophisticated account management, have a look at wallet.rs for which we also provide bindings in Python and JavaScript.
Requirements
This library was mainly tested with Go version 1.16.x
To use the library, we recommend you update Go to the latest stable version.
Using the library
Using the library is easy, just go get
it as any other dependency:
go get github.com/iotaledger/iota.go/v3
API reference
You can read the API reference here.
Joining the discussion
If you want to get involved in the community, need help with setting up, have any issues or just want to discuss IOTA
with other people, feel free to join our Discord in the #clients-dev
and #clients-discussion
channels.
License
The MIT license can be found here.
# Packages
Package bech32 implements bech32 encoding and decoding.
No description provided by the author
Package ed25519 implements an Ed25519 Verify function for use in consensus-critical contexts.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package pow implements the Curl-based proof of work for arbitrary binary data.
No description provided by the author
No description provided by the author
No description provided by the author
Package units provides functions for converting different units of IOTAs.
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
AddressSelector implements SerializableSelectorFunc for address types.
No description provided by the author
checks whether the given Serializable is an Address and also supported AddressType.
AliasAddressFromOutputID returns the alias address computed from a given OutputID.
AliasIDFromOutputID returns the AliasID computed from a given OutputID.
AliasOutputFeaturesArrayRules returns array rules defining the constraints on Features within an AliasOutput.
AliasOutputImmutableFeaturesArrayRules returns array rules defining the constraints on immutable Features within an AliasOutput.
BasicOutputFeaturesArrayRules returns array rules defining the constraints on Features within an BasicOutput.
BasicOutputUnlockConditionsArrayRules returns array rules defining the constraints on UnlockConditions within an BasicOutput.
BlockIDFromHexString converts the given block ID from its hex to BlockID representation.
BlockIDsFromHexString converts the given block IDs from their hex to BlockID representation.
BlockParentArrayRules returns array rules defining the constraints on a slice of block parent references.
DecodeHex decodes the given hex string to bytes.
DecodeUint256 decodes the little-endian hex encoded string to an uint256.
DecodeUint64 decodes the base 10 string to an uint64.
DeserializeObjectFromJSON reads out the type of the given raw json message, then selects the appropriate object type and deserializes the given *json.RawMessage into it.
Ed25519AddressFromPubKey returns the address belonging to the given Ed25519 public key.
EmptyBlockID returns an empty BlockID.
EncodeHex encodes the bytes string to a hex string.
EncodeUint256 encodes the uint256 to a little-endian encoded hex string.
EncodeUint64 encodes the uint64 to a base 10 string.
FeatureSelector implements SerializableSelectorFunc for features.
FeatureUnchanged checks whether the specified Feature type is unchanged between in and out.
FoundryOutputFeaturesArrayRules returns array rules defining the constraints on Features within an FoundryOutput.
FoundryOutputImmutableFeaturesArrayRules returns array rules defining the constraints on immutable Features within an FoundryOutput.
InMemoryEd25519MilestoneSigner is a function which uses the provided Ed25519 MilestonePublicKeyMapping to produce signatures for the Milestone essence data.
InputSelector implements SerializableSelectorFunc for input types.
InputsSyntacticalIndicesWithinBounds returns an InputsSyntacticalValidationFunc which checks that the UTXO ref index is within bounds.
InputsSyntacticalUnique returns an InputsSyntacticalValidationFunc which checks that every input has a unique UTXO ref.
InsecureRemoteEd25519MilestoneSigner is a function which uses a remote RPC server via an insecure connection to produce signatures for the Milestone essence data.
IsIssuerOnOutputUnlocked checks whether the issuer in an IssuerFeature of this new ChainConstrainedOutput has been unlocked.
JsonOutputSelector selects the json output implementation for the given type.
MigratedFundEntriesArrayRules returns array rules defining the constraints of a slice of MigratedFundsEntry.
MilestoneOptSelector implements SerializableSelectorFunc for milestone options.
MilestoneParentArrayRules returns array rules defining the constraints on a slice of milestone parent references.
MilestoneSignatureArrayRules returns array rules defining the constraints on a slice of signatures within a milestone.
MustBlockIDFromHexString converts the given block ID from its hex to BlockID representation.
MustOutputIDFromHex works like OutputIDFromHex but panics if an error is encountered.
MustParseAliasAddressFromHexString parses the given hex string into an AliasAddress.
MustParseEd25519AddressFromHexString parses the given hex string into an Ed25519Address.
MustParseNFTAddressFromHexString parses the given hex string into an NFTAddress.
NativeTokenArrayRules returns array rules defining the constraints on a slice of NativeTokens.
NetworkIDFromString returns the network ID string's numerical representation.
NewAddressKeysForEd25519Address returns new AddressKeys for Ed25519Address.
NewInMemoryAddressSigner creates a new InMemoryAddressSigner holding the given AddressKeys.
NewMilestone creates a new unsigned Milestone.
NewReceiptBuilder creates a new ReceiptBuilder.
No description provided by the author
NFTAddressFromOutputID returns the NFT address computed from a given OutputID.
No description provided by the author
NFTOutputFeaturesArrayRules returns array rules defining the constraints on Features within an NFTOutput.
NFTOutputImmutableFeaturesArrayRules returns array rules defining the constraints on immutable Features within an NFTOutput.
OutputIDFromHex creates a OutputID from the given hex encoded OututID data.
OutputIDFromTransactionIDAndIndex creates a OutputID from the given TransactionID and index.
OutputSelector implements SerializableSelectorFunc for output types.
OutputsFilterByType is an OutputsFilterFunc which filters Outputs by OutputType.
OutputsSyntacticalAlias returns an OutputsSyntacticalValidationFunc which checks that AliasOutput(s)': - StateIndex/FoundryCounter are zero if the AliasID is zeroed - StateController and GovernanceController must be different from AliasAddress derived from AliasID.
No description provided by the author
OutputsSyntacticalDepositAmount returns an OutputsSyntacticalValidationFunc which checks that: - every output deposits more than zero - every output deposits less than the total supply - the sum of deposits does not exceed the total supply - the deposit fulfills the minimum storage deposit as calculated from the virtual byte cost of the output - if the output contains a StorageDepositReturnUnlockCondition, it must "return" bigger equal than the minimum storage deposit required for the sender to send back the tokens.
OutputsSyntacticalExpirationAndTimelock returns an OutputsSyntacticalValidationFunc which checks that: That ExpirationUnlockCondition and TimelockUnlockCondition does not have its unix criteria set to zero.
OutputsSyntacticalFoundry returns an OutputsSyntacticalValidationFunc which checks that FoundryOutput(s)': - Minted and melted supply is less equal MaximumSupply - MaximumSupply is not zero.
OutputsSyntacticalNativeTokens returns an OutputsSyntacticalValidationFunc which checks that: - the sum of native tokens count across all outputs does not exceed MaxNativeTokensCount - each native token holds an amount bigger than zero.
OutputsSyntacticalNFT returns an OutputsSyntacticalValidationFunc which checks that NFTOutput(s)': - Address must be different from NFTAddress derived from NFTID.
ParseAliasAddressFromHexString parses the given hex string into an AliasAddress.
ParseBech32 decodes a bech32 encoded string.
ParseEd25519AddressFromHexString parses the given hex string into an Ed25519Address.
ParseNFTAddressFromHexString parses the given hex string into an NFTAddress.
PayloadSelector implements SerializableSelectorFunc for payload types.
No description provided by the author
No description provided by the author
SignatureSelector implements SerializableSelectorFunc for signature types.
checks whether the given Serializable is a Signature and also supported SignatureType.
SyntacticallyValidateInputs validates the inputs by running them against the given InputsSyntacticalValidationFunc(s).
SyntacticallyValidateOutputs validates the outputs by running them against the given OutputsSyntacticalValidationFunc(s).
TokenSchemeSelector implements SerializableSelectorFunc for token scheme types.
TransactionEssenceInputsArrayRules returns array rules defining the constraints on Inputs within a TransactionEssence.
TransactionEssenceOutputsArrayRules returns array rules defining the constraints on Outputs within a TransactionEssence.
TransactionEssenceSelector implements SerializableSelectorFunc for transaction essence types.
TransactionUnlocksArrayRules returns array rules defining the constraints on Unlocks within a Transaction.
TxSemanticDeposit validates that the IOTA tokens are balanced from the input/output side.
TxSemanticInputUnlocks produces the UnlockedIdentities which will be set into the given SemanticValidationContext and verifies that inputs are correctly unlocked and that the inputs commitment matches.
TxSemanticNativeTokens validates following rules regarding NativeTokens: - The NativeTokens between Inputs / Outputs must be balanced or have a deficit on the output side if there is no foundry state transition for a given NativeToken.
TxSemanticOutputsSender validates that for SenderFeature occurring on the output side, the given identity is unlocked on the input side.
TxSemanticSTVFOnChains executes StateTransitionValidationFunc(s) on ChainConstrainedOutput(s).
TxSemanticTimelock validates that the inputs' timelocks are expired.
UnlockConditionSelector implements SerializableSelectorFunc for unlock conditions.
UnlockSelector implements SerializableSelectorFunc for unlock types.
UnlocksSigUniqueAndRefValidator returns a validator which checks that: 1.
ValidateReceipt validates whether given the following receipt: - None of the MigratedFundsEntry objects deposits more than the max supply and deposits at least MinMigratedFundsEntryDeposit tokens.
ValidateUnlocks validates the unlocks by running them against the given UnlockValidatorFunc.
# Constants
AddressAlias denotes an Alias address.
AddressEd25519 denotes an Ed25519 address.
AddressNFT denotes an NFT address.
AliasAddressBytesLength is the length of an Alias address.
AliasAddressSerializedBytesSize is the size of a serialized Alias address with its type denoting byte.
AliasIDLength is the byte length of an AliasID.
AliasUnlockSize defines the size of an AliasUnlock.
BlockBinSerializedMaxSize defines the maximum size of a block.
BlockIDLength defines the length of a block ID.
BlockMaxParents defines the maximum amount of parents in a block.
BlockMinParents defines the minimum amount of parents in a block.
ChainTransitionTypeDestroy indicates that the chain is being destroyed.
ChainTransitionTypeGenesis indicates that the chain is in its genesis, aka it is new.
ChainTransitionTypeStateChange indicates that the chain is state transitioning.
Ed25519AddressBytesLength is the length of an Ed25519 address.
Ed25519AddressSerializedBytesSize is the size of a serialized Ed25519 address with its type denoting byte.
Ed25519SignatureSerializedBytesSize defines the size of a serialized Ed25519Signature with its type denoting byte and public key.
FeatureIssuer denotes an IssuerFeature.
FeatureMetadata denotes a MetadataFeature.
FeatureSender denotes a SenderFeature.
FeatureTag denotes a TagFeature.
FoundryIDLength is the byte length of a FoundryID consisting out of the alias address, serial number and token scheme.
InputsCommitmentLength defines the length of the inputs commitment hash.
InputTreasury is a type of input which references a milestone which generated a treasury output.
InputUTXO is a type of input which references an unspent transaction output.
LegacyTailTransactionHashLength denotes the length of a legacy transaction.
MaxInputsCount defines the maximum amount of inputs within a TransactionEssence.
MaxMetadataLength defines the max length of the data within a MetadataFeature.
MaxMigratedFundsEntryCount defines the maximum amount of MigratedFundsEntry items within a ReceiptMilestoneOpt.
MaxNativeTokenCountPerOutput max number of different native tokens that can reside in one output.
MaxNativeTokensCount is the max number of native tokens which can occur in a transaction (sum input/output side).
MaxOutputsCount defines the maximum amount of outputs within a TransactionEssence.
MaxParamsLength defines the max length of the data within a ProtocolParamsMilestoneOpt.
MaxSignaturesInAMilestone is the maximum amount of signatures in a milestone.
MaxTagLength defines the max.
MigratedFundsEntrySerializedBytesSize is the serialized size of a MigratedFundsEntry.
MilestoneIDLength defines the length of a Milestone ID.
MilestoneMerkleProofLength defines the length of a merkle proof within a milestone payload.
MilestoneOptProtocolParams denotes a ProtocolParams milestone option.
MilestoneOptReceipt denotes a ReceiptMilestoneOpt milestone option.
MilestonePublicKeyLength defines the length of a public key within a milestone.
MilestoneSignatureLength defines the length of the milestone signature.
MinInputsCount defines the minimum amount of inputs within a TransactionEssence.
MinMetadataLength defines the min length of the data within a MetadataFeature.
MinMigratedFundsEntryCount defines the minimum amount of MigratedFundsEntry items within a ReceiptMilestoneOpt.
MinMigratedFundsEntryDeposit defines the minimum amount a MigratedFundsEntry must deposit.
MinNativeTokenCountPerOutput min number of different native tokens that can reside in one output.
MinOutputsCount defines the minimum amount of inputs within a TransactionEssence.
MinSignaturesInAMilestone is the minimum amount of signatures in a milestone.
MinTagLength defines the min.
NativeTokenIDLength is the byte length of a NativeTokenID consisting out of the FoundryID plus TokenTag.
NativeTokenVByteCost defines the static virtual byte cost of a NativeToken.
NFTAddressBytesLength is the length of an NFT address.
NFTAddressSerializedBytesSize is the size of a serialized NFT address with its type denoting byte.
NFTIDLength is the byte length of an NFTID.
NFTUnlockSize defines the size of an NFTUnlock.
OutputAlias denotes an AliasOutput.
OutputBasic denotes an BasicOutput.
OutputFoundry denotes a FoundryOutput.
OutputIDLength defines the length of an OutputID.
OutputNFT denotes an NFTOutput.
OutputTreasury denotes the type of the TreasuryOutput.
PayloadMilestone denotes a Milestone.
PayloadTaggedData denotes a TaggedData payload.
PayloadTransaction denotes a Transaction.
PayloadTreasuryTransaction denotes a TreasuryTransaction.
Network prefixes.
Network prefixes.
Network prefixes.
Network prefixes.
ReferenceUnlockSize defines the size of a ReferenceUnlock.
RefUTXOIndexMax is the maximum index of a referenced UTXO.
RefUTXOIndexMin is the minimum index of a referenced UTXO.
SignatureEd25519 denotes an Ed25519Signature.
TaggedPayloadTagMaxLength defines the max length of the tag within a TaggedData payload.
TokenSchemeSimple denotes a type of output which is locked by a signature and deposits onto a single address.
TransactionEssenceNormal denotes a standard transaction essence.
TransactionIDLength defines the length of a Transaction ID.
TreasuryInputBytesLength is the length of a TreasuryInput.
TreasuryInputSerializedBytesSize is the size of a serialized TreasuryInput with its type denoting byte.
Uint256ByteSize defines the size of an uint256.
UnlockAlias denotes an AliasUnlock.
UnlockConditionAddress denotes an AddressUnlockCondition.
UnlockConditionExpiration denotes an ExpirationUnlockCondition.
UnlockConditionGovernorAddress denotes a GovernorAddressUnlockCondition.
UnlockConditionImmutableAlias denotes an ImmutableAliasUnlockCondition.
UnlockConditionStateControllerAddress denotes a StateControllerAddressUnlockCondition.
UnlockConditionStorageDepositReturn denotes a StorageDepositReturnUnlockCondition.
UnlockConditionTimelock denotes a TimelockUnlockCondition.
UnlockNFT denotes a NFTUnlock.
UnlockReference denotes a ReferenceUnlock.
UnlockSignature denotes a SignatureUnlock.
UTXOInputSize is the size of a UTXO input: input type + tx id + index.
VByteCostFactorData defines the multiplier for data fields.
VByteCostFactorKey defines the multiplier for fields which can act as keys for lookups.
# Variables
ErrAddressKeysNotMapped gets returned if the needed keys to sign a message are absent/not mapped.
ErrAddressKeysWrongType gets returned if the specified keys to sign a message for a given address are of the wrong type.
ErrAliasMissing gets returned when an alias is missing.
ErrAliasOutputCyclicAddress gets returned if an AliasOutput's AliasID results into the same address as the State/Governance controller.
ErrAliasOutputNonEmptyState gets returned if an AliasOutput with zeroed AliasID contains state (counters non-zero etc.).
ErrBlockExceedsMaxSize gets returned when a serialized block exceeds BlockBinSerializedMaxSize.
ErrChainMissing gets returned when a chain is missing.
ErrDecodeJSONUint256Str gets returned when an uint256 string could not be decoded to a big.int.
ErrDepositAmountMustBeGreaterThanZero returned if the deposit amount of an output is less or equal zero.
ErrEd25519PubKeyAndAddrMismatch gets returned when an Ed25519Address and public key do not correspond to each other.
ErrEd25519SignatureInvalid gets returned for invalid an Ed25519Signature.
ErrExpirationConditionZero gets returned when an ExpirationUnlockCondition has set the unix timestamp to zero.
ErrInputOutputSumMismatch gets returned if a transaction does not spend the entirety of the inputs to the outputs.
ErrInputUTXORefsNotUnique gets returned if multiple inputs reference the same UTXO.
ErrInvalidAliasGovernanceTransition gets returned when an alias is doing an invalid governance transition.
ErrInvalidAliasStateTransition gets returned when an alias is doing an invalid state transition.
ErrInvalidFeatureTransition gets returned when a Feature's transition within a ChainConstrainedOutput is invalid.
ErrInvalidInputsCommitment gets returned when the inputs commitment is invalid.
ErrInvalidInputUnlock gets returned when an input unlock is invalid.
ErrInvalidJSON gets returned when invalid JSON is tried to get parsed.
ErrInvalidReceiptMilestoneOpt gets returned when a ReceiptMilestoneOpt is invalid.
ErrIssuerFeatureNotUnlocked gets returned when an output contains a IssuerFeature with an ident which is not unlocked.
ErrMaxNativeTokensCountExceeded gets returned if outputs or transactions exceed the MaxNativeTokensCount.
ErrMilestoneInMemorySignerPrivateKeyMissing gets returned when an InMemoryEd25519MilestoneSigner is missing a private key.
ErrMilestoneInvalidMinSignatureThreshold gets returned when an invalid min signatures threshold is given to the verification function.
ErrMilestoneInvalidSignature gets returned when a Milestone's signature is invalid.
ErrMilestoneNonApplicablePublicKey gets returned when a Milestone contains a public key which isn't in the applicable public key set.
ErrMilestoneProducedSignaturesCountMismatch gets returned when a MilestoneSigningFunc produces less signatures than expected.
ErrMilestoneSignatureThresholdGreaterThanApplicablePublicKeySet gets returned when a min.
ErrMilestoneTooFewSignatures gets returned if a to be deserialized Milestone does not contain at least one signature.
ErrMilestoneTooFewSignaturesForVerificationThreshold gets returned if there are less signatures within a Milestone than the min.
ErrMilestoneTooManySignatures gets returned when a Milestone holds more than 255 signatures.
ErrMissingProtocolParas is returned when ProtocolParameters are missing for operations which require them.
ErrMissingUTXO gets returned if an UTXO is missing to commence a certain operation.
ErrNativeTokenAmountLessThanEqualZero gets returned when a NativeToken.Amount is not bigger than 0.
ErrNativeTokenSumExceedsUint256 gets returned when a NativeToken.Amount addition results in a value bigger than the max value of a uint256.
ErrNativeTokenSumUnbalanced gets returned when two NativeTokenSum(s) are unbalanced.
ErrNFTOutputCyclicAddress gets returned if an NFTOutput's NFTID results into the same address as the address field within the output.
ErrNonUniqueAliasOutputs gets returned when multiple AliasOutputs(s) with the same AliasID exist within sets.
ErrNonUniqueChainConstrainedOutputs gets returned when multiple ChainConstrainedOutputs(s) with the same ChainID exist within sets.
ErrNonUniqueFeatures gets returned when multiple Feature(s) with the same FeatureType exist within sets.
ErrNonUniqueFoundryOutputs gets returned when multiple FoundryOutput(s) with the same FoundryID exist within an OutputsByType.
ErrNonUniqueMilestoneOpts gets returned when multiple MilestoneOpt(s) with the same MilestoneOptType exist within sets.
ErrNonUniqueNativeTokens gets returned when multiple NativeToken(s) with the same NativeTokenID exist within sets.
ErrNonUniqueUnlockConditions gets returned when multiple UnlockCondition(s) with the same UnlockConditionType exist within sets.
ErrOutputDepositsMoreThanTotalSupply gets returned if an output deposits more than the total supply.
ErrOutputsSumExceedsTotalSupply gets returned if the sum of the output deposits exceeds the total supply of tokens.
ErrProtocolParamsMilestoneOptInvalid gets returned when a ProtocolParamsMilestoneOpt is invalid.
ErrReceiptMustContainATreasuryTransaction gets returned if a ReceiptMilestoneOpt does not contain a TreasuryTransaction.
ErrReferentialUnlockInvalid gets returned when a ReferentialUnlock is invalid.
ErrRefUTXOIndexInvalid gets returned on invalid UTXO indices.
ErrReturnAmountNotFulFilled gets returned when a return amount in a transaction is not fulfilled by the output side.
ErrSenderFeatureNotUnlocked gets returned when an output contains a SenderFeature with an ident which is not unlocked.
ErrSignatureAndAddrIncompatible gets returned if an address of an input has a companion signature unlock with the wrong signature type.
ErrSigUnlockHasNilSig gets returned if a signature unlock contains a nil signature.
ErrSigUnlockNotUnique gets returned if sig unlocks making part of a transaction aren't unique.
ErrSimpleTokenSchemeInvalidMaximumSupply gets returned when a SimpleTokenScheme's max supply is invalid.
ErrSimpleTokenSchemeInvalidMintedMeltedTokens gets returned when a SimpleTokenScheme's minted supply is invalid.
ErrSimpleTokenSchemeTransition gets returned when a SimpleTokenScheme transition is invalid.
ErrStorageDepositExceedsTargetOutputDeposit gets returned when the storage deposit condition's amount exceeds the target output's deposit.
ErrStorageDepositLessThanMinReturnOutputStorageDeposit gets returned when the storage deposit condition's amount is less than the min storage deposit for the return output.
ErrTaggedDataTagExceedsMaxSize gets returned when a TaggedData payload's tag exceeds TaggedPayloadTagMaxLength.
ErrTimelockConditionZero gets returned when a TimelockUnlockCondition has set the unix timestamp to zero.
ErrTimelockNotExpired gets returned when timelocks in a UnlockConditionSet are not expired.
ErrTransDepIdentOutputNextInvalid gets returned when a TransDepIdentOutput's next state is invalid.
ErrTransDepIdentOutputNonUTXOChainID gets returned when a TransDepIdentOutput has a ChainID which is not a UTXOIDChainID.
ErrTxEssenceNetworkIDInvalid gets returned when a network ID within a TransactionEssence is invalid.
ErrTypeIsNotSupportedAddress gets returned when a serializable was found to not be a supported Address.
ErrTypeIsNotSupportedEssence gets returned when a serializable was found to not be a supported essence.
ErrTypeIsNotSupportedInput gets returned when a serializable was found to not be a supported Input.
ErrTypeIsNotSupportedMilestoneOpt gets returned when a serializable was found to not be a supported MilestoneOpt.
ErrTypeIsNotSupportedOutput gets returned when a serializable was found to not be a supported Output.
ErrTypeIsNotSupportedPayload gets returned when a serializable was found to not be a supported Payload.
ErrTypeIsNotSupportedRentStructure gets returned when a serializable was found to not be a supported RentStructure.
ErrTypeIsNotSupportedSignature gets returned when a serializable was found to not be a supported Signature.
ErrTypeIsNotSupportedTokenScheme gets returned when a serializable was found to not be a supported TokenScheme.
ErrTypeIsNotSupportedUnlock gets returned when a serializable was found to not be a supported Unlock.
ErrUnknownAddrType gets returned for unknown address types.
ErrUnknownFeatureType gets returned for unknown feature types.
ErrUnknownInputType gets returned for unknown input types.
ErrUnknownMilestoneOptType gets returned for unknown milestone options types.
ErrUnknownOutputType gets returned for unknown output types.
ErrUnknownPayloadType gets returned for unknown payload types.
ErrUnknownSignatureType gets returned for unknown signature types.
ErrUnknownTokenSchemeType gets returned for unknown token scheme types.
ErrUnknownTransactionEssenceType gets returned for unknown transaction essence types.
ErrUnknownUnlockConditionType gets returned for unknown unlock condition types.
ErrUnknownUnlockType gets returned for unknown unlock.
ErrUnsupportedFeatureType gets returned when an unsupported feature exists in a set.
ErrUnsupportedInputType gets returned for unsupported input types.
ErrUnsupportedMilestoneOptType gets returned when an unsupported milestone option exists in a set.
ErrUnsupportedObjectType gets returned for unsupported object types.
ErrUnsupportedPayloadType gets returned for unsupported payload types.
ErrUnsupportedUnlockConditionType gets returned when an unsupported unlock condition exists in a set.
ErrVByteRentNotCovered gets returned when a NonEphemeralObject does not cover the state rent cost which are calculated from its virtual byte costs.
# Structs
AddressKeys pairs an address and its source key(s).
AddressUnlockCondition is an UnlockCondition defining an identity which has to be unlocked.
AliasOutput is an output type which represents an alias account.
AliasUnlock is an Unlock which references a previous unlock.
BasicOutput is an output type which can hold native tokens and features.
Block represents a vertex in the Tangle.
ChainTransitionError gets returned when a state transition validation fails for a ChainConstrainedOutput.
Ed25519Signature defines an Ed25519 signature.
ExpirationUnlockCondition is an unlock condition which puts a time constraint on whether the receiver or return identity can consume an output depending on the latest confirmed milestone's timestamp T: - only the receiver identity can consume the output, if T is before than the one defined in the condition.
ExternalUnlockParameters defines a palette of external system parameters which are used to determine whether an Output can be unlocked.
FoundryOutput is an output type which controls the supply of user defined native tokens.
GovernorAddressUnlockCondition is an UnlockCondition defining the governor identity for an AliasOutput.
ImmutableAliasUnlockCondition is an UnlockCondition defining an alias which has to be unlocked.
InMemoryAddressSigner implements AddressSigner by holding keys simply in-memory.
IssuerFeature is a feature which associates an output with an issuer identity.
JSONObjectEnvelope defines the envelope for looking-ahead an object's type before deserializing it to its actual object.
MetadataFeature is a feature which simply holds binary data to be freely interpreted by higher layer applications.
MigratedFundsEntry are funds which were migrated from a legacy network.
Milestone represents a special payload which defines the inclusion set of other blocks in the Tangle.
NativeToken represents a token which resides natively on the ledger.
NFTOutput is an output type used to implement non-fungible tokens.
NFTUnlock is an Unlock which references a previous unlock.
ProtocolParameters defines the parameters of the protocol.
ProtocolParamsMilestoneOpt is a MilestoneOpt defining changing protocol parameters.
ReceiptBuilder is used to easily build up a ReceiptMilestoneOpt.
ReceiptMilestoneOpt is a listing of migrated funds.
ReferenceUnlock is an Unlock which references a previous unlock.
RentStructure defines the parameters of rent cost calculations on objects which take node resources.
SemanticValidationContext defines the context under which a semantic validation for a Transaction is happening.
SemValiContextWorkingSet contains fields which get automatically populated by the library during the semantic validation of a Transaction.
SenderFeature is a feature which associates an output with a sender identity.
SignatureUnlock holds a signature which unlocks inputs.
SimpleTokenScheme is a TokenScheme which works with minted/melted/maximum supply counters.
StateControllerAddressUnlockCondition is an UnlockCondition defining the state controller identity for an AliasOutput.
StorageDepositReturnUnlockCondition is an unlock condition which defines the amount of tokens which must be sent back to the return identity, when the output in which it occurs in, is consumed.
TagFeature is a feature which allows to additionally tag an output by a user defined value.
TaggedData is a payload which holds a tag and associated data.
TimelockUnlockCondition is an unlock condition which puts a time constraint on an output depending on the latest confirmed milestone's timestamp T: - the output can only be consumed, if T is bigger than the one defined in the condition.
Transaction is a transaction with its inputs, outputs and unlocks.
TransactionEssence is the essence part of a Transaction.
TreasuryOutput is an output which holds the treasury of a network.
TreasuryTransaction represents a transaction which moves funds from the treasury.
UnlockedIdentity represents an unlocked identity.
UTXOInput references an unspent transaction output by the Transaction's ID and the corresponding index of the Output.
# Interfaces
Address describes a general address.
AddressSigner produces signatures for messages which get verified against a given address.
ChainConstrainedAddress is a type of Address representing ownership of an output by a ChainConstrainedOutput.
ChainConstrainedOutput is a type of Output which represents a chain of state transitions.
ChainID represents the chain ID of a chain created by a ChainConstrainedOutput.
DirectUnlockableAddress is a type of Address which can be directly unlocked.
Feature is an abstract building block extending the features of an Output.
IndexedUTXOReferencer is a type of Input which references a UTXO by the transaction ID and output index.
Input references a UTXO.
JSONSerializable is an object which can return a Serializable.
MilestoneOpt is an object carried within a Milestone.
NonEphemeralObject is an object which can not be pruned by nodes as it makes up an integral part to execute the IOTA protocol.
Output defines a unit of output of a transaction.
Payload is an object which can be embedded into other objects.
ReferentialUnlock is an Unlock which references another Unlock.
Signature is a signature.
TokenScheme defines a scheme for to be used for an OutputFoundry.
TransDepIdentOutput is a type of Output where the identity to unlock is dependent on the transition the output does (without considering UnlockConditions(s)).
TransIndepIdentOutput is a type of Output where the identity to unlock is independent of any transition the output does (without considering Feature(s)).
Unlock unlocks inputs of a Transaction.
UnlockCondition is an abstract building block defining the unlock conditions of an Output.
UTXOIDChainID is a ChainID which gets produced by taking an OutputID.
# Type aliases
AddressSignerFunc implements the AddressSigner interface.
AddressType defines the type of addresses.
AddressTypeSet is a set of AddressType.
AliasAddress defines an Alias address.
AliasID is the identifier for an alias account.
AliasOutputs is a slice of AliasOutput(s).
AliasOutputsSet is a set of AliasOutput(s).
BasicOutputs is a slice of BasicOutput(s).
BlockID is the ID of a Block.
BlockIDs are IDs of blocks.
ChainConstrainedOutputs is a slice of ChainConstrainedOutput.
ChainConstrainedOutputsSet is a map of ChainID to ChainConstrainedOutput.
ChainTransitionType defines the type of transition a ChainConstrainedOutput is doing.
Ed25519Address defines an Ed25519 address.
Features is a slice of Feature(s).
FeatureSet is a set of Feature(s).
FeatureSetTransitionValidationFunc checks whether the Features transition from in to out is valid.
FeatureType defines the type of features.
FoundryID defines the identifier for a foundry consisting out of the address, serial number and TokenScheme.
FoundryOutputs is a slice of FoundryOutput(s).
FoundryOutputsSet is a set of FoundryOutput(s).
HexOutputIDs is a slice of hex encoded OutputID strings.
Inputs a slice of Input.
InputsCommitment is a commitment to the inputs of a transaction.
InputsSyntacticalValidationFunc which given the index of an input and the input itself, runs syntactical validations and returns an error if any should fail.
InputType defines the type of inputs.
JSONSerializableSelectorFunc is a function that given a type int, returns an empty instance of the given underlying type.
LegacyTailTransactionHash represents the bytes of a T5B1 encoded legacy tail transaction hash.
MigratedFundsEntries is a slice of MigratedFundsEntry.
MilestoneID is the ID of a Milestone.
MilestoneIndex is the index of a Milestone.
No description provided by the author
MilestoneOpts is a slice of MilestoneOpt(s).
MilestoneOptSet is a set of MilestoneOpt(s).
MilestoneOptType defines the type of milestone options.
MilestoneOptTypeSet is a set of MilestoneOptType.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MilestoneSigningFunc is a function which produces a set of signatures for the given Milestone essence data.
NativeTokenID is an identifier which uniquely identifies a NativeToken.
NativeTokens is a set of NativeToken.
NativeTokensSet is a set of NativeToken(s).
NativeTokenSum is a mapping of NativeTokenID to a sum value.
NativeTokenSumFunc gets called with a NativeTokenID and the sums of input/output side.
NetworkID defines the ID of the network on which entities operate on.
NetworkPrefix denotes the different network prefixes.
NFTAddress defines an NFT address.
NFTID is the identifier for an NFT.
NFTIDs are NFTID(s).
OutputID defines the identifier for an UTXO which consists out of the referenced TransactionID and the output's index.
OutputIDHex is the hex representation of an output ID.
OutputIDs is a slice of OutputID.
Outputs is a slice of Output.
OutputsByType is a map of OutputType(s) to slice of Output(s).
OutputSet is a map of the OutputID to Output.
OutputsFilterFunc is a predicate function operating on an Output.
OutputsSyntacticalValidationFunc which given the index of an output and the output itself, runs syntactical validations and returns an error if any should fail.
OutputType defines the type of outputs.
PayloadType denotes a type of payload.
Signatures is a slice of Signature(s).
SignatureType defines the type of signature.
SignatureTypeSet is a set of SignatureType.
StateTransitionValidationFunc is a function which given the current and next chain state, validates the state transition.
TokenSchemeType defines the type of token schemes.
TransactionEssenceType defines the type of transaction.
TransactionID is the ID of a Transaction.
TransactionIDs are IDs of transactions.
TreasuryInput is an input which references a milestone which generated a TreasuryOutput.
TxSemanticValidationFunc is a function which given the context, input, outputs and unlocks runs a specific semantic validation.
UnlockConditions is a slice of UnlockCondition(s).
UnlockConditionSet is a set of UnlockCondition(s).
UnlockConditionType defines the type of UnlockCondition.
UnlockedIdentities defines a set of identities which are unlocked from the input side of a Transaction.
No description provided by the author
UnlocksByType is a map of UnlockType(s) to slice of Unlock(s).
UnlockType defines a type of unlock.
UnlockValidatorFunc which given the index and the Unlock itself, runs validations and returns an error if any should fail.
VByteCostFactor defines the type of the virtual byte cost factor.
VBytes defines the type of the virtual byte costs.
VBytesFunc is a function which computes the virtual byte cost of a NonEphemeralObject.