Versions in this module Expand all Collapse all v0 v0.0.3 Aug 12, 2026 Changes in this version + const Namespace + const StrategyLeastUsed + const StrategyRandom + const StrategyRoundRobin + const StrategySingle + func NormalizedStrategy(strategy string) string + type Aggregate struct + Active uint64 + Depositing uint64 + Exited uint64 + Exiting uint64 + Managed uint64 + Pending uint64 + Target uint64 + TotalBalance uint64 + TotalEffective uint64 + TotalPendingPayments uint64 + Unused uint64 + Withdrawn uint64 + type BalanceAdjuster interface + GetBalanceAdjustment func(keyIndex uint64) int64 + type ChangeEvent struct + Aggregate Aggregate + States []*State + type Key struct + func (k *Key) BLSSigner() *signer.BLSSigner + func (k *Key) BuilderIndex() (uint64, bool) + func (k *Key) KeyIndex() uint64 + func (k *Key) Pubkey() phase0.BLSPubKey + func (k *Key) State() *State + func (k *Key) Status() Status + func (k *Key) String() string + type Registry struct + func NewRegistry(cfg *config.Config, entryPrivkeyHex string, log logrus.FieldLogger) (*Registry, error) + func (r *Registry) Aggregate() Aggregate + func (r *Registry) AnyActive() bool + func (r *Registry) ByBuilderIndex(builderIndex uint64) *Key + func (r *Registry) ByPubkey(pubkey phase0.BLSPubKey) *Key + func (r *Registry) EffectiveBalance(keyIndex uint64) uint64 + func (r *Registry) Key(keyIndex uint64) (*Key, error) + func (r *Registry) Keys() []*Key + func (r *Registry) MarkDepositPending(keyIndex uint64) + func (r *Registry) MarkDepositSubmitted(keyIndex uint64) + func (r *Registry) MarkExitSubmitted(keyIndex uint64) + func (r *Registry) MarkToppedUp(keyIndex uint64, epoch phase0.Epoch) + func (r *Registry) NextDepositCandidate() *Key + func (r *Registry) NextExitCandidate() *Key + func (r *Registry) Primary() *Key + func (r *Registry) PrimeKeyState(keyIndex uint64, mutate func(*State)) (*Key, error) + func (r *Registry) RecordBid(keyIndex uint64) + func (r *Registry) RecordWin(keyIndex uint64) + func (r *Registry) Refresh() + func (r *Registry) ReleaseDepositPending(keyIndex uint64) + func (r *Registry) SelectForBid(slot phase0.Slot, req SelectRequest) []*Key + func (r *Registry) SetBalanceAdjuster(adjuster BalanceAdjuster) + func (r *Registry) Start(ctx context.Context, chainSvc chain.Service, stateDB *db.Database) error + func (r *Registry) State(keyIndex uint64) *State + func (r *Registry) States() []*State + func (r *Registry) Stop() + func (r *Registry) SubscribeChanges(capacity int, blocking bool) *utils.Subscription[*ChangeEvent] + type SelectRequest struct + Count uint64 + Exclude map[uint64]struct{} + RequiredGwei uint64 + Strategy string + type State struct + Balance uint64 + BalanceAdjustment int64 + BidsSubmitted uint64 + BidsWon uint64 + BuilderIndex uint64 + DepositEpoch uint64 + EffectiveBalance uint64 + HasBuilderIndex bool + KeyIndex uint64 + LastDepositAt int64 + LastExitAt int64 + LastTopupEpoch phase0.Epoch + PendingPayments uint64 + Pubkey phase0.BLSPubKey + PubkeyHex string + Status Status + UseCount uint32 + WithdrawableEpoch uint64 + func (s *State) Ready(requiredGwei uint64) bool + type Status string + const StatusActive + const StatusDepositing + const StatusExited + const StatusExiting + const StatusPending + const StatusUnused + const StatusWithdrawn + func (s Status) Depositable() bool + func (s Status) Managed() bool + type Usage struct + FirstUsedAt int64 + KeyIndex uint64 + LastDepositAt int64 + LastExitAt int64 + Pubkey string + UseCount uint32 + type UsageCodec struct + func (UsageCodec) DecodeKey(key string) (uint64, error) + func (UsageCodec) DecodeValue(value []byte) (*Usage, error) + func (UsageCodec) EncodeKey(keyIndex uint64) string + func (UsageCodec) EncodeValue(usage *Usage) ([]byte, error)