@merkl/api 0.16.12 → 0.16.14
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/backgroundJobs/jobs/priceUpdater.js +1 -1
- package/dist/src/eden/index.d.ts +90 -410
- package/dist/src/entities/opportunity.js +17 -0
- package/dist/src/index.d.ts +22 -82
- package/dist/src/libs/campaigns/campaignTypes/EncompassingDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/EncompassingDynamicData.js +34 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +4 -0
- package/dist/src/libs/merklChainData.js +1 -1
- package/dist/src/libs/tokens/balances.js +1 -1
- package/dist/src/modules/v4/accounting/accounting.service.js +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -13
- package/dist/src/modules/v4/campaign/campaign.repository.js +2 -2
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +2 -26
- package/dist/src/modules/v4/campaign/campaign.service.js +3 -3
- package/dist/src/modules/v4/claims/claims.controller.d.ts +1 -1
- package/dist/src/modules/v4/enso/enso.model.d.ts +1 -1
- package/dist/src/modules/v4/enso/enso.model.js +1 -1
- package/dist/src/modules/v4/enso/enso.service.d.ts +2 -2
- package/dist/src/modules/v4/enso/enso.service.js +2 -2
- package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -1
- package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
- package/dist/src/modules/v4/kyberzap/kyberzap.service.js +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +4 -40
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +12 -108
- package/dist/src/modules/v4/opportunity/opportunity.service.js +8 -5
- package/dist/src/modules/v4/opportunity/subservices/getAjnaMetadata.service.js +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getBadgerMetadata.service.js +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getEncompassingMetadata.service.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/subservices/getEncompassingMetadata.service.js +35 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +4 -0
- package/dist/src/modules/v4/protocol/protocol.service.js +6 -2
- package/dist/src/modules/v4/reward/reward.controller.js +3 -3
- package/dist/src/modules/v4/reward/reward.repository.js +2 -2
- package/dist/src/modules/v4/reward/reward.service.js +1 -1
- package/dist/src/modules/v4/router.d.ts +22 -82
- package/dist/src/modules/v4/token/token.controller.d.ts +16 -28
- package/dist/src/modules/v4/token/token.controller.js +2 -1
- package/dist/src/modules/v4/token/token.service.d.ts +5 -69
- package/dist/src/routes/v3/lostyield.js +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/modules/v4/token/index.d.ts +0 -3
- package/dist/src/modules/v4/token/index.js +0 -3
@@ -14,56 +14,16 @@ export declare abstract class TokenService {
|
|
14
14
|
/**
|
15
15
|
* Fetches tokens and include balances
|
16
16
|
*/
|
17
|
-
static fetchTokensAndBalances(chainId: number, userAddress: string, addresses: string[]): Promise<
|
18
|
-
symbol: string;
|
19
|
-
name: string | null;
|
20
|
-
id: string;
|
21
|
-
icon: string;
|
22
|
-
chainId: number;
|
23
|
-
address: string;
|
24
|
-
decimals: number;
|
25
|
-
verified: boolean;
|
26
|
-
isTest: boolean;
|
27
|
-
} & {
|
28
|
-
price?: number | null | undefined;
|
29
|
-
} & {
|
30
|
-
balance: bigint;
|
31
|
-
})[]>;
|
17
|
+
static fetchTokensAndBalances(chainId: number, userAddress: string, addresses: string[]): Promise<any[]>;
|
32
18
|
/**
|
33
19
|
* Fetches balances of verified tokens
|
34
20
|
* @info tokens that are popular and must be detected in the app are marked as 'verified'
|
35
21
|
* @param additionalTokens balances along with the verified ones
|
36
22
|
*/
|
37
|
-
static fetchVerifiedBalances(chainId: number, userAddress: string, additionalTokenAddresses?: string[]): Promise<
|
38
|
-
symbol: string;
|
39
|
-
name: string | null;
|
40
|
-
id: string;
|
41
|
-
icon: string;
|
42
|
-
chainId: number;
|
43
|
-
address: string;
|
44
|
-
decimals: number;
|
45
|
-
verified: boolean;
|
46
|
-
isTest: boolean;
|
47
|
-
} & {
|
48
|
-
price?: number | null | undefined;
|
49
|
-
} & {
|
50
|
-
balance: bigint;
|
51
|
-
})[]>;
|
23
|
+
static fetchVerifiedBalances(chainId: number, userAddress: string, additionalTokenAddresses?: string[]): Promise<any[]>;
|
52
24
|
static fetchOnChain(token: TokenModel): Promise<Omit<Token["model"], "id">>;
|
53
25
|
static fetchManyOnChain(chainId: ChainId, addresses: string[]): Promise<{
|
54
|
-
[address: string]: Omit<
|
55
|
-
symbol: string;
|
56
|
-
name: string | null;
|
57
|
-
id: string;
|
58
|
-
icon: string;
|
59
|
-
chainId: number;
|
60
|
-
address: string;
|
61
|
-
decimals: number;
|
62
|
-
verified: boolean;
|
63
|
-
isTest: boolean;
|
64
|
-
} & {
|
65
|
-
price?: number | null | undefined;
|
66
|
-
}, "id">;
|
26
|
+
[address: string]: Omit<Token, "id">;
|
67
27
|
}>;
|
68
28
|
/**
|
69
29
|
* Updates price of tokens that share the same symbol
|
@@ -150,32 +110,8 @@ export declare abstract class TokenService {
|
|
150
110
|
* @param query
|
151
111
|
* @returns A list of tokens
|
152
112
|
*/
|
153
|
-
static findMany(query: GetTokenQueryModel): Promise<
|
154
|
-
|
155
|
-
name: string | null;
|
156
|
-
id: string;
|
157
|
-
icon: string;
|
158
|
-
chainId: number;
|
159
|
-
address: string;
|
160
|
-
decimals: number;
|
161
|
-
verified: boolean;
|
162
|
-
isTest: boolean;
|
163
|
-
} & {
|
164
|
-
price?: number | null | undefined;
|
165
|
-
})[]>;
|
166
|
-
static findManyObjectPerAddress(query: GetTokenQueryModel): Promise<Record<string, {
|
167
|
-
symbol: string;
|
168
|
-
name: string | null;
|
169
|
-
id: string;
|
170
|
-
icon: string;
|
171
|
-
chainId: number;
|
172
|
-
address: string;
|
173
|
-
decimals: number;
|
174
|
-
verified: boolean;
|
175
|
-
isTest: boolean;
|
176
|
-
} & {
|
177
|
-
price?: number | null | undefined;
|
178
|
-
}>>;
|
113
|
+
static findMany(query: GetTokenQueryModel): Promise<Token[]>;
|
114
|
+
static findManyObjectPerAddress(query: GetTokenQueryModel): Promise<Token>;
|
179
115
|
/**
|
180
116
|
* Get value of tokens
|
181
117
|
* @param tokenAmounts address/chain + amount of token
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Redis } from "../../cache";
|
2
|
-
import { TokenService } from "../../modules/v4/token";
|
2
|
+
import { TokenService } from "../../modules/v4/token/token.service";
|
3
3
|
import { getLastBlockBeforeWithCache } from "../../utils/lastBlockBefore";
|
4
4
|
import { BN2Number, ChainId, DAY, ERC20Interface } from "@sdk";
|
5
5
|
import { t } from "elysia";
|