Skip to content

Commit e79a182

Browse files
authored
feat: update GetRewardsByAvsForDistributionRoot (#51)
…t and make the API public
2 parents 5b3cadc + 47cfad8 commit e79a182

File tree

30 files changed

+1890
-4111
lines changed

30 files changed

+1890
-4111
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,15 @@ export type GetAttributableRewardsForDistributionRootResponse = {
101101
rewards?: EigenlayerSidecarV1RewardsCommon.AttributableReward[]
102102
}
103103

104-
export type GetRewardsByAvsForDistributionRootRequest = {
104+
105+
type BaseGetRewardsByAvsForDistributionRootRequest = {
105106
rootIndex?: string
106107
pagination?: EigenlayerSidecarV1CommonTypes.Pagination
107108
}
108109

110+
export type GetRewardsByAvsForDistributionRootRequest = BaseGetRewardsByAvsForDistributionRootRequest
111+
& OneOf<{ earnerAddress: string }>
112+
109113
export type GetRewardsByAvsForDistributionRootResponse = {
110114
rewards?: EigenlayerSidecarV1RewardsCommon.AvsReward[]
111115
nextPage?: EigenlayerSidecarV1CommonTypes.Pagination

gen/openapi/api.public.swagger.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,48 @@
503503
]
504504
}
505505
},
506+
"/rewards/v1/avs-rewards-by-root/{root_index}": {
507+
"get": {
508+
"summary": "GetRewardsByAvsForDistributionRoot",
509+
"operationId": "Rewards_GetRewardsByAvsForDistributionRoot",
510+
"parameters": [
511+
{
512+
"name": "root_index",
513+
"in": "path",
514+
"required": true,
515+
"schema": {
516+
"type": "string"
517+
}
518+
}
519+
],
520+
"responses": {
521+
"200": {
522+
"description": "Successful response",
523+
"content": {
524+
"application/json": {
525+
"schema": {
526+
"type": "object",
527+
"properties": {
528+
"nextPage": {
529+
"$ref": "#/components/schemas/Pagination"
530+
},
531+
"rewards": {
532+
"$ref": "#/components/schemas/AvsReward"
533+
}
534+
},
535+
"required": [
536+
"next_page"
537+
]
538+
}
539+
}
540+
}
541+
}
542+
},
543+
"tags": [
544+
"rewards"
545+
]
546+
}
547+
},
506548
"/rewards/v1/claim-proof": {
507549
"post": {
508550
"summary": "GenerateClaimProof",
@@ -1668,6 +1710,9 @@
16681710
"GetRewardsByAvsForDistributionRootRequest": {
16691711
"type": "object",
16701712
"properties": {
1713+
"earnerAddress": {
1714+
"type": "string"
1715+
},
16711716
"pagination": {
16721717
"$ref": "#/components/schemas/Pagination"
16731718
},
@@ -1677,7 +1722,8 @@
16771722
}
16781723
},
16791724
"required": [
1680-
"pagination"
1725+
"pagination",
1726+
"earner_address"
16811727
]
16821728
},
16831729
"GetRewardsByAvsForDistributionRootResponse": {

gen/openapi/api.swagger.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2721,6 +2721,9 @@
27212721
"GetRewardsByAvsForDistributionRootRequest": {
27222722
"type": "object",
27232723
"properties": {
2724+
"earnerAddress": {
2725+
"type": "string"
2726+
},
27242727
"pagination": {
27252728
"$ref": "#/components/schemas/Pagination"
27262729
},
@@ -2730,7 +2733,8 @@
27302733
}
27312734
},
27322735
"required": [
2733-
"pagination"
2736+
"pagination",
2737+
"earner_address"
27342738
]
27352739
},
27362740
"GetRewardsByAvsForDistributionRootResponse": {

0 commit comments

Comments
 (0)