@merkl/api 0.10.279 → 0.10.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@ declare const eden: {
125
125
  } & {
126
126
  price?: number | null | undefined;
127
127
  })[];
128
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
128
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
129
129
  depositUrl: any;
130
130
  tags: string[];
131
131
  };
@@ -1126,24 +1126,17 @@ declare const eden: {
1126
1126
  };
1127
1127
  pendings: {
1128
1128
  post: (body: {
1129
- distributionChainId: number;
1130
- campaignId: string;
1131
- root: string;
1132
- rewardToken: string;
1133
- toUpdate: {
1134
- auxiliaryData1?: string | undefined;
1135
- auxiliaryData2?: string | undefined;
1136
- reason: string;
1137
- pending: string;
1138
- recipient: string;
1139
- }[];
1140
- toCreate: {
1129
+ data: {
1141
1130
  auxiliaryData1?: string | undefined;
1142
1131
  auxiliaryData2?: string | undefined;
1143
1132
  reason: string;
1144
1133
  pending: string;
1145
1134
  recipient: string;
1146
1135
  }[];
1136
+ distributionChainId: number;
1137
+ campaignId: string;
1138
+ root: string;
1139
+ rewardToken: string;
1147
1140
  }, options: {
1148
1141
  headers: {
1149
1142
  authorization: string;
@@ -3023,7 +3016,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3023
3016
  } & {
3024
3017
  price?: number | null | undefined;
3025
3018
  })[];
3026
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
3019
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
3027
3020
  depositUrl: any;
3028
3021
  tags: string[];
3029
3022
  };
@@ -4149,24 +4142,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4149
4142
  pendings: {
4150
4143
  post: {
4151
4144
  body: {
4152
- distributionChainId: number;
4153
- campaignId: string;
4154
- root: string;
4155
- rewardToken: string;
4156
- toUpdate: {
4157
- auxiliaryData1?: string | undefined;
4158
- auxiliaryData2?: string | undefined;
4159
- reason: string;
4160
- pending: string;
4161
- recipient: string;
4162
- }[];
4163
- toCreate: {
4145
+ data: {
4164
4146
  auxiliaryData1?: string | undefined;
4165
4147
  auxiliaryData2?: string | undefined;
4166
4148
  reason: string;
4167
4149
  pending: string;
4168
4150
  recipient: string;
4169
4151
  }[];
4152
+ distributionChainId: number;
4153
+ campaignId: string;
4154
+ root: string;
4155
+ rewardToken: string;
4170
4156
  };
4171
4157
  params: {};
4172
4158
  query: unknown;
@@ -6444,7 +6430,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6444
6430
  } & {
6445
6431
  price?: number | null | undefined;
6446
6432
  })[];
6447
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
6433
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
6448
6434
  depositUrl: any;
6449
6435
  tags: string[];
6450
6436
  };
@@ -7445,24 +7431,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7445
7431
  };
7446
7432
  pendings: {
7447
7433
  post: (body: {
7448
- distributionChainId: number;
7449
- campaignId: string;
7450
- root: string;
7451
- rewardToken: string;
7452
- toUpdate: {
7453
- auxiliaryData1?: string | undefined;
7454
- auxiliaryData2?: string | undefined;
7455
- reason: string;
7456
- pending: string;
7457
- recipient: string;
7458
- }[];
7459
- toCreate: {
7434
+ data: {
7460
7435
  auxiliaryData1?: string | undefined;
7461
7436
  auxiliaryData2?: string | undefined;
7462
7437
  reason: string;
7463
7438
  pending: string;
7464
7439
  recipient: string;
7465
7440
  }[];
7441
+ distributionChainId: number;
7442
+ campaignId: string;
7443
+ root: string;
7444
+ rewardToken: string;
7466
7445
  }, options: {
7467
7446
  headers: {
7468
7447
  authorization: string;
@@ -221,7 +221,7 @@ declare const app: Elysia<"", false, {
221
221
  } & {
222
222
  price?: number | null | undefined;
223
223
  })[];
224
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
224
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
225
225
  depositUrl: any;
226
226
  tags: string[];
227
227
  };
@@ -1347,24 +1347,17 @@ declare const app: Elysia<"", false, {
1347
1347
  pendings: {
1348
1348
  post: {
1349
1349
  body: {
1350
- distributionChainId: number;
1351
- campaignId: string;
1352
- root: string;
1353
- rewardToken: string;
1354
- toUpdate: {
1355
- auxiliaryData1?: string | undefined;
1356
- auxiliaryData2?: string | undefined;
1357
- reason: string;
1358
- pending: string;
1359
- recipient: string;
1360
- }[];
1361
- toCreate: {
1350
+ data: {
1362
1351
  auxiliaryData1?: string | undefined;
1363
1352
  auxiliaryData2?: string | undefined;
1364
1353
  reason: string;
1365
1354
  pending: string;
1366
1355
  recipient: string;
1367
1356
  }[];
1357
+ distributionChainId: number;
1358
+ campaignId: string;
1359
+ root: string;
1360
+ rewardToken: string;
1368
1361
  };
1369
1362
  params: {};
1370
1363
  query: unknown;
@@ -11,7 +11,8 @@ export declare const slugToProtocolId: {
11
11
  readonly "aura-lp": "aura";
12
12
  readonly aura: "aura";
13
13
  readonly beefy: "beefy";
14
- readonly venus: "compound";
14
+ readonly venus: "venus";
15
+ readonly "compound-v3": "compound";
15
16
  readonly "curve-gauge": "curve";
16
17
  readonly "euler-v2": "euler";
17
18
  readonly fluid: "fluid";
@@ -25,7 +26,7 @@ export declare const slugToProtocolId: {
25
26
  readonly "silo-protected": "silo";
26
27
  readonly silo: "silo";
27
28
  readonly "velodrome-v2-staking": "velodrome";
28
- readonly zerolend: "zero";
29
+ readonly zerolend: "zerolend";
29
30
  };
30
31
  export type EnsoSlug = keyof typeof slugToProtocolId;
31
32
  export declare const apiTypes: {
@@ -12,8 +12,8 @@ export const slugToProtocolId = {
12
12
  "aura-lp": "aura",
13
13
  aura: "aura",
14
14
  beefy: "beefy",
15
- venus: "compound",
16
- // "compound-v3": "compound",
15
+ venus: "venus",
16
+ "compound-v3": "compound",
17
17
  "curve-gauge": "curve",
18
18
  "euler-v2": "euler",
19
19
  fluid: "fluid",
@@ -27,7 +27,7 @@ export const slugToProtocolId = {
27
27
  "silo-protected": "silo",
28
28
  silo: "silo",
29
29
  "velodrome-v2-staking": "velodrome",
30
- zerolend: "zero",
30
+ zerolend: "zerolend",
31
31
  };
32
32
  export const apiTypes = {
33
33
  "/v1/protocols": {
@@ -90,7 +90,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
90
90
  } & {
91
91
  price?: number | null | undefined;
92
92
  })[];
93
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
93
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
94
94
  depositUrl: any;
95
95
  tags: string[];
96
96
  };
@@ -47,7 +47,7 @@ export declare abstract class OpportunityService {
47
47
  } & {
48
48
  price?: number | null | undefined;
49
49
  })[];
50
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
50
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
51
51
  depositUrl: any;
52
52
  tags: string[];
53
53
  }>;
@@ -75,7 +75,7 @@ export declare abstract class OpportunityService {
75
75
  } & {
76
76
  price?: number | null | undefined;
77
77
  })[];
78
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
78
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
79
79
  depositUrl: any;
80
80
  tags: string[];
81
81
  }>;
@@ -5,7 +5,7 @@ import type { Resource } from "../prisma";
5
5
  * @see {@link Resource}
6
6
  */
7
7
  export type Protocol = Resource<"Protocol">;
8
- declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest"];
8
+ declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest", "zerolend"];
9
9
  export type ProtocolId = (typeof protocolTypes)[number];
10
10
  export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
11
11
  id: import("@sinclair/typebox").TString;
@@ -68,6 +68,7 @@ const protocolTypes = [
68
68
  "reactor_fusion",
69
69
  "eigenlayer",
70
70
  "vest",
71
+ "zerolend",
71
72
  ];
72
73
  // ─── DTOs ────────────────────────────────────────────────────────────────────
73
74
  export const ProtocolResourceDto = t.Object({
@@ -130,24 +130,17 @@ export declare const RewardController: Elysia<"/rewards", false, {
130
130
  pendings: {
131
131
  post: {
132
132
  body: {
133
- distributionChainId: number;
134
- campaignId: string;
135
- root: string;
136
- rewardToken: string;
137
- toUpdate: {
138
- auxiliaryData1?: string | undefined;
139
- auxiliaryData2?: string | undefined;
140
- reason: string;
141
- pending: string;
142
- recipient: string;
143
- }[];
144
- toCreate: {
133
+ data: {
145
134
  auxiliaryData1?: string | undefined;
146
135
  auxiliaryData2?: string | undefined;
147
136
  reason: string;
148
137
  pending: string;
149
138
  recipient: string;
150
139
  }[];
140
+ distributionChainId: number;
141
+ campaignId: string;
142
+ root: string;
143
+ rewardToken: string;
151
144
  };
152
145
  params: {};
153
146
  query: unknown;
@@ -126,14 +126,7 @@ export declare const UpdatePendingDto: import("@sinclair/typebox").TObject<{
126
126
  rewardToken: import("@sinclair/typebox").TString;
127
127
  campaignId: import("@sinclair/typebox").TString;
128
128
  root: import("@sinclair/typebox").TString;
129
- toUpdate: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
130
- recipient: import("@sinclair/typebox").TString;
131
- reason: import("@sinclair/typebox").TString;
132
- pending: import("@sinclair/typebox").TString;
133
- auxiliaryData1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
134
- auxiliaryData2: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
135
- }>>;
136
- toCreate: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
129
+ data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
137
130
  recipient: import("@sinclair/typebox").TString;
138
131
  reason: import("@sinclair/typebox").TString;
139
132
  pending: import("@sinclair/typebox").TString;
@@ -58,8 +58,7 @@ export const UpdatePendingDto = t.Object({
58
58
  rewardToken: t.String(),
59
59
  campaignId: t.String(),
60
60
  root: t.String(),
61
- toUpdate: t.Array(PendingDto),
62
- toCreate: t.Array(PendingDto),
61
+ data: t.Array(PendingDto),
63
62
  });
64
63
  export const RewardsByUser = t.Object({
65
64
  address: t.String(),
@@ -126,6 +126,12 @@ export declare abstract class RewardRepository {
126
126
  };
127
127
  })[]>;
128
128
  static updateClaimed(recipient: string, rewardTokenId: string, campaignId: string, reason: string, amount: string): Promise<Prisma.BatchPayload>;
129
+ static findManyBreakdownUniques(rewardTokenId: string, root: string, campaignId: string): Promise<{
130
+ reason: string;
131
+ Reward: {
132
+ recipient: string;
133
+ };
134
+ }[]>;
129
135
  static updatePendings(rewardTokenId: string, root: string, campaignId: string, toUpdate: PendingEntity[]): Promise<{
130
136
  reason: string;
131
137
  pending: string;
@@ -139,6 +139,25 @@ export class RewardRepository {
139
139
  },
140
140
  });
141
141
  }
142
+ static async findManyBreakdownUniques(rewardTokenId, root, campaignId) {
143
+ return await apiDbClient.rewardBreakdown.findMany({
144
+ where: {
145
+ Reward: {
146
+ root,
147
+ rewardTokenId,
148
+ },
149
+ campaignId,
150
+ },
151
+ select: {
152
+ Reward: {
153
+ select: {
154
+ recipient: true,
155
+ },
156
+ },
157
+ reason: true,
158
+ },
159
+ });
160
+ }
142
161
  static async updatePendings(rewardTokenId, root, campaignId, toUpdate) {
143
162
  return await apiDbClient.$transaction(toUpdate.map(x => {
144
163
  return apiDbClient.rewardBreakdown.update({
@@ -238,14 +238,19 @@ export class RewardService {
238
238
  distributionChain: data.distributionChainId,
239
239
  campaignId: data.campaignId,
240
240
  });
241
- try {
242
- await RewardRepository.updatePendings(rewardTokenId, data.root, campaignId, data.toUpdate);
243
- }
244
- catch (e) {
245
- log.error("Error updating pendings", `rewardTokenId: ${rewardTokenId}, campaignId: ${campaignId}, root: ${data.root}`);
246
- console.error(e);
241
+ const ids = (await RewardRepository.findManyBreakdownUniques(rewardTokenId, campaignId, data.root)).map(({ Reward, reason }) => Bun.hash(`${Reward.recipient}${reason}`).toString());
242
+ const toUpdate = [];
243
+ const toCreate = [];
244
+ for (const point of data.data) {
245
+ if (ids.includes(Bun.hash(`${point.recipient}${point.reason}`).toString())) {
246
+ toUpdate.push(point);
247
+ }
248
+ else {
249
+ toCreate.push(point);
250
+ }
247
251
  }
248
- await RewardRepository.createPendings(rewardTokenId, data.root, campaignId, data.toCreate);
252
+ await RewardRepository.updatePendings(rewardTokenId, data.root, campaignId, toUpdate);
253
+ await RewardRepository.createPendings(rewardTokenId, data.root, campaignId, toCreate);
249
254
  return true;
250
255
  }
251
256
  static async countAllchains() {
@@ -99,7 +99,7 @@ export declare const v4: Elysia<"/v4", false, {
99
99
  } & {
100
100
  price?: number | null | undefined;
101
101
  })[];
102
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
102
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
103
103
  depositUrl: any;
104
104
  tags: string[];
105
105
  };
@@ -1225,24 +1225,17 @@ export declare const v4: Elysia<"/v4", false, {
1225
1225
  pendings: {
1226
1226
  post: {
1227
1227
  body: {
1228
- distributionChainId: number;
1229
- campaignId: string;
1230
- root: string;
1231
- rewardToken: string;
1232
- toUpdate: {
1233
- auxiliaryData1?: string | undefined;
1234
- auxiliaryData2?: string | undefined;
1235
- reason: string;
1236
- pending: string;
1237
- recipient: string;
1238
- }[];
1239
- toCreate: {
1228
+ data: {
1240
1229
  auxiliaryData1?: string | undefined;
1241
1230
  auxiliaryData2?: string | undefined;
1242
1231
  reason: string;
1243
1232
  pending: string;
1244
1233
  recipient: string;
1245
1234
  }[];
1235
+ distributionChainId: number;
1236
+ campaignId: string;
1237
+ root: string;
1238
+ rewardToken: string;
1246
1239
  };
1247
1240
  params: {};
1248
1241
  query: unknown;