diff --git a/Makefile b/Makefile index 63c97936..c120ea5c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: deps proto +.PHONY: deps PROJECT_ROOT = $(shell pwd) CGO_CFLAGS = "-I$(PROJECT_ROOT)/sqlite-extensions" @@ -8,44 +8,20 @@ CGO_ENABLED = 1 GO=$(shell which go) ALL_FLAGS=CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) PYTHONPATH=$(PYTHONPATH) CGO_ENABLED=$(CGO_ENABLED) -PROTO_OPTS=--proto_path=protos --go_out=paths=source_relative:protos - deps/dev: ${GO} install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 ${GO} install honnef.co/go/tools/cmd/staticcheck@latest ${GO} install github.com/google/yamlfmt/cmd/yamlfmt@latest deps/go: - ${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 - ${GO} install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 - ${GO} get \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ - google.golang.org/protobuf/cmd/protoc-gen-go \ - google.golang.org/grpc/cmd/protoc-gen-go-grpc - ${GO} install \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ - google.golang.org/protobuf/cmd/protoc-gen-go \ - google.golang.org/grpc/cmd/protoc-gen-go-grpc ${GO} mod tidy -deps-buf: - GOROOT=$(go env GOROOT) - BIN="${GOROOT}/bin" VERSION="1.32.2" && \ - curl -sSL "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" -o "${BIN}/buf" && \ - chmod +x "${BIN}/buf" - deps-system: ./scripts/installDeps.sh -deps: deps-system deps-buf deps/go deps/dev - +deps: deps-system deps/go deps/dev -# Build targets -proto: - buf generate protos .PHONY: clean clean: diff --git a/buf.gen.yaml b/buf.gen.yaml deleted file mode 100644 index 06f1d8c8..00000000 --- a/buf.gen.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: v1 -managed: - enabled: true -plugins: - - plugin: go - out: protos - opt: paths=source_relative - - plugin: go-grpc - out: protos - opt: paths=source_relative,require_unimplemented_servers=false - - plugin: grpc-gateway - out: protos - opt: paths=source_relative - - plugin: openapiv2 - out: gen/openapiv2 diff --git a/buf.lock b/buf.lock deleted file mode 100644 index 54eb2611..00000000 --- a/buf.lock +++ /dev/null @@ -1,8 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 09703837a2ed48dbbbb3fdfbe6a84f5c - digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 diff --git a/gen/openapiv2/eigenlayer/sidecar/v1/api.swagger.json b/gen/openapiv2/eigenlayer/sidecar/v1/api.swagger.json deleted file mode 100644 index 71a058e6..00000000 --- a/gen/openapiv2/eigenlayer/sidecar/v1/api.swagger.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "eigenlayer/sidecar/v1/api.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Rpc" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/available-rewards": { - "post": { - "operationId": "Rpc_GetAvailableRewards", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetAvailableRewardsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GetAvailableRewardsRequest" - } - } - ], - "tags": [ - "Rpc" - ] - } - }, - "/v1/available-rewards-tokens": { - "post": { - "operationId": "Rpc_GetAvailableRewardsTokens", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetAvailableRewardsTokensResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GetAvailableRewardsTokensRequest" - } - } - ], - "tags": [ - "Rpc" - ] - } - }, - "/v1/claim-proof": { - "post": { - "operationId": "Rpc_GenerateClaimProof", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GenerateClaimProofResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GenerateClaimProofRequest" - } - } - ], - "tags": [ - "Rpc" - ] - } - }, - "/v1/latest-block": { - "post": { - "operationId": "Rpc_GetBlockHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetBlockHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GetBlockHeightRequest" - } - } - ], - "tags": [ - "Rpc" - ] - } - }, - "/v1/rewards-roots/{blockNumber}": { - "post": { - "operationId": "Rpc_GetRewardsRoot", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetRewardsRootResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "blockNumber", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RpcGetRewardsRootBody" - } - } - ], - "tags": [ - "Rpc" - ] - } - }, - "/v1/state-roots/{blockNumber}": { - "post": { - "operationId": "Rpc_GetStateRoot", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetStateRootResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "blockNumber", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RpcGetStateRootBody" - } - } - ], - "tags": [ - "Rpc" - ] - } - } - }, - "definitions": { - "RpcGetRewardsRootBody": { - "type": "object" - }, - "RpcGetStateRootBody": { - "type": "object" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1EarnerLeaf": { - "type": "object", - "properties": { - "earner": { - "type": "string" - }, - "earnerTokenRoot": { - "type": "string" - } - } - }, - "v1GenerateClaimProofRequest": { - "type": "object", - "properties": { - "earnerAddress": { - "type": "string" - }, - "tokens": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v1GenerateClaimProofResponse": { - "type": "object", - "properties": { - "proof": { - "$ref": "#/definitions/v1Proof" - } - } - }, - "v1GetAvailableRewardsRequest": { - "type": "object", - "properties": { - "earnerAddress": { - "type": "string" - } - } - }, - "v1GetAvailableRewardsResponse": { - "type": "object", - "properties": { - "rewards": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Reward" - } - } - } - }, - "v1GetAvailableRewardsTokensRequest": { - "type": "object", - "properties": { - "earnerAddress": { - "type": "string" - } - } - }, - "v1GetAvailableRewardsTokensResponse": { - "type": "object", - "properties": { - "tokens": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v1GetBlockHeightRequest": { - "type": "object" - }, - "v1GetBlockHeightResponse": { - "type": "object", - "properties": { - "blockNumber": { - "type": "string", - "format": "uint64" - }, - "blockHash": { - "type": "string" - } - } - }, - "v1GetRewardsRootResponse": { - "type": "object", - "properties": { - "rewardsRoot": { - "type": "string" - } - } - }, - "v1GetStateRootResponse": { - "type": "object", - "properties": { - "ethBlockNumber": { - "type": "string", - "format": "uint64" - }, - "ethBlockHash": { - "type": "string" - }, - "stateRoot": { - "type": "string" - } - } - }, - "v1Proof": { - "type": "object", - "properties": { - "root": { - "type": "string" - }, - "rootIndex": { - "type": "integer", - "format": "int64" - }, - "earnerIndex": { - "type": "integer", - "format": "int64" - }, - "earnerTreeProof": { - "type": "string" - }, - "earnerLeaf": { - "$ref": "#/definitions/v1EarnerLeaf" - }, - "leafIndices": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "tokenTreeProofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "tokenLeaves": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1TokenLeaf" - } - } - } - }, - "v1Reward": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "amount": { - "type": "string" - } - } - }, - "v1TokenLeaf": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "cumulativeEarnings": { - "type": "string" - } - } - } - } -} diff --git a/go.mod b/go.mod index 967f20de..1b6921c5 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.22.2 require ( github.com/DataDog/datadog-go/v5 v5.5.0 + github.com/Layr-Labs/sidecar-apis v0.0.0-20241008133938-7596231e046f github.com/ethereum/go-ethereum v1.14.9 github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1 github.com/google/uuid v1.6.0 @@ -22,9 +23,7 @@ require ( github.com/wk8/go-ordered-map/v2 v2.1.8 go.uber.org/zap v1.27.0 golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 - google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.35.1 gorm.io/driver/sqlite v1.5.6 gorm.io/gorm v1.25.10 ) @@ -78,7 +77,9 @@ require ( golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 2a132309..19dd9e6d 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/DataDog/datadog-go/v5 v5.5.0 h1:G5KHeB8pWBNXT4Jtw0zAkhdxEAWSpWH00geHI github.com/DataDog/datadog-go/v5 v5.5.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Layr-Labs/sidecar-apis v0.0.0-20241008133938-7596231e046f h1:IKfqEjUiz/glwL+k236TtvY8DnCwRBQ567TvfuOJzTc= +github.com/Layr-Labs/sidecar-apis v0.0.0-20241008133938-7596231e046f/go.mod h1:ByZiD/2nBvaerCAAG6+f+wwIPmX9u8Y/yBeV6mNg5xk= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= diff --git a/internal/rpcServer/handlers.go b/internal/rpcServer/handlers.go index af64eb3d..e3c93e1a 100644 --- a/internal/rpcServer/handlers.go +++ b/internal/rpcServer/handlers.go @@ -3,7 +3,7 @@ package rpcServer import ( "context" - v1 "github.com/Layr-Labs/go-sidecar/protos/eigenlayer/sidecar/v1" + v1 "github.com/Layr-Labs/sidecar-apis/protos/eigenlayer/sidecar/v1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/rpcServer/server.go b/internal/rpcServer/server.go index 6c41ef5a..c811275b 100644 --- a/internal/rpcServer/server.go +++ b/internal/rpcServer/server.go @@ -5,7 +5,7 @@ import ( "github.com/Layr-Labs/go-sidecar/internal/eigenState/stateManager" "github.com/Layr-Labs/go-sidecar/internal/storage" - v1 "github.com/Layr-Labs/go-sidecar/protos/eigenlayer/sidecar/v1" + v1 "github.com/Layr-Labs/sidecar-apis/protos/eigenlayer/sidecar/v1" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "go.uber.org/zap" "google.golang.org/grpc" diff --git a/protos/buf.lock b/protos/buf.lock deleted file mode 100644 index 85a524fb..00000000 --- a/protos/buf.lock +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 09703837a2ed48dbbbb3fdfbe6a84f5c - digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - commit: cf1213ca7b09450999c79cd8da42a8e3 - digest: shake256:67b115260e12cb2d6c5d5ce8dbbf3a095c86f0e52b84f9dbd16dec9433b218f8694bc9aadb1d45eb6fd52f5a7029977d460e2d58afb3208ab6c680e7b21c80e4 diff --git a/protos/buf.yaml b/protos/buf.yaml deleted file mode 100644 index dfcb9041..00000000 --- a/protos/buf.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway -breaking: - use: - - FILE -lint: - use: - - DEFAULT diff --git a/protos/eigenlayer/sidecar/v1/api.pb.go b/protos/eigenlayer/sidecar/v1/api.pb.go deleted file mode 100644 index 42bb0034..00000000 --- a/protos/eigenlayer/sidecar/v1/api.pb.go +++ /dev/null @@ -1,1333 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: eigenlayer/sidecar/v1/api.proto - -package v1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetBlockHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetBlockHeightRequest) Reset() { - *x = GetBlockHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHeightRequest) ProtoMessage() {} - -func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBlockHeightRequest.ProtoReflect.Descriptor instead. -func (*GetBlockHeightRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{0} -} - -type GetBlockHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockNumber uint64 `protobuf:"varint,1,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` - BlockHash string `protobuf:"bytes,2,opt,name=blockHash,proto3" json:"blockHash,omitempty"` -} - -func (x *GetBlockHeightResponse) Reset() { - *x = GetBlockHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHeightResponse) ProtoMessage() {} - -func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBlockHeightResponse.ProtoReflect.Descriptor instead. -func (*GetBlockHeightResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{1} -} - -func (x *GetBlockHeightResponse) GetBlockNumber() uint64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -func (x *GetBlockHeightResponse) GetBlockHash() string { - if x != nil { - return x.BlockHash - } - return "" -} - -type GetStateRootRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockNumber uint64 `protobuf:"varint,1,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` -} - -func (x *GetStateRootRequest) Reset() { - *x = GetStateRootRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetStateRootRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStateRootRequest) ProtoMessage() {} - -func (x *GetStateRootRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStateRootRequest.ProtoReflect.Descriptor instead. -func (*GetStateRootRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{2} -} - -func (x *GetStateRootRequest) GetBlockNumber() uint64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -type GetStateRootResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EthBlockNumber uint64 `protobuf:"varint,1,opt,name=ethBlockNumber,proto3" json:"ethBlockNumber,omitempty"` - EthBlockHash string `protobuf:"bytes,2,opt,name=ethBlockHash,proto3" json:"ethBlockHash,omitempty"` - StateRoot string `protobuf:"bytes,3,opt,name=stateRoot,proto3" json:"stateRoot,omitempty"` -} - -func (x *GetStateRootResponse) Reset() { - *x = GetStateRootResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetStateRootResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStateRootResponse) ProtoMessage() {} - -func (x *GetStateRootResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStateRootResponse.ProtoReflect.Descriptor instead. -func (*GetStateRootResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{3} -} - -func (x *GetStateRootResponse) GetEthBlockNumber() uint64 { - if x != nil { - return x.EthBlockNumber - } - return 0 -} - -func (x *GetStateRootResponse) GetEthBlockHash() string { - if x != nil { - return x.EthBlockHash - } - return "" -} - -func (x *GetStateRootResponse) GetStateRoot() string { - if x != nil { - return x.StateRoot - } - return "" -} - -type GetRewardsRootRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockNumber uint64 `protobuf:"varint,1,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` -} - -func (x *GetRewardsRootRequest) Reset() { - *x = GetRewardsRootRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRewardsRootRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRewardsRootRequest) ProtoMessage() {} - -func (x *GetRewardsRootRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRewardsRootRequest.ProtoReflect.Descriptor instead. -func (*GetRewardsRootRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{4} -} - -func (x *GetRewardsRootRequest) GetBlockNumber() uint64 { - if x != nil { - return x.BlockNumber - } - return 0 -} - -type GetRewardsRootResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RewardsRoot string `protobuf:"bytes,1,opt,name=rewardsRoot,proto3" json:"rewardsRoot,omitempty"` -} - -func (x *GetRewardsRootResponse) Reset() { - *x = GetRewardsRootResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRewardsRootResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRewardsRootResponse) ProtoMessage() {} - -func (x *GetRewardsRootResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRewardsRootResponse.ProtoReflect.Descriptor instead. -func (*GetRewardsRootResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{5} -} - -func (x *GetRewardsRootResponse) GetRewardsRoot() string { - if x != nil { - return x.RewardsRoot - } - return "" -} - -type GenerateClaimProofRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EarnerAddress string `protobuf:"bytes,1,opt,name=earner_address,json=earnerAddress,proto3" json:"earner_address,omitempty"` - Tokens []string `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"` -} - -func (x *GenerateClaimProofRequest) Reset() { - *x = GenerateClaimProofRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateClaimProofRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateClaimProofRequest) ProtoMessage() {} - -func (x *GenerateClaimProofRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateClaimProofRequest.ProtoReflect.Descriptor instead. -func (*GenerateClaimProofRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{6} -} - -func (x *GenerateClaimProofRequest) GetEarnerAddress() string { - if x != nil { - return x.EarnerAddress - } - return "" -} - -func (x *GenerateClaimProofRequest) GetTokens() []string { - if x != nil { - return x.Tokens - } - return nil -} - -type EarnerLeaf struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Earner string `protobuf:"bytes,1,opt,name=earner,proto3" json:"earner,omitempty"` - EarnerTokenRoot string `protobuf:"bytes,2,opt,name=earner_token_root,json=earnerTokenRoot,proto3" json:"earner_token_root,omitempty"` -} - -func (x *EarnerLeaf) Reset() { - *x = EarnerLeaf{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EarnerLeaf) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EarnerLeaf) ProtoMessage() {} - -func (x *EarnerLeaf) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EarnerLeaf.ProtoReflect.Descriptor instead. -func (*EarnerLeaf) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{7} -} - -func (x *EarnerLeaf) GetEarner() string { - if x != nil { - return x.Earner - } - return "" -} - -func (x *EarnerLeaf) GetEarnerTokenRoot() string { - if x != nil { - return x.EarnerTokenRoot - } - return "" -} - -type TokenLeaf struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - CumulativeEarnings string `protobuf:"bytes,2,opt,name=cumulative_earnings,json=cumulativeEarnings,proto3" json:"cumulative_earnings,omitempty"` -} - -func (x *TokenLeaf) Reset() { - *x = TokenLeaf{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenLeaf) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenLeaf) ProtoMessage() {} - -func (x *TokenLeaf) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenLeaf.ProtoReflect.Descriptor instead. -func (*TokenLeaf) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{8} -} - -func (x *TokenLeaf) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *TokenLeaf) GetCumulativeEarnings() string { - if x != nil { - return x.CumulativeEarnings - } - return "" -} - -type Proof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - RootIndex uint32 `protobuf:"varint,2,opt,name=root_index,json=rootIndex,proto3" json:"root_index,omitempty"` - EarnerIndex uint32 `protobuf:"varint,3,opt,name=earner_index,json=earnerIndex,proto3" json:"earner_index,omitempty"` - EarnerTreeProof string `protobuf:"bytes,4,opt,name=earner_tree_proof,json=earnerTreeProof,proto3" json:"earner_tree_proof,omitempty"` - EarnerLeaf *EarnerLeaf `protobuf:"bytes,5,opt,name=earner_leaf,json=earnerLeaf,proto3" json:"earner_leaf,omitempty"` - LeafIndices []uint32 `protobuf:"varint,6,rep,packed,name=leaf_indices,json=leafIndices,proto3" json:"leaf_indices,omitempty"` - TokenTreeProofs []string `protobuf:"bytes,7,rep,name=token_tree_proofs,json=tokenTreeProofs,proto3" json:"token_tree_proofs,omitempty"` - TokenLeaves []*TokenLeaf `protobuf:"bytes,8,rep,name=token_leaves,json=tokenLeaves,proto3" json:"token_leaves,omitempty"` -} - -func (x *Proof) Reset() { - *x = Proof{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proof) ProtoMessage() {} - -func (x *Proof) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Proof.ProtoReflect.Descriptor instead. -func (*Proof) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{9} -} - -func (x *Proof) GetRoot() string { - if x != nil { - return x.Root - } - return "" -} - -func (x *Proof) GetRootIndex() uint32 { - if x != nil { - return x.RootIndex - } - return 0 -} - -func (x *Proof) GetEarnerIndex() uint32 { - if x != nil { - return x.EarnerIndex - } - return 0 -} - -func (x *Proof) GetEarnerTreeProof() string { - if x != nil { - return x.EarnerTreeProof - } - return "" -} - -func (x *Proof) GetEarnerLeaf() *EarnerLeaf { - if x != nil { - return x.EarnerLeaf - } - return nil -} - -func (x *Proof) GetLeafIndices() []uint32 { - if x != nil { - return x.LeafIndices - } - return nil -} - -func (x *Proof) GetTokenTreeProofs() []string { - if x != nil { - return x.TokenTreeProofs - } - return nil -} - -func (x *Proof) GetTokenLeaves() []*TokenLeaf { - if x != nil { - return x.TokenLeaves - } - return nil -} - -type GenerateClaimProofResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proof *Proof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *GenerateClaimProofResponse) Reset() { - *x = GenerateClaimProofResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateClaimProofResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateClaimProofResponse) ProtoMessage() {} - -func (x *GenerateClaimProofResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateClaimProofResponse.ProtoReflect.Descriptor instead. -func (*GenerateClaimProofResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{10} -} - -func (x *GenerateClaimProofResponse) GetProof() *Proof { - if x != nil { - return x.Proof - } - return nil -} - -type GetAvailableRewardsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EarnerAddress string `protobuf:"bytes,1,opt,name=earner_address,json=earnerAddress,proto3" json:"earner_address,omitempty"` -} - -func (x *GetAvailableRewardsRequest) Reset() { - *x = GetAvailableRewardsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAvailableRewardsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvailableRewardsRequest) ProtoMessage() {} - -func (x *GetAvailableRewardsRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvailableRewardsRequest.ProtoReflect.Descriptor instead. -func (*GetAvailableRewardsRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{11} -} - -func (x *GetAvailableRewardsRequest) GetEarnerAddress() string { - if x != nil { - return x.EarnerAddress - } - return "" -} - -type Reward struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Reward) Reset() { - *x = Reward{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Reward) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Reward) ProtoMessage() {} - -func (x *Reward) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Reward.ProtoReflect.Descriptor instead. -func (*Reward) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{12} -} - -func (x *Reward) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *Reward) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type GetAvailableRewardsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (x *GetAvailableRewardsResponse) Reset() { - *x = GetAvailableRewardsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAvailableRewardsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvailableRewardsResponse) ProtoMessage() {} - -func (x *GetAvailableRewardsResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvailableRewardsResponse.ProtoReflect.Descriptor instead. -func (*GetAvailableRewardsResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{13} -} - -func (x *GetAvailableRewardsResponse) GetRewards() []*Reward { - if x != nil { - return x.Rewards - } - return nil -} - -type GetAvailableRewardsTokensRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EarnerAddress string `protobuf:"bytes,1,opt,name=earner_address,json=earnerAddress,proto3" json:"earner_address,omitempty"` -} - -func (x *GetAvailableRewardsTokensRequest) Reset() { - *x = GetAvailableRewardsTokensRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAvailableRewardsTokensRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvailableRewardsTokensRequest) ProtoMessage() {} - -func (x *GetAvailableRewardsTokensRequest) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvailableRewardsTokensRequest.ProtoReflect.Descriptor instead. -func (*GetAvailableRewardsTokensRequest) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{14} -} - -func (x *GetAvailableRewardsTokensRequest) GetEarnerAddress() string { - if x != nil { - return x.EarnerAddress - } - return "" -} - -type GetAvailableRewardsTokensResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tokens []string `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` -} - -func (x *GetAvailableRewardsTokensResponse) Reset() { - *x = GetAvailableRewardsTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAvailableRewardsTokensResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvailableRewardsTokensResponse) ProtoMessage() {} - -func (x *GetAvailableRewardsTokensResponse) ProtoReflect() protoreflect.Message { - mi := &file_eigenlayer_sidecar_v1_api_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvailableRewardsTokensResponse.ProtoReflect.Descriptor instead. -func (*GetAvailableRewardsTokensResponse) Descriptor() ([]byte, []int) { - return file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP(), []int{15} -} - -func (x *GetAvailableRewardsTokensResponse) GetTokens() []string { - if x != nil { - return x.Tokens - } - return nil -} - -var File_eigenlayer_sidecar_v1_api_proto protoreflect.FileDescriptor - -var file_eigenlayer_sidecar_v1_api_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x73, 0x69, 0x64, - 0x65, 0x63, 0x61, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x19, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x37, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x26, 0x0a, 0x0e, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x39, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, - 0x22, 0x5a, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x69, - 0x6d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, - 0x0e, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x50, 0x0a, 0x0a, - 0x45, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x61, - 0x72, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x61, 0x72, 0x6e, - 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, - 0x61, 0x72, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x52, - 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x45, 0x61, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x73, 0x22, 0xe9, 0x02, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x12, 0x0a, 0x04, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x21, 0x0a, 0x0c, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x65, - 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, - 0x61, 0x72, 0x6e, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x46, - 0x0a, 0x0b, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x66, 0x52, 0x0a, 0x65, 0x61, 0x72, 0x6e, - 0x65, 0x72, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x69, - 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0b, 0x6c, 0x65, - 0x61, 0x66, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, - 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x69, - 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x65, 0x61, - 0x66, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x22, 0x54, - 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x69, - 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x43, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x61, 0x72, 0x6e, - 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x36, 0x0a, 0x06, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x5a, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x49, 0x0a, - 0x20, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x61, 0x72, 0x6e, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3b, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x32, 0xe5, 0x07, 0x0a, 0x03, 0x52, 0x70, 0x63, 0x12, 0x92, 0x01, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x30, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, - 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x2d, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x2e, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, - 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2d, 0x72, 0x6f, 0x6f, 0x74, 0x73, - 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x7d, 0x12, 0xa1, - 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x30, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, - 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2d, 0x72, - 0x6f, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, - 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x34, 0x2e, 0x65, 0x69, 0x67, 0x65, - 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, - 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, - 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x12, 0xa6, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x35, 0x2e, 0x65, 0x69, 0x67, - 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x36, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x2d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xbf, 0x01, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x3b, 0x2e, 0x65, 0x69, 0x67, 0x65, - 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2d, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0xea, 0x01, - 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, - 0x08, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x79, 0x72, 0x2d, 0x4c, 0x61, 0x62, - 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2f, 0x65, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x53, 0x41, 0xaa, 0x02, 0x19, 0x45, 0x69, - 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, - 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x45, 0x69, 0x67, 0x65, 0x6e, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x5c, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x5c, 0x41, 0x70, 0x69, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x45, 0x69, 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x5c, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x45, 0x69, - 0x67, 0x65, 0x6e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, - 0x72, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_eigenlayer_sidecar_v1_api_proto_rawDescOnce sync.Once - file_eigenlayer_sidecar_v1_api_proto_rawDescData = file_eigenlayer_sidecar_v1_api_proto_rawDesc -) - -func file_eigenlayer_sidecar_v1_api_proto_rawDescGZIP() []byte { - file_eigenlayer_sidecar_v1_api_proto_rawDescOnce.Do(func() { - file_eigenlayer_sidecar_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_eigenlayer_sidecar_v1_api_proto_rawDescData) - }) - return file_eigenlayer_sidecar_v1_api_proto_rawDescData -} - -var file_eigenlayer_sidecar_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_eigenlayer_sidecar_v1_api_proto_goTypes = []any{ - (*GetBlockHeightRequest)(nil), // 0: eigenlayer.sidecar.api.v1.GetBlockHeightRequest - (*GetBlockHeightResponse)(nil), // 1: eigenlayer.sidecar.api.v1.GetBlockHeightResponse - (*GetStateRootRequest)(nil), // 2: eigenlayer.sidecar.api.v1.GetStateRootRequest - (*GetStateRootResponse)(nil), // 3: eigenlayer.sidecar.api.v1.GetStateRootResponse - (*GetRewardsRootRequest)(nil), // 4: eigenlayer.sidecar.api.v1.GetRewardsRootRequest - (*GetRewardsRootResponse)(nil), // 5: eigenlayer.sidecar.api.v1.GetRewardsRootResponse - (*GenerateClaimProofRequest)(nil), // 6: eigenlayer.sidecar.api.v1.GenerateClaimProofRequest - (*EarnerLeaf)(nil), // 7: eigenlayer.sidecar.api.v1.EarnerLeaf - (*TokenLeaf)(nil), // 8: eigenlayer.sidecar.api.v1.TokenLeaf - (*Proof)(nil), // 9: eigenlayer.sidecar.api.v1.Proof - (*GenerateClaimProofResponse)(nil), // 10: eigenlayer.sidecar.api.v1.GenerateClaimProofResponse - (*GetAvailableRewardsRequest)(nil), // 11: eigenlayer.sidecar.api.v1.GetAvailableRewardsRequest - (*Reward)(nil), // 12: eigenlayer.sidecar.api.v1.Reward - (*GetAvailableRewardsResponse)(nil), // 13: eigenlayer.sidecar.api.v1.GetAvailableRewardsResponse - (*GetAvailableRewardsTokensRequest)(nil), // 14: eigenlayer.sidecar.api.v1.GetAvailableRewardsTokensRequest - (*GetAvailableRewardsTokensResponse)(nil), // 15: eigenlayer.sidecar.api.v1.GetAvailableRewardsTokensResponse -} -var file_eigenlayer_sidecar_v1_api_proto_depIdxs = []int32{ - 7, // 0: eigenlayer.sidecar.api.v1.Proof.earner_leaf:type_name -> eigenlayer.sidecar.api.v1.EarnerLeaf - 8, // 1: eigenlayer.sidecar.api.v1.Proof.token_leaves:type_name -> eigenlayer.sidecar.api.v1.TokenLeaf - 9, // 2: eigenlayer.sidecar.api.v1.GenerateClaimProofResponse.proof:type_name -> eigenlayer.sidecar.api.v1.Proof - 12, // 3: eigenlayer.sidecar.api.v1.GetAvailableRewardsResponse.rewards:type_name -> eigenlayer.sidecar.api.v1.Reward - 0, // 4: eigenlayer.sidecar.api.v1.Rpc.GetBlockHeight:input_type -> eigenlayer.sidecar.api.v1.GetBlockHeightRequest - 2, // 5: eigenlayer.sidecar.api.v1.Rpc.GetStateRoot:input_type -> eigenlayer.sidecar.api.v1.GetStateRootRequest - 4, // 6: eigenlayer.sidecar.api.v1.Rpc.GetRewardsRoot:input_type -> eigenlayer.sidecar.api.v1.GetRewardsRootRequest - 6, // 7: eigenlayer.sidecar.api.v1.Rpc.GenerateClaimProof:input_type -> eigenlayer.sidecar.api.v1.GenerateClaimProofRequest - 11, // 8: eigenlayer.sidecar.api.v1.Rpc.GetAvailableRewards:input_type -> eigenlayer.sidecar.api.v1.GetAvailableRewardsRequest - 14, // 9: eigenlayer.sidecar.api.v1.Rpc.GetAvailableRewardsTokens:input_type -> eigenlayer.sidecar.api.v1.GetAvailableRewardsTokensRequest - 1, // 10: eigenlayer.sidecar.api.v1.Rpc.GetBlockHeight:output_type -> eigenlayer.sidecar.api.v1.GetBlockHeightResponse - 3, // 11: eigenlayer.sidecar.api.v1.Rpc.GetStateRoot:output_type -> eigenlayer.sidecar.api.v1.GetStateRootResponse - 5, // 12: eigenlayer.sidecar.api.v1.Rpc.GetRewardsRoot:output_type -> eigenlayer.sidecar.api.v1.GetRewardsRootResponse - 10, // 13: eigenlayer.sidecar.api.v1.Rpc.GenerateClaimProof:output_type -> eigenlayer.sidecar.api.v1.GenerateClaimProofResponse - 13, // 14: eigenlayer.sidecar.api.v1.Rpc.GetAvailableRewards:output_type -> eigenlayer.sidecar.api.v1.GetAvailableRewardsResponse - 15, // 15: eigenlayer.sidecar.api.v1.Rpc.GetAvailableRewardsTokens:output_type -> eigenlayer.sidecar.api.v1.GetAvailableRewardsTokensResponse - 10, // [10:16] is the sub-list for method output_type - 4, // [4:10] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_eigenlayer_sidecar_v1_api_proto_init() } -func file_eigenlayer_sidecar_v1_api_proto_init() { - if File_eigenlayer_sidecar_v1_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_eigenlayer_sidecar_v1_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetStateRootRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetStateRootResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetRewardsRootRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetRewardsRootResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClaimProofRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EarnerLeaf); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*TokenLeaf); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Proof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GenerateClaimProofResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetAvailableRewardsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Reward); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetAvailableRewardsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetAvailableRewardsTokensRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_eigenlayer_sidecar_v1_api_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetAvailableRewardsTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_eigenlayer_sidecar_v1_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_eigenlayer_sidecar_v1_api_proto_goTypes, - DependencyIndexes: file_eigenlayer_sidecar_v1_api_proto_depIdxs, - MessageInfos: file_eigenlayer_sidecar_v1_api_proto_msgTypes, - }.Build() - File_eigenlayer_sidecar_v1_api_proto = out.File - file_eigenlayer_sidecar_v1_api_proto_rawDesc = nil - file_eigenlayer_sidecar_v1_api_proto_goTypes = nil - file_eigenlayer_sidecar_v1_api_proto_depIdxs = nil -} diff --git a/protos/eigenlayer/sidecar/v1/api.pb.gw.go b/protos/eigenlayer/sidecar/v1/api.pb.gw.go deleted file mode 100644 index 3c4af97e..00000000 --- a/protos/eigenlayer/sidecar/v1/api.pb.gw.go +++ /dev/null @@ -1,617 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: eigenlayer/sidecar/v1/api.proto - -/* -Package v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_Rpc_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHeightRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetBlockHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHeightRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetBlockHeight(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Rpc_GetStateRoot_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetStateRootRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockNumber"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockNumber") - } - - protoReq.BlockNumber, err = runtime.Uint64(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockNumber", err) - } - - msg, err := client.GetStateRoot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GetStateRoot_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetStateRootRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockNumber"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockNumber") - } - - protoReq.BlockNumber, err = runtime.Uint64(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockNumber", err) - } - - msg, err := server.GetStateRoot(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Rpc_GetRewardsRoot_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRewardsRootRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockNumber"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockNumber") - } - - protoReq.BlockNumber, err = runtime.Uint64(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockNumber", err) - } - - msg, err := client.GetRewardsRoot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GetRewardsRoot_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRewardsRootRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockNumber"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockNumber") - } - - protoReq.BlockNumber, err = runtime.Uint64(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockNumber", err) - } - - msg, err := server.GetRewardsRoot(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Rpc_GenerateClaimProof_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenerateClaimProofRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GenerateClaimProof(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GenerateClaimProof_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenerateClaimProofRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GenerateClaimProof(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Rpc_GetAvailableRewards_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableRewardsRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAvailableRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GetAvailableRewards_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableRewardsRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAvailableRewards(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Rpc_GetAvailableRewardsTokens_0(ctx context.Context, marshaler runtime.Marshaler, client RpcClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableRewardsTokensRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAvailableRewardsTokens(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Rpc_GetAvailableRewardsTokens_0(ctx context.Context, marshaler runtime.Marshaler, server RpcServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableRewardsTokensRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAvailableRewardsTokens(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterRpcHandlerServer registers the http handlers for service Rpc to "mux". -// UnaryRPC :call RpcServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRpcHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterRpcHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RpcServer) error { - - mux.Handle("POST", pattern_Rpc_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetBlockHeight", runtime.WithHTTPPathPattern("/v1/latest-block")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GetBlockHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetStateRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetStateRoot", runtime.WithHTTPPathPattern("/v1/state-roots/{blockNumber}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GetStateRoot_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetStateRoot_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetRewardsRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetRewardsRoot", runtime.WithHTTPPathPattern("/v1/rewards-roots/{blockNumber}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GetRewardsRoot_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetRewardsRoot_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GenerateClaimProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GenerateClaimProof", runtime.WithHTTPPathPattern("/v1/claim-proof")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GenerateClaimProof_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GenerateClaimProof_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetAvailableRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewards", runtime.WithHTTPPathPattern("/v1/available-rewards")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GetAvailableRewards_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetAvailableRewards_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetAvailableRewardsTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewardsTokens", runtime.WithHTTPPathPattern("/v1/available-rewards-tokens")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Rpc_GetAvailableRewardsTokens_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetAvailableRewardsTokens_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterRpcHandlerFromEndpoint is same as RegisterRpcHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRpcHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterRpcHandler(ctx, mux, conn) -} - -// RegisterRpcHandler registers the http handlers for service Rpc to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterRpcHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterRpcHandlerClient(ctx, mux, NewRpcClient(conn)) -} - -// RegisterRpcHandlerClient registers the http handlers for service Rpc -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RpcClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RpcClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RpcClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterRpcHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RpcClient) error { - - mux.Handle("POST", pattern_Rpc_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetBlockHeight", runtime.WithHTTPPathPattern("/v1/latest-block")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GetBlockHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetStateRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetStateRoot", runtime.WithHTTPPathPattern("/v1/state-roots/{blockNumber}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GetStateRoot_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetStateRoot_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetRewardsRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetRewardsRoot", runtime.WithHTTPPathPattern("/v1/rewards-roots/{blockNumber}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GetRewardsRoot_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetRewardsRoot_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GenerateClaimProof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GenerateClaimProof", runtime.WithHTTPPathPattern("/v1/claim-proof")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GenerateClaimProof_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GenerateClaimProof_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetAvailableRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewards", runtime.WithHTTPPathPattern("/v1/available-rewards")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GetAvailableRewards_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetAvailableRewards_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_Rpc_GetAvailableRewardsTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewardsTokens", runtime.WithHTTPPathPattern("/v1/available-rewards-tokens")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Rpc_GetAvailableRewardsTokens_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Rpc_GetAvailableRewardsTokens_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Rpc_GetBlockHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "latest-block"}, "")) - - pattern_Rpc_GetStateRoot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "state-roots", "blockNumber"}, "")) - - pattern_Rpc_GetRewardsRoot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "rewards-roots", "blockNumber"}, "")) - - pattern_Rpc_GenerateClaimProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "claim-proof"}, "")) - - pattern_Rpc_GetAvailableRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "available-rewards"}, "")) - - pattern_Rpc_GetAvailableRewardsTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "available-rewards-tokens"}, "")) -) - -var ( - forward_Rpc_GetBlockHeight_0 = runtime.ForwardResponseMessage - - forward_Rpc_GetStateRoot_0 = runtime.ForwardResponseMessage - - forward_Rpc_GetRewardsRoot_0 = runtime.ForwardResponseMessage - - forward_Rpc_GenerateClaimProof_0 = runtime.ForwardResponseMessage - - forward_Rpc_GetAvailableRewards_0 = runtime.ForwardResponseMessage - - forward_Rpc_GetAvailableRewardsTokens_0 = runtime.ForwardResponseMessage -) diff --git a/protos/eigenlayer/sidecar/v1/api.proto b/protos/eigenlayer/sidecar/v1/api.proto deleted file mode 100644 index 88c1cc22..00000000 --- a/protos/eigenlayer/sidecar/v1/api.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package eigenlayer.sidecar.api.v1; - -option go_package = "github.com/Layr-Labs/go-sidecar/protos/eigenlayer/api/v1"; - -import "google/api/annotations.proto"; - -message GetBlockHeightRequest { -} - -message GetBlockHeightResponse { - uint64 blockNumber = 1; - string blockHash = 2; -} - -message GetStateRootRequest { - uint64 blockNumber = 1; -} - -message GetStateRootResponse { - uint64 ethBlockNumber = 1; - string ethBlockHash = 2; - string stateRoot = 3; -} - -message GetRewardsRootRequest { - uint64 blockNumber = 1; -} - -message GetRewardsRootResponse { - string rewardsRoot = 1; -} - -message GenerateClaimProofRequest { - string earner_address = 1; - repeated string tokens = 2; -} - -message EarnerLeaf { - string earner = 1; - string earner_token_root = 2; -} - -message TokenLeaf { - string token = 1; - string cumulative_earnings = 2; -} - -message Proof { - string root = 1; - uint32 root_index = 2; - uint32 earner_index = 3; - string earner_tree_proof = 4; - EarnerLeaf earner_leaf = 5; - repeated uint32 leaf_indices = 6; - repeated string token_tree_proofs = 7; - repeated TokenLeaf token_leaves = 8; -} - -message GenerateClaimProofResponse { - Proof proof = 1; -} - -message GetAvailableRewardsRequest { - string earner_address = 1; -} - -message Reward { - string token = 1; - string amount = 2; -} - -message GetAvailableRewardsResponse { - repeated Reward rewards = 1; -} - -message GetAvailableRewardsTokensRequest { - string earner_address = 1; -} - -message GetAvailableRewardsTokensResponse { - repeated string tokens = 1; -} - -service Rpc { - rpc GetBlockHeight(GetBlockHeightRequest) returns (GetBlockHeightResponse) { - option (google.api.http) = { - post: "/v1/latest-block" - body: "*" - }; - } - - rpc GetStateRoot(GetStateRootRequest) returns (GetStateRootResponse) { - option (google.api.http) = { - post: "/v1/state-roots/{blockNumber}" - body: "*" - }; - } - - rpc GetRewardsRoot(GetRewardsRootRequest) returns (GetRewardsRootResponse) { - option (google.api.http) = { - post: "/v1/rewards-roots/{blockNumber}" - body: "*" - }; - } - - rpc GenerateClaimProof(GenerateClaimProofRequest) returns (GenerateClaimProofResponse) { - option (google.api.http) = { - post: "/v1/claim-proof" - body: "*" - }; - } - - rpc GetAvailableRewards(GetAvailableRewardsRequest) returns (GetAvailableRewardsResponse) { - option (google.api.http) = { - post: "/v1/available-rewards" - body: "*" - }; - } - - rpc GetAvailableRewardsTokens(GetAvailableRewardsTokensRequest) returns (GetAvailableRewardsTokensResponse) { - option (google.api.http) = { - post: "/v1/available-rewards-tokens" - body: "*" - }; - } -} diff --git a/protos/eigenlayer/sidecar/v1/api_grpc.pb.go b/protos/eigenlayer/sidecar/v1/api_grpc.pb.go deleted file mode 100644 index 52f8de59..00000000 --- a/protos/eigenlayer/sidecar/v1/api_grpc.pb.go +++ /dev/null @@ -1,309 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: eigenlayer/sidecar/v1/api.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Rpc_GetBlockHeight_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GetBlockHeight" - Rpc_GetStateRoot_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GetStateRoot" - Rpc_GetRewardsRoot_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GetRewardsRoot" - Rpc_GenerateClaimProof_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GenerateClaimProof" - Rpc_GetAvailableRewards_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewards" - Rpc_GetAvailableRewardsTokens_FullMethodName = "/eigenlayer.sidecar.api.v1.Rpc/GetAvailableRewardsTokens" -) - -// RpcClient is the client API for Rpc service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type RpcClient interface { - GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) - GetStateRoot(ctx context.Context, in *GetStateRootRequest, opts ...grpc.CallOption) (*GetStateRootResponse, error) - GetRewardsRoot(ctx context.Context, in *GetRewardsRootRequest, opts ...grpc.CallOption) (*GetRewardsRootResponse, error) - GenerateClaimProof(ctx context.Context, in *GenerateClaimProofRequest, opts ...grpc.CallOption) (*GenerateClaimProofResponse, error) - GetAvailableRewards(ctx context.Context, in *GetAvailableRewardsRequest, opts ...grpc.CallOption) (*GetAvailableRewardsResponse, error) - GetAvailableRewardsTokens(ctx context.Context, in *GetAvailableRewardsTokensRequest, opts ...grpc.CallOption) (*GetAvailableRewardsTokensResponse, error) -} - -type rpcClient struct { - cc grpc.ClientConnInterface -} - -func NewRpcClient(cc grpc.ClientConnInterface) RpcClient { - return &rpcClient{cc} -} - -func (c *rpcClient) GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBlockHeightResponse) - err := c.cc.Invoke(ctx, Rpc_GetBlockHeight_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *rpcClient) GetStateRoot(ctx context.Context, in *GetStateRootRequest, opts ...grpc.CallOption) (*GetStateRootResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetStateRootResponse) - err := c.cc.Invoke(ctx, Rpc_GetStateRoot_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *rpcClient) GetRewardsRoot(ctx context.Context, in *GetRewardsRootRequest, opts ...grpc.CallOption) (*GetRewardsRootResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetRewardsRootResponse) - err := c.cc.Invoke(ctx, Rpc_GetRewardsRoot_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *rpcClient) GenerateClaimProof(ctx context.Context, in *GenerateClaimProofRequest, opts ...grpc.CallOption) (*GenerateClaimProofResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GenerateClaimProofResponse) - err := c.cc.Invoke(ctx, Rpc_GenerateClaimProof_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *rpcClient) GetAvailableRewards(ctx context.Context, in *GetAvailableRewardsRequest, opts ...grpc.CallOption) (*GetAvailableRewardsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAvailableRewardsResponse) - err := c.cc.Invoke(ctx, Rpc_GetAvailableRewards_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *rpcClient) GetAvailableRewardsTokens(ctx context.Context, in *GetAvailableRewardsTokensRequest, opts ...grpc.CallOption) (*GetAvailableRewardsTokensResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAvailableRewardsTokensResponse) - err := c.cc.Invoke(ctx, Rpc_GetAvailableRewardsTokens_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RpcServer is the server API for Rpc service. -// All implementations should embed UnimplementedRpcServer -// for forward compatibility. -type RpcServer interface { - GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) - GetStateRoot(context.Context, *GetStateRootRequest) (*GetStateRootResponse, error) - GetRewardsRoot(context.Context, *GetRewardsRootRequest) (*GetRewardsRootResponse, error) - GenerateClaimProof(context.Context, *GenerateClaimProofRequest) (*GenerateClaimProofResponse, error) - GetAvailableRewards(context.Context, *GetAvailableRewardsRequest) (*GetAvailableRewardsResponse, error) - GetAvailableRewardsTokens(context.Context, *GetAvailableRewardsTokensRequest) (*GetAvailableRewardsTokensResponse, error) -} - -// UnimplementedRpcServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedRpcServer struct{} - -func (UnimplementedRpcServer) GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeight not implemented") -} -func (UnimplementedRpcServer) GetStateRoot(context.Context, *GetStateRootRequest) (*GetStateRootResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStateRoot not implemented") -} -func (UnimplementedRpcServer) GetRewardsRoot(context.Context, *GetRewardsRootRequest) (*GetRewardsRootResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRewardsRoot not implemented") -} -func (UnimplementedRpcServer) GenerateClaimProof(context.Context, *GenerateClaimProofRequest) (*GenerateClaimProofResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateClaimProof not implemented") -} -func (UnimplementedRpcServer) GetAvailableRewards(context.Context, *GetAvailableRewardsRequest) (*GetAvailableRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAvailableRewards not implemented") -} -func (UnimplementedRpcServer) GetAvailableRewardsTokens(context.Context, *GetAvailableRewardsTokensRequest) (*GetAvailableRewardsTokensResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAvailableRewardsTokens not implemented") -} -func (UnimplementedRpcServer) testEmbeddedByValue() {} - -// UnsafeRpcServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RpcServer will -// result in compilation errors. -type UnsafeRpcServer interface { - mustEmbedUnimplementedRpcServer() -} - -func RegisterRpcServer(s grpc.ServiceRegistrar, srv RpcServer) { - // If the following call pancis, it indicates UnimplementedRpcServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Rpc_ServiceDesc, srv) -} - -func _Rpc_GetBlockHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GetBlockHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GetBlockHeight_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GetBlockHeight(ctx, req.(*GetBlockHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Rpc_GetStateRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStateRootRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GetStateRoot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GetStateRoot_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GetStateRoot(ctx, req.(*GetStateRootRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Rpc_GetRewardsRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRewardsRootRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GetRewardsRoot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GetRewardsRoot_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GetRewardsRoot(ctx, req.(*GetRewardsRootRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Rpc_GenerateClaimProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateClaimProofRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GenerateClaimProof(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GenerateClaimProof_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GenerateClaimProof(ctx, req.(*GenerateClaimProofRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Rpc_GetAvailableRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvailableRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GetAvailableRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GetAvailableRewards_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GetAvailableRewards(ctx, req.(*GetAvailableRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Rpc_GetAvailableRewardsTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvailableRewardsTokensRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RpcServer).GetAvailableRewardsTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Rpc_GetAvailableRewardsTokens_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RpcServer).GetAvailableRewardsTokens(ctx, req.(*GetAvailableRewardsTokensRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Rpc_ServiceDesc is the grpc.ServiceDesc for Rpc service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Rpc_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "eigenlayer.sidecar.api.v1.Rpc", - HandlerType: (*RpcServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetBlockHeight", - Handler: _Rpc_GetBlockHeight_Handler, - }, - { - MethodName: "GetStateRoot", - Handler: _Rpc_GetStateRoot_Handler, - }, - { - MethodName: "GetRewardsRoot", - Handler: _Rpc_GetRewardsRoot_Handler, - }, - { - MethodName: "GenerateClaimProof", - Handler: _Rpc_GenerateClaimProof_Handler, - }, - { - MethodName: "GetAvailableRewards", - Handler: _Rpc_GetAvailableRewards_Handler, - }, - { - MethodName: "GetAvailableRewardsTokens", - Handler: _Rpc_GetAvailableRewardsTokens_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "eigenlayer/sidecar/v1/api.proto", -}