Versions in this module Expand all Collapse all v0 v0.0.2 Jul 8, 2026 Changes in this version + type KVCodec interface + DecodeKey func(key string) (K, error) + DecodeValue func(value []byte) (V, error) + EncodeKey func(key K) string + EncodeValue func(value V) ([]byte, error) + type KVPersistence struct + func NewKVPersistence[K comparable, V any](d *Database, namespace string, codec KVCodec[K, V]) *KVPersistence[K, V] + func (p *KVPersistence[K, V]) Load() (map[K]V, error) + func (p *KVPersistence[K, V]) PersistBatch(upserts map[K]V, deletes []K) error v0.0.1 Jun 24, 2026 Changes in this version + const WonBlockSourceBuilderAPI + const WonBlockSourceEPBS + type AuditLog struct + Action string + Actor string + Detail string + ID int64 + RemoteAddr string + Result string + Target string + Timestamp int64 + type Config struct + File string + MaxIdleConns int + MaxOpenConns int + type Database struct + func NewDatabase(config *Config, logger logrus.FieldLogger) *Database + func (d *Database) AddWonBlock(wb WonBlock) error + func (d *Database) AppendAuditLog(entry AuditLog) error + func (d *Database) Close() error + func (d *Database) Enabled() bool + func (d *Database) GetAuditLogs(offset, limit int) ([]AuditLog, int, error) + func (d *Database) GetProposerPreferences(limit int) ([]ProposerPreference, error) + func (d *Database) GetSettings() ([]SettingRow, error) + func (d *Database) GetValidatorRegistrations() ([]ValidatorRegistration, error) + func (d *Database) GetWonBlocks(offset, limit int) ([]WonBlock, int, error) + func (d *Database) Init() error + func (d *Database) PutProposerPreference(p ProposerPreference) error + func (d *Database) PutSetting(row SettingRow) error + func (d *Database) PutValidatorRegistration(reg ValidatorRegistration) error + func (d *Database) RunDBTransaction(handler func(tx *sqlx.Tx) error) error + type ProposerPreference struct + FeeRecipient string + Raw string + Slot uint64 + TargetGasLimit uint64 + ValidatorIndex uint64 + type SettingRow struct + Actor string + CLISeq int64 + CLIValue sql.NullString + Key string + UISeq int64 + UIValue sql.NullString + UpdatedAt int64 + type ValidatorRegistration struct + FeeRecipient string + GasLimit uint64 + Pubkey string + Raw string + Timestamp int64 + UpdatedAt int64 + type WonBlock struct + BlockHash string + ID int64 + NumBlobs int + NumTransactions int + Slot uint64 + Source string + Timestamp int64 + ValueETH string + ValueWei string