Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Parameters = struct { RefreshInterval uint `default:"25" usage:"interval for refreshing delegated mana (minutes)"` }{}
Parameters contains the configuration parameters used by the manarefresher plugin.
Functions ¶
func DelegatedOutputs ¶
func DelegatedOutputs() (delegated ledgerstate.Outputs, err error)
DelegatedOutputs returns all confirmed, unspent outputs that are delegated to the node.
func DelegationAddress ¶
func DelegationAddress() (ledgerstate.Address, error)
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() ledgerstate.Address
Address returns the receive address of the delegation receiver.
func (*DelegationReceiver) Scan ¶
func (d *DelegationReceiver) Scan() []*ledgerstate.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 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.