Documentation ¶
Index ¶
- Variables
- type AccountOutputBuilder
- func (builder *AccountOutputBuilder) AccountID(accountID iotago.AccountID) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Address(addr iotago.Address) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Amount(amount iotago.BaseToken) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) BlockIssuer(keys iotago.BlockIssuerKeys, expirySlot iotago.SlotIndex) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) BlockIssuerTransition() *BlockIssuerTransition
- func (builder *AccountOutputBuilder) Build() (*iotago.AccountOutput, error)
- func (builder *AccountOutputBuilder) FoundriesToGenerate(count uint32) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) ImmutableIssuer(issuer iotago.Address) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Mana(mana iotago.Mana) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) MustBuild() *iotago.AccountOutput
- func (builder *AccountOutputBuilder) RemoveFeature(featureType iotago.FeatureType) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Sender(senderAddr iotago.Address) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) Staking(amount iotago.BaseToken, fixedCost iotago.Mana, startEpoch iotago.EpochIndex, ...) *AccountOutputBuilder
- func (builder *AccountOutputBuilder) StakingTransition() *StakingTransition
- type AnchorGovernanceTransition
- func (trans *AnchorGovernanceTransition) Builder() *AnchorOutputBuilder
- func (trans *AnchorGovernanceTransition) Governor(governor iotago.Address) *AnchorGovernanceTransition
- func (trans *AnchorGovernanceTransition) Metadata(entries iotago.MetadataFeatureEntries) *AnchorGovernanceTransition
- func (trans *AnchorGovernanceTransition) StateController(stateCtrl iotago.Address) *AnchorGovernanceTransition
- type AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) Amount(amount iotago.BaseToken) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) AnchorID(anchorID iotago.AnchorID) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) Build() (*iotago.AnchorOutput, error)
- func (builder *AnchorOutputBuilder) GovernanceTransition() *AnchorGovernanceTransition
- func (builder *AnchorOutputBuilder) Governor(governor iotago.Address) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) ImmutableIssuer(issuer iotago.Address) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) Mana(mana iotago.Mana) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) MustBuild() *iotago.AnchorOutput
- func (builder *AnchorOutputBuilder) StateController(stateCtrl iotago.Address) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) StateMetadata(entries iotago.StateMetadataFeatureEntries) *AnchorOutputBuilder
- func (builder *AnchorOutputBuilder) StateTransition() *AnchorStateTransition
- type AnchorStateTransition
- func (trans *AnchorStateTransition) Amount(amount iotago.BaseToken) *AnchorStateTransition
- func (trans *AnchorStateTransition) Builder() *AnchorOutputBuilder
- func (trans *AnchorStateTransition) Mana(mana iotago.Mana) *AnchorStateTransition
- func (trans *AnchorStateTransition) StateMetadata(entries iotago.StateMetadataFeatureEntries) *AnchorStateTransition
- type AvailableManaResult
- func (a *AvailableManaResult) AddAccountBoundMana(accountID iotago.AccountID, value iotago.Mana) error
- func (a *AvailableManaResult) AddPotentialMana(value iotago.Mana) error
- func (a *AvailableManaResult) AddRewards(value iotago.Mana) error
- func (a *AvailableManaResult) AddStoredMana(value iotago.Mana) error
- func (a *AvailableManaResult) AddUnboundPotentialMana(value iotago.Mana) error
- func (a *AvailableManaResult) AddUnboundStoredMana(value iotago.Mana) error
- type BasicBlockBuilder
- func (b *BasicBlockBuilder) Build() (*iotago.Block, error)
- func (b *BasicBlockBuilder) CalculateAndSetMaxBurnedMana(rmc iotago.Mana) *BasicBlockBuilder
- func (b *BasicBlockBuilder) IssuingTime(time time.Time) *BasicBlockBuilder
- func (b *BasicBlockBuilder) LatestFinalizedSlot(slot iotago.SlotIndex) *BasicBlockBuilder
- func (b *BasicBlockBuilder) MaxBurnedMana(maxBurnedMana iotago.Mana) *BasicBlockBuilder
- func (b *BasicBlockBuilder) Payload(payload iotago.ApplicationPayload) *BasicBlockBuilder
- func (b *BasicBlockBuilder) ProtocolVersion(version iotago.Version) *BasicBlockBuilder
- func (b *BasicBlockBuilder) ShallowLikeParents(parents iotago.BlockIDs) *BasicBlockBuilder
- func (b *BasicBlockBuilder) Sign(accountID iotago.AccountID, privKey ed25519.PrivateKey) *BasicBlockBuilder
- func (b *BasicBlockBuilder) SignWithSigner(accountID iotago.AccountID, signer iotago.AddressSigner, addr iotago.Address) *BasicBlockBuilder
- func (b *BasicBlockBuilder) SlotCommitmentID(commitment iotago.CommitmentID) *BasicBlockBuilder
- func (b *BasicBlockBuilder) StrongParents(parents iotago.BlockIDs) *BasicBlockBuilder
- func (b *BasicBlockBuilder) WeakParents(parents iotago.BlockIDs) *BasicBlockBuilder
- type BasicOutputBuilder
- func (builder *BasicOutputBuilder) Address(addr iotago.Address) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Amount(amount iotago.BaseToken) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Build() (*iotago.BasicOutput, error)
- func (builder *BasicOutputBuilder) Expiration(returnAddr iotago.Address, expiredAfterSlot iotago.SlotIndex) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Mana(mana iotago.Mana) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) MustBuild() *iotago.BasicOutput
- func (builder *BasicOutputBuilder) NativeToken(nt *iotago.NativeTokenFeature) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Sender(senderAddr iotago.Address) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) StorageDepositReturn(returnAddr iotago.Address, amount iotago.BaseToken) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Tag(tag []byte) *BasicOutputBuilder
- func (builder *BasicOutputBuilder) Timelock(untilSlot iotago.SlotIndex) *BasicOutputBuilder
- type BlockIssuerTransition
- func (trans *BlockIssuerTransition) AddKeys(keys ...iotago.BlockIssuerKey) *BlockIssuerTransition
- func (trans *BlockIssuerTransition) Builder() *AccountOutputBuilder
- func (trans *BlockIssuerTransition) ExpirySlot(slot iotago.SlotIndex) *BlockIssuerTransition
- func (trans *BlockIssuerTransition) Keys(keys iotago.BlockIssuerKeys) *BlockIssuerTransition
- func (trans *BlockIssuerTransition) RemoveKey(keyToDelete iotago.BlockIssuerKey) *BlockIssuerTransition
- type DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) Address(addr iotago.Address) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) Amount(amount iotago.BaseToken) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) Build() (*iotago.DelegationOutput, error)
- func (builder *DelegationOutputBuilder) DelegatedAmount(delegatedAmount iotago.BaseToken) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) DelegationID(delegationID iotago.DelegationID) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) EndEpoch(endEpoch iotago.EpochIndex) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) MustBuild() *iotago.DelegationOutput
- func (builder *DelegationOutputBuilder) StartEpoch(startEpoch iotago.EpochIndex) *DelegationOutputBuilder
- func (builder *DelegationOutputBuilder) ValidatorAddress(validatorAddress *iotago.AccountAddress) *DelegationOutputBuilder
- type FoundryOutputBuilder
- func (builder *FoundryOutputBuilder) Amount(amount iotago.BaseToken) *FoundryOutputBuilder
- func (builder *FoundryOutputBuilder) Build() (*iotago.FoundryOutput, error)
- func (builder *FoundryOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *FoundryOutputBuilder
- func (builder *FoundryOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *FoundryOutputBuilder
- func (builder *FoundryOutputBuilder) MustBuild() *iotago.FoundryOutput
- func (builder *FoundryOutputBuilder) NativeToken(nt *iotago.NativeTokenFeature) *FoundryOutputBuilder
- func (builder *FoundryOutputBuilder) TokenScheme(tokenScheme iotago.TokenScheme) *FoundryOutputBuilder
- type NFTOutputBuilder
- func (builder *NFTOutputBuilder) Address(addr iotago.Address) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Amount(amount iotago.BaseToken) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Build() (*iotago.NFTOutput, error)
- func (builder *NFTOutputBuilder) Expiration(returnAddr iotago.Address, expiredAfterSlot iotago.SlotIndex) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) ImmutableIssuer(issuer iotago.Address) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Mana(mana iotago.Mana) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) MustBuild() *iotago.NFTOutput
- func (builder *NFTOutputBuilder) NFTID(nftID iotago.NFTID) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Sender(senderAddr iotago.Address) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) StorageDepositReturn(returnAddr iotago.Address, amount iotago.BaseToken) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Tag(tag []byte) *NFTOutputBuilder
- func (builder *NFTOutputBuilder) Timelock(untilSlot iotago.SlotIndex) *NFTOutputBuilder
- type StakingTransition
- func (trans *StakingTransition) Builder() *AccountOutputBuilder
- func (trans *StakingTransition) EndEpoch(epoch iotago.EpochIndex) *StakingTransition
- func (trans *StakingTransition) FixedCost(fixedCost iotago.Mana) *StakingTransition
- func (trans *StakingTransition) StakedAmount(amount iotago.BaseToken) *StakingTransition
- func (trans *StakingTransition) StartEpoch(epoch iotago.EpochIndex) *StakingTransition
- type TransactionBuilder
- func (b *TransactionBuilder) AddBlockIssuanceCreditInput(blockIssuanceCreditInput *iotago.BlockIssuanceCreditInput) *TransactionBuilder
- func (b *TransactionBuilder) AddCommitmentInput(commitmentInput *iotago.CommitmentInput) *TransactionBuilder
- func (b *TransactionBuilder) AddInput(input *TxInput) *TransactionBuilder
- func (b *TransactionBuilder) AddOutput(output iotago.Output) *TransactionBuilder
- func (b *TransactionBuilder) AddRewardInput(rewardInput *iotago.RewardInput, mana iotago.Mana) *TransactionBuilder
- func (b *TransactionBuilder) AddTaggedDataPayload(payload *iotago.TaggedData) *TransactionBuilder
- func (b *TransactionBuilder) AllotAllMana(targetSlot iotago.SlotIndex, accountID iotago.AccountID, ...) *TransactionBuilder
- func (b *TransactionBuilder) AllotMinRequiredManaAndStoreRemainingManaInOutput(targetSlot iotago.SlotIndex, rmc iotago.Mana, ...) *TransactionBuilder
- func (b *TransactionBuilder) AllotRemainingAccountBoundMana(targetSlot iotago.SlotIndex, onAllotment func(iotago.AccountID, iotago.Mana), ...) *TransactionBuilder
- func (b *TransactionBuilder) Build() (*iotago.SignedTransaction, error)
- func (b *TransactionBuilder) BuildAndSwapToBlockBuilder(txFunc TransactionFunc) *BasicBlockBuilder
- func (b *TransactionBuilder) CalculateAvailableManaInputs(targetSlot iotago.SlotIndex) (*AvailableManaResult, error)
- func (b *TransactionBuilder) CalculateAvailableManaRemaining(targetSlot iotago.SlotIndex) (*AvailableManaResult, error)
- func (b *TransactionBuilder) Clone() *TransactionBuilder
- func (b *TransactionBuilder) CreationSlot() iotago.SlotIndex
- func (b *TransactionBuilder) IncreaseAllotment(accountID iotago.AccountID, value iotago.Mana) *TransactionBuilder
- func (b *TransactionBuilder) MinRequiredAllottedMana(rmc iotago.Mana, blockIssuerAccountID iotago.AccountID) (iotago.Mana, error)
- func (b *TransactionBuilder) SetCreationSlot(creationSlot iotago.SlotIndex) *TransactionBuilder
- func (b *TransactionBuilder) StoreRemainingManaInOutputAndAllotRemainingAccountBoundMana(targetSlot iotago.SlotIndex, storedManaOutputIndex int) *TransactionBuilder
- func (b *TransactionBuilder) WithTransactionCapabilities(capabilities iotago.TransactionCapabilitiesBitMask) *TransactionBuilder
- type TransactionBuilderInputFilter
- type TransactionFunc
- type TxInput
- type ValidationBlockBuilder
- func (v *ValidationBlockBuilder) Build() (*iotago.Block, error)
- func (v *ValidationBlockBuilder) HighestSupportedVersion(highestSupportedVersion iotago.Version) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) IssuingTime(time time.Time) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) LatestFinalizedSlot(slot iotago.SlotIndex) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) ProtocolParametersHash(hash iotago.Identifier) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) ProtocolVersion(version iotago.Version) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) ShallowLikeParents(parents iotago.BlockIDs) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) Sign(accountID iotago.AccountID, privKey ed25519.PrivateKey) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) SignWithSigner(accountID iotago.AccountID, signer iotago.AddressSigner, addr iotago.Address) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) SlotCommitmentID(commitmentID iotago.CommitmentID) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) StrongParents(parents iotago.BlockIDs) *ValidationBlockBuilder
- func (v *ValidationBlockBuilder) WeakParents(parents iotago.BlockIDs) *ValidationBlockBuilder
Constants ¶
This section is empty.
Variables ¶
var ErrTransactionBuilder = ierrors.New("transaction builder error")
ErrTransactionBuilder defines a generic error occurring within the TransactionBuilder.
Functions ¶
This section is empty.
Types ¶
type AccountOutputBuilder ¶
type AccountOutputBuilder struct {
// contains filtered or unexported fields
}
AccountOutputBuilder builds an iotago.AccountOutput.
func NewAccountOutputBuilder ¶
func NewAccountOutputBuilder(targetAddr iotago.Address, amount iotago.BaseToken) *AccountOutputBuilder
NewAccountOutputBuilder creates a new AccountOutputBuilder with the address and base token amount.
func NewAccountOutputBuilderFromPrevious ¶
func NewAccountOutputBuilderFromPrevious(previous *iotago.AccountOutput) *AccountOutputBuilder
NewAccountOutputBuilderFromPrevious creates a new AccountOutputBuilder starting from a copy of the previous iotago.AccountOutput.
func (*AccountOutputBuilder) AccountID ¶
func (builder *AccountOutputBuilder) AccountID(accountID iotago.AccountID) *AccountOutputBuilder
AccountID sets the iotago.AccountID of this output. Do not call this function if the underlying iotago.AccountOutput is not new.
func (*AccountOutputBuilder) Address ¶
func (builder *AccountOutputBuilder) Address(addr iotago.Address) *AccountOutputBuilder
Address sets/modifies an iotago.AddressUnlockCondition on the output.
func (*AccountOutputBuilder) Amount ¶
func (builder *AccountOutputBuilder) Amount(amount iotago.BaseToken) *AccountOutputBuilder
Amount sets the base token amount of the output.
func (*AccountOutputBuilder) BlockIssuer ¶
func (builder *AccountOutputBuilder) BlockIssuer(keys iotago.BlockIssuerKeys, expirySlot iotago.SlotIndex) *AccountOutputBuilder
BlockIssuer sets/modifies an iotago.BlockIssuerFeature as a mutable feature on the output.
func (*AccountOutputBuilder) BlockIssuerTransition ¶
func (builder *AccountOutputBuilder) BlockIssuerTransition() *BlockIssuerTransition
BlockIssuerTransition narrows the builder functions to the ones available for an iotago.BlockIssuerFeature transition. If BlockIssuerFeature does not exist, it creates and sets an empty feature.
func (*AccountOutputBuilder) Build ¶
func (builder *AccountOutputBuilder) Build() (*iotago.AccountOutput, error)
Build builds the iotago.AccountOutput.
func (*AccountOutputBuilder) FoundriesToGenerate ¶
func (builder *AccountOutputBuilder) FoundriesToGenerate(count uint32) *AccountOutputBuilder
FoundriesToGenerate bumps the output's foundry counter by the amount of foundries to generate.
func (*AccountOutputBuilder) ImmutableIssuer ¶
func (builder *AccountOutputBuilder) ImmutableIssuer(issuer iotago.Address) *AccountOutputBuilder
ImmutableIssuer sets/modifies an iotago.IssuerFeature as an immutable feature on the output. Only call this function on a new iotago.AccountOutput.
func (*AccountOutputBuilder) ImmutableMetadata ¶
func (builder *AccountOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *AccountOutputBuilder
ImmutableMetadata sets/modifies an iotago.MetadataFeature as an immutable feature on the output. Only call this function on a new iotago.AccountOutput.
func (*AccountOutputBuilder) Mana ¶
func (builder *AccountOutputBuilder) Mana(mana iotago.Mana) *AccountOutputBuilder
Mana sets the mana of the output.
func (*AccountOutputBuilder) Metadata ¶
func (builder *AccountOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *AccountOutputBuilder
Metadata sets/modifies an iotago.MetadataFeature on the output.
func (*AccountOutputBuilder) MustBuild ¶
func (builder *AccountOutputBuilder) MustBuild() *iotago.AccountOutput
MustBuild works like Build() but panics if an error is encountered.
func (*AccountOutputBuilder) RemoveFeature ¶
func (builder *AccountOutputBuilder) RemoveFeature(featureType iotago.FeatureType) *AccountOutputBuilder
RemoveFeature removes a feature from the output.
func (*AccountOutputBuilder) Sender ¶
func (builder *AccountOutputBuilder) Sender(senderAddr iotago.Address) *AccountOutputBuilder
Sender sets/modifies an iotago.SenderFeature as a mutable feature on the output.
func (*AccountOutputBuilder) Staking ¶
func (builder *AccountOutputBuilder) Staking(amount iotago.BaseToken, fixedCost iotago.Mana, startEpoch iotago.EpochIndex, optEndEpoch ...iotago.EpochIndex) *AccountOutputBuilder
Staking sets/modifies an iotago.StakingFeature as a mutable feature on the output.
func (*AccountOutputBuilder) StakingTransition ¶
func (builder *AccountOutputBuilder) StakingTransition() *StakingTransition
StakingTransition narrows the builder functions to the ones available for an iotago.StakingFeature transition. If StakingFeature does not exist, it creates and sets an empty feature.
type AnchorGovernanceTransition ¶
type AnchorGovernanceTransition struct {
// contains filtered or unexported fields
}
func (*AnchorGovernanceTransition) Builder ¶
func (trans *AnchorGovernanceTransition) Builder() *AnchorOutputBuilder
Builder returns the AnchorOutputBuilder.
func (*AnchorGovernanceTransition) Governor ¶
func (trans *AnchorGovernanceTransition) Governor(governor iotago.Address) *AnchorGovernanceTransition
Governor sets the iotago.GovernorAddressUnlockCondition of the output.
func (*AnchorGovernanceTransition) Metadata ¶
func (trans *AnchorGovernanceTransition) Metadata(entries iotago.MetadataFeatureEntries) *AnchorGovernanceTransition
Metadata sets/modifies an iotago.MetadataFeature as a mutable feature on the output.
func (*AnchorGovernanceTransition) StateController ¶
func (trans *AnchorGovernanceTransition) StateController(stateCtrl iotago.Address) *AnchorGovernanceTransition
StateController sets the iotago.StateControllerAddressUnlockCondition of the output.
type AnchorOutputBuilder ¶
type AnchorOutputBuilder struct {
// contains filtered or unexported fields
}
AnchorOutputBuilder builds an iotago.AnchorOutput.
func NewAnchorOutputBuilder ¶
func NewAnchorOutputBuilder(stateCtrl iotago.Address, govAddr iotago.Address, amount iotago.BaseToken) *AnchorOutputBuilder
NewAnchorOutputBuilder creates a new AnchorOutputBuilder with the required state controller/governor addresses and base token amount.
func NewAnchorOutputBuilderFromPrevious ¶
func NewAnchorOutputBuilderFromPrevious(previous *iotago.AnchorOutput) *AnchorOutputBuilder
NewAnchorOutputBuilderFromPrevious creates a new AnchorOutputBuilder starting from a copy of the previous iotago.AnchorOutput.
func (*AnchorOutputBuilder) Amount ¶
func (builder *AnchorOutputBuilder) Amount(amount iotago.BaseToken) *AnchorOutputBuilder
Amount sets the base token amount of the output.
func (*AnchorOutputBuilder) AnchorID ¶
func (builder *AnchorOutputBuilder) AnchorID(anchorID iotago.AnchorID) *AnchorOutputBuilder
AnchorID sets the iotago.AnchorID of this output. Do not call this function if the underlying iotago.AnchorOutput is not new.
func (*AnchorOutputBuilder) Build ¶
func (builder *AnchorOutputBuilder) Build() (*iotago.AnchorOutput, error)
Build builds the iotago.AnchorOutput.
func (*AnchorOutputBuilder) GovernanceTransition ¶
func (builder *AnchorOutputBuilder) GovernanceTransition() *AnchorGovernanceTransition
GovernanceTransition narrows the builder functions to the ones available for an anchor governance transition.
func (*AnchorOutputBuilder) Governor ¶
func (builder *AnchorOutputBuilder) Governor(governor iotago.Address) *AnchorOutputBuilder
Governor sets the iotago.GovernorAddressUnlockCondition of the output.
func (*AnchorOutputBuilder) ImmutableIssuer ¶
func (builder *AnchorOutputBuilder) ImmutableIssuer(issuer iotago.Address) *AnchorOutputBuilder
ImmutableIssuer sets/modifies an iotago.IssuerFeature as an immutable feature on the output. Only call this function on a new iotago.AnchorOutput.
func (*AnchorOutputBuilder) ImmutableMetadata ¶
func (builder *AnchorOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *AnchorOutputBuilder
ImmutableMetadata sets/modifies an iotago.MetadataFeature as an immutable feature on the output. Only call this function on a new iotago.AnchorOutput.
func (*AnchorOutputBuilder) Mana ¶
func (builder *AnchorOutputBuilder) Mana(mana iotago.Mana) *AnchorOutputBuilder
Mana sets the mana of the output.
func (*AnchorOutputBuilder) Metadata ¶
func (builder *AnchorOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *AnchorOutputBuilder
Metadata sets/modifies an iotago.MetadataFeature on the output.
func (*AnchorOutputBuilder) MustBuild ¶
func (builder *AnchorOutputBuilder) MustBuild() *iotago.AnchorOutput
MustBuild works like Build() but panics if an error is encountered.
func (*AnchorOutputBuilder) StateController ¶
func (builder *AnchorOutputBuilder) StateController(stateCtrl iotago.Address) *AnchorOutputBuilder
StateController sets the iotago.StateControllerAddressUnlockCondition of the output.
func (*AnchorOutputBuilder) StateMetadata ¶
func (builder *AnchorOutputBuilder) StateMetadata(entries iotago.StateMetadataFeatureEntries) *AnchorOutputBuilder
StateMetadata sets/modifies an iotago.StateMetadataFeature on the output.
func (*AnchorOutputBuilder) StateTransition ¶
func (builder *AnchorOutputBuilder) StateTransition() *AnchorStateTransition
StateTransition narrows the builder functions to the ones available for an anchor state transition.
type AnchorStateTransition ¶
type AnchorStateTransition struct {
// contains filtered or unexported fields
}
func (*AnchorStateTransition) Amount ¶
func (trans *AnchorStateTransition) Amount(amount iotago.BaseToken) *AnchorStateTransition
Amount sets the base token amount of the output.
func (*AnchorStateTransition) Builder ¶
func (trans *AnchorStateTransition) Builder() *AnchorOutputBuilder
Builder returns the AnchorOutputBuilder.
func (*AnchorStateTransition) Mana ¶
func (trans *AnchorStateTransition) Mana(mana iotago.Mana) *AnchorStateTransition
Mana sets the mana of the output.
func (*AnchorStateTransition) StateMetadata ¶
func (trans *AnchorStateTransition) StateMetadata(entries iotago.StateMetadataFeatureEntries) *AnchorStateTransition
StateMetadata sets/modifies an iotago.StateMetadataFeature on the output.
type AvailableManaResult ¶
type AvailableManaResult struct { TotalMana iotago.Mana UnboundMana iotago.Mana PotentialMana iotago.Mana StoredMana iotago.Mana UnboundPotentialMana iotago.Mana UnboundStoredMana iotago.Mana AccountBoundMana map[iotago.AccountID]iotago.Mana Rewards iotago.Mana }
func (*AvailableManaResult) AddAccountBoundMana ¶
func (*AvailableManaResult) AddPotentialMana ¶
func (a *AvailableManaResult) AddPotentialMana(value iotago.Mana) error
func (*AvailableManaResult) AddRewards ¶
func (a *AvailableManaResult) AddRewards(value iotago.Mana) error
func (*AvailableManaResult) AddStoredMana ¶
func (a *AvailableManaResult) AddStoredMana(value iotago.Mana) error
func (*AvailableManaResult) AddUnboundPotentialMana ¶
func (a *AvailableManaResult) AddUnboundPotentialMana(value iotago.Mana) error
func (*AvailableManaResult) AddUnboundStoredMana ¶
func (a *AvailableManaResult) AddUnboundStoredMana(value iotago.Mana) error
type BasicBlockBuilder ¶
type BasicBlockBuilder struct {
// contains filtered or unexported fields
}
BasicBlockBuilder is used to easily build up a Basic Block.
func NewBasicBlockBuilder ¶
func NewBasicBlockBuilder(api iotago.API) *BasicBlockBuilder
NewBasicBlockBuilder creates a new BasicBlockBuilder.
func (*BasicBlockBuilder) Build ¶
func (b *BasicBlockBuilder) Build() (*iotago.Block, error)
Build builds the Block or returns any error which occurred during the build steps.
func (*BasicBlockBuilder) CalculateAndSetMaxBurnedMana ¶
func (b *BasicBlockBuilder) CalculateAndSetMaxBurnedMana(rmc iotago.Mana) *BasicBlockBuilder
CalculateAndSetMaxBurnedMana sets the maximum amount of mana allowed to be burned by the block based on the provided reference mana cost.
func (*BasicBlockBuilder) IssuingTime ¶
func (b *BasicBlockBuilder) IssuingTime(time time.Time) *BasicBlockBuilder
func (*BasicBlockBuilder) LatestFinalizedSlot ¶
func (b *BasicBlockBuilder) LatestFinalizedSlot(slot iotago.SlotIndex) *BasicBlockBuilder
LatestFinalizedSlot sets the latest finalized slot.
func (*BasicBlockBuilder) MaxBurnedMana ¶
func (b *BasicBlockBuilder) MaxBurnedMana(maxBurnedMana iotago.Mana) *BasicBlockBuilder
MaxBurnedMana sets the maximum amount of mana allowed to be burned by the block.
func (*BasicBlockBuilder) Payload ¶
func (b *BasicBlockBuilder) Payload(payload iotago.ApplicationPayload) *BasicBlockBuilder
Payload sets the payload.
func (*BasicBlockBuilder) ProtocolVersion ¶
func (b *BasicBlockBuilder) ProtocolVersion(version iotago.Version) *BasicBlockBuilder
ProtocolVersion sets the protocol version.
func (*BasicBlockBuilder) ShallowLikeParents ¶
func (b *BasicBlockBuilder) ShallowLikeParents(parents iotago.BlockIDs) *BasicBlockBuilder
ShallowLikeParents sets the shallow like parents.
func (*BasicBlockBuilder) Sign ¶
func (b *BasicBlockBuilder) Sign(accountID iotago.AccountID, privKey ed25519.PrivateKey) *BasicBlockBuilder
func (*BasicBlockBuilder) SignWithSigner ¶
func (b *BasicBlockBuilder) SignWithSigner(accountID iotago.AccountID, signer iotago.AddressSigner, addr iotago.Address) *BasicBlockBuilder
func (*BasicBlockBuilder) SlotCommitmentID ¶
func (b *BasicBlockBuilder) SlotCommitmentID(commitment iotago.CommitmentID) *BasicBlockBuilder
SlotCommitmentID sets the slot commitment.
func (*BasicBlockBuilder) StrongParents ¶
func (b *BasicBlockBuilder) StrongParents(parents iotago.BlockIDs) *BasicBlockBuilder
StrongParents sets the strong parents.
func (*BasicBlockBuilder) WeakParents ¶
func (b *BasicBlockBuilder) WeakParents(parents iotago.BlockIDs) *BasicBlockBuilder
WeakParents sets the weak parents.
type BasicOutputBuilder ¶
type BasicOutputBuilder struct {
// contains filtered or unexported fields
}
BasicOutputBuilder builds an iotago.BasicOutput.
func NewBasicOutputBuilder ¶
func NewBasicOutputBuilder(targetAddr iotago.Address, amount iotago.BaseToken) *BasicOutputBuilder
NewBasicOutputBuilder creates a new BasicOutputBuilder with the required target address and base token amount.
func NewBasicOutputBuilderFromPrevious ¶
func NewBasicOutputBuilderFromPrevious(previous *iotago.BasicOutput) *BasicOutputBuilder
NewBasicOutputBuilderFromPrevious creates a new BasicOutputBuilder starting from a copy of the previous iotago.BasicOutput.
func (*BasicOutputBuilder) Address ¶
func (builder *BasicOutputBuilder) Address(addr iotago.Address) *BasicOutputBuilder
Address sets/modifies an iotago.AddressUnlockCondition on the output.
func (*BasicOutputBuilder) Amount ¶
func (builder *BasicOutputBuilder) Amount(amount iotago.BaseToken) *BasicOutputBuilder
Amount sets the base token amount of the output.
func (*BasicOutputBuilder) Build ¶
func (builder *BasicOutputBuilder) Build() (*iotago.BasicOutput, error)
Build builds the iotago.BasicOutput.
func (*BasicOutputBuilder) Expiration ¶
func (builder *BasicOutputBuilder) Expiration(returnAddr iotago.Address, expiredAfterSlot iotago.SlotIndex) *BasicOutputBuilder
Expiration sets/modifies an iotago.ExpirationUnlockCondition on the output.
func (*BasicOutputBuilder) Mana ¶
func (builder *BasicOutputBuilder) Mana(mana iotago.Mana) *BasicOutputBuilder
Mana sets the mana of the output.
func (*BasicOutputBuilder) Metadata ¶
func (builder *BasicOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *BasicOutputBuilder
Metadata sets/modifies an iotago.MetadataFeature on the output.
func (*BasicOutputBuilder) MustBuild ¶
func (builder *BasicOutputBuilder) MustBuild() *iotago.BasicOutput
MustBuild works like Build() but panics if an error is encountered.
func (*BasicOutputBuilder) NativeToken ¶
func (builder *BasicOutputBuilder) NativeToken(nt *iotago.NativeTokenFeature) *BasicOutputBuilder
NativeToken adds/modifies a native token to/on the output.
func (*BasicOutputBuilder) Sender ¶
func (builder *BasicOutputBuilder) Sender(senderAddr iotago.Address) *BasicOutputBuilder
Sender sets/modifies an iotago.SenderFeature on the output.
func (*BasicOutputBuilder) StorageDepositReturn ¶
func (builder *BasicOutputBuilder) StorageDepositReturn(returnAddr iotago.Address, amount iotago.BaseToken) *BasicOutputBuilder
StorageDepositReturn sets/modifies an iotago.StorageDepositReturnUnlockCondition on the output.
func (*BasicOutputBuilder) Tag ¶
func (builder *BasicOutputBuilder) Tag(tag []byte) *BasicOutputBuilder
Tag sets/modifies an iotago.TagFeature on the output.
func (*BasicOutputBuilder) Timelock ¶
func (builder *BasicOutputBuilder) Timelock(untilSlot iotago.SlotIndex) *BasicOutputBuilder
Timelock sets/modifies an iotago.TimelockUnlockCondition on the output.
type BlockIssuerTransition ¶
type BlockIssuerTransition struct {
// contains filtered or unexported fields
}
func (*BlockIssuerTransition) AddKeys ¶
func (trans *BlockIssuerTransition) AddKeys(keys ...iotago.BlockIssuerKey) *BlockIssuerTransition
AddKeys adds the keys of the BlockIssuerFeature.
func (*BlockIssuerTransition) Builder ¶
func (trans *BlockIssuerTransition) Builder() *AccountOutputBuilder
Builder returns the AccountOutputBuilder.
func (*BlockIssuerTransition) ExpirySlot ¶
func (trans *BlockIssuerTransition) ExpirySlot(slot iotago.SlotIndex) *BlockIssuerTransition
ExpirySlot sets the ExpirySlot of iotago.BlockIssuerFeature.
func (*BlockIssuerTransition) Keys ¶
func (trans *BlockIssuerTransition) Keys(keys iotago.BlockIssuerKeys) *BlockIssuerTransition
Keys sets the keys of the iotago.BlockIssuerFeature.
func (*BlockIssuerTransition) RemoveKey ¶
func (trans *BlockIssuerTransition) RemoveKey(keyToDelete iotago.BlockIssuerKey) *BlockIssuerTransition
RemoveKey deletes the key of the iotago.BlockIssuerFeature.
type DelegationOutputBuilder ¶
type DelegationOutputBuilder struct {
// contains filtered or unexported fields
}
DelegationOutputBuilder builds an iotago.DelegationOutput.
func NewDelegationOutputBuilder ¶
func NewDelegationOutputBuilder(validatorAddress *iotago.AccountAddress, addr iotago.Address, amount iotago.BaseToken) *DelegationOutputBuilder
NewDelegationOutputBuilder creates a new DelegationOutputBuilder with the account address, serial number, token scheme and base token amount.
func NewDelegationOutputBuilderFromPrevious ¶
func NewDelegationOutputBuilderFromPrevious(previous *iotago.DelegationOutput) *DelegationOutputBuilder
NewDelegationOutputBuilderFromPrevious creates a new DelegationOutputBuilder starting from a copy of the previous iotago.DelegationOutput.
func (*DelegationOutputBuilder) Address ¶
func (builder *DelegationOutputBuilder) Address(addr iotago.Address) *DelegationOutputBuilder
Address sets/modifies an iotago.AddressUnlockCondition on the output.
func (*DelegationOutputBuilder) Amount ¶
func (builder *DelegationOutputBuilder) Amount(amount iotago.BaseToken) *DelegationOutputBuilder
Amount sets the base token amount of the output.
func (*DelegationOutputBuilder) Build ¶
func (builder *DelegationOutputBuilder) Build() (*iotago.DelegationOutput, error)
Build builds the iotago.DelegationOutput.
func (*DelegationOutputBuilder) DelegatedAmount ¶
func (builder *DelegationOutputBuilder) DelegatedAmount(delegatedAmount iotago.BaseToken) *DelegationOutputBuilder
DelegatedAmount sets the delegated amount of the output.
func (*DelegationOutputBuilder) DelegationID ¶
func (builder *DelegationOutputBuilder) DelegationID(delegationID iotago.DelegationID) *DelegationOutputBuilder
DelegationID sets the delegation ID of the output.
func (*DelegationOutputBuilder) EndEpoch ¶
func (builder *DelegationOutputBuilder) EndEpoch(endEpoch iotago.EpochIndex) *DelegationOutputBuilder
EndEpoch sets the delegation end epoch.
func (*DelegationOutputBuilder) MustBuild ¶
func (builder *DelegationOutputBuilder) MustBuild() *iotago.DelegationOutput
MustBuild works like Build() but panics if an error is encountered.
func (*DelegationOutputBuilder) StartEpoch ¶
func (builder *DelegationOutputBuilder) StartEpoch(startEpoch iotago.EpochIndex) *DelegationOutputBuilder
StartEpoch sets the delegation start epoch.
func (*DelegationOutputBuilder) ValidatorAddress ¶
func (builder *DelegationOutputBuilder) ValidatorAddress(validatorAddress *iotago.AccountAddress) *DelegationOutputBuilder
ValidatorAddress sets the validator address of the output.
type FoundryOutputBuilder ¶
type FoundryOutputBuilder struct {
// contains filtered or unexported fields
}
FoundryOutputBuilder builds an iotago.FoundryOutput.
func NewFoundryOutputBuilder ¶
func NewFoundryOutputBuilder(accountAddr *iotago.AccountAddress, amount iotago.BaseToken, serialNumber uint32, tokenScheme iotago.TokenScheme) *FoundryOutputBuilder
NewFoundryOutputBuilder creates a new FoundryOutputBuilder with the account address, serial number, token scheme and base token amount.
func NewFoundryOutputBuilderFromPrevious ¶
func NewFoundryOutputBuilderFromPrevious(previous *iotago.FoundryOutput) *FoundryOutputBuilder
NewFoundryOutputBuilderFromPrevious creates a new FoundryOutputBuilder starting from a copy of the previous iotago.FoundryOutput.
func (*FoundryOutputBuilder) Amount ¶
func (builder *FoundryOutputBuilder) Amount(amount iotago.BaseToken) *FoundryOutputBuilder
Amount sets the base token amount of the output.
func (*FoundryOutputBuilder) Build ¶
func (builder *FoundryOutputBuilder) Build() (*iotago.FoundryOutput, error)
Build builds the iotago.FoundryOutput.
func (*FoundryOutputBuilder) ImmutableMetadata ¶
func (builder *FoundryOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *FoundryOutputBuilder
ImmutableMetadata sets/modifies an iotago.MetadataFeature as an immutable feature on the output. Only call this function on a new iotago.FoundryOutput.
func (*FoundryOutputBuilder) Metadata ¶
func (builder *FoundryOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *FoundryOutputBuilder
Metadata sets/modifies an iotago.MetadataFeature on the output.
func (*FoundryOutputBuilder) MustBuild ¶
func (builder *FoundryOutputBuilder) MustBuild() *iotago.FoundryOutput
MustBuild works like Build() but panics if an error is encountered.
func (*FoundryOutputBuilder) NativeToken ¶
func (builder *FoundryOutputBuilder) NativeToken(nt *iotago.NativeTokenFeature) *FoundryOutputBuilder
NativeToken adds/modifies a native token to/on the output.
func (*FoundryOutputBuilder) TokenScheme ¶
func (builder *FoundryOutputBuilder) TokenScheme(tokenScheme iotago.TokenScheme) *FoundryOutputBuilder
type NFTOutputBuilder ¶
type NFTOutputBuilder struct {
// contains filtered or unexported fields
}
NFTOutputBuilder builds an iotago.NFTOutput.
func NewNFTOutputBuilder ¶
func NewNFTOutputBuilder(targetAddr iotago.Address, amount iotago.BaseToken) *NFTOutputBuilder
NewNFTOutputBuilder creates a new NFTOutputBuilder with the address and base token amount.
func NewNFTOutputBuilderFromPrevious ¶
func NewNFTOutputBuilderFromPrevious(previous *iotago.NFTOutput) *NFTOutputBuilder
NewNFTOutputBuilderFromPrevious creates a new NFTOutputBuilder starting from a copy of the previous iotago.NFTOutput.
func (*NFTOutputBuilder) Address ¶
func (builder *NFTOutputBuilder) Address(addr iotago.Address) *NFTOutputBuilder
Address sets/modifies an iotago.AddressUnlockCondition on the output.
func (*NFTOutputBuilder) Amount ¶
func (builder *NFTOutputBuilder) Amount(amount iotago.BaseToken) *NFTOutputBuilder
Amount sets the base token amount of the output.
func (*NFTOutputBuilder) Build ¶
func (builder *NFTOutputBuilder) Build() (*iotago.NFTOutput, error)
Build builds the iotago.FoundryOutput.
func (*NFTOutputBuilder) Expiration ¶
func (builder *NFTOutputBuilder) Expiration(returnAddr iotago.Address, expiredAfterSlot iotago.SlotIndex) *NFTOutputBuilder
Expiration sets/modifies an iotago.ExpirationUnlockCondition on the output.
func (*NFTOutputBuilder) ImmutableIssuer ¶
func (builder *NFTOutputBuilder) ImmutableIssuer(issuer iotago.Address) *NFTOutputBuilder
ImmutableIssuer sets/modifies an iotago.IssuerFeature as an immutable feature on the output. Only call this function on a new iotago.NFTOutput.
func (*NFTOutputBuilder) ImmutableMetadata ¶
func (builder *NFTOutputBuilder) ImmutableMetadata(entries iotago.MetadataFeatureEntries) *NFTOutputBuilder
ImmutableMetadata sets/modifies an iotago.MetadataFeature as an immutable feature on the output. Only call this function on a new iotago.NFTOutput.
func (*NFTOutputBuilder) Mana ¶
func (builder *NFTOutputBuilder) Mana(mana iotago.Mana) *NFTOutputBuilder
Amount sets the mana of the output.
func (*NFTOutputBuilder) Metadata ¶
func (builder *NFTOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *NFTOutputBuilder
Metadata sets/modifies an iotago.MetadataFeature on the output.
func (*NFTOutputBuilder) MustBuild ¶
func (builder *NFTOutputBuilder) MustBuild() *iotago.NFTOutput
MustBuild works like Build() but panics if an error is encountered.
func (*NFTOutputBuilder) NFTID ¶
func (builder *NFTOutputBuilder) NFTID(nftID iotago.NFTID) *NFTOutputBuilder
NFTID sets the iotago.NFTID of this output. Do not call this function if the underlying iotago.NFTID is not new.
func (*NFTOutputBuilder) Sender ¶
func (builder *NFTOutputBuilder) Sender(senderAddr iotago.Address) *NFTOutputBuilder
Sender sets/modifies an iotago.SenderFeature on the output.
func (*NFTOutputBuilder) StorageDepositReturn ¶
func (builder *NFTOutputBuilder) StorageDepositReturn(returnAddr iotago.Address, amount iotago.BaseToken) *NFTOutputBuilder
StorageDepositReturn sets/modifies an iotago.StorageDepositReturnUnlockCondition on the output.
func (*NFTOutputBuilder) Tag ¶
func (builder *NFTOutputBuilder) Tag(tag []byte) *NFTOutputBuilder
Tag sets/modifies an iotago.TagFeature on the output.
func (*NFTOutputBuilder) Timelock ¶
func (builder *NFTOutputBuilder) Timelock(untilSlot iotago.SlotIndex) *NFTOutputBuilder
Timelock sets/modifies an iotago.TimelockUnlockCondition on the output.
type StakingTransition ¶
type StakingTransition struct {
// contains filtered or unexported fields
}
func (*StakingTransition) Builder ¶
func (trans *StakingTransition) Builder() *AccountOutputBuilder
Builder returns the AccountOutputBuilder.
func (*StakingTransition) EndEpoch ¶
func (trans *StakingTransition) EndEpoch(epoch iotago.EpochIndex) *StakingTransition
EndEpoch sets the EndEpoch of iotago.StakingFeature.
func (*StakingTransition) FixedCost ¶
func (trans *StakingTransition) FixedCost(fixedCost iotago.Mana) *StakingTransition
FixedCost sets the FixedCost of iotago.StakingFeature.
func (*StakingTransition) StakedAmount ¶
func (trans *StakingTransition) StakedAmount(amount iotago.BaseToken) *StakingTransition
StakedAmount sets the StakedAmount of iotago.StakingFeature.
func (*StakingTransition) StartEpoch ¶
func (trans *StakingTransition) StartEpoch(epoch iotago.EpochIndex) *StakingTransition
StartEpoch sets the StartEpoch of iotago.StakingFeature.
type TransactionBuilder ¶
type TransactionBuilder struct {
// contains filtered or unexported fields
}
TransactionBuilder is used to easily build up a SignedTransaction.
func NewTransactionBuilder ¶
func NewTransactionBuilder(api iotago.API, signer iotago.AddressSigner) *TransactionBuilder
NewTransactionBuilder creates a new TransactionBuilder.
func (*TransactionBuilder) AddBlockIssuanceCreditInput ¶
func (b *TransactionBuilder) AddBlockIssuanceCreditInput(blockIssuanceCreditInput *iotago.BlockIssuanceCreditInput) *TransactionBuilder
AddBlockIssuanceCreditInput adds the given block issuance credit input to the builder.
func (*TransactionBuilder) AddCommitmentInput ¶
func (b *TransactionBuilder) AddCommitmentInput(commitmentInput *iotago.CommitmentInput) *TransactionBuilder
AddCommitmentInput adds the given commitment input to the builder.
func (*TransactionBuilder) AddInput ¶
func (b *TransactionBuilder) AddInput(input *TxInput) *TransactionBuilder
AddInput adds the given input to the builder.
func (*TransactionBuilder) AddOutput ¶
func (b *TransactionBuilder) AddOutput(output iotago.Output) *TransactionBuilder
AddOutput adds the given output to the builder.
func (*TransactionBuilder) AddRewardInput ¶
func (b *TransactionBuilder) AddRewardInput(rewardInput *iotago.RewardInput, mana iotago.Mana) *TransactionBuilder
AddRewardInput adds the given reward input to the builder.
func (*TransactionBuilder) AddTaggedDataPayload ¶
func (b *TransactionBuilder) AddTaggedDataPayload(payload *iotago.TaggedData) *TransactionBuilder
AddTaggedDataPayload adds the given TaggedData as the inner payload.
func (*TransactionBuilder) AllotAllMana ¶
func (b *TransactionBuilder) AllotAllMana(targetSlot iotago.SlotIndex, accountID iotago.AccountID, minRequiredMana iotago.Mana) *TransactionBuilder
AllotAllMana allots all remaining account bound mana to the accounts, as well as the remaining unbound mana to the given account. It checks if at least the given "minRequiredMana" was allotted to the given account.
func (*TransactionBuilder) AllotMinRequiredManaAndStoreRemainingManaInOutput ¶
func (b *TransactionBuilder) AllotMinRequiredManaAndStoreRemainingManaInOutput(targetSlot iotago.SlotIndex, rmc iotago.Mana, blockIssuerAccountID iotago.AccountID, storedManaOutputIndex int) *TransactionBuilder
AllotMinRequiredManaAndStoreRemainingManaInOutput allots the minimum required mana needed to issue a block to the block issuer account and moves the remaining unbound mana to stored mana on the specified output index as well as it's account bound mana if available and if the output belongs to an account. The remaining account bound mana is allotted to the respective accounts.
func (*TransactionBuilder) AllotRemainingAccountBoundMana ¶
func (b *TransactionBuilder) AllotRemainingAccountBoundMana(targetSlot iotago.SlotIndex, onAllotment func(iotago.AccountID, iotago.Mana), ignoreAccountIDs ...iotago.AccountID) *TransactionBuilder
AllotRemainingAccountBoundMana allots all remaining account bound mana to the accounts, except the ignored accounts.
func (*TransactionBuilder) Build ¶
func (b *TransactionBuilder) Build() (*iotago.SignedTransaction, error)
Build signs the transaction essence and returns the built payload.
func (*TransactionBuilder) BuildAndSwapToBlockBuilder ¶
func (b *TransactionBuilder) BuildAndSwapToBlockBuilder(txFunc TransactionFunc) *BasicBlockBuilder
BuildAndSwapToBlockBuilder builds the transaction and then swaps to a BasicBlockBuilder with the transaction set as its payload. txFunc can be nil.
func (*TransactionBuilder) CalculateAvailableManaInputs ¶
func (b *TransactionBuilder) CalculateAvailableManaInputs(targetSlot iotago.SlotIndex) (*AvailableManaResult, error)
CalculateAvailableManaInputs calculates the available mana on the input side including mana generation and decay and the rewards.
func (*TransactionBuilder) CalculateAvailableManaRemaining ¶
func (b *TransactionBuilder) CalculateAvailableManaRemaining(targetSlot iotago.SlotIndex) (*AvailableManaResult, error)
CalculateAvailableManaRemaining calculates the available mana on the input side, subtracts all the mana on the output side and on the allotments and returns the remaining mana. It takes the account bound mana into consideration. It will return an error if there is not enough mana available.
func (*TransactionBuilder) Clone ¶
func (b *TransactionBuilder) Clone() *TransactionBuilder
func (*TransactionBuilder) CreationSlot ¶
func (b *TransactionBuilder) CreationSlot() iotago.SlotIndex
func (*TransactionBuilder) IncreaseAllotment ¶
func (b *TransactionBuilder) IncreaseAllotment(accountID iotago.AccountID, value iotago.Mana) *TransactionBuilder
IncreaseAllotment adds or increases the given allotment to the builder.
func (*TransactionBuilder) MinRequiredAllottedMana ¶
func (b *TransactionBuilder) MinRequiredAllottedMana(rmc iotago.Mana, blockIssuerAccountID iotago.AccountID) (iotago.Mana, error)
MinRequiredAllottedMana returns the minimum allotted mana required to issue a Block with the transaction payload from the builder and 1 allotment for the block issuer.
func (*TransactionBuilder) SetCreationSlot ¶
func (b *TransactionBuilder) SetCreationSlot(creationSlot iotago.SlotIndex) *TransactionBuilder
func (*TransactionBuilder) StoreRemainingManaInOutputAndAllotRemainingAccountBoundMana ¶
func (b *TransactionBuilder) StoreRemainingManaInOutputAndAllotRemainingAccountBoundMana(targetSlot iotago.SlotIndex, storedManaOutputIndex int) *TransactionBuilder
StoreRemainingManaInOutputAndAllotRemainingAccountBoundMana moves the remaining unbound mana to stored mana on the specified output index as well as it's account bound mana if available and if the output belongs to an account. The remaining account bound mana is allotted to the respective accounts.
func (*TransactionBuilder) WithTransactionCapabilities ¶
func (b *TransactionBuilder) WithTransactionCapabilities(capabilities iotago.TransactionCapabilitiesBitMask) *TransactionBuilder
WithTransactionCapabilities sets the capabilities of the transaction.
type TransactionBuilderInputFilter ¶
TransactionBuilderInputFilter is a filter function which determines whether an input should be used or not. (returning true = pass). The filter can also be used to accumulate data over the set of inputs, i.e. the input sum etc.
type TransactionFunc ¶
type TransactionFunc func(tx *iotago.SignedTransaction)
TransactionFunc is a function which receives a SignedTransaction as its parameter.
type TxInput ¶
type TxInput struct { // The address which needs to be unlocked to spend this input. UnlockTarget iotago.Address `json:"address"` // The ID of the referenced input. InputID iotago.OutputID `json:"inputId"` // The output which is used as an input. Input iotago.Output `json:"input"` }
TxInput defines an input with the address to unlock.
type ValidationBlockBuilder ¶
type ValidationBlockBuilder struct {
// contains filtered or unexported fields
}
ValidationBlockBuilder is used to easily build up a Validation Block.
func NewValidationBlockBuilder ¶
func NewValidationBlockBuilder(api iotago.API) *ValidationBlockBuilder
NewValidationBlockBuilder creates a new ValidationBlockBuilder.
func (*ValidationBlockBuilder) Build ¶
func (v *ValidationBlockBuilder) Build() (*iotago.Block, error)
Build builds the Block or returns any error which occurred during the build steps.
func (*ValidationBlockBuilder) HighestSupportedVersion ¶
func (v *ValidationBlockBuilder) HighestSupportedVersion(highestSupportedVersion iotago.Version) *ValidationBlockBuilder
HighestSupportedVersion sets the highest supported version.
func (*ValidationBlockBuilder) IssuingTime ¶
func (v *ValidationBlockBuilder) IssuingTime(time time.Time) *ValidationBlockBuilder
func (*ValidationBlockBuilder) LatestFinalizedSlot ¶
func (v *ValidationBlockBuilder) LatestFinalizedSlot(slot iotago.SlotIndex) *ValidationBlockBuilder
LatestFinalizedSlot sets the latest finalized slot.
func (*ValidationBlockBuilder) ProtocolParametersHash ¶
func (v *ValidationBlockBuilder) ProtocolParametersHash(hash iotago.Identifier) *ValidationBlockBuilder
ProtocolParametersHash sets the ProtocolParametersHash of the highest supported version.
func (*ValidationBlockBuilder) ProtocolVersion ¶
func (v *ValidationBlockBuilder) ProtocolVersion(version iotago.Version) *ValidationBlockBuilder
ProtocolVersion sets the protocol version.
func (*ValidationBlockBuilder) ShallowLikeParents ¶
func (v *ValidationBlockBuilder) ShallowLikeParents(parents iotago.BlockIDs) *ValidationBlockBuilder
ShallowLikeParents sets the shallow like parents.
func (*ValidationBlockBuilder) Sign ¶
func (v *ValidationBlockBuilder) Sign(accountID iotago.AccountID, privKey ed25519.PrivateKey) *ValidationBlockBuilder
func (*ValidationBlockBuilder) SignWithSigner ¶
func (v *ValidationBlockBuilder) SignWithSigner(accountID iotago.AccountID, signer iotago.AddressSigner, addr iotago.Address) *ValidationBlockBuilder
func (*ValidationBlockBuilder) SlotCommitmentID ¶
func (v *ValidationBlockBuilder) SlotCommitmentID(commitmentID iotago.CommitmentID) *ValidationBlockBuilder
SlotCommitmentID sets the slot commitment.
func (*ValidationBlockBuilder) StrongParents ¶
func (v *ValidationBlockBuilder) StrongParents(parents iotago.BlockIDs) *ValidationBlockBuilder
StrongParents sets the strong parents.
func (*ValidationBlockBuilder) WeakParents ¶
func (v *ValidationBlockBuilder) WeakParents(parents iotago.BlockIDs) *ValidationBlockBuilder
WeakParents sets the weak parents.