balanceverifier

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoPath                   = "/"
	VerifyEffectiveBalancePath = "/verify"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceVerifierService

type BalanceVerifierService struct {
	// contains filtered or unexported fields
}

func NewBalanceVerifierService

func NewBalanceVerifierService() *BalanceVerifierService

func (*BalanceVerifierService) Configure

func (s *BalanceVerifierService) Configure(url *url.URL) error

func (*BalanceVerifierService) ConnectedChainId

func (s *BalanceVerifierService) ConnectedChainId() *big.Int

func (*BalanceVerifierService) GetInfo

func (s *BalanceVerifierService) GetInfo() (Info, error)

func (*BalanceVerifierService) ReportEffectiveBalance

func (s *BalanceVerifierService) ReportEffectiveBalance(
	effectiveBalances map[phase0.BLSPubKey]uint64,
) (res map[phase0.BLSPubKey]EcdsaSignature, err error)

type EcdsaSignature

type EcdsaSignature struct {
	R string `json:"r"`
	S string `json:"s"`
	V uint8  `json:"v"`
}

type EffectiveBalanceReport

type EffectiveBalanceReport struct {
	BLSPubKey        phase0.BLSPubKey `json:"blsKey"`
	EffectiveBalance uint64           `json:"effectiveBalance"`
}

type Info

type Info struct {
	ChainID uint64 `json:"CHAIN_ID,string"`
}

type ReportEffectiveBalancePayload

type ReportEffectiveBalancePayload struct {
	BLSPubKeys        []phase0.BLSPubKey `json:"blsKeys"`
	EffectiveBalances []uint64           `json:"effectiveBalances"`
}

type ReportEffectiveBalanceResponse

type ReportEffectiveBalanceResponse struct {
	Responses []ReportEffectiveBalanceResponseItem `json:"responses"`
}

type ReportEffectiveBalanceResponseItem

type ReportEffectiveBalanceResponseItem struct {
	Report                      EffectiveBalanceReport `json:"report"`
	DesignatedVerifierSignature EcdsaSignature         `json:"designatedVerifierSignature"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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