@merkl/api 0.10.352 → 0.10.353
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 +236 -7
- package/dist/src/index.d.ts +84 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GenericProcessor.d.ts +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GenericProcessor.js +2 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +72 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +16 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +95 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +47 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +13 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +52 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +12 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +3 -2
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.service.js +5 -2
- package/dist/src/modules/v4/router.d.ts +84 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -2248,6 +2248,68 @@ declare const eden: {
|
|
2248
2248
|
};
|
2249
2249
|
}>>;
|
2250
2250
|
};
|
2251
|
+
"from-config": {
|
2252
|
+
post: (body: {
|
2253
|
+
id?: string | undefined;
|
2254
|
+
tags?: string[] | undefined;
|
2255
|
+
identifier?: string | undefined;
|
2256
|
+
subType?: number | undefined;
|
2257
|
+
chain?: {} | undefined;
|
2258
|
+
chainId?: number | undefined;
|
2259
|
+
startTimestamp?: string | undefined;
|
2260
|
+
endTimestamp?: string | undefined;
|
2261
|
+
distributionChainId?: number | undefined;
|
2262
|
+
campaignId?: string | undefined;
|
2263
|
+
rewardTokenId?: string | undefined;
|
2264
|
+
amount?: string | undefined;
|
2265
|
+
opportunityId?: string | undefined;
|
2266
|
+
creatorAddress?: string | undefined;
|
2267
|
+
campaignStatus?: {} | undefined;
|
2268
|
+
rewardToken?: {} | undefined;
|
2269
|
+
rewardTokenAddress?: string | undefined;
|
2270
|
+
distributionChain?: {} | undefined;
|
2271
|
+
opportunityIdentifier?: string | undefined;
|
2272
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST";
|
2273
|
+
params: {};
|
2274
|
+
computeChainId: number;
|
2275
|
+
}, options: {
|
2276
|
+
headers: {
|
2277
|
+
authorization: string;
|
2278
|
+
};
|
2279
|
+
query?: Record<string, unknown> | undefined;
|
2280
|
+
fetch?: RequestInit | undefined;
|
2281
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
2282
|
+
[x: string]: any;
|
2283
|
+
200: any;
|
2284
|
+
}>>;
|
2285
|
+
};
|
2286
|
+
"from-existing": {
|
2287
|
+
get: (options: {
|
2288
|
+
headers: {
|
2289
|
+
authorization: string;
|
2290
|
+
};
|
2291
|
+
query: {
|
2292
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | undefined;
|
2293
|
+
items?: number | undefined;
|
2294
|
+
subType?: number | undefined;
|
2295
|
+
page?: number | undefined;
|
2296
|
+
chainId?: number | undefined;
|
2297
|
+
startTimestamp?: string | undefined;
|
2298
|
+
endTimestamp?: string | undefined;
|
2299
|
+
tokenAddress?: string | undefined;
|
2300
|
+
mainParameter?: string | undefined;
|
2301
|
+
campaignId?: string | undefined;
|
2302
|
+
opportunityId?: string | undefined;
|
2303
|
+
test?: boolean | undefined;
|
2304
|
+
creatorTag?: string | undefined;
|
2305
|
+
tokenSymbol?: string | undefined;
|
2306
|
+
};
|
2307
|
+
fetch?: RequestInit | undefined;
|
2308
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
2309
|
+
[x: string]: any;
|
2310
|
+
200: any;
|
2311
|
+
}>>;
|
2312
|
+
};
|
2251
2313
|
};
|
2252
2314
|
"campaign-status": ((params: {
|
2253
2315
|
campaignId: string | number;
|
@@ -2568,12 +2630,23 @@ declare const eden: {
|
|
2568
2630
|
amount: string;
|
2569
2631
|
rewardToken: string;
|
2570
2632
|
campaignType: number;
|
2571
|
-
}, options
|
2633
|
+
}, options: {
|
2572
2634
|
headers?: Record<string, unknown> | undefined;
|
2573
|
-
query
|
2635
|
+
query: {
|
2636
|
+
debug?: boolean | undefined;
|
2637
|
+
};
|
2574
2638
|
fetch?: RequestInit | undefined;
|
2575
|
-
}
|
2639
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
2576
2640
|
200: {
|
2641
|
+
version: string;
|
2642
|
+
chainId: string;
|
2643
|
+
createdAt: number;
|
2644
|
+
meta: {
|
2645
|
+
name: string;
|
2646
|
+
txBuilderVersion: string;
|
2647
|
+
};
|
2648
|
+
transactions: import("../modules/v4/programPayload").transaction[];
|
2649
|
+
} | {
|
2577
2650
|
safePayload: import("../modules/v4/programPayload").safePayload;
|
2578
2651
|
nonEncodedConfig: any;
|
2579
2652
|
};
|
@@ -6005,6 +6078,78 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6005
6078
|
};
|
6006
6079
|
};
|
6007
6080
|
};
|
6081
|
+
} & {
|
6082
|
+
"dynamic-data": {
|
6083
|
+
"from-config": {
|
6084
|
+
post: {
|
6085
|
+
body: {
|
6086
|
+
id?: string | undefined;
|
6087
|
+
tags?: string[] | undefined;
|
6088
|
+
identifier?: string | undefined;
|
6089
|
+
subType?: number | undefined;
|
6090
|
+
chain?: {} | undefined;
|
6091
|
+
chainId?: number | undefined;
|
6092
|
+
startTimestamp?: string | undefined;
|
6093
|
+
endTimestamp?: string | undefined;
|
6094
|
+
distributionChainId?: number | undefined;
|
6095
|
+
campaignId?: string | undefined;
|
6096
|
+
rewardTokenId?: string | undefined;
|
6097
|
+
amount?: string | undefined;
|
6098
|
+
opportunityId?: string | undefined;
|
6099
|
+
creatorAddress?: string | undefined;
|
6100
|
+
campaignStatus?: {} | undefined;
|
6101
|
+
rewardToken?: {} | undefined;
|
6102
|
+
rewardTokenAddress?: string | undefined;
|
6103
|
+
distributionChain?: {} | undefined;
|
6104
|
+
opportunityIdentifier?: string | undefined;
|
6105
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST";
|
6106
|
+
params: {};
|
6107
|
+
computeChainId: number;
|
6108
|
+
};
|
6109
|
+
params: {};
|
6110
|
+
query: unknown;
|
6111
|
+
headers: {
|
6112
|
+
authorization: string;
|
6113
|
+
};
|
6114
|
+
response: {
|
6115
|
+
[x: string]: any;
|
6116
|
+
200: any;
|
6117
|
+
};
|
6118
|
+
};
|
6119
|
+
};
|
6120
|
+
};
|
6121
|
+
} & {
|
6122
|
+
"dynamic-data": {
|
6123
|
+
"from-existing": {
|
6124
|
+
get: {
|
6125
|
+
body: unknown;
|
6126
|
+
params: {};
|
6127
|
+
query: {
|
6128
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | undefined;
|
6129
|
+
items?: number | undefined;
|
6130
|
+
subType?: number | undefined;
|
6131
|
+
page?: number | undefined;
|
6132
|
+
chainId?: number | undefined;
|
6133
|
+
startTimestamp?: string | undefined;
|
6134
|
+
endTimestamp?: string | undefined;
|
6135
|
+
tokenAddress?: string | undefined;
|
6136
|
+
mainParameter?: string | undefined;
|
6137
|
+
campaignId?: string | undefined;
|
6138
|
+
opportunityId?: string | undefined;
|
6139
|
+
test?: boolean | undefined;
|
6140
|
+
creatorTag?: string | undefined;
|
6141
|
+
tokenSymbol?: string | undefined;
|
6142
|
+
};
|
6143
|
+
headers: {
|
6144
|
+
authorization: string;
|
6145
|
+
};
|
6146
|
+
response: {
|
6147
|
+
[x: string]: any;
|
6148
|
+
200: any;
|
6149
|
+
};
|
6150
|
+
};
|
6151
|
+
};
|
6152
|
+
};
|
6008
6153
|
};
|
6009
6154
|
} & {
|
6010
6155
|
v4: {
|
@@ -6397,10 +6542,21 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6397
6542
|
campaignType: number;
|
6398
6543
|
};
|
6399
6544
|
params: {};
|
6400
|
-
query:
|
6545
|
+
query: {
|
6546
|
+
debug?: boolean | undefined;
|
6547
|
+
};
|
6401
6548
|
headers: unknown;
|
6402
6549
|
response: {
|
6403
6550
|
200: {
|
6551
|
+
version: string;
|
6552
|
+
chainId: string;
|
6553
|
+
createdAt: number;
|
6554
|
+
meta: {
|
6555
|
+
name: string;
|
6556
|
+
txBuilderVersion: string;
|
6557
|
+
};
|
6558
|
+
transactions: import("../modules/v4/programPayload").transaction[];
|
6559
|
+
} | {
|
6404
6560
|
safePayload: import("../modules/v4/programPayload").safePayload;
|
6405
6561
|
nonEncodedConfig: any;
|
6406
6562
|
};
|
@@ -9477,6 +9633,68 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
9477
9633
|
};
|
9478
9634
|
}>>;
|
9479
9635
|
};
|
9636
|
+
"from-config": {
|
9637
|
+
post: (body: {
|
9638
|
+
id?: string | undefined;
|
9639
|
+
tags?: string[] | undefined;
|
9640
|
+
identifier?: string | undefined;
|
9641
|
+
subType?: number | undefined;
|
9642
|
+
chain?: {} | undefined;
|
9643
|
+
chainId?: number | undefined;
|
9644
|
+
startTimestamp?: string | undefined;
|
9645
|
+
endTimestamp?: string | undefined;
|
9646
|
+
distributionChainId?: number | undefined;
|
9647
|
+
campaignId?: string | undefined;
|
9648
|
+
rewardTokenId?: string | undefined;
|
9649
|
+
amount?: string | undefined;
|
9650
|
+
opportunityId?: string | undefined;
|
9651
|
+
creatorAddress?: string | undefined;
|
9652
|
+
campaignStatus?: {} | undefined;
|
9653
|
+
rewardToken?: {} | undefined;
|
9654
|
+
rewardTokenAddress?: string | undefined;
|
9655
|
+
distributionChain?: {} | undefined;
|
9656
|
+
opportunityIdentifier?: string | undefined;
|
9657
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST";
|
9658
|
+
params: {};
|
9659
|
+
computeChainId: number;
|
9660
|
+
}, options: {
|
9661
|
+
headers: {
|
9662
|
+
authorization: string;
|
9663
|
+
};
|
9664
|
+
query?: Record<string, unknown> | undefined;
|
9665
|
+
fetch?: RequestInit | undefined;
|
9666
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
9667
|
+
[x: string]: any;
|
9668
|
+
200: any;
|
9669
|
+
}>>;
|
9670
|
+
};
|
9671
|
+
"from-existing": {
|
9672
|
+
get: (options: {
|
9673
|
+
headers: {
|
9674
|
+
authorization: string;
|
9675
|
+
};
|
9676
|
+
query: {
|
9677
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | undefined;
|
9678
|
+
items?: number | undefined;
|
9679
|
+
subType?: number | undefined;
|
9680
|
+
page?: number | undefined;
|
9681
|
+
chainId?: number | undefined;
|
9682
|
+
startTimestamp?: string | undefined;
|
9683
|
+
endTimestamp?: string | undefined;
|
9684
|
+
tokenAddress?: string | undefined;
|
9685
|
+
mainParameter?: string | undefined;
|
9686
|
+
campaignId?: string | undefined;
|
9687
|
+
opportunityId?: string | undefined;
|
9688
|
+
test?: boolean | undefined;
|
9689
|
+
creatorTag?: string | undefined;
|
9690
|
+
tokenSymbol?: string | undefined;
|
9691
|
+
};
|
9692
|
+
fetch?: RequestInit | undefined;
|
9693
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
9694
|
+
[x: string]: any;
|
9695
|
+
200: any;
|
9696
|
+
}>>;
|
9697
|
+
};
|
9480
9698
|
};
|
9481
9699
|
"campaign-status": ((params: {
|
9482
9700
|
campaignId: string | number;
|
@@ -9797,12 +10015,23 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
9797
10015
|
amount: string;
|
9798
10016
|
rewardToken: string;
|
9799
10017
|
campaignType: number;
|
9800
|
-
}, options
|
10018
|
+
}, options: {
|
9801
10019
|
headers?: Record<string, unknown> | undefined;
|
9802
|
-
query
|
10020
|
+
query: {
|
10021
|
+
debug?: boolean | undefined;
|
10022
|
+
};
|
9803
10023
|
fetch?: RequestInit | undefined;
|
9804
|
-
}
|
10024
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
9805
10025
|
200: {
|
10026
|
+
version: string;
|
10027
|
+
chainId: string;
|
10028
|
+
createdAt: number;
|
10029
|
+
meta: {
|
10030
|
+
name: string;
|
10031
|
+
txBuilderVersion: string;
|
10032
|
+
};
|
10033
|
+
transactions: import("../modules/v4/programPayload").transaction[];
|
10034
|
+
} | {
|
9806
10035
|
safePayload: import("../modules/v4/programPayload").safePayload;
|
9807
10036
|
nonEncodedConfig: any;
|
9808
10037
|
};
|
package/dist/src/index.d.ts
CHANGED
@@ -2797,6 +2797,78 @@ declare const app: Elysia<"", false, {
|
|
2797
2797
|
};
|
2798
2798
|
};
|
2799
2799
|
};
|
2800
|
+
} & {
|
2801
|
+
"dynamic-data": {
|
2802
|
+
"from-config": {
|
2803
|
+
post: {
|
2804
|
+
body: {
|
2805
|
+
id?: string | undefined;
|
2806
|
+
tags?: string[] | undefined;
|
2807
|
+
identifier?: string | undefined;
|
2808
|
+
subType?: number | undefined;
|
2809
|
+
chain?: {} | undefined;
|
2810
|
+
chainId?: number | undefined;
|
2811
|
+
startTimestamp?: string | undefined;
|
2812
|
+
endTimestamp?: string | undefined;
|
2813
|
+
distributionChainId?: number | undefined;
|
2814
|
+
campaignId?: string | undefined;
|
2815
|
+
rewardTokenId?: string | undefined;
|
2816
|
+
amount?: string | undefined;
|
2817
|
+
opportunityId?: string | undefined;
|
2818
|
+
creatorAddress?: string | undefined;
|
2819
|
+
campaignStatus?: {} | undefined;
|
2820
|
+
rewardToken?: {} | undefined;
|
2821
|
+
rewardTokenAddress?: string | undefined;
|
2822
|
+
distributionChain?: {} | undefined;
|
2823
|
+
opportunityIdentifier?: string | undefined;
|
2824
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST";
|
2825
|
+
params: {};
|
2826
|
+
computeChainId: number;
|
2827
|
+
};
|
2828
|
+
params: {};
|
2829
|
+
query: unknown;
|
2830
|
+
headers: {
|
2831
|
+
authorization: string;
|
2832
|
+
};
|
2833
|
+
response: {
|
2834
|
+
[x: string]: any;
|
2835
|
+
200: any;
|
2836
|
+
};
|
2837
|
+
};
|
2838
|
+
};
|
2839
|
+
};
|
2840
|
+
} & {
|
2841
|
+
"dynamic-data": {
|
2842
|
+
"from-existing": {
|
2843
|
+
get: {
|
2844
|
+
body: unknown;
|
2845
|
+
params: {};
|
2846
|
+
query: {
|
2847
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | undefined;
|
2848
|
+
items?: number | undefined;
|
2849
|
+
subType?: number | undefined;
|
2850
|
+
page?: number | undefined;
|
2851
|
+
chainId?: number | undefined;
|
2852
|
+
startTimestamp?: string | undefined;
|
2853
|
+
endTimestamp?: string | undefined;
|
2854
|
+
tokenAddress?: string | undefined;
|
2855
|
+
mainParameter?: string | undefined;
|
2856
|
+
campaignId?: string | undefined;
|
2857
|
+
opportunityId?: string | undefined;
|
2858
|
+
test?: boolean | undefined;
|
2859
|
+
creatorTag?: string | undefined;
|
2860
|
+
tokenSymbol?: string | undefined;
|
2861
|
+
};
|
2862
|
+
headers: {
|
2863
|
+
authorization: string;
|
2864
|
+
};
|
2865
|
+
response: {
|
2866
|
+
[x: string]: any;
|
2867
|
+
200: any;
|
2868
|
+
};
|
2869
|
+
};
|
2870
|
+
};
|
2871
|
+
};
|
2800
2872
|
};
|
2801
2873
|
} & {
|
2802
2874
|
v4: {
|
@@ -3189,10 +3261,21 @@ declare const app: Elysia<"", false, {
|
|
3189
3261
|
campaignType: number;
|
3190
3262
|
};
|
3191
3263
|
params: {};
|
3192
|
-
query:
|
3264
|
+
query: {
|
3265
|
+
debug?: boolean | undefined;
|
3266
|
+
};
|
3193
3267
|
headers: unknown;
|
3194
3268
|
response: {
|
3195
3269
|
200: {
|
3270
|
+
version: string;
|
3271
|
+
chainId: string;
|
3272
|
+
createdAt: number;
|
3273
|
+
meta: {
|
3274
|
+
name: string;
|
3275
|
+
txBuilderVersion: string;
|
3276
|
+
};
|
3277
|
+
transactions: import("./modules/v4/programPayload").transaction[];
|
3278
|
+
} | {
|
3196
3279
|
safePayload: import("./modules/v4/programPayload").safePayload;
|
3197
3280
|
nonEncodedConfig: any;
|
3198
3281
|
};
|
@@ -18,18 +18,22 @@ export type callKeys = mandatoryCallKeys & {
|
|
18
18
|
[key: string]: string;
|
19
19
|
};
|
20
20
|
export type mandatoryCallKeys = {
|
21
|
+
type: tokenType;
|
22
|
+
protocol: string;
|
21
23
|
tokenAddress: string;
|
22
24
|
blacklistedSupply: string;
|
23
25
|
totalSupply: string;
|
24
26
|
whitelistedSupply: string;
|
25
27
|
};
|
26
28
|
export type dataRaw = {
|
29
|
+
protocol: string;
|
27
30
|
tokenAddress: string;
|
28
31
|
blacklistedSupply: string;
|
29
32
|
totalSupply: string;
|
30
33
|
whitelistedSupply: string;
|
31
34
|
};
|
32
35
|
export type dataType = {
|
36
|
+
protocol: string;
|
33
37
|
type: tokenType;
|
34
38
|
tokenAddress: string;
|
35
39
|
totalSupply: number;
|
@@ -39,6 +39,7 @@ export class GenericProcessor {
|
|
39
39
|
const priceTargetToken = (await pricer.get({ symbol: campaign.campaignParameters.symbolTargetToken })) ?? 0;
|
40
40
|
const tvl = whitelistedSupplyTargetToken * priceTargetToken;
|
41
41
|
return {
|
42
|
+
protocol: typeInfo.protocol,
|
42
43
|
type,
|
43
44
|
whitelistedSupplyTargetToken,
|
44
45
|
totalSupply,
|
@@ -49,7 +50,7 @@ export class GenericProcessor {
|
|
49
50
|
};
|
50
51
|
}
|
51
52
|
computeRound1(type, typeInfo) {
|
52
|
-
typeInfo = { ...tokenTypeToProtocol[type], ...typeInfo };
|
53
|
+
typeInfo = { type, ...tokenTypeToProtocol[type], ...typeInfo };
|
53
54
|
this.processingRound1(typeInfo);
|
54
55
|
if (this.debug) {
|
55
56
|
console.log("Round 1", {
|
@@ -37,6 +37,78 @@ export declare const DynamicDataController: Elysia<"/dynamic-data", false, {
|
|
37
37
|
};
|
38
38
|
};
|
39
39
|
};
|
40
|
+
} & {
|
41
|
+
"dynamic-data": {
|
42
|
+
"from-config": {
|
43
|
+
post: {
|
44
|
+
body: {
|
45
|
+
id?: string | undefined;
|
46
|
+
tags?: string[] | undefined;
|
47
|
+
identifier?: string | undefined;
|
48
|
+
subType?: number | undefined;
|
49
|
+
chain?: {} | undefined;
|
50
|
+
chainId?: number | undefined;
|
51
|
+
startTimestamp?: string | undefined;
|
52
|
+
endTimestamp?: string | undefined;
|
53
|
+
distributionChainId?: number | undefined;
|
54
|
+
campaignId?: string | undefined;
|
55
|
+
rewardTokenId?: string | undefined;
|
56
|
+
amount?: string | undefined;
|
57
|
+
opportunityId?: string | undefined;
|
58
|
+
creatorAddress?: string | undefined;
|
59
|
+
campaignStatus?: {} | undefined;
|
60
|
+
rewardToken?: {} | undefined;
|
61
|
+
rewardTokenAddress?: string | undefined;
|
62
|
+
distributionChain?: {} | undefined;
|
63
|
+
opportunityIdentifier?: string | undefined;
|
64
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST";
|
65
|
+
params: {};
|
66
|
+
computeChainId: number;
|
67
|
+
};
|
68
|
+
params: {};
|
69
|
+
query: unknown;
|
70
|
+
headers: {
|
71
|
+
authorization: string;
|
72
|
+
};
|
73
|
+
response: {
|
74
|
+
[x: string]: any;
|
75
|
+
200: any;
|
76
|
+
};
|
77
|
+
};
|
78
|
+
};
|
79
|
+
};
|
80
|
+
} & {
|
81
|
+
"dynamic-data": {
|
82
|
+
"from-existing": {
|
83
|
+
get: {
|
84
|
+
body: unknown;
|
85
|
+
params: {};
|
86
|
+
query: {
|
87
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | undefined;
|
88
|
+
items?: number | undefined;
|
89
|
+
subType?: number | undefined;
|
90
|
+
page?: number | undefined;
|
91
|
+
chainId?: number | undefined;
|
92
|
+
startTimestamp?: string | undefined;
|
93
|
+
endTimestamp?: string | undefined;
|
94
|
+
tokenAddress?: string | undefined;
|
95
|
+
mainParameter?: string | undefined;
|
96
|
+
campaignId?: string | undefined;
|
97
|
+
opportunityId?: string | undefined;
|
98
|
+
test?: boolean | undefined;
|
99
|
+
creatorTag?: string | undefined;
|
100
|
+
tokenSymbol?: string | undefined;
|
101
|
+
};
|
102
|
+
headers: {
|
103
|
+
authorization: string;
|
104
|
+
};
|
105
|
+
response: {
|
106
|
+
[x: string]: any;
|
107
|
+
200: any;
|
108
|
+
};
|
109
|
+
};
|
110
|
+
};
|
111
|
+
};
|
40
112
|
}, {
|
41
113
|
derive: {};
|
42
114
|
resolve: {};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { AuthorizationHeadersDto, BackOfficeGuard } from "../../../guards/BackOffice.guard";
|
2
2
|
import Elysia from "elysia";
|
3
3
|
import { throwOnUnsupportedChainId } from "src/utils/throw";
|
4
|
-
import {
|
4
|
+
import { GetCampaignQueryDto } from "../campaign";
|
5
|
+
import { DynamicDataSourceIdentifier, SimplifiedCampaignDto } from "./dynamicData.model";
|
5
6
|
import { DynamicDataService } from "./dynamicData.service";
|
6
7
|
// ─── DynamicDatas Controller ───────────────────────────────────────────────────────
|
7
8
|
export const DynamicDataController = new Elysia({
|
@@ -16,4 +17,18 @@ export const DynamicDataController = new Elysia({
|
|
16
17
|
BackOfficeGuard({ headers });
|
17
18
|
throwOnUnsupportedChainId(query.chainId);
|
18
19
|
},
|
20
|
+
})
|
21
|
+
.post("/from-config", async ({ body }) => await DynamicDataService.queryDynamicData(body), {
|
22
|
+
body: SimplifiedCampaignDto,
|
23
|
+
headers: AuthorizationHeadersDto,
|
24
|
+
beforeHandle: ({ headers }) => {
|
25
|
+
BackOfficeGuard({ headers });
|
26
|
+
},
|
27
|
+
})
|
28
|
+
.get("/from-existing", async ({ query }) => await DynamicDataService.queryDynamicDataFromCampaignId(query), {
|
29
|
+
query: GetCampaignQueryDto,
|
30
|
+
headers: AuthorizationHeadersDto,
|
31
|
+
beforeHandle: ({ headers }) => {
|
32
|
+
BackOfficeGuard({ headers });
|
33
|
+
},
|
19
34
|
});
|
@@ -1,5 +1,100 @@
|
|
1
|
+
import type { SinglePayloadInputDto } from "../programPayload";
|
1
2
|
export declare const DynamicDataSourceIdentifier: import("@sinclair/typebox").TObject<{
|
2
3
|
chainId: import("@sinclair/typebox").TNumber;
|
3
4
|
tokenAddress: import("@sinclair/typebox").TString;
|
4
5
|
}>;
|
6
|
+
export declare const DynamicDataExtendedDto: import("@sinclair/typebox").TObject<{
|
7
|
+
targetTokenSymbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
8
|
+
}>;
|
9
|
+
export declare const SimplifiedCampaignDto: import("@sinclair/typebox").TObject<{
|
10
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
11
|
+
distributionChainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
12
|
+
rewardTokenId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
13
|
+
opportunityId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
14
|
+
computeChainId: import("@sinclair/typebox").TNumber;
|
15
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
16
|
+
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
17
|
+
identifier: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
18
|
+
creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
19
|
+
type: import("@sinclair/typebox").TEnum<{
|
20
|
+
INVALID: "INVALID";
|
21
|
+
ERC20: "ERC20";
|
22
|
+
CLAMM: "CLAMM";
|
23
|
+
ERC20_SNAPSHOT: "ERC20_SNAPSHOT";
|
24
|
+
JSON_AIRDROP: "JSON_AIRDROP";
|
25
|
+
SILO: "SILO";
|
26
|
+
RADIANT: "RADIANT";
|
27
|
+
MORPHO: "MORPHO";
|
28
|
+
DOLOMITE: "DOLOMITE";
|
29
|
+
BADGER: "BADGER";
|
30
|
+
COMPOUND: "COMPOUND";
|
31
|
+
AJNA: "AJNA";
|
32
|
+
EULER: "EULER";
|
33
|
+
UNISWAP_V4: "UNISWAP_V4";
|
34
|
+
ION: "ION";
|
35
|
+
EIGENLAYER: "EIGENLAYER";
|
36
|
+
ERC20TRANSFERS: "ERC20TRANSFERS";
|
37
|
+
ERC20LOGPROCESSOR: "ERC20LOGPROCESSOR";
|
38
|
+
ERC20REBASELOGPROCESSOR: "ERC20REBASELOGPROCESSOR";
|
39
|
+
VEST: "VEST";
|
40
|
+
}>;
|
41
|
+
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
42
|
+
rewardTokenAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
43
|
+
amount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
44
|
+
opportunityIdentifier: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
45
|
+
startTimestamp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
46
|
+
endTimestamp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
47
|
+
params: import("@sinclair/typebox").TObject<{}>;
|
48
|
+
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
49
|
+
chain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
50
|
+
rewardToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
51
|
+
distributionChain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
52
|
+
campaignStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
53
|
+
}>;
|
54
|
+
export declare const FilledCampaignDto: import("@sinclair/typebox").TObject<{
|
55
|
+
id: import("@sinclair/typebox").TString;
|
56
|
+
distributionChainId: import("@sinclair/typebox").TNumber;
|
57
|
+
rewardTokenId: import("@sinclair/typebox").TString;
|
58
|
+
opportunityId: import("@sinclair/typebox").TString;
|
59
|
+
computeChainId: import("@sinclair/typebox").TNumber;
|
60
|
+
chainId: import("@sinclair/typebox").TNumber;
|
61
|
+
campaignId: import("@sinclair/typebox").TString;
|
62
|
+
identifier: import("@sinclair/typebox").TString;
|
63
|
+
creatorAddress: import("@sinclair/typebox").TString;
|
64
|
+
type: import("@sinclair/typebox").TEnum<{
|
65
|
+
INVALID: "INVALID";
|
66
|
+
ERC20: "ERC20";
|
67
|
+
CLAMM: "CLAMM";
|
68
|
+
ERC20_SNAPSHOT: "ERC20_SNAPSHOT";
|
69
|
+
JSON_AIRDROP: "JSON_AIRDROP";
|
70
|
+
SILO: "SILO";
|
71
|
+
RADIANT: "RADIANT";
|
72
|
+
MORPHO: "MORPHO";
|
73
|
+
DOLOMITE: "DOLOMITE";
|
74
|
+
BADGER: "BADGER";
|
75
|
+
COMPOUND: "COMPOUND";
|
76
|
+
AJNA: "AJNA";
|
77
|
+
EULER: "EULER";
|
78
|
+
UNISWAP_V4: "UNISWAP_V4";
|
79
|
+
ION: "ION";
|
80
|
+
EIGENLAYER: "EIGENLAYER";
|
81
|
+
ERC20TRANSFERS: "ERC20TRANSFERS";
|
82
|
+
ERC20LOGPROCESSOR: "ERC20LOGPROCESSOR";
|
83
|
+
ERC20REBASELOGPROCESSOR: "ERC20REBASELOGPROCESSOR";
|
84
|
+
VEST: "VEST";
|
85
|
+
}>;
|
86
|
+
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
87
|
+
rewardTokenAddress: import("@sinclair/typebox").TString;
|
88
|
+
amount: import("@sinclair/typebox").TString;
|
89
|
+
opportunityIdentifier: import("@sinclair/typebox").TString;
|
90
|
+
startTimestamp: import("@sinclair/typebox").TString;
|
91
|
+
endTimestamp: import("@sinclair/typebox").TString;
|
92
|
+
campaignParameters: import("@sinclair/typebox").TObject<{}>;
|
93
|
+
}>;
|
5
94
|
export type DynamicDataSourceModel = typeof DynamicDataSourceIdentifier.static;
|
95
|
+
export type SimplifiedCampaignDtoModel = typeof SimplifiedCampaignDto.static;
|
96
|
+
export type FilledCampaignDtoModel = typeof FilledCampaignDto.static;
|
97
|
+
export type DynamicDataExtendedDtoModel = typeof DynamicDataExtendedDto.static;
|
98
|
+
export type SinglePayloadInputDtoModelExtended = typeof SinglePayloadInputDto.static & {
|
99
|
+
targetTokenSymbol: string;
|
100
|
+
};
|