Documentation
¶
Index ¶
- func NewProvider() module.Provider[*engine.Engine, ledger.Ledger]
- type ExecutionContextKey
- type Ledger
- func (l *Ledger) Account(accountID iotago.AccountID, targetIndex iotago.SlotIndex) (accountData *accounts.AccountData, exists bool, err error)
- func (l *Ledger) AccountRoot() iotago.Identifier
- func (l *Ledger) AddAccount(output *utxoledger.Output, blockIssuanceCredits iotago.BlockIssuanceCredits) error
- func (l *Ledger) AddGenesisUnspentOutput(unspentOutput *utxoledger.Output) error
- func (l *Ledger) AttachTransaction(block *blocks.Block) (attachedTransaction mempool.SignedTransactionMetadata, ...)
- func (l *Ledger) CommitSlot(slot iotago.SlotIndex) (stateRoot iotago.Identifier, mutationRoot iotago.Identifier, ...)
- func (l *Ledger) Export(writer io.WriteSeeker, targetIndex iotago.SlotIndex) error
- func (l *Ledger) ForEachUnspentOutput(consumer func(output *utxoledger.Output) bool) error
- func (l *Ledger) Import(reader io.ReadSeeker) error
- func (l *Ledger) ManaManager() *mana.Manager
- func (l *Ledger) MemPool() mempool.MemPool[ledger.BlockVoteRank]
- func (l *Ledger) OnTransactionAttached(handler func(transaction mempool.TransactionMetadata), opts ...event.Option) *event.Hook[func(metadata mempool.TransactionMetadata)]
- func (l *Ledger) Output(outputID iotago.OutputID) (*utxoledger.Output, error)
- func (l *Ledger) OutputOrSpent(outputID iotago.OutputID) (*utxoledger.Output, *utxoledger.Spent, error)
- func (l *Ledger) PastAccounts(accountIDs iotago.AccountIDs, targetIndex iotago.SlotIndex) (accountDataMap map[iotago.AccountID]*accounts.AccountData, err error)
- func (l *Ledger) RMCManager() *rmc.Manager
- func (l *Ledger) Reset()
- func (l *Ledger) SlotDiffs(slot iotago.SlotIndex) (*utxoledger.SlotDiff, error)
- func (l *Ledger) SpendDAG() spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]
- func (l *Ledger) TrackBlock(block *blocks.Block)
- func (l *Ledger) TransactionMetadata(transactionID iotago.TransactionID) (mempool.TransactionMetadata, bool)
- func (l *Ledger) TransactionMetadataByAttachment(blockID iotago.BlockID) (mempool.TransactionMetadata, bool)
- type VM
- func (v *VM) Execute(executionContext context.Context, transaction mempool.Transaction) (outputs []mempool.State, err error)
- func (v *VM) Inputs(transaction mempool.Transaction) (inputReferences []mempool.StateReference, err error)
- func (v *VM) ValidateSignatures(signedTransaction mempool.SignedTransaction, ...) (executionContext context.Context, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecutionContextKey ¶
type ExecutionContextKey uint8
ExecutionContextKey is the type of the keys used in the execution context.
const ( // ExecutionContextKeyUnlockedAddresses is the key for the unlocked addresses in the execution context. ExecutionContextKeyUnlockedAddresses ExecutionContextKey = iota // ExecutionContextKeyResolvedInputs is the key for the resolved inputs in the execution context. ExecutionContextKeyResolvedInputs )
type Ledger ¶
func New ¶
func New( subModule module.Module, utxoLedger *utxoledger.Manager, accountsStore kvstore.KVStore, commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error), blocksFunc func(id iotago.BlockID) (*blocks.Block, bool), slotDiffFunc func(iotago.SlotIndex) (*slotstore.AccountDiffs, error), apiProvider iotago.APIProvider, sybilProtection sybilprotection.SybilProtection, errorHandler func(error), ) *Ledger
func (*Ledger) AccountRoot ¶
func (l *Ledger) AccountRoot() iotago.Identifier
func (*Ledger) AddAccount ¶
func (l *Ledger) AddAccount(output *utxoledger.Output, blockIssuanceCredits iotago.BlockIssuanceCredits) error
func (*Ledger) AddGenesisUnspentOutput ¶
func (l *Ledger) AddGenesisUnspentOutput(unspentOutput *utxoledger.Output) error
func (*Ledger) AttachTransaction ¶
func (*Ledger) CommitSlot ¶
func (l *Ledger) CommitSlot(slot iotago.SlotIndex) (stateRoot iotago.Identifier, mutationRoot iotago.Identifier, accountRoot iotago.Identifier, created utxoledger.Outputs, consumed utxoledger.Spents, mutations []*iotago.Transaction, err error)
func (*Ledger) ForEachUnspentOutput ¶
func (l *Ledger) ForEachUnspentOutput(consumer func(output *utxoledger.Output) bool) error
func (*Ledger) ManaManager ¶
func (*Ledger) OnTransactionAttached ¶
func (l *Ledger) OnTransactionAttached(handler func(transaction mempool.TransactionMetadata), opts ...event.Option) *event.Hook[func(metadata mempool.TransactionMetadata)]
func (*Ledger) OutputOrSpent ¶
func (l *Ledger) OutputOrSpent(outputID iotago.OutputID) (*utxoledger.Output, *utxoledger.Spent, error)
func (*Ledger) PastAccounts ¶
func (l *Ledger) PastAccounts(accountIDs iotago.AccountIDs, targetIndex iotago.SlotIndex) (accountDataMap map[iotago.AccountID]*accounts.AccountData, err error)
func (*Ledger) RMCManager ¶
func (*Ledger) Reset ¶
func (l *Ledger) Reset()
Reset resets the component to a clean state as if it was created at the last commitment.
func (*Ledger) SpendDAG ¶
func (l *Ledger) SpendDAG() spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]
func (*Ledger) TrackBlock ¶
func (*Ledger) TransactionMetadata ¶
func (l *Ledger) TransactionMetadata(transactionID iotago.TransactionID) (mempool.TransactionMetadata, bool)
func (*Ledger) TransactionMetadataByAttachment ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func (*VM) Inputs ¶
func (v *VM) Inputs(transaction mempool.Transaction) (inputReferences []mempool.StateReference, err error)
func (*VM) ValidateSignatures ¶
Click to show internal directories.
Click to hide internal directories.