mana

package
v1.0.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	module.Module
	// contains filtered or unexported fields
}

Manager is used to access stored and potential mana of an account in order. For stored Mana added to account, or stored/potential Mana spent, we will update on commitment. For potential Mana updates and decay, we update on demand if the Mana vector is accessed (by the scheduler).

func NewManager

func NewManager(apiProvider iotago.APIProvider, accountOutputResolveFunc func(iotago.AccountID, iotago.SlotIndex) (*utxoledger.Output, error), accountRetrieveFunc func(iotago.AccountID, iotago.SlotIndex) (*accounts.AccountData, bool, error)) *Manager

func (*Manager) ApplyDiff

func (m *Manager) ApplyDiff(slot iotago.SlotIndex, destroyedAccounts ds.Set[iotago.AccountID], accountOutputs map[iotago.AccountID]*utxoledger.Output, accountDiffs map[iotago.AccountID]*model.AccountDiff) error

func (*Manager) GetManaOnAccount

func (m *Manager) GetManaOnAccount(accountID iotago.AccountID, slot iotago.SlotIndex) (iotago.Mana, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL