Documentation ¶
Index ¶
- Constants
- type AddressOutputMapping
- type Indexer
- func (i *Indexer) CachedAddressOutputMappings(address devnetvm.Address) (cachedAddressOutputMappings objectstorage.CachedObjects[*AddressOutputMapping])
- func (i *Indexer) IndexOutput(output devnetvm.Output)
- func (i *Indexer) Prune() (err error)
- func (i *Indexer) RemoveAddressOutputMapping(address devnetvm.Address, outputID utxo.OutputID)
- func (i *Indexer) Shutdown()
- func (i *Indexer) StoreAddressOutputMapping(address devnetvm.Address, outputID utxo.OutputID)
- type Option
Constants ¶
const ( // PrefixAddressOutputMappingStorage defines the storage prefix for the AddressOutputMapping object storage. PrefixAddressOutputMappingStorage byte = iota )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressOutputMapping ¶
type AddressOutputMapping struct { model.StorableReference[AddressOutputMapping, *AddressOutputMapping, devnetvm.Address, utxo.OutputID] `serix:"0"` }
AddressOutputMapping is a mapping from an Address to an OutputID than enables lookups of stored Outputs.
func NewAddressOutputMapping ¶
func NewAddressOutputMapping(address devnetvm.Address, outputID utxo.OutputID) *AddressOutputMapping
NewAddressOutputMapping creates a new AddressOutputMapping.
func (*AddressOutputMapping) Address ¶
func (a *AddressOutputMapping) Address() devnetvm.Address
Address returns the Address of the AddressOutputMapping.
func (*AddressOutputMapping) OutputID ¶
func (a *AddressOutputMapping) OutputID() utxo.OutputID
OutputID returns the OutputID of the AddressOutputMapping.
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Indexer is a component that indexes the Outputs of a ledger for easier lookups.
func (*Indexer) CachedAddressOutputMappings ¶
func (i *Indexer) CachedAddressOutputMappings(address devnetvm.Address) (cachedAddressOutputMappings objectstorage.CachedObjects[*AddressOutputMapping])
CachedAddressOutputMappings retrieves all AddressOutputMappings for a particular address
func (*Indexer) IndexOutput ¶
IndexOutput stores the AddressOutputMapping dependent on which type of output it is.
func (*Indexer) RemoveAddressOutputMapping ¶
StoreAddressOutputMapping stores the address-output mapping.
type Option ¶
type Option func(*options)
Option represents the return type of optional parameters that can be handed into the constructor of the Ledger to configure its behavior.
func WithAddressOutputMappingCacheTime ¶
WithAddressOutputMappingCacheTime is an Option for the Ledger that allows to configure how long AddressOutputMapping objects stay cached after they have been released.
func WithCacheTimeProvider ¶
func WithCacheTimeProvider(cacheTimeProvider *database.CacheTimeProvider) (option Option)
WithCacheTimeProvider is an Option for the Ledger that allows to configure which CacheTimeProvider is supposed to be used.