func (d *Duty) Account(index phase0.ValidatorIndex) e2wtypes.Account {
	return d.accounts[index]
}
Account provides a specific account.
package synccommitteemessenger
import (
	"context"
	"fmt"
	"github.com/attestantio/go-eth2-client/spec/altair"
	"github.com/attestantio/go-eth2-client/spec/phase0"
	e2wtypes "github.com/wealdtech/go-eth2-wallet-types/v2"
)
type Duty struct {
	slot                phase0.Slot
	validatorIndices    []phase0.ValidatorIndex
	contributionIndices map[phase0.ValidatorIndex][]phase0.CommitteeIndex
	accounts map[phase0.ValidatorIndex]e2wtypes.Account
	aggregatorSubcommittees map[phase0.ValidatorIndex]map[uint64]phase0.BLSSignature
}
func NewDuty(slot phase0.Slot, contributionIndices map[phase0.ValidatorIndex][]phase0.CommitteeIndex) *Duty {
	validatorIndices := make([]phase0.ValidatorIndex, 0, len(contributionIndices))
	for k := range contributionIndices {
		validatorIndices = append(validatorIndices, k)
	}
	return &Duty{
		slot:                    slot,
		validatorIndices:        validatorIndices,
		contributionIndices:     contributionIndices,
		accounts:                make(map[phase0.ValidatorIndex]e2wtypes.Account, len(contributionIndices)),
		aggregatorSubcommittees: make(map[phase0.ValidatorIndex]map[uint64]phase0.BLSSignature),
	}
}
func (d *Duty) Slot() phase0.Slot {
	return d.slot
}
func (d *Duty) ValidatorIndices() []phase0.ValidatorIndex {
	return d.validatorIndices
}
func (d *Duty) ContributionIndices() map[phase0.ValidatorIndex][]phase0.CommitteeIndex {
	return d.contributionIndices
}
func (d *Duty) String() string {
	return fmt.Sprintf("sync committee contributions %v", d.Tuples())
}
func (d *Duty) Tuples() []string {
	res := make([]string, 0, len(d.contributionIndices))
	for k, v := range d.contributionIndices {
		res = append(res, fmt.Sprintf("(%d,%v)", k, v))
	}
	return res
}
func (d *Duty) SetAccount(index phase0.ValidatorIndex, account e2wtypes.Account) {
	d.accounts[index] = account
}
func (d *Duty) Accounts() map[phase0.ValidatorIndex]e2wtypes.Account {
	return d.accounts
}