Documentation ¶
Index ¶
- Constants
- Variables
- func AccountConversionManaCost(protocolParameters iotago.ProtocolParameters) iotago.Mana
- func MaxBlockManaCost(protocolParameters iotago.ProtocolParameters) iotago.Mana
- func MinDelegationAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
- func MinIssuerAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
- func MinValidatorAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
- func RegisterIDAlias(id peer.ID, alias string)
- func UnregisterIDAliases()
- func WithAccountAmount(amount iotago.BaseToken) options.Option[builder.AccountOutputBuilder]
- func WithAccountConditions(conditions iotago.AccountOutputUnlockConditions) options.Option[builder.AccountOutputBuilder]
- func WithAccountImmutableFeatures(features iotago.AccountOutputImmFeatures) options.Option[builder.AccountOutputBuilder]
- func WithAccountIncreasedFoundryCounter(diff uint32) options.Option[builder.AccountOutputBuilder]
- func WithAccountInput(input *utxoledger.Output) options.Option[builder.TransactionBuilder]
- func WithAccountMana(mana iotago.Mana) options.Option[builder.AccountOutputBuilder]
- func WithAddBlockIssuerKey(key iotago.BlockIssuerKey) options.Option[builder.AccountOutputBuilder]
- func WithAllotAllManaToAccount(slot iotago.SlotIndex, accountID iotago.AccountID) options.Option[builder.TransactionBuilder]
- func WithAllotments(allotments iotago.Allotments) options.Option[builder.TransactionBuilder]
- func WithBasicBlockHeader(opts ...options.Option[BlockHeaderParams]) func(builder *BasicBlockParams)
- func WithBlockIssuanceCreditInput(input *iotago.BlockIssuanceCreditInput) options.Option[builder.TransactionBuilder]
- func WithBlockIssuerExpirySlot(expirySlot iotago.SlotIndex) options.Option[builder.AccountOutputBuilder]
- func WithBlockIssuerFeature(keys iotago.BlockIssuerKeys, expirySlot iotago.SlotIndex) options.Option[builder.AccountOutputBuilder]
- func WithBlockIssuerKeys(keys iotago.BlockIssuerKeys) options.Option[builder.AccountOutputBuilder]
- func WithCommitmentInput(input *iotago.CommitmentInput) options.Option[builder.TransactionBuilder]
- func WithCreationSlot(creationSlot iotago.SlotIndex) options.Option[builder.TransactionBuilder]
- func WithDelegatedAmount(delegatedAmount iotago.BaseToken) options.Option[builder.DelegationOutputBuilder]
- func WithDelegatedValidatorAddress(validatorAddress *iotago.AccountAddress) options.Option[builder.DelegationOutputBuilder]
- func WithDelegationAmount(amount iotago.BaseToken) options.Option[builder.DelegationOutputBuilder]
- func WithDelegationConditions(delegationConditions iotago.DelegationOutputUnlockConditions) options.Option[builder.DelegationOutputBuilder]
- func WithDelegationEndEpoch(endEpoch iotago.EpochIndex) options.Option[builder.DelegationOutputBuilder]
- func WithDelegationStartEpoch(startEpoch iotago.EpochIndex) options.Option[builder.DelegationOutputBuilder]
- func WithHighestSupportedVersion(highestSupportedVersion iotago.Version) func(builder *ValidationBlockParams)
- func WithIncompleteBlockAccepted(accepted bool) options.Option[BlockIssuer]
- func WithInputs(inputs ...*utxoledger.Output) options.Option[builder.TransactionBuilder]
- func WithIssuer(issuer wallet.Account) func(builder *BlockHeaderParams)
- func WithIssuingTime(issuingTime time.Time) func(builder *BlockHeaderParams)
- func WithLatestFinalizedSlot(commitmentIndex iotago.SlotIndex) func(builder *BlockHeaderParams)
- func WithOutputs(outputs ...iotago.Output) options.Option[builder.TransactionBuilder]
- func WithParentsCount(parentsCount int) func(builder *BlockHeaderParams)
- func WithPayload(payload iotago.Payload) func(builder *BasicBlockParams)
- func WithProtocolParametersHash(protocolParametersHash iotago.Identifier) func(builder *ValidationBlockParams)
- func WithProtocolVersion(version iotago.Version) func(builder *BlockHeaderParams)
- func WithRateSetterEnabled(enabled bool) options.Option[BlockIssuer]
- func WithRewardInput(input *iotago.RewardInput, mana iotago.Mana) options.Option[builder.TransactionBuilder]
- func WithShallowLikeParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
- func WithSkipReferenceValidation(skipReferenceValidation bool) func(builder *BlockHeaderParams)
- func WithSlotCommitment(commitment *iotago.Commitment) func(builder *BlockHeaderParams)
- func WithStakingFeature(amount iotago.BaseToken, fixedCost iotago.Mana, startEpoch iotago.EpochIndex, ...) options.Option[builder.AccountOutputBuilder]
- func WithStrongParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
- func WithTaggedDataPayload(payload *iotago.TaggedData) options.Option[builder.TransactionBuilder]
- func WithTipSelectionRetryInterval(interval time.Duration) options.Option[BlockIssuer]
- func WithTipSelectionTimeout(timeout time.Duration) options.Option[BlockIssuer]
- func WithValidationBlockHeaderOptions(opts ...options.Option[BlockHeaderParams]) func(builder *ValidationBlockParams)
- func WithWeakParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
- func WithoutBlockIssuerFeature() options.Option[builder.AccountOutputBuilder]
- func WithoutStakingFeature() options.Option[builder.AccountOutputBuilder]
- type BasicBlockParams
- type BlockHeaderParams
- type BlockIssuer
- func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Block, node *Node, ...) (iotago.BlockID, error)
- func (i *BlockIssuer) BlockIssuerKey() iotago.BlockIssuerKey
- func (i *BlockIssuer) BlockIssuerKeys() iotago.BlockIssuerKeys
- func (i *BlockIssuer) CopyIdentityFromBlockIssuer(otherBlockIssuer *BlockIssuer)
- func (i *BlockIssuer) CreateBasicBlock(ctx context.Context, alias string, node *Node, ...) (*blocks.Block, error)
- func (i *BlockIssuer) CreateValidationBlock(ctx context.Context, alias string, issuerAccount wallet.Account, node *Node, ...) (*blocks.Block, error)
- func (i *BlockIssuer) IssueActivity(ctx context.Context, wg *sync.WaitGroup, startSlot iotago.SlotIndex, ...)
- func (i *BlockIssuer) IssueBasicBlock(ctx context.Context, alias string, node *Node, ...) *blocks.Block
- func (i *BlockIssuer) IssueBlock(block *model.Block, node *Node) error
- func (i *BlockIssuer) IssueBlockAndAwaitEvent(ctx context.Context, block *model.Block, node *Node, ...) error
- func (i *BlockIssuer) IssueValidationBlock(ctx context.Context, alias string, node *Node, ...) *blocks.Block
- func (i *BlockIssuer) Shutdown()
- type Endpoint
- type Events
- type InvalidSignedTransactionEvent
- type Network
- type Node
- func (n *Node) AttachedBlocks() []*blocks.Block
- func (n *Node) CandidateEngineActivatedCount() int
- func (n *Node) FilteredBlocks() []*postsolidfilter.BlockFilteredEvent
- func (n *Node) ForkDetectedCount() int
- func (n *Node) HighestSupportedVersion() iotago.Version
- func (n *Node) Initialize(failOnBlockFiltered bool, opts ...options.Option[protocol.Protocol])
- func (n *Node) IsValidator() bool
- func (n *Node) IssueValidationBlock(ctx context.Context, alias string, ...) *blocks.Block
- func (n *Node) MainEngineSwitchedCount() int
- func (n *Node) ProtocolParametersHash() iotago.Identifier
- func (n *Node) SetCurrentSlot(slot iotago.SlotIndex)
- func (n *Node) SetHighestSupportedVersion(version iotago.Version)
- func (n *Node) SetProtocolParametersHash(hash iotago.Identifier)
- func (n *Node) Shutdown()
- func (n *Node) TransactionFailure(txID iotago.SignedTransactionID) (InvalidSignedTransactionEvent, bool)
- func (n *Node) Wait()
- type ValidationBlockParams
- type Wallet
- func (w *Wallet) AccountOutput(outputName string) *utxoledger.Output
- func (w *Wallet) AddOutput(outputName string, output *utxoledger.Output)
- func (w *Wallet) Address(index ...uint32) iotago.DirectUnlockableAddress
- func (w *Wallet) AddressSigner(indexes ...uint32) iotago.AddressSigner
- func (w *Wallet) AllotManaFromBasicOutput(transactionName string, inputName string, accountIDs ...iotago.AccountID) *iotago.SignedTransaction
- func (w *Wallet) AllotManaFromInputs(transactionName string, allotments iotago.Allotments, inputNames ...string) *iotago.SignedTransaction
- func (w *Wallet) AllotManaToWallet(transactionName string, inputName string, recipientWallet *Wallet) *iotago.SignedTransaction
- func (w *Wallet) Balance() iotago.BaseToken
- func (w *Wallet) BlockIssuerKey() iotago.BlockIssuerKey
- func (w *Wallet) ClaimDelegatorRewards(transactionName string, inputName string) *iotago.SignedTransaction
- func (w *Wallet) ClaimValidatorRewards(transactionName string, inputName string) *iotago.SignedTransaction
- func (w *Wallet) CreateAccountFromInput(transactionName string, inputName string, recipientWallet *Wallet, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateAccountsFromInput(transactionName string, inputName string, outputCount int, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateBasicOutputsAtAddressesFromInput(transactionName string, addressIndexes []uint32, inputName string) *iotago.SignedTransaction
- func (w *Wallet) CreateBasicOutputsEquallyFromInput(transactionName string, outputCount int, inputName string) *iotago.SignedTransaction
- func (w *Wallet) CreateBasicOutputsEquallyFromInputs(transactionName string, inputNames []string, inputAddressIndexes []uint32, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateDelegationFromInput(transactionName string, inputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateFoundryAndNativeTokensFromInput(transactionName string, inputName string, accountName string, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateImplicitAccountFromInput(transactionName string, inputName string, recipientWallet *Wallet) *iotago.SignedTransaction
- func (w *Wallet) CreateNFTFromInput(transactionName string, inputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) CreateNativeTokenFromInput(transactionName string, inputName string, accountOutputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) DelayedClaimingTransition(transactionName string, inputName string, delegationEndEpoch iotago.EpochIndex) *iotago.SignedTransaction
- func (w *Wallet) DelegationEndFromSlot(slot iotago.SlotIndex) iotago.EpochIndex
- func (w *Wallet) DelegationStartFromSlot(slot iotago.SlotIndex) iotago.EpochIndex
- func (w *Wallet) DestroyAccount(transactionName string, inputName string) *iotago.SignedTransaction
- func (w *Wallet) HasAddress(address iotago.Address, index ...uint32) bool
- func (w *Wallet) ImplicitAccountCreationAddress(index ...uint32) *iotago.ImplicitAccountCreationAddress
- func (w *Wallet) IssueBasicBlock(ctx context.Context, blockName string, ...) *blocks.Block
- func (w *Wallet) KeyPair() (ed25519.PrivateKey, ed25519.PublicKey)
- func (w *Wallet) Output(outputName string) *utxoledger.Output
- func (w *Wallet) PotentialMana(api iotago.API, input *utxoledger.Output) iotago.Mana
- func (w *Wallet) RemoveFeatureFromAccount(featureType iotago.FeatureType, transactionName string, inputName string) *iotago.SignedTransaction
- func (w *Wallet) SendFundsFromAccount(transactionName string, accountOutputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) SendFundsToAccount(transactionName string, accountID iotago.AccountID, inputNames ...string) *iotago.SignedTransaction
- func (w *Wallet) SendFundsToWallet(transactionName string, receiverWallet *Wallet, inputNames ...string) *iotago.SignedTransaction
- func (w *Wallet) SetBlockIssuer(accountID iotago.AccountID)
- func (w *Wallet) SetCurrentSlot(slot iotago.SlotIndex)
- func (w *Wallet) SetDefaultNode(node *Node)
- func (w *Wallet) StoredMana(api iotago.API, input *utxoledger.Output) iotago.Mana
- func (w *Wallet) Transaction(alias string) *iotago.Transaction
- func (w *Wallet) TransactionID(alias string) iotago.TransactionID
- func (w *Wallet) Transactions(transactionNames ...string) []*iotago.Transaction
- func (w *Wallet) TransitionAccount(transactionName string, inputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) TransitionAccounts(transactionName string, inputNames []string, ...) *iotago.SignedTransaction
- func (w *Wallet) TransitionFoundry(transactionName string, inputName string, accountName string) *iotago.SignedTransaction
- func (w *Wallet) TransitionImplicitAccountToAccountOutput(transactionName string, inputName string, ...) *iotago.SignedTransaction
- func (w *Wallet) TransitionNFTWithTransactionOpts(transactionName string, inputName string, ...) *iotago.SignedTransaction
Constants ¶
const NetworkMainPartition = "main"
Variables ¶
var ( ErrBlockAttacherInvalidBlock = ierrors.New("invalid block") ErrBlockAttacherAttachingNotPossible = ierrors.New("attaching not possible") ErrBlockAttacherIncompleteBlockNotAllowed = ierrors.New("incomplete block is not allowed on this node") ErrBlockTooRecent = ierrors.New("block is too recent compared to latest commitment") )
var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) { return &Events{ BlockConstructed: event.New1[*model.Block](), BlockIssued: event.New1[*model.Block](), Error: event.New1[error](), } })
NewEvents contains the constructor of the Events object (it is generated by a generic factory).
Functions ¶
func AccountConversionManaCost ¶
func AccountConversionManaCost(protocolParameters iotago.ProtocolParameters) iotago.Mana
TODO: add the correct formula later.
func MaxBlockManaCost ¶
func MaxBlockManaCost(protocolParameters iotago.ProtocolParameters) iotago.Mana
TODO: add the correct formula later.
func MinDelegationAmount ¶
func MinDelegationAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
func MinIssuerAccountAmount ¶
func MinIssuerAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
func MinValidatorAccountAmount ¶
func MinValidatorAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken
func RegisterIDAlias ¶
RegisterIDAlias registers an alias that will modify the String() output of the ID to show a human readable string instead of the base58 encoded version of itself.
func UnregisterIDAliases ¶
func UnregisterIDAliases()
UnregisterIDAliases removes all aliases registered through the RegisterIDAlias function.
func WithAccountAmount ¶
func WithAccountConditions ¶
func WithAccountConditions(conditions iotago.AccountOutputUnlockConditions) options.Option[builder.AccountOutputBuilder]
func WithAccountImmutableFeatures ¶
func WithAccountImmutableFeatures(features iotago.AccountOutputImmFeatures) options.Option[builder.AccountOutputBuilder]
func WithAccountIncreasedFoundryCounter ¶
func WithAccountIncreasedFoundryCounter(diff uint32) options.Option[builder.AccountOutputBuilder]
func WithAccountInput ¶
func WithAccountInput(input *utxoledger.Output) options.Option[builder.TransactionBuilder]
func WithAccountMana ¶
func WithAddBlockIssuerKey ¶
func WithAddBlockIssuerKey(key iotago.BlockIssuerKey) options.Option[builder.AccountOutputBuilder]
func WithAllotments ¶
func WithAllotments(allotments iotago.Allotments) options.Option[builder.TransactionBuilder]
func WithBasicBlockHeader ¶
func WithBasicBlockHeader(opts ...options.Option[BlockHeaderParams]) func(builder *BasicBlockParams)
func WithBlockIssuanceCreditInput ¶
func WithBlockIssuanceCreditInput(input *iotago.BlockIssuanceCreditInput) options.Option[builder.TransactionBuilder]
func WithBlockIssuerFeature ¶
func WithBlockIssuerFeature(keys iotago.BlockIssuerKeys, expirySlot iotago.SlotIndex) options.Option[builder.AccountOutputBuilder]
func WithBlockIssuerKeys ¶
func WithBlockIssuerKeys(keys iotago.BlockIssuerKeys) options.Option[builder.AccountOutputBuilder]
func WithCommitmentInput ¶
func WithCommitmentInput(input *iotago.CommitmentInput) options.Option[builder.TransactionBuilder]
func WithCreationSlot ¶
func WithDelegatedAmount ¶
func WithDelegatedValidatorAddress ¶
func WithDelegatedValidatorAddress(validatorAddress *iotago.AccountAddress) options.Option[builder.DelegationOutputBuilder]
func WithDelegationAmount ¶
func WithDelegationConditions ¶
func WithDelegationConditions(delegationConditions iotago.DelegationOutputUnlockConditions) options.Option[builder.DelegationOutputBuilder]
func WithDelegationEndEpoch ¶
func WithDelegationEndEpoch(endEpoch iotago.EpochIndex) options.Option[builder.DelegationOutputBuilder]
func WithDelegationStartEpoch ¶
func WithDelegationStartEpoch(startEpoch iotago.EpochIndex) options.Option[builder.DelegationOutputBuilder]
func WithHighestSupportedVersion ¶
func WithHighestSupportedVersion(highestSupportedVersion iotago.Version) func(builder *ValidationBlockParams)
func WithIncompleteBlockAccepted ¶
func WithIncompleteBlockAccepted(accepted bool) options.Option[BlockIssuer]
func WithInputs ¶
func WithInputs(inputs ...*utxoledger.Output) options.Option[builder.TransactionBuilder]
func WithIssuer ¶
func WithIssuer(issuer wallet.Account) func(builder *BlockHeaderParams)
func WithIssuingTime ¶
func WithIssuingTime(issuingTime time.Time) func(builder *BlockHeaderParams)
func WithLatestFinalizedSlot ¶
func WithLatestFinalizedSlot(commitmentIndex iotago.SlotIndex) func(builder *BlockHeaderParams)
func WithOutputs ¶
func WithParentsCount ¶
func WithParentsCount(parentsCount int) func(builder *BlockHeaderParams)
func WithPayload ¶
func WithPayload(payload iotago.Payload) func(builder *BasicBlockParams)
func WithProtocolParametersHash ¶
func WithProtocolParametersHash(protocolParametersHash iotago.Identifier) func(builder *ValidationBlockParams)
func WithProtocolVersion ¶
func WithProtocolVersion(version iotago.Version) func(builder *BlockHeaderParams)
func WithRateSetterEnabled ¶
func WithRateSetterEnabled(enabled bool) options.Option[BlockIssuer]
func WithRewardInput ¶
func WithRewardInput(input *iotago.RewardInput, mana iotago.Mana) options.Option[builder.TransactionBuilder]
func WithShallowLikeParents ¶
func WithShallowLikeParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
func WithSkipReferenceValidation ¶
func WithSkipReferenceValidation(skipReferenceValidation bool) func(builder *BlockHeaderParams)
func WithSlotCommitment ¶
func WithSlotCommitment(commitment *iotago.Commitment) func(builder *BlockHeaderParams)
func WithStakingFeature ¶
func WithStakingFeature(amount iotago.BaseToken, fixedCost iotago.Mana, startEpoch iotago.EpochIndex, optEndEpoch ...iotago.EpochIndex) options.Option[builder.AccountOutputBuilder]
func WithStrongParents ¶
func WithStrongParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
func WithTaggedDataPayload ¶
func WithTaggedDataPayload(payload *iotago.TaggedData) options.Option[builder.TransactionBuilder]
func WithTipSelectionRetryInterval ¶
func WithTipSelectionRetryInterval(interval time.Duration) options.Option[BlockIssuer]
func WithTipSelectionTimeout ¶
func WithTipSelectionTimeout(timeout time.Duration) options.Option[BlockIssuer]
func WithValidationBlockHeaderOptions ¶
func WithValidationBlockHeaderOptions(opts ...options.Option[BlockHeaderParams]) func(builder *ValidationBlockParams)
func WithWeakParents ¶
func WithWeakParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams)
func WithoutBlockIssuerFeature ¶
func WithoutBlockIssuerFeature() options.Option[builder.AccountOutputBuilder]
func WithoutStakingFeature ¶
func WithoutStakingFeature() options.Option[builder.AccountOutputBuilder]
Types ¶
type BasicBlockParams ¶
type BasicBlockParams struct { BlockHeader *BlockHeaderParams Payload iotago.Payload }
type BlockHeaderParams ¶
type BlockIssuer ¶
type BlockIssuer struct { Testing *testing.T Name string Validator bool AccountID iotago.AccountID OutputID iotago.OutputID PublicKey ed25519.PublicKey // contains filtered or unexported fields }
BlockIssuer contains logic to create and issue blocks signed by the given account.
func NewBlockIssuer ¶
func NewBlockIssuer(t *testing.T, name string, keyManager *wallet.KeyManager, accountID iotago.AccountID, validator bool, opts ...options.Option[BlockIssuer]) *BlockIssuer
func (*BlockIssuer) AttachBlock ¶
func (*BlockIssuer) BlockIssuerKey ¶
func (i *BlockIssuer) BlockIssuerKey() iotago.BlockIssuerKey
func (*BlockIssuer) BlockIssuerKeys ¶
func (i *BlockIssuer) BlockIssuerKeys() iotago.BlockIssuerKeys
func (*BlockIssuer) CopyIdentityFromBlockIssuer ¶
func (i *BlockIssuer) CopyIdentityFromBlockIssuer(otherBlockIssuer *BlockIssuer)
func (*BlockIssuer) CreateBasicBlock ¶
func (i *BlockIssuer) CreateBasicBlock(ctx context.Context, alias string, node *Node, opts ...options.Option[BasicBlockParams]) (*blocks.Block, error)
CreateBlock creates a new block with the options.
func (*BlockIssuer) CreateValidationBlock ¶
func (*BlockIssuer) IssueActivity ¶
func (*BlockIssuer) IssueBasicBlock ¶
func (i *BlockIssuer) IssueBasicBlock(ctx context.Context, alias string, node *Node, opts ...options.Option[BasicBlockParams]) *blocks.Block
func (*BlockIssuer) IssueBlock ¶
func (i *BlockIssuer) IssueBlock(block *model.Block, node *Node) error
func (*BlockIssuer) IssueBlockAndAwaitEvent ¶
func (i *BlockIssuer) IssueBlockAndAwaitEvent(ctx context.Context, block *model.Block, node *Node, evt *event.Event1[*blocks.Block]) error
IssueBlockAndAwaitEvent submits a block to be processed and waits for the event to be triggered.
func (*BlockIssuer) IssueValidationBlock ¶
func (i *BlockIssuer) IssueValidationBlock(ctx context.Context, alias string, node *Node, opts ...options.Option[ValidationBlockParams]) *blocks.Block
func (*BlockIssuer) Shutdown ¶
func (i *BlockIssuer) Shutdown()
Shutdown shuts down the block issuer.
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func (*Endpoint) LocalPeerID ¶
func (*Endpoint) RegisterProtocol ¶
func (*Endpoint) UnregisterProtocol ¶
func (e *Endpoint) UnregisterProtocol()
type Events ¶
type Events struct { // Fired when a block is built. BlockConstructed *event.Event1[*model.Block] // Triggered when a block is issued, i.e. sent to the protocol to be processed. BlockIssued *event.Event1[*model.Block] // Fired when an error occurred. Error *event.Event1[error] event.Group[Events, *Events] }
Events represents events happening on a block factory.
type InvalidSignedTransactionEvent ¶
type InvalidSignedTransactionEvent struct { Metadata mempool.SignedTransactionMetadata Error error }
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func NewNetwork ¶
func NewNetwork() *Network
func (*Network) JoinWithEndpoint ¶
func (*Network) JoinWithEndpointID ¶
func (*Network) MergePartitionsToMain ¶
type Node ¶
type Node struct { Testing *testing.T Name string Validator *BlockIssuer KeyManager *wallet.KeyManager PeerID peer.ID Partition string Endpoint *Endpoint Workers *workerpool.Group Protocol *protocol.Protocol // contains filtered or unexported fields }
func (*Node) AttachedBlocks ¶
func (*Node) CandidateEngineActivatedCount ¶
func (*Node) FilteredBlocks ¶
func (n *Node) FilteredBlocks() []*postsolidfilter.BlockFilteredEvent
func (*Node) ForkDetectedCount ¶
func (*Node) HighestSupportedVersion ¶
func (*Node) Initialize ¶
func (*Node) IsValidator ¶
func (*Node) IssueValidationBlock ¶
func (*Node) MainEngineSwitchedCount ¶
func (*Node) ProtocolParametersHash ¶
func (n *Node) ProtocolParametersHash() iotago.Identifier
func (*Node) SetCurrentSlot ¶
func (*Node) SetHighestSupportedVersion ¶
func (*Node) SetProtocolParametersHash ¶
func (n *Node) SetProtocolParametersHash(hash iotago.Identifier)
func (*Node) TransactionFailure ¶
func (n *Node) TransactionFailure(txID iotago.SignedTransactionID) (InvalidSignedTransactionEvent, bool)
type ValidationBlockParams ¶
type ValidationBlockParams struct { BlockHeader *BlockHeaderParams HighestSupportedVersion *iotago.Version ProtocolParametersHash *iotago.Identifier }
type Wallet ¶
type Wallet struct { Testing *testing.T Name string Node *Node BlockIssuer *BlockIssuer // contains filtered or unexported fields }
Wallet is an object representing a wallet (similar to a FireFly wallet) capable of the following: - hierarchical deterministic key management - signing transactions - signing blocks - keeping track of unspent outputs.
func (*Wallet) AccountOutput ¶
func (w *Wallet) AccountOutput(outputName string) *utxoledger.Output
func (*Wallet) AddressSigner ¶
func (w *Wallet) AddressSigner(indexes ...uint32) iotago.AddressSigner
func (*Wallet) AllotManaFromBasicOutput ¶
func (*Wallet) AllotManaFromInputs ¶
func (w *Wallet) AllotManaFromInputs(transactionName string, allotments iotago.Allotments, inputNames ...string) *iotago.SignedTransaction
func (*Wallet) AllotManaToWallet ¶
func (*Wallet) BlockIssuerKey ¶
func (w *Wallet) BlockIssuerKey() iotago.BlockIssuerKey
func (*Wallet) ClaimDelegatorRewards ¶
func (w *Wallet) ClaimDelegatorRewards(transactionName string, inputName string) *iotago.SignedTransaction
func (*Wallet) ClaimValidatorRewards ¶
func (w *Wallet) ClaimValidatorRewards(transactionName string, inputName string) *iotago.SignedTransaction
func (*Wallet) CreateAccountFromInput ¶
func (w *Wallet) CreateAccountFromInput(transactionName string, inputName string, recipientWallet *Wallet, opts ...options.Option[builder.AccountOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) CreateAccountsFromInput ¶
func (w *Wallet) CreateAccountsFromInput(transactionName string, inputName string, outputCount int, opts ...options.Option[builder.AccountOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) CreateBasicOutputsAtAddressesFromInput ¶
func (*Wallet) CreateBasicOutputsEquallyFromInput ¶
func (*Wallet) CreateBasicOutputsEquallyFromInputs ¶
func (*Wallet) CreateDelegationFromInput ¶
func (w *Wallet) CreateDelegationFromInput(transactionName string, inputName string, opts ...options.Option[builder.DelegationOutputBuilder]) *iotago.SignedTransaction
CreateDelegationFromInput creates a new DelegationOutput with given options from an input. If the remainder Output is not created, then StoredMana from the input is not passed and can potentially be burned. In order not to burn it, it needs to be assigned manually in another output in the transaction.
func (*Wallet) CreateFoundryAndNativeTokensFromInput ¶
func (*Wallet) CreateImplicitAccountFromInput ¶
func (w *Wallet) CreateImplicitAccountFromInput(transactionName string, inputName string, recipientWallet *Wallet) *iotago.SignedTransaction
CreateImplicitAccountFromInput creates an implicit account output.
func (*Wallet) CreateNFTFromInput ¶
func (w *Wallet) CreateNFTFromInput(transactionName string, inputName string, opts ...options.Option[builder.NFTOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) CreateNativeTokenFromInput ¶
func (*Wallet) DelayedClaimingTransition ¶
func (w *Wallet) DelayedClaimingTransition(transactionName string, inputName string, delegationEndEpoch iotago.EpochIndex) *iotago.SignedTransaction
DelayedClaimingTransition transitions DelegationOutput into delayed claiming state by setting DelegationID and EndEpoch.
func (*Wallet) DelegationEndFromSlot ¶
func (w *Wallet) DelegationEndFromSlot(slot iotago.SlotIndex) iotago.EpochIndex
func (*Wallet) DelegationStartFromSlot ¶
func (w *Wallet) DelegationStartFromSlot(slot iotago.SlotIndex) iotago.EpochIndex
func (*Wallet) DestroyAccount ¶
func (w *Wallet) DestroyAccount(transactionName string, inputName string) *iotago.SignedTransaction
func (*Wallet) HasAddress ¶
func (*Wallet) ImplicitAccountCreationAddress ¶
func (w *Wallet) ImplicitAccountCreationAddress(index ...uint32) *iotago.ImplicitAccountCreationAddress
func (*Wallet) IssueBasicBlock ¶
func (*Wallet) PotentialMana ¶
Computes the Potential Mana that the output generates until the current slot.
func (*Wallet) RemoveFeatureFromAccount ¶
func (w *Wallet) RemoveFeatureFromAccount(featureType iotago.FeatureType, transactionName string, inputName string) *iotago.SignedTransaction
func (*Wallet) SendFundsFromAccount ¶
func (w *Wallet) SendFundsFromAccount(transactionName string, accountOutputName string, commitmentID iotago.CommitmentID, inputNames ...string) *iotago.SignedTransaction
func (*Wallet) SendFundsToAccount ¶
func (*Wallet) SendFundsToWallet ¶
func (*Wallet) SetBlockIssuer ¶
func (*Wallet) SetCurrentSlot ¶
func (*Wallet) SetDefaultNode ¶
func (*Wallet) StoredMana ¶
Computes the decay on stored mana that the output holds until the current slot.
func (*Wallet) Transaction ¶
func (w *Wallet) Transaction(alias string) *iotago.Transaction
func (*Wallet) TransactionID ¶
func (w *Wallet) TransactionID(alias string) iotago.TransactionID
func (*Wallet) Transactions ¶
func (w *Wallet) Transactions(transactionNames ...string) []*iotago.Transaction
func (*Wallet) TransitionAccount ¶
func (w *Wallet) TransitionAccount(transactionName string, inputName string, opts ...options.Option[builder.AccountOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) TransitionAccounts ¶
func (w *Wallet) TransitionAccounts(transactionName string, inputNames []string, opts ...options.Option[builder.AccountOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) TransitionFoundry ¶
func (w *Wallet) TransitionFoundry(transactionName string, inputName string, accountName string) *iotago.SignedTransaction
TransitionFoundry transitions a FoundryOutput by increasing the native token amount on the output by one.
func (*Wallet) TransitionImplicitAccountToAccountOutput ¶
func (w *Wallet) TransitionImplicitAccountToAccountOutput(transactionName string, inputName string, opts ...options.Option[builder.AccountOutputBuilder]) *iotago.SignedTransaction
func (*Wallet) TransitionNFTWithTransactionOpts ¶
func (w *Wallet) TransitionNFTWithTransactionOpts(transactionName string, inputName string, opts ...options.Option[builder.TransactionBuilder]) *iotago.SignedTransaction