Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Parameters = &ParametersDefinition{}
Parameters contains the configuration used by the manaRefresher plugin.
var ( // Plugin is the plugin instance of the manarefresher plugin. Plugin *node.Plugin )
Functions ¶
func DelegatedOutputs ¶
DelegatedOutputs returns all confirmed, unspent outputs that are delegated to the node.
func DelegationAddress ¶
DelegationAddress returns the current mana delegation address of the node.
func TotalDelegatedFunds ¶
func TotalDelegatedFunds() (amount uint64)
TotalDelegatedFunds returns the amount of funds delegated to the node.
Types ¶
type DelegationReceiver ¶
DelegationReceiver checks for delegation outputs on the wallet address and keeps the most recent delegated balance.
func (*DelegationReceiver) Address ¶
func (d *DelegationReceiver) Address() devnetvm.Address
Address returns the receive address of the delegation receiver.
func (*DelegationReceiver) Scan ¶
func (d *DelegationReceiver) Scan() []*devnetvm.AliasOutput
Scan scans for unspent delegation outputs on the delegation receiver address.
func (*DelegationReceiver) TotalDelegatedFunds ¶
func (d *DelegationReceiver) TotalDelegatedFunds() uint64
TotalDelegatedFunds returns the total amount of funds currently delegated to this node.
type ParametersDefinition ¶ added in v0.7.4
type ParametersDefinition struct { // RefreshInterval defines the interval for refreshing delegated mana. RefreshInterval time.Duration `default:"25m" usage:"interval for refreshing delegated mana (minutes)"` }
ParametersDefinition contains the definition of the parameters used by the manaRefresher plugin.
type Refresher ¶
type Refresher struct {
// contains filtered or unexported fields
}
Refresher is a component that takes care of refreshing the mana delegated to the node.
func NewRefresher ¶
func NewRefresher(wallet *wallet, receiver *DelegationReceiver) *Refresher
NewRefresher creates a new Refresher object.