# Functions
FromPersistableEvent parses a persistable event to a regular event.
IDFromPubKey returns the ID from the given public key.
IDFromStr decodes and returns an ID from base58.
NewBaseManaVector creates and returns a new base mana vector for the specified type.
No description provided by the author
No description provided by the author
TypeFromString parses a string and returns the type of mana it defines.
# Constants
AccessMana is mana associated with access to the network.
ConsensusBaseManaPastVectorMetadataStorageKey is the key to the consensus base vector metadata storage.
ConsensusMana is mana associated with consensus weights in the network.
EventTypePledge defines the type of a pledge event.
EventTypeRevoke defines the event type of a revoke event.
EventTypeUpdate defines the event type of an updated event.
PrefixAccess is the storage prefix for access mana storage.
PrefixAccessResearch is the storage prefix for research access mana storage.
PrefixConsensus is the storage prefix for consensus mana storage.
PrefixConsensusPastMetadata is the storage prefix for consensus mana past vector metadata storage.
PrefixConsensusPastVector is the storage prefix for consensus mana past vector storage.
PrefixConsensusResearch is the storage prefix for research consensus mana storage.
PrefixEventStorage is the storage prefix for consensus mana event storage.
ResearchAccess is a special type of WeightedMana, that targets access pledges.
ResearchConsensus is a special type of WeightedMana, that targets consensus pledges.
WeightedMana is a weighted combination of Mana 1 (consensus) and Mana 2 (access) for research purposes.
# Variables
ErrAlreadyUpdated is returned if mana is tried to be updated at a later time.
ErrBaseManaNegative is returned if base mana will become negative.
ErrEffBaseManaNegative is returned if base mana will become negative.
ErrInvalidTargetManaType is returned if a research base mana vector can't handle the target mana type.
ErrInvalidWeightParameter is returned if an invalid weight parameter is passed.
ErrNodeNotFoundInBaseManaVector is returned if the node is not found in the base mana vector.
ErrUnknownManaEvent is returned if mana event type could not be identified.
ErrUnknownManaType is returned if mana type could not be identified.
No description provided by the author
# Structs
AccessManaSnapshot defines the record for the aMana snapshot of one node.
BaseManaJSON is a JSON serializable form of a BaseMana.
ConsensusBasePastManaVectorMetadata holds metadata for the past consensus mana vector.
InputInfo holds mana related info about an input within a transaction.
ManaBase holds information about the consensus base mana values of a single node.
ManaBaseVector represents a base mana vector.
ManaEvents represents events happening in the mana package.
ManaVectorUpdateEvent is a container that acts as a dictionary for the EpochCommittable event related parameters.
Node represents a node and its mana value.
NodeStr defines a node and its mana value.
PersistableBaseMana represents a base mana vector that can be persisted.
PersistableEvent is a persistable event.
PledgedEvent is the struct that is passed along with triggering a Pledged event.
PledgedEventJSON is a JSON serializable form of a PledgedEvent.
RevokedEvent is the struct that is passed along with triggering a Revoked event.
RevokedEventJSON is a JSON serializable form of a RevokedEvent.
SnapshotNode defines the record for the mana snapshot of one node.
TxInfo holds information related to the transaction which we are processing for mana calculation.
TxSnapshot defines the record of one transaction.
UpdatedEvent is the struct that is passed along with triggering an Updated event.
UpdatedEventJSON is a JSON serializable form of an UpdatedEvent.
# Interfaces
BaseMana is an interface for a collection of base mana values of a single node.
BaseManaVector is an interface for vectors that store base mana values of nodes in the network.
Event is the interface definition of an event.
# Type aliases
EventSlice is a slice of events.
ManaRetrievalFunc returns the mana value of a node with default weights.
NodeMap is a map of nodeID and mana value.
NodeMapStr is a NodeMap but with string id.
SortedTxSnapshot defines a list of SnapshotInfo sorted by timestamp.
Type defines if mana is access or consensus type of mana.