signatureswapper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type EcdsaSignature

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

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 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 EcdsaSignature                     `json:"ecdsaSignature"`
}

type SignatureSwapperService

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

func NewSignatureSwapperService

func NewSignatureSwapperService() *SignatureSwapperService

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,
) (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