Skip to content

Commit 98f9a6a

Browse files
authored
feat: create new ListOperatorSets endpoint (#62)
2 parents c8fd807 + cea80a4 commit 98f9a6a

File tree

11 files changed

+432
-117
lines changed

11 files changed

+432
-117
lines changed

gen/api-ts/eigenlayer/sidecar/v1/operatorSets/operatorSets.pb.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,11 @@ export type ListOperatorsForBlockRangeRequest = BaseListOperatorsForBlockRangeRe
6363

6464
export type ListOperatorsForBlockRangeResponse = {
6565
operators?: EigenlayerSidecarV1OperatorSetsCommon.Operator[]
66+
}
67+
68+
export type ListOperatorSetsRequest = {
69+
}
70+
71+
export type ListOperatorSetsResponse = {
72+
operatorSets?: EigenlayerSidecarV1OperatorSetsCommon.OperatorSet[]
6673
}

gen/api-ts/eigenlayer/sidecar/v1/operatorSets/rpc.pb.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ export class OperatorSets {
1919
static ListOperatorsForBlockRange(req: EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorsForBlockRangeRequest, initReq?: fm.InitReq): Promise<EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorsForBlockRangeResponse> {
2020
return fm.fetchReq<EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorsForBlockRangeRequest, EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorsForBlockRangeResponse>(`/v1/operatorSets/blockRange/${req["startBlock"]}/${req["endBlock"]}/operators?${fm.renderURLSearchParams(req, ["startBlock", "endBlock"])}`, {...initReq, method: "GET"})
2121
}
22+
static ListOperatorSets(req: EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorSetsRequest, initReq?: fm.InitReq): Promise<EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorSetsResponse> {
23+
return fm.fetchReq<EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorSetsRequest, EigenlayerSidecarV1OperatorSetsOperatorSets.ListOperatorSetsResponse>(`/v1/operatorSets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
24+
}
2225
}

gen/openapi/api.public.swagger.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,32 @@
10171017
]
10181018
}
10191019
},
1020+
"/v1/operatorSets": {
1021+
"get": {
1022+
"summary": "ListOperatorSets",
1023+
"operationId": "OperatorSets_ListOperatorSets",
1024+
"responses": {
1025+
"200": {
1026+
"description": "Successful response",
1027+
"content": {
1028+
"application/json": {
1029+
"schema": {
1030+
"type": "object",
1031+
"properties": {
1032+
"operatorSets": {
1033+
"$ref": "#/components/schemas/OperatorSet"
1034+
}
1035+
}
1036+
}
1037+
}
1038+
}
1039+
}
1040+
},
1041+
"tags": [
1042+
"operatorSets"
1043+
]
1044+
}
1045+
},
10201046
"/v1/slashing/avss/{avsAddress}/operator-sets/{operatorSetId}/slashing-history": {
10211047
"get": {
10221048
"summary": "ListAvsOperatorSetSlashingHistory",
@@ -2468,6 +2494,17 @@
24682494
}
24692495
}
24702496
},
2497+
"ListOperatorSetsRequest": {
2498+
"type": "object"
2499+
},
2500+
"ListOperatorSetsResponse": {
2501+
"type": "object",
2502+
"properties": {
2503+
"operatorSets": {
2504+
"$ref": "#/components/schemas/OperatorSet"
2505+
}
2506+
}
2507+
},
24712508
"ListOperatorSlashingHistoryRequest": {
24722509
"type": "object",
24732510
"properties": {
@@ -4003,6 +4040,10 @@
40034040
"name": "health",
40044041
"description": "Operations from package health"
40054042
},
4043+
{
4044+
"name": "operatorSets",
4045+
"description": "Operations from package operatorSets"
4046+
},
40064047
{
40074048
"name": "protocol",
40084049
"description": "Operations from package protocol"

gen/openapi/api.swagger.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,32 @@
18531853
]
18541854
}
18551855
},
1856+
"/v1/operatorSets": {
1857+
"get": {
1858+
"summary": "ListOperatorSets",
1859+
"operationId": "OperatorSets_ListOperatorSets",
1860+
"responses": {
1861+
"200": {
1862+
"description": "Successful response",
1863+
"content": {
1864+
"application/json": {
1865+
"schema": {
1866+
"type": "object",
1867+
"properties": {
1868+
"operatorSets": {
1869+
"$ref": "#/components/schemas/OperatorSet"
1870+
}
1871+
}
1872+
}
1873+
}
1874+
}
1875+
}
1876+
},
1877+
"tags": [
1878+
"operatorSets"
1879+
]
1880+
}
1881+
},
18561882
"/v1/operatorSets/avss/{avsAddress}/operators": {
18571883
"get": {
18581884
"summary": "ListOperatorsForAvs",
@@ -3482,6 +3508,17 @@
34823508
}
34833509
}
34843510
},
3511+
"ListOperatorSetsRequest": {
3512+
"type": "object"
3513+
},
3514+
"ListOperatorSetsResponse": {
3515+
"type": "object",
3516+
"properties": {
3517+
"operatorSets": {
3518+
"$ref": "#/components/schemas/OperatorSet"
3519+
}
3520+
}
3521+
},
34853522
"ListOperatorSlashingHistoryRequest": {
34863523
"type": "object",
34873524
"properties": {

gen/protos/eigenlayer/sidecar/v1/operatorSets/operatorSets.pb.go

Lines changed: 126 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/protos/eigenlayer/sidecar/v1/operatorSets/rpc.gw.client.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)