signatureswapper

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoPath                   = "/info"
	GenerateSignaturePath      = "/validator-registration"
	BatchGenerateSignaturePath = "/batch-validator-registration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchSignatureSwapPayload

type BatchSignatureSwapPayload struct {
	Signatures []SignatureSwapPayload `json:"signatures"`
}

type BatchSignatureSwapResponse

type BatchSignatureSwapResponse struct {
	OriginalData    []OriginalDataForBatchResponse `json:"originalData"`
	EcdsaSignatures []k2Common.EcdsaSignature      `json:"ecdsaSignatures"`
}

type Info

type Info struct {
	ChainID                        uint64 `json:"CHAIN_ID,string"`
	BlsDomain                      string `json:"BLS_DOMAIN"`
	GasLimitProposerRegistryDomain uint64 `json:"GAS_LIMIT_PROPOSER_REGISTRY_DOMAIN,string"`
}

type OriginalDataForBatchResponse

type OriginalDataForBatchResponse struct {
	Message               *apiv1.ValidatorRegistration `json:"message"`
	RepresentativeAddress common.Address               `json:"representativeAddress"`
	Signature             phase0.BLSSignature          `json:"signature"`
}

type SignatureSwapPayload

type SignatureSwapPayload struct {
	Signature             phase0.BLSSignature          `json:"signature"`
	Message               *apiv1.ValidatorRegistration `json:"message"`
	RepresentativeAddress common.Address               `json:"representativeAddress"`
}

type SignatureSwapResponse

type SignatureSwapResponse struct {
	OriginalData   *apiv1.SignedValidatorRegistration `json:"originalData"`
	EcdsaSignature k2Common.EcdsaSignature            `json:"ecdsaSignature"`
}

type SignatureSwapperService

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

func NewSignatureSwapperService

func NewSignatureSwapperService() *SignatureSwapperService

func (*SignatureSwapperService) BatchGenerateSignature

func (s *SignatureSwapperService) BatchGenerateSignature(
	registration []apiv1.SignedValidatorRegistration,
	representativeAddress common.Address,
) (map[phase0.BLSPubKey]k2Common.EcdsaSignature, error)

func (*SignatureSwapperService) Configure

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

func (*SignatureSwapperService) ConnectedChainId

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

func (*SignatureSwapperService) Domain

func (s *SignatureSwapperService) Domain() uint64

func (*SignatureSwapperService) GenerateSignature

func (s *SignatureSwapperService) GenerateSignature(
	registration apiv1.SignedValidatorRegistration,
	representativeAddress common.Address,
) (k2Common.EcdsaSignature, error)

func (*SignatureSwapperService) GetInfo

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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