github.com/prysmaticlabs/prysm@v1.4.4/proto/eth/v1/validator_service.pb.gw.go (about)

     1  // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
     2  // source: proto/eth/v1/validator_service.proto
     3  
     4  /*
     5  Package v1 is a reverse proxy.
     6  
     7  It translates gRPC into RESTful JSON APIs.
     8  */
     9  package v1
    10  
    11  import (
    12  	"context"
    13  	"io"
    14  	"net/http"
    15  
    16  	"github.com/golang/protobuf/ptypes/empty"
    17  	emptypb "github.com/golang/protobuf/ptypes/empty"
    18  	"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
    19  	"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
    20  	github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types"
    21  	"google.golang.org/grpc"
    22  	"google.golang.org/grpc/codes"
    23  	"google.golang.org/grpc/grpclog"
    24  	"google.golang.org/grpc/metadata"
    25  	"google.golang.org/grpc/status"
    26  	"google.golang.org/protobuf/proto"
    27  )
    28  
    29  // Suppress "imported and not used" errors
    30  var _ codes.Code
    31  var _ io.Reader
    32  var _ status.Status
    33  var _ = runtime.String
    34  var _ = utilities.NewDoubleArray
    35  var _ = metadata.Join
    36  var _ = github_com_prysmaticlabs_eth2_types.Epoch(0)
    37  var _ = emptypb.Empty{}
    38  var _ = empty.Empty{}
    39  
    40  var (
    41  	filter_BeaconValidator_GetAttesterDuties_0 = &utilities.DoubleArray{Encoding: map[string]int{"epoch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
    42  )
    43  
    44  func request_BeaconValidator_GetAttesterDuties_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
    45  	var protoReq AttesterDutiesRequest
    46  	var metadata runtime.ServerMetadata
    47  
    48  	var (
    49  		val string
    50  		ok  bool
    51  		err error
    52  		_   = err
    53  	)
    54  
    55  	val, ok = pathParams["epoch"]
    56  	if !ok {
    57  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
    58  	}
    59  
    60  	epoch, err := runtime.Uint64(val)
    61  	if err != nil {
    62  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
    63  	}
    64  	protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
    65  
    66  	if err := req.ParseForm(); err != nil {
    67  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    68  	}
    69  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttesterDuties_0); err != nil {
    70  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
    71  	}
    72  
    73  	msg, err := client.GetAttesterDuties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
    74  	return msg, metadata, err
    75  
    76  }
    77  
    78  func local_request_BeaconValidator_GetAttesterDuties_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
    79  	var protoReq AttesterDutiesRequest
    80  	var metadata runtime.ServerMetadata
    81  
    82  	var (
    83  		val string
    84  		ok  bool
    85  		err error
    86  		_   = err
    87  	)
    88  
    89  	val, ok = pathParams["epoch"]
    90  	if !ok {
    91  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
    92  	}
    93  
    94  	epoch, err := runtime.Uint64(val)
    95  	if err != nil {
    96  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
    97  	}
    98  	protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
    99  
   100  	if err := req.ParseForm(); err != nil {
   101  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   102  	}
   103  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttesterDuties_0); err != nil {
   104  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   105  	}
   106  
   107  	msg, err := server.GetAttesterDuties(ctx, &protoReq)
   108  	return msg, metadata, err
   109  
   110  }
   111  
   112  func request_BeaconValidator_GetProposerDuties_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   113  	var protoReq ProposerDutiesRequest
   114  	var metadata runtime.ServerMetadata
   115  
   116  	var (
   117  		val string
   118  		ok  bool
   119  		err error
   120  		_   = err
   121  	)
   122  
   123  	val, ok = pathParams["epoch"]
   124  	if !ok {
   125  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
   126  	}
   127  
   128  	epoch, err := runtime.Uint64(val)
   129  	if err != nil {
   130  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
   131  	}
   132  	protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
   133  
   134  	msg, err := client.GetProposerDuties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   135  	return msg, metadata, err
   136  
   137  }
   138  
   139  func local_request_BeaconValidator_GetProposerDuties_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   140  	var protoReq ProposerDutiesRequest
   141  	var metadata runtime.ServerMetadata
   142  
   143  	var (
   144  		val string
   145  		ok  bool
   146  		err error
   147  		_   = err
   148  	)
   149  
   150  	val, ok = pathParams["epoch"]
   151  	if !ok {
   152  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch")
   153  	}
   154  
   155  	epoch, err := runtime.Uint64(val)
   156  	if err != nil {
   157  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch", err)
   158  	}
   159  	protoReq.Epoch = github_com_prysmaticlabs_eth2_types.Epoch(epoch)
   160  
   161  	msg, err := server.GetProposerDuties(ctx, &protoReq)
   162  	return msg, metadata, err
   163  
   164  }
   165  
   166  var (
   167  	filter_BeaconValidator_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{"slot": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
   168  )
   169  
   170  func request_BeaconValidator_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   171  	var protoReq ProposerBlockRequest
   172  	var metadata runtime.ServerMetadata
   173  
   174  	var (
   175  		val string
   176  		ok  bool
   177  		err error
   178  		_   = err
   179  	)
   180  
   181  	val, ok = pathParams["slot"]
   182  	if !ok {
   183  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "slot")
   184  	}
   185  
   186  	slot, err := runtime.Uint64(val)
   187  	if err != nil {
   188  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "slot", err)
   189  	}
   190  	protoReq.Slot = github_com_prysmaticlabs_eth2_types.Slot(slot)
   191  
   192  	if err := req.ParseForm(); err != nil {
   193  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   194  	}
   195  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetBlock_0); err != nil {
   196  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   197  	}
   198  
   199  	msg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   200  	return msg, metadata, err
   201  
   202  }
   203  
   204  func local_request_BeaconValidator_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   205  	var protoReq ProposerBlockRequest
   206  	var metadata runtime.ServerMetadata
   207  
   208  	var (
   209  		val string
   210  		ok  bool
   211  		err error
   212  		_   = err
   213  	)
   214  
   215  	val, ok = pathParams["slot"]
   216  	if !ok {
   217  		return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "slot")
   218  	}
   219  
   220  	slot, err := runtime.Uint64(val)
   221  	if err != nil {
   222  		return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "slot", err)
   223  	}
   224  	protoReq.Slot = github_com_prysmaticlabs_eth2_types.Slot(slot)
   225  
   226  	if err := req.ParseForm(); err != nil {
   227  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   228  	}
   229  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetBlock_0); err != nil {
   230  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   231  	}
   232  
   233  	msg, err := server.GetBlock(ctx, &protoReq)
   234  	return msg, metadata, err
   235  
   236  }
   237  
   238  var (
   239  	filter_BeaconValidator_GetAttestationData_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
   240  )
   241  
   242  func request_BeaconValidator_GetAttestationData_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   243  	var protoReq AttestationDataRequest
   244  	var metadata runtime.ServerMetadata
   245  
   246  	if err := req.ParseForm(); err != nil {
   247  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   248  	}
   249  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttestationData_0); err != nil {
   250  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   251  	}
   252  
   253  	msg, err := client.GetAttestationData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   254  	return msg, metadata, err
   255  
   256  }
   257  
   258  func local_request_BeaconValidator_GetAttestationData_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   259  	var protoReq AttestationDataRequest
   260  	var metadata runtime.ServerMetadata
   261  
   262  	if err := req.ParseForm(); err != nil {
   263  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   264  	}
   265  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAttestationData_0); err != nil {
   266  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   267  	}
   268  
   269  	msg, err := server.GetAttestationData(ctx, &protoReq)
   270  	return msg, metadata, err
   271  
   272  }
   273  
   274  var (
   275  	filter_BeaconValidator_GetAggregateAttestation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
   276  )
   277  
   278  func request_BeaconValidator_GetAggregateAttestation_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   279  	var protoReq AggregateAttestationRequest
   280  	var metadata runtime.ServerMetadata
   281  
   282  	if err := req.ParseForm(); err != nil {
   283  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   284  	}
   285  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAggregateAttestation_0); err != nil {
   286  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   287  	}
   288  
   289  	msg, err := client.GetAggregateAttestation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   290  	return msg, metadata, err
   291  
   292  }
   293  
   294  func local_request_BeaconValidator_GetAggregateAttestation_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   295  	var protoReq AggregateAttestationRequest
   296  	var metadata runtime.ServerMetadata
   297  
   298  	if err := req.ParseForm(); err != nil {
   299  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   300  	}
   301  	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconValidator_GetAggregateAttestation_0); err != nil {
   302  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   303  	}
   304  
   305  	msg, err := server.GetAggregateAttestation(ctx, &protoReq)
   306  	return msg, metadata, err
   307  
   308  }
   309  
   310  func request_BeaconValidator_SubmitAggregateAndProofs_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   311  	var protoReq AggregateAndProofsSubmit
   312  	var metadata runtime.ServerMetadata
   313  
   314  	newReader, berr := utilities.IOReaderFactory(req.Body)
   315  	if berr != nil {
   316  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
   317  	}
   318  	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
   319  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   320  	}
   321  
   322  	msg, err := client.SubmitAggregateAndProofs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   323  	return msg, metadata, err
   324  
   325  }
   326  
   327  func local_request_BeaconValidator_SubmitAggregateAndProofs_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   328  	var protoReq AggregateAndProofsSubmit
   329  	var metadata runtime.ServerMetadata
   330  
   331  	newReader, berr := utilities.IOReaderFactory(req.Body)
   332  	if berr != nil {
   333  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
   334  	}
   335  	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
   336  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   337  	}
   338  
   339  	msg, err := server.SubmitAggregateAndProofs(ctx, &protoReq)
   340  	return msg, metadata, err
   341  
   342  }
   343  
   344  func request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconValidatorClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   345  	var protoReq BeaconCommitteeSubscribeSubmit
   346  	var metadata runtime.ServerMetadata
   347  
   348  	newReader, berr := utilities.IOReaderFactory(req.Body)
   349  	if berr != nil {
   350  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
   351  	}
   352  	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
   353  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   354  	}
   355  
   356  	msg, err := client.SubmitBeaconCommitteeSubscription(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
   357  	return msg, metadata, err
   358  
   359  }
   360  
   361  func local_request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconValidatorServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
   362  	var protoReq BeaconCommitteeSubscribeSubmit
   363  	var metadata runtime.ServerMetadata
   364  
   365  	newReader, berr := utilities.IOReaderFactory(req.Body)
   366  	if berr != nil {
   367  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
   368  	}
   369  	if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Data); err != nil && err != io.EOF {
   370  		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
   371  	}
   372  
   373  	msg, err := server.SubmitBeaconCommitteeSubscription(ctx, &protoReq)
   374  	return msg, metadata, err
   375  
   376  }
   377  
   378  // RegisterBeaconValidatorHandlerServer registers the http handlers for service BeaconValidator to "mux".
   379  // UnaryRPC     :call BeaconValidatorServer directly.
   380  // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
   381  // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBeaconValidatorHandlerFromEndpoint instead.
   382  func RegisterBeaconValidatorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconValidatorServer) error {
   383  
   384  	mux.Handle("GET", pattern_BeaconValidator_GetAttesterDuties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   385  		ctx, cancel := context.WithCancel(req.Context())
   386  		defer cancel()
   387  		var stream runtime.ServerTransportStream
   388  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   389  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   390  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAttesterDuties")
   391  		if err != nil {
   392  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   393  			return
   394  		}
   395  		resp, md, err := local_request_BeaconValidator_GetAttesterDuties_0(rctx, inboundMarshaler, server, req, pathParams)
   396  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   397  		ctx = runtime.NewServerMetadataContext(ctx, md)
   398  		if err != nil {
   399  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   400  			return
   401  		}
   402  
   403  		forward_BeaconValidator_GetAttesterDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   404  
   405  	})
   406  
   407  	mux.Handle("GET", pattern_BeaconValidator_GetProposerDuties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   408  		ctx, cancel := context.WithCancel(req.Context())
   409  		defer cancel()
   410  		var stream runtime.ServerTransportStream
   411  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   412  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   413  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetProposerDuties")
   414  		if err != nil {
   415  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   416  			return
   417  		}
   418  		resp, md, err := local_request_BeaconValidator_GetProposerDuties_0(rctx, inboundMarshaler, server, req, pathParams)
   419  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   420  		ctx = runtime.NewServerMetadataContext(ctx, md)
   421  		if err != nil {
   422  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   423  			return
   424  		}
   425  
   426  		forward_BeaconValidator_GetProposerDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   427  
   428  	})
   429  
   430  	mux.Handle("GET", pattern_BeaconValidator_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   431  		ctx, cancel := context.WithCancel(req.Context())
   432  		defer cancel()
   433  		var stream runtime.ServerTransportStream
   434  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   435  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   436  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetBlock")
   437  		if err != nil {
   438  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   439  			return
   440  		}
   441  		resp, md, err := local_request_BeaconValidator_GetBlock_0(rctx, inboundMarshaler, server, req, pathParams)
   442  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   443  		ctx = runtime.NewServerMetadataContext(ctx, md)
   444  		if err != nil {
   445  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   446  			return
   447  		}
   448  
   449  		forward_BeaconValidator_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   450  
   451  	})
   452  
   453  	mux.Handle("GET", pattern_BeaconValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   454  		ctx, cancel := context.WithCancel(req.Context())
   455  		defer cancel()
   456  		var stream runtime.ServerTransportStream
   457  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   458  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   459  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAttestationData")
   460  		if err != nil {
   461  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   462  			return
   463  		}
   464  		resp, md, err := local_request_BeaconValidator_GetAttestationData_0(rctx, inboundMarshaler, server, req, pathParams)
   465  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   466  		ctx = runtime.NewServerMetadataContext(ctx, md)
   467  		if err != nil {
   468  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   469  			return
   470  		}
   471  
   472  		forward_BeaconValidator_GetAttestationData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   473  
   474  	})
   475  
   476  	mux.Handle("GET", pattern_BeaconValidator_GetAggregateAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   477  		ctx, cancel := context.WithCancel(req.Context())
   478  		defer cancel()
   479  		var stream runtime.ServerTransportStream
   480  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   481  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   482  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAggregateAttestation")
   483  		if err != nil {
   484  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   485  			return
   486  		}
   487  		resp, md, err := local_request_BeaconValidator_GetAggregateAttestation_0(rctx, inboundMarshaler, server, req, pathParams)
   488  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   489  		ctx = runtime.NewServerMetadataContext(ctx, md)
   490  		if err != nil {
   491  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   492  			return
   493  		}
   494  
   495  		forward_BeaconValidator_GetAggregateAttestation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   496  
   497  	})
   498  
   499  	mux.Handle("POST", pattern_BeaconValidator_SubmitAggregateAndProofs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   500  		ctx, cancel := context.WithCancel(req.Context())
   501  		defer cancel()
   502  		var stream runtime.ServerTransportStream
   503  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   504  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   505  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/SubmitAggregateAndProofs")
   506  		if err != nil {
   507  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   508  			return
   509  		}
   510  		resp, md, err := local_request_BeaconValidator_SubmitAggregateAndProofs_0(rctx, inboundMarshaler, server, req, pathParams)
   511  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   512  		ctx = runtime.NewServerMetadataContext(ctx, md)
   513  		if err != nil {
   514  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   515  			return
   516  		}
   517  
   518  		forward_BeaconValidator_SubmitAggregateAndProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   519  
   520  	})
   521  
   522  	mux.Handle("POST", pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   523  		ctx, cancel := context.WithCancel(req.Context())
   524  		defer cancel()
   525  		var stream runtime.ServerTransportStream
   526  		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
   527  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   528  		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/SubmitBeaconCommitteeSubscription")
   529  		if err != nil {
   530  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   531  			return
   532  		}
   533  		resp, md, err := local_request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(rctx, inboundMarshaler, server, req, pathParams)
   534  		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
   535  		ctx = runtime.NewServerMetadataContext(ctx, md)
   536  		if err != nil {
   537  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   538  			return
   539  		}
   540  
   541  		forward_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   542  
   543  	})
   544  
   545  	return nil
   546  }
   547  
   548  // RegisterBeaconValidatorHandlerFromEndpoint is same as RegisterBeaconValidatorHandler but
   549  // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
   550  func RegisterBeaconValidatorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
   551  	conn, err := grpc.Dial(endpoint, opts...)
   552  	if err != nil {
   553  		return err
   554  	}
   555  	defer func() {
   556  		if err != nil {
   557  			if cerr := conn.Close(); cerr != nil {
   558  				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
   559  			}
   560  			return
   561  		}
   562  		go func() {
   563  			<-ctx.Done()
   564  			if cerr := conn.Close(); cerr != nil {
   565  				grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
   566  			}
   567  		}()
   568  	}()
   569  
   570  	return RegisterBeaconValidatorHandler(ctx, mux, conn)
   571  }
   572  
   573  // RegisterBeaconValidatorHandler registers the http handlers for service BeaconValidator to "mux".
   574  // The handlers forward requests to the grpc endpoint over "conn".
   575  func RegisterBeaconValidatorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
   576  	return RegisterBeaconValidatorHandlerClient(ctx, mux, NewBeaconValidatorClient(conn))
   577  }
   578  
   579  // RegisterBeaconValidatorHandlerClient registers the http handlers for service BeaconValidator
   580  // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconValidatorClient".
   581  // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconValidatorClient"
   582  // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
   583  // "BeaconValidatorClient" to call the correct interceptors.
   584  func RegisterBeaconValidatorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconValidatorClient) error {
   585  
   586  	mux.Handle("GET", pattern_BeaconValidator_GetAttesterDuties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   587  		ctx, cancel := context.WithCancel(req.Context())
   588  		defer cancel()
   589  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   590  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAttesterDuties")
   591  		if err != nil {
   592  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   593  			return
   594  		}
   595  		resp, md, err := request_BeaconValidator_GetAttesterDuties_0(rctx, inboundMarshaler, client, req, pathParams)
   596  		ctx = runtime.NewServerMetadataContext(ctx, md)
   597  		if err != nil {
   598  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   599  			return
   600  		}
   601  
   602  		forward_BeaconValidator_GetAttesterDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   603  
   604  	})
   605  
   606  	mux.Handle("GET", pattern_BeaconValidator_GetProposerDuties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   607  		ctx, cancel := context.WithCancel(req.Context())
   608  		defer cancel()
   609  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   610  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetProposerDuties")
   611  		if err != nil {
   612  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   613  			return
   614  		}
   615  		resp, md, err := request_BeaconValidator_GetProposerDuties_0(rctx, inboundMarshaler, client, req, pathParams)
   616  		ctx = runtime.NewServerMetadataContext(ctx, md)
   617  		if err != nil {
   618  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   619  			return
   620  		}
   621  
   622  		forward_BeaconValidator_GetProposerDuties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   623  
   624  	})
   625  
   626  	mux.Handle("GET", pattern_BeaconValidator_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   627  		ctx, cancel := context.WithCancel(req.Context())
   628  		defer cancel()
   629  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   630  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetBlock")
   631  		if err != nil {
   632  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   633  			return
   634  		}
   635  		resp, md, err := request_BeaconValidator_GetBlock_0(rctx, inboundMarshaler, client, req, pathParams)
   636  		ctx = runtime.NewServerMetadataContext(ctx, md)
   637  		if err != nil {
   638  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   639  			return
   640  		}
   641  
   642  		forward_BeaconValidator_GetBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   643  
   644  	})
   645  
   646  	mux.Handle("GET", pattern_BeaconValidator_GetAttestationData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   647  		ctx, cancel := context.WithCancel(req.Context())
   648  		defer cancel()
   649  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   650  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAttestationData")
   651  		if err != nil {
   652  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   653  			return
   654  		}
   655  		resp, md, err := request_BeaconValidator_GetAttestationData_0(rctx, inboundMarshaler, client, req, pathParams)
   656  		ctx = runtime.NewServerMetadataContext(ctx, md)
   657  		if err != nil {
   658  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   659  			return
   660  		}
   661  
   662  		forward_BeaconValidator_GetAttestationData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   663  
   664  	})
   665  
   666  	mux.Handle("GET", pattern_BeaconValidator_GetAggregateAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   667  		ctx, cancel := context.WithCancel(req.Context())
   668  		defer cancel()
   669  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   670  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/GetAggregateAttestation")
   671  		if err != nil {
   672  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   673  			return
   674  		}
   675  		resp, md, err := request_BeaconValidator_GetAggregateAttestation_0(rctx, inboundMarshaler, client, req, pathParams)
   676  		ctx = runtime.NewServerMetadataContext(ctx, md)
   677  		if err != nil {
   678  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   679  			return
   680  		}
   681  
   682  		forward_BeaconValidator_GetAggregateAttestation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   683  
   684  	})
   685  
   686  	mux.Handle("POST", pattern_BeaconValidator_SubmitAggregateAndProofs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   687  		ctx, cancel := context.WithCancel(req.Context())
   688  		defer cancel()
   689  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   690  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/SubmitAggregateAndProofs")
   691  		if err != nil {
   692  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   693  			return
   694  		}
   695  		resp, md, err := request_BeaconValidator_SubmitAggregateAndProofs_0(rctx, inboundMarshaler, client, req, pathParams)
   696  		ctx = runtime.NewServerMetadataContext(ctx, md)
   697  		if err != nil {
   698  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   699  			return
   700  		}
   701  
   702  		forward_BeaconValidator_SubmitAggregateAndProofs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   703  
   704  	})
   705  
   706  	mux.Handle("POST", pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
   707  		ctx, cancel := context.WithCancel(req.Context())
   708  		defer cancel()
   709  		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
   710  		rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.v1.BeaconValidator/SubmitBeaconCommitteeSubscription")
   711  		if err != nil {
   712  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   713  			return
   714  		}
   715  		resp, md, err := request_BeaconValidator_SubmitBeaconCommitteeSubscription_0(rctx, inboundMarshaler, client, req, pathParams)
   716  		ctx = runtime.NewServerMetadataContext(ctx, md)
   717  		if err != nil {
   718  			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
   719  			return
   720  		}
   721  
   722  		forward_BeaconValidator_SubmitBeaconCommitteeSubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
   723  
   724  	})
   725  
   726  	return nil
   727  }
   728  
   729  var (
   730  	pattern_BeaconValidator_GetAttesterDuties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"eth", "v1", "validator", "duties", "attester", "epoch"}, ""))
   731  
   732  	pattern_BeaconValidator_GetProposerDuties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"eth", "v1", "validator", "duties", "proposer", "epoch"}, ""))
   733  
   734  	pattern_BeaconValidator_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"eth", "v1", "validator", "blocks", "slot"}, ""))
   735  
   736  	pattern_BeaconValidator_GetAttestationData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "attestation_data"}, ""))
   737  
   738  	pattern_BeaconValidator_GetAggregateAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "aggregate_attestation"}, ""))
   739  
   740  	pattern_BeaconValidator_SubmitAggregateAndProofs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "aggregate_and_proofs"}, ""))
   741  
   742  	pattern_BeaconValidator_SubmitBeaconCommitteeSubscription_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"eth", "v1", "validator", "beacon_committee_subscriptions"}, ""))
   743  )
   744  
   745  var (
   746  	forward_BeaconValidator_GetAttesterDuties_0 = runtime.ForwardResponseMessage
   747  
   748  	forward_BeaconValidator_GetProposerDuties_0 = runtime.ForwardResponseMessage
   749  
   750  	forward_BeaconValidator_GetBlock_0 = runtime.ForwardResponseMessage
   751  
   752  	forward_BeaconValidator_GetAttestationData_0 = runtime.ForwardResponseMessage
   753  
   754  	forward_BeaconValidator_GetAggregateAttestation_0 = runtime.ForwardResponseMessage
   755  
   756  	forward_BeaconValidator_SubmitAggregateAndProofs_0 = runtime.ForwardResponseMessage
   757  
   758  	forward_BeaconValidator_SubmitBeaconCommitteeSubscription_0 = runtime.ForwardResponseMessage
   759  )