@merkl/api 1.0.31 → 1.0.33

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.
@@ -4727,7 +4727,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
4727
4727
  body: {
4728
4728
  symbol: string;
4729
4729
  args: {};
4730
- method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL";
4730
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2";
4731
4731
  };
4732
4732
  params: {};
4733
4733
  query: unknown;
@@ -4756,7 +4756,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
4756
4756
  body: {
4757
4757
  symbol?: string | undefined;
4758
4758
  args?: {} | undefined;
4759
- method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | undefined;
4759
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2" | undefined;
4760
4760
  };
4761
4761
  params: {
4762
4762
  symbol: string;
@@ -5113,6 +5113,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
5113
5113
  address: string;
5114
5114
  };
5115
5115
  query: {
5116
+ tags?: string | undefined;
5116
5117
  test?: boolean | undefined;
5117
5118
  chainIds?: string[] | undefined;
5118
5119
  reloadChainId?: number | undefined;
@@ -14238,7 +14239,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
14238
14239
  patch: (body: {
14239
14240
  symbol?: string | undefined;
14240
14241
  args?: {} | undefined;
14241
- method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | undefined;
14242
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2" | undefined;
14242
14243
  }, options: {
14243
14244
  headers: {
14244
14245
  authorization: string;
@@ -14289,7 +14290,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
14289
14290
  post: (body: {
14290
14291
  symbol: string;
14291
14292
  args: {};
14292
- method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL";
14293
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2";
14293
14294
  }, options: {
14294
14295
  headers: {
14295
14296
  authorization: string;
@@ -14469,6 +14470,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
14469
14470
  get: (options: {
14470
14471
  headers?: Record<string, unknown> | undefined;
14471
14472
  query: {
14473
+ tags?: string | undefined;
14472
14474
  test?: boolean | undefined;
14473
14475
  chainIds?: string[] | undefined;
14474
14476
  reloadChainId?: number | undefined;
@@ -4728,7 +4728,7 @@ declare const app: Elysia<"", {
4728
4728
  body: {
4729
4729
  symbol: string;
4730
4730
  args: {};
4731
- method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL";
4731
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2";
4732
4732
  };
4733
4733
  params: {};
4734
4734
  query: unknown;
@@ -4757,7 +4757,7 @@ declare const app: Elysia<"", {
4757
4757
  body: {
4758
4758
  symbol?: string | undefined;
4759
4759
  args?: {} | undefined;
4760
- method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | undefined;
4760
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2" | undefined;
4761
4761
  };
4762
4762
  params: {
4763
4763
  symbol: string;
@@ -5114,6 +5114,7 @@ declare const app: Elysia<"", {
5114
5114
  address: string;
5115
5115
  };
5116
5116
  query: {
5117
+ tags?: string | undefined;
5117
5118
  test?: boolean | undefined;
5118
5119
  chainIds?: string[] | undefined;
5119
5120
  reloadChainId?: number | undefined;
@@ -121,7 +121,7 @@ export declare const PriceController: Elysia<"/prices", {
121
121
  body: {
122
122
  symbol: string;
123
123
  args: {};
124
- method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL";
124
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2";
125
125
  };
126
126
  params: {};
127
127
  query: unknown;
@@ -150,7 +150,7 @@ export declare const PriceController: Elysia<"/prices", {
150
150
  body: {
151
151
  symbol?: string | undefined;
152
152
  args?: {} | undefined;
153
- method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | undefined;
153
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2" | undefined;
154
154
  };
155
155
  params: {
156
156
  symbol: string;
@@ -9,6 +9,7 @@ export declare const CreatePriceSourceDto: import("@sinclair/typebox").TObject<{
9
9
  readonly INDEXCOOP: "INDEXCOOP";
10
10
  readonly DEFILLAMA: "DEFILLAMA";
11
11
  readonly ONCHAIN_CALL: "ONCHAIN_CALL";
12
+ readonly UNISWAP_V2: "UNISWAP_V2";
12
13
  }>;
13
14
  args: import("@sinclair/typebox").TObject<{}>;
14
15
  }>;
@@ -23,6 +24,7 @@ export declare const UpdatePriceSourceDto: import("@sinclair/typebox").TObject<{
23
24
  readonly INDEXCOOP: "INDEXCOOP";
24
25
  readonly DEFILLAMA: "DEFILLAMA";
25
26
  readonly ONCHAIN_CALL: "ONCHAIN_CALL";
27
+ readonly UNISWAP_V2: "UNISWAP_V2";
26
28
  }>>;
27
29
  args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
28
30
  }>;
@@ -4,7 +4,7 @@ import type { BreakdownForCampaignsRaw, CampaignIdModel, CampaignIdWithoutPageMo
4
4
  export declare abstract class RewardRepository {
5
5
  static createManyReward(rewards: CreateManyRewardModel): Promise<Prisma.BatchPayload>;
6
6
  static createManyBreakdown(data: CreateManyBreakdownModel): Promise<Prisma.BatchPayload>;
7
- static getByRecipient(recipient: string, roots: string[], withToken: boolean, withTestTokens: boolean, breakdownPage?: number, chainFilter?: ChainId[] | null, reasonFilter?: string): Promise<({
7
+ static getByRecipient(recipient: string, roots: string[], withToken: boolean, withTestTokens: boolean, tags: string[], breakdownPage?: number, chainFilter?: ChainId[] | null, reasonFilter?: string): Promise<({
8
8
  RewardToken: {
9
9
  symbol: string;
10
10
  name: string | null;
@@ -362,7 +362,7 @@ export declare abstract class RewardService {
362
362
  proofs: string[];
363
363
  }[];
364
364
  static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("@package/databases").BatchPayload | undefined>;
365
- static getByRecipient(recipient: string, roots: string[], withToken?: boolean, withTestTokens?: boolean, breakdownPage?: number, chainFilter?: ChainId[] | null, reasonFilter?: string): Promise<({
365
+ static getByRecipient(recipient: string, roots: string[], tags: string[], withToken?: boolean, withTestTokens?: boolean, breakdownPage?: number, chainFilter?: ChainId[] | null, reasonFilter?: string): Promise<({
366
366
  RewardToken: {
367
367
  symbol: string;
368
368
  name: string | null;
@@ -788,7 +788,7 @@ export declare abstract class RewardService {
788
788
  pending: string;
789
789
  rewardTokenId: string;
790
790
  })[]>;
791
- static getUserRewardsByChain(user: string, withToken: boolean, breakdownPage?: number, chainFilter?: ChainId[], connectedChainId?: MerklChainId | null, withTestTokens?: boolean, claimableOnly?: boolean): Promise<{
791
+ static getUserRewardsByChain(user: string, withToken: boolean, breakdownPage?: number, chainFilter?: ChainId[], connectedChainId?: MerklChainId | null, withTestTokens?: boolean, claimableOnly?: boolean, tags?: string[]): Promise<{
792
792
  chain: Chain;
793
793
  rewards: Awaited<ReturnType<(typeof RewardService)["format"]>>;
794
794
  }[]>;
@@ -4537,7 +4537,7 @@ export declare const v4: Elysia<"/v4", {
4537
4537
  body: {
4538
4538
  symbol: string;
4539
4539
  args: {};
4540
- method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL";
4540
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2";
4541
4541
  };
4542
4542
  params: {};
4543
4543
  query: unknown;
@@ -4566,7 +4566,7 @@ export declare const v4: Elysia<"/v4", {
4566
4566
  body: {
4567
4567
  symbol?: string | undefined;
4568
4568
  args?: {} | undefined;
4569
- method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | undefined;
4569
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | "ONCHAIN_CALL" | "UNISWAP_V2" | undefined;
4570
4570
  };
4571
4571
  params: {
4572
4572
  symbol: string;
@@ -4923,6 +4923,7 @@ export declare const v4: Elysia<"/v4", {
4923
4923
  address: string;
4924
4924
  };
4925
4925
  query: {
4926
+ tags?: string | undefined;
4926
4927
  test?: boolean | undefined;
4927
4928
  chainIds?: string[] | undefined;
4928
4929
  reloadChainId?: number | undefined;
@@ -178,6 +178,7 @@ export declare const UserController: Elysia<"/users", {
178
178
  address: string;
179
179
  };
180
180
  query: {
181
+ tags?: string | undefined;
181
182
  test?: boolean | undefined;
182
183
  chainIds?: string[] | undefined;
183
184
  reloadChainId?: number | undefined;
@@ -52,7 +52,8 @@ export declare const UserRewardsResourceDto: import("@sinclair/typebox").TObject
52
52
  export declare const UserUniqueDto: import("@sinclair/typebox").TObject<{
53
53
  address: import("@sinclair/typebox").TString;
54
54
  }>;
55
- export declare const OptionalChainIdDto: import("@sinclair/typebox").TObject<{
55
+ export declare const GetRewardBreakdownsDto: import("@sinclair/typebox").TObject<{
56
+ tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
56
57
  chainIds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
57
58
  reloadChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
58
59
  test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -80,5 +81,5 @@ export declare const UserTagsDto: import("@sinclair/typebox").TObject<{
80
81
  }>;
81
82
  export type UserUniqueModel = typeof UserUniqueDto.static;
82
83
  export type UserModel = typeof UserDto.static;
83
- export type OptionalChainIdModel = typeof OptionalChainIdDto.static;
84
+ export type OptionalChainIdModel = typeof GetRewardBreakdownsDto.static;
84
85
  export type GetManyUserModel = typeof GetManyUserQuery.static;
@@ -0,0 +1,8 @@
1
+ import { type PriceSource } from "@package/databases/api";
2
+ import type PriceFetcher from "./priceFetcher.ts";
3
+ import type { ResponsePriceType } from "./priceFetcher.ts";
4
+ export default class UniswapV2PriceService implements PriceFetcher {
5
+ static readonly instance: PriceFetcher;
6
+ private constructor();
7
+ getPrice(tokens: PriceSource[]): Promise<ResponsePriceType[]>;
8
+ }