standard

package
v0.0.0-...-7838e69 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by fastssz. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithChecker

func WithChecker(checker checker.Service) Parameter

WithChecker sets the access checker for this module.

func WithFetcher

func WithFetcher(fetcher fetcher.Service) Parameter

WithFetcher sets the account fetcher for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.SignerMonitor) Parameter

WithMonitor sets the monitor for this module.

func WithRuler

func WithRuler(ruler ruler.Service) Parameter

WithRuler sets the ruler for this module.

func WithUnlocker

func WithUnlocker(unlocker unlocker.Service) Parameter

WithUnlocker sets the account unlocker for this module.

type Service

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

Service is the signer handler.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new signer service.

func (*Service) Multisign

func (s *Service) Multisign(ctx context.Context,
	credentials *checker.Credentials,
	accountNames []string,
	pubKeys [][]byte,
	data []*rules.SignData) (
	[]core.Result,
	[][]byte,
)

Multisign signs multiple generic data.

func (*Service) SignBeaconAttestation

func (s *Service) SignBeaconAttestation(
	ctx context.Context,
	credentials *checker.Credentials,
	accountName string,
	pubKey []byte,
	data *rules.SignBeaconAttestationData,
) (
	core.Result,
	[]byte,
)

SignBeaconAttestation signs a attestation for a beacon block.

func (*Service) SignBeaconAttestations

func (s *Service) SignBeaconAttestations(
	ctx context.Context,
	credentials *checker.Credentials,
	accountNames []string,
	pubKeys [][]byte,
	data []*rules.SignBeaconAttestationData,
) (
	[]core.Result,
	[][]byte,
)

SignBeaconAttestations signs multiple attestations for a beacon block.

func (*Service) SignBeaconProposal

func (s *Service) SignBeaconProposal(
	ctx context.Context,
	credentials *checker.Credentials,
	accountName string,
	pubKey []byte,
	data *rules.SignBeaconProposalData,
) (
	core.Result,
	[]byte,
)

SignBeaconProposal signs a proposal for a beacon block.

func (*Service) SignGeneric

func (s *Service) SignGeneric(
	ctx context.Context,
	credentials *checker.Credentials,
	accountName string,
	pubKey []byte,
	data *rules.SignData,
) (
	core.Result,
	[]byte,
)

SignGeneric signs generic data.

type SigningRoot

type SigningRoot struct {
	DataRoot []byte `ssz-size:"32"`
	Domain   []byte `ssz-size:"32"`
}

SigningRoot is used to generate a single root for signing.

func (*SigningRoot) HashTreeRoot

func (s *SigningRoot) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SigningRoot object

func (*SigningRoot) HashTreeRootWith

func (s *SigningRoot) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the SigningRoot object with a hasher

func (*SigningRoot) MarshalSSZ

func (s *SigningRoot) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SigningRoot object

func (*SigningRoot) MarshalSSZTo

func (s *SigningRoot) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SigningRoot object to a target array

func (*SigningRoot) SizeSSZ

func (s *SigningRoot) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SigningRoot object

func (*SigningRoot) UnmarshalSSZ

func (s *SigningRoot) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SigningRoot object

Jump to

Keyboard shortcuts

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