backend

package
v1.6.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AccountsPattern is the path pattern for list accounts endpoint
	AccountsPattern = "accounts/"
)

Endpoints patterns

View Source
const (
	// ConfigPattern is the path pattern for config endpoint
	ConfigPattern = "config"
)

Endpoints patterns

View Source
const (
	// SignAttestationPattern is the path pattern for sign attestation endpoint
	SignPattern = "accounts/sign"
)

Endpoints patterns

View Source
const (
	// SlashingStoragePattern is the path pattern for slashing storage endpoint
	SlashingStoragePattern = "storage/slashing"
)

Endpoints patterns

View Source
const (
	// StoragePattern is the path pattern for storage endpoint
	StoragePattern = "storage"
)

Endpoints patterns

View Source
const (
	// VersionPattern is the path pattern for version endpoint
	VersionPattern = "version"
)

Endpoints patterns

Variables

View Source
var (
	// BLSPubkeyLength is the length of a BLS public key.
	BLSPubkeyLength = 48
	// FeeRecipientLength is the length of a fee recipient address.
	FeeRecipientLength = 20
)
View Source
var (
	// ErrFeeRecipientNotSet is returned when the fee recipient isn't set.
	ErrFeeRecipientNotSet = errors.New("fee recipient is not configured for public key")

	// ErrFeeRecipientDiffers is returned when the fee recipient does not match the requested one.
	ErrFeeRecipientDiffers = errors.New("requested fee recipient does not match configured fee recipient")
)

Functions

func Factory

func Factory(version string, logger *logrus.Logger) logical.Factory

Factory returns the backend factory

Types

type Config

type Config struct {
	Network       core.Network  `json:"network"`
	FeeRecipients FeeRecipients `json:"fee_recipients"`
}

Config contains the configuration for each mount

func (Config) Map added in v1.5.0

func (c Config) Map() map[string]interface{}

Map returns a map representation of the FeeRecipients.

type FeeRecipients added in v1.5.0

type FeeRecipients map[string]string

FeeRecipients is a map of validator public keys and their associated fee recipient addresses. Both the public key and the address are 0x-prefixed hex strings.

func ParseFeeRecipients added in v1.5.0

func ParseFeeRecipients(input map[string]interface{}) (FeeRecipients, error)

ParseFeeRecipients parses & validates the fee recipients from a given map[string]interface{}

func (FeeRecipients) Default added in v1.5.0

func (f FeeRecipients) Default() (common.Address, bool)

Default returns the default fee recipient.

func (FeeRecipients) Get added in v1.5.0

func (f FeeRecipients) Get(pubKey []byte) (common.Address, bool)

Get returns the fee recipient for the given public key.

func (*FeeRecipients) UnmarshalJSON added in v1.5.0

func (f *FeeRecipients) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes JSON-encoded FeeRecipients with validation.

type SlashingHistory

type SlashingHistory struct {
	HighestAttestation *phase0.AttestationData
	HighestProposal    phase0.Slot
}

SlashingHistory contains slashing history data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL