@merkl/api 0.21.23 → 0.21.24
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.
- package/dist/src/eden/index.d.ts +36 -36
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.js +2 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.js +4 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.js +2 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +2 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.js +2 -0
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +2 -2
- package/dist/src/index.d.ts +12 -12
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +2 -2
- package/dist/src/modules/v4/chain/chain.model.d.ts +1 -1
- package/dist/src/modules/v4/chain/chain.model.js +1 -4
- package/dist/src/modules/v4/claims/claims.controller.d.ts +1 -1
- package/dist/src/modules/v4/claims/claims.controller.js +4 -3
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/reward/reward.controller.d.ts +3 -3
- package/dist/src/modules/v4/reward/reward.controller.js +1 -0
- package/dist/src/modules/v4/reward/reward.model.d.ts +1 -8
- package/dist/src/modules/v4/reward/reward.model.js +1 -13
- package/dist/src/modules/v4/router.d.ts +11 -11
- package/dist/src/modules/v4/user/user.controller.d.ts +2 -2
- package/dist/src/modules/v4/user/user.controller.js +8 -11
- package/dist/src/modules/v4/user/user.model.d.ts +2 -2
- package/dist/src/modules/v4/user/user.model.js +2 -8
- package/dist/src/routes/v3/campaigns.d.ts +1 -1
- package/dist/src/routes/v3/router.d.ts +1 -1
- package/dist/src/utils/decodeCalls.js +2 -0
- package/dist/src/utils/encodeCalls.js +2 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1139,7 +1139,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1139
1139
|
} & {
|
1140
1140
|
price?: number | null | undefined;
|
1141
1141
|
})[];
|
1142
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1142
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1143
1143
|
description: string;
|
1144
1144
|
howToSteps: string[];
|
1145
1145
|
depositUrl: string | undefined;
|
@@ -1277,7 +1277,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1277
1277
|
} & {
|
1278
1278
|
price?: number | null | undefined;
|
1279
1279
|
})[];
|
1280
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1280
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1281
1281
|
description: string;
|
1282
1282
|
howToSteps: string[];
|
1283
1283
|
depositUrl: string | undefined;
|
@@ -1407,7 +1407,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1407
1407
|
} & {
|
1408
1408
|
price?: number | null | undefined;
|
1409
1409
|
})[];
|
1410
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1410
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
1411
1411
|
description: string;
|
1412
1412
|
howToSteps: string[];
|
1413
1413
|
depositUrl: string | undefined;
|
@@ -2344,7 +2344,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2344
2344
|
} & {
|
2345
2345
|
price?: number | null | undefined;
|
2346
2346
|
})[];
|
2347
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
2347
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
2348
2348
|
description: string;
|
2349
2349
|
howToSteps: string[];
|
2350
2350
|
depositUrl: string | undefined;
|
@@ -2456,7 +2456,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2456
2456
|
} & {
|
2457
2457
|
price?: number | null | undefined;
|
2458
2458
|
})[];
|
2459
|
-
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
2459
|
+
mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
|
2460
2460
|
description: string;
|
2461
2461
|
howToSteps: string[];
|
2462
2462
|
depositUrl: string | undefined;
|
@@ -3212,9 +3212,9 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3212
3212
|
query: {
|
3213
3213
|
items?: number | undefined;
|
3214
3214
|
page?: number | undefined;
|
3215
|
-
campaignIds?: string[] | undefined;
|
3216
3215
|
address: string;
|
3217
3216
|
chainId: number;
|
3217
|
+
campaignIds: string[];
|
3218
3218
|
};
|
3219
3219
|
headers: unknown;
|
3220
3220
|
response: {
|
@@ -3237,9 +3237,9 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3237
3237
|
query: {
|
3238
3238
|
items?: number | undefined;
|
3239
3239
|
page?: number | undefined;
|
3240
|
-
campaignIds?: string[] | undefined;
|
3241
3240
|
address: string;
|
3242
3241
|
chainId: number;
|
3242
|
+
campaignIds: string[];
|
3243
3243
|
};
|
3244
3244
|
headers: unknown;
|
3245
3245
|
response: {
|
@@ -3260,9 +3260,9 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3260
3260
|
query: {
|
3261
3261
|
items?: number | undefined;
|
3262
3262
|
page?: number | undefined;
|
3263
|
-
campaignIds?: string[] | undefined;
|
3264
3263
|
address: string;
|
3265
3264
|
chainId: number;
|
3265
|
+
campaignIds: string[];
|
3266
3266
|
};
|
3267
3267
|
headers: unknown;
|
3268
3268
|
response: {
|
@@ -3889,7 +3889,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3889
3889
|
test?: boolean | undefined;
|
3890
3890
|
reloadChainId?: number | undefined;
|
3891
3891
|
claimableOnly?: boolean | undefined;
|
3892
|
-
chainId:
|
3892
|
+
chainId: string[];
|
3893
3893
|
};
|
3894
3894
|
headers: unknown;
|
3895
3895
|
response: {
|
@@ -4077,9 +4077,9 @@ export declare const v4: Elysia<"/v4", false, {
|
|
4077
4077
|
};
|
4078
4078
|
query: {
|
4079
4079
|
test?: boolean | undefined;
|
4080
|
-
chainIds?: number[] | undefined;
|
4081
4080
|
reloadChainId?: number | undefined;
|
4082
4081
|
claimableOnly?: boolean | undefined;
|
4082
|
+
chainIds: string[];
|
4083
4083
|
};
|
4084
4084
|
headers: unknown;
|
4085
4085
|
response: {
|
@@ -4874,7 +4874,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
4874
4874
|
address: string;
|
4875
4875
|
};
|
4876
4876
|
query: {
|
4877
|
-
chainIds
|
4877
|
+
chainIds: string[];
|
4878
4878
|
};
|
4879
4879
|
headers: unknown;
|
4880
4880
|
response: {
|
@@ -25,7 +25,7 @@ export declare const UserController: Elysia<"/users", false, {
|
|
25
25
|
test?: boolean | undefined;
|
26
26
|
reloadChainId?: number | undefined;
|
27
27
|
claimableOnly?: boolean | undefined;
|
28
|
-
chainId:
|
28
|
+
chainId: string[];
|
29
29
|
};
|
30
30
|
headers: unknown;
|
31
31
|
response: {
|
@@ -213,9 +213,9 @@ export declare const UserController: Elysia<"/users", false, {
|
|
213
213
|
};
|
214
214
|
query: {
|
215
215
|
test?: boolean | undefined;
|
216
|
-
chainIds?: number[] | undefined;
|
217
216
|
reloadChainId?: number | undefined;
|
218
217
|
claimableOnly?: boolean | undefined;
|
218
|
+
chainIds: string[];
|
219
219
|
};
|
220
220
|
headers: unknown;
|
221
221
|
response: {
|
@@ -7,20 +7,16 @@ import { UserService } from "./user.service";
|
|
7
7
|
export const UserController = new Elysia({ prefix: "/users", detail: { tags: ["Users"] } })
|
8
8
|
// ─── Get User's Rewards With Breakdown ──────────────────────────────
|
9
9
|
.get("/:address/rewards", async ({ params, query }) => {
|
10
|
-
const rewardsByChain = await RewardService.getUserRewardsByChain(params.address, false,
|
10
|
+
const rewardsByChain = await RewardService.getUserRewardsByChain(params.address, false, query.chainId.map(Number), !!query.reloadChainId ? query.reloadChainId : null, !!query.test ? query.test : false, !!query.claimableOnly);
|
11
11
|
return RewardService.removeOpportunityFromRewardBreakdown(rewardsByChain);
|
12
12
|
}, {
|
13
13
|
params: UserUniqueDto,
|
14
14
|
query: UserRewardRouteDto,
|
15
15
|
beforeHandle: ({ query, params }) => {
|
16
16
|
params.address = throwOnInvalidRequiredAddress(params.address);
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
else {
|
21
|
-
for (const chainId of query.chainId) {
|
22
|
-
throwOnUnsupportedChainId(chainId);
|
23
|
-
}
|
17
|
+
query.chainId = query.chainId.flatMap(x => x.split(","));
|
18
|
+
for (const chainId of query.chainId) {
|
19
|
+
throwOnUnsupportedChainId(Number(chainId));
|
24
20
|
}
|
25
21
|
if (!!query.reloadChainId)
|
26
22
|
throwOnUnsupportedChainId(query.reloadChainId);
|
@@ -42,7 +38,7 @@ export const UserController = new Elysia({ prefix: "/users", detail: { tags: ["U
|
|
42
38
|
.get("/:address", async ({ params }) => await UserService.findUniqueOrThrow(params.address))
|
43
39
|
// ─── Get User's Rewards With Breakdown And Details for our FE ────────
|
44
40
|
.get("/:address/rewards/breakdowns", async ({ params, query }) => {
|
45
|
-
const rewardsByChain = await RewardService.getUserRewardsByChain(params.address, true, query?.chainIds, query.reloadChainId ?? null, !!query.test ? query.test : false, !!query.claimableOnly);
|
41
|
+
const rewardsByChain = await RewardService.getUserRewardsByChain(params.address, true, query?.chainIds?.map(Number), query.reloadChainId ?? null, !!query.test ? query.test : false, !!query.claimableOnly);
|
46
42
|
return RewardService.splitRewardsBreakdownByOpportunity(rewardsByChain);
|
47
43
|
}, {
|
48
44
|
params: UserUniqueDto,
|
@@ -51,8 +47,9 @@ export const UserController = new Elysia({ prefix: "/users", detail: { tags: ["U
|
|
51
47
|
params.address = throwOnInvalidRequiredAddress(params.address);
|
52
48
|
if (!!query.reloadChainId)
|
53
49
|
throwOnUnsupportedChainId(query.reloadChainId);
|
54
|
-
|
55
|
-
|
50
|
+
query.chainIds = query.chainIds.flatMap(x => x.split(","));
|
51
|
+
for (const chainId of query.chainIds) {
|
52
|
+
throwOnUnsupportedChainId(Number(chainId));
|
56
53
|
}
|
57
54
|
},
|
58
55
|
})
|
@@ -7,7 +7,7 @@ import type { Resource } from "@/modules/v4/prisma";
|
|
7
7
|
export type User = Resource<"User">;
|
8
8
|
export type Creator = Resource<"Creator">;
|
9
9
|
export declare const UserRewardRouteDto: import("@sinclair/typebox").TObject<{
|
10
|
-
chainId: import("@sinclair/typebox").
|
10
|
+
chainId: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
11
11
|
reloadChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
12
12
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
13
13
|
claimableOnly: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
@@ -44,7 +44,7 @@ export declare const UserUniqueDto: import("@sinclair/typebox").TObject<{
|
|
44
44
|
address: import("@sinclair/typebox").TString;
|
45
45
|
}>;
|
46
46
|
export declare const OptionalChainIdDto: import("@sinclair/typebox").TObject<{
|
47
|
-
chainIds: import("@sinclair/typebox").
|
47
|
+
chainIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
48
48
|
reloadChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
49
49
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
50
50
|
claimableOnly: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
@@ -2,10 +2,7 @@ import { ChainResourceDto } from "@/modules/v4/chain/chain.model";
|
|
2
2
|
import { t } from "elysia";
|
3
3
|
// ─── Dtos ────────────────────────────────────────────────────────────────────
|
4
4
|
export const UserRewardRouteDto = t.Object({
|
5
|
-
chainId: t
|
6
|
-
.Transform(t.Union([t.String(), t.Array(t.Numeric())]))
|
7
|
-
.Decode(value => (typeof value === "string" ? value.split(",").map(v => Number.parseInt(v)) : value))
|
8
|
-
.Encode(value => [...value]),
|
5
|
+
chainId: t.Array(t.String()),
|
9
6
|
reloadChainId: t.Optional(t.Numeric({
|
10
7
|
description: "An optional chainId to bypass the cache and check if there was very recently a claim on this chain",
|
11
8
|
})),
|
@@ -42,10 +39,7 @@ export const UserUniqueDto = t.Object({
|
|
42
39
|
address: t.String(),
|
43
40
|
});
|
44
41
|
export const OptionalChainIdDto = t.Object({
|
45
|
-
chainIds: t.
|
46
|
-
.Transform(t.Union([t.String(), t.Array(t.Numeric())]))
|
47
|
-
.Decode(value => (typeof value === "string" ? value.split(",").map(v => Number.parseInt(v)) : value))
|
48
|
-
.Encode(value => [...value])),
|
42
|
+
chainIds: t.Array(t.String()),
|
49
43
|
reloadChainId: t.Optional(t.Numeric()),
|
50
44
|
test: t.Optional(t.Boolean({ description: "Include test token rewards" })),
|
51
45
|
claimableOnly: t.Optional(t.Boolean({ description: "Include only claimable rewards (to avoid transferring zero amounts)" })),
|
@@ -33,7 +33,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
33
33
|
body: unknown;
|
34
34
|
params: {};
|
35
35
|
query: {
|
36
|
-
types?: string | number |
|
36
|
+
types?: string | number | string[] | number[] | undefined;
|
37
37
|
chainIds?: string | string[] | undefined;
|
38
38
|
creatorTag?: string | undefined;
|
39
39
|
live?: boolean | undefined;
|
@@ -74,7 +74,7 @@ export declare const v3: Elysia<"/v3", false, {
|
|
74
74
|
body: unknown;
|
75
75
|
params: {};
|
76
76
|
query: {
|
77
|
-
types?: string | number |
|
77
|
+
types?: string | number | string[] | number[] | undefined;
|
78
78
|
chainIds?: string | string[] | undefined;
|
79
79
|
creatorTag?: string | undefined;
|
80
80
|
live?: boolean | undefined;
|
@@ -102,6 +102,8 @@ export function decodeReturnValue(returnData, key, type) {
|
|
102
102
|
case Erc20SubType.zerolend_borrowing:
|
103
103
|
case Erc20SubType.lnd_lending:
|
104
104
|
case Erc20SubType.lnd_borrowing:
|
105
|
+
case Erc20SubType.dlend_lending:
|
106
|
+
case Erc20SubType.dlend_borrowing:
|
105
107
|
case Erc20SubType.avalon_lending:
|
106
108
|
case Erc20SubType.avalon_borrowing:
|
107
109
|
case Erc20SubType.superlend_lending:
|
@@ -163,6 +163,8 @@ export function createCall(target, key, type, metaData) {
|
|
163
163
|
case Erc20SubType.zerolend_borrowing:
|
164
164
|
case Erc20SubType.lnd_lending:
|
165
165
|
case Erc20SubType.lnd_borrowing:
|
166
|
+
case Erc20SubType.dlend_lending:
|
167
|
+
case Erc20SubType.dlend_borrowing:
|
166
168
|
case Erc20SubType.avalon_lending:
|
167
169
|
case Erc20SubType.avalon_borrowing:
|
168
170
|
case Erc20SubType.superlend_lending:
|