@merkl/api 0.20.0 → 0.20.1

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.
Files changed (52) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +28 -28
  2. package/dist/database/api/.generated/drizzle/schema.js +11 -11
  3. package/dist/database/api/.generated/drizzle/schema.ts +11 -11
  4. package/dist/database/api/.generated/edge.js +5 -5
  5. package/dist/database/api/.generated/index-browser.js +2 -2
  6. package/dist/database/api/.generated/index.d.ts +151 -154
  7. package/dist/database/api/.generated/index.js +5 -5
  8. package/dist/database/api/.generated/package.json +1 -1
  9. package/dist/database/api/.generated/schema.prisma +11 -11
  10. package/dist/database/api/.generated/wasm.js +2 -2
  11. package/dist/src/eden/index.d.ts +56 -0
  12. package/dist/src/engine/opportunityMetadata/implementations/Clamm.d.ts +1 -0
  13. package/dist/src/engine/opportunityMetadata/implementations/Clamm.js +1 -0
  14. package/dist/src/engine/opportunityMetadata/implementations/Dolomite.d.ts +1 -0
  15. package/dist/src/engine/opportunityMetadata/implementations/Dolomite.js +2 -0
  16. package/dist/src/engine/opportunityMetadata/implementations/Erc20.d.ts +1 -0
  17. package/dist/src/engine/opportunityMetadata/implementations/Erc20.js +2 -0
  18. package/dist/src/engine/opportunityMetadata/implementations/Euler.d.ts +1 -0
  19. package/dist/src/engine/opportunityMetadata/implementations/Euler.js +2 -0
  20. package/dist/src/engine/opportunityMetadata/implementations/Hyperdrive.d.ts +1 -0
  21. package/dist/src/engine/opportunityMetadata/implementations/Hyperdrive.js +2 -0
  22. package/dist/src/engine/opportunityMetadata/implementations/Morpho.d.ts +1 -0
  23. package/dist/src/engine/opportunityMetadata/implementations/Morpho.js +2 -0
  24. package/dist/src/engine/opportunityMetadata/implementations/Radiant.d.ts +1 -0
  25. package/dist/src/engine/opportunityMetadata/implementations/Radiant.js +2 -0
  26. package/dist/src/engine/opportunityMetadata/implementations/Silo.d.ts +1 -0
  27. package/dist/src/engine/opportunityMetadata/implementations/Silo.js +2 -0
  28. package/dist/src/engine/opportunityMetadata/implementations/UniswapV4.d.ts +1 -0
  29. package/dist/src/engine/opportunityMetadata/implementations/UniswapV4.js +2 -0
  30. package/dist/src/index.d.ts +12 -0
  31. package/dist/src/jobs/reward-breakdowns.js +0 -2
  32. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +4 -0
  33. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +5 -0
  34. package/dist/src/modules/v4/campaign/campaign.service.d.ts +9 -0
  35. package/dist/src/modules/v4/merklRoot/merklRoot.service.js +1 -1
  36. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +6 -0
  37. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +1 -0
  38. package/dist/src/modules/v4/opportunity/opportunity.model.js +1 -0
  39. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +11 -0
  40. package/dist/src/modules/v4/opportunity/opportunity.repository.js +8 -0
  41. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +12 -0
  42. package/dist/src/modules/v4/opportunity/opportunity.service.js +1 -0
  43. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +1 -0
  44. package/dist/src/modules/v4/reward/reward.model.d.ts +1 -1
  45. package/dist/src/modules/v4/reward/reward.repository.d.ts +3 -4
  46. package/dist/src/modules/v4/reward/reward.repository.js +0 -1
  47. package/dist/src/modules/v4/reward/reward.service.d.ts +10 -4
  48. package/dist/src/modules/v4/reward/reward.service.js +1 -1
  49. package/dist/src/modules/v4/router.d.ts +12 -0
  50. package/dist/src/modules/v4/user/user.controller.d.ts +2 -0
  51. package/dist/tsconfig.package.tsbuildinfo +1 -1
  52. package/package.json +2 -1
@@ -494,7 +494,7 @@ export declare const UserComputedValue: import("drizzle-orm/pg-core").PgTableWit
494
494
  driverParam: number;
495
495
  notNull: true;
496
496
  hasDefault: true;
497
- isPrimaryKey: true;
497
+ isPrimaryKey: false;
498
498
  isAutoincrement: false;
499
499
  hasRuntimeDefault: false;
500
500
  enumValues: undefined;
@@ -528,7 +528,7 @@ export declare const UserComputedValue: import("drizzle-orm/pg-core").PgTableWit
528
528
  driverParam: string;
529
529
  notNull: true;
530
530
  hasDefault: true;
531
- isPrimaryKey: false;
531
+ isPrimaryKey: true;
532
532
  isAutoincrement: false;
533
533
  hasRuntimeDefault: false;
534
534
  enumValues: [string, ...string[]];
@@ -846,6 +846,23 @@ export declare const Opportunity: import("drizzle-orm/pg-core").PgTableWithColum
846
846
  identity: undefined;
847
847
  generated: undefined;
848
848
  }, {}, {}>;
849
+ explorerAddress: import("drizzle-orm/pg-core").PgColumn<{
850
+ name: "explorerAddress";
851
+ tableName: "Opportunity";
852
+ dataType: "string";
853
+ columnType: "PgText";
854
+ data: string;
855
+ driverParam: string;
856
+ notNull: false;
857
+ hasDefault: false;
858
+ isPrimaryKey: false;
859
+ isAutoincrement: false;
860
+ hasRuntimeDefault: false;
861
+ enumValues: [string, ...string[]];
862
+ baseColumn: never;
863
+ identity: undefined;
864
+ generated: undefined;
865
+ }, {}, {}>;
849
866
  status: import("drizzle-orm/pg-core").PgColumn<{
850
867
  name: "status";
851
868
  tableName: "Opportunity";
@@ -1445,7 +1462,7 @@ export declare const AprBreakdown: import("drizzle-orm/pg-core").PgTableWithColu
1445
1462
  driverParam: number;
1446
1463
  notNull: true;
1447
1464
  hasDefault: true;
1448
- isPrimaryKey: true;
1465
+ isPrimaryKey: false;
1449
1466
  isAutoincrement: false;
1450
1467
  hasRuntimeDefault: false;
1451
1468
  enumValues: undefined;
@@ -1462,7 +1479,7 @@ export declare const AprBreakdown: import("drizzle-orm/pg-core").PgTableWithColu
1462
1479
  driverParam: string;
1463
1480
  notNull: true;
1464
1481
  hasDefault: true;
1465
- isPrimaryKey: false;
1482
+ isPrimaryKey: true;
1466
1483
  isAutoincrement: false;
1467
1484
  hasRuntimeDefault: false;
1468
1485
  enumValues: [string, ...string[]];
@@ -1629,7 +1646,7 @@ export declare const TVLBreakdown: import("drizzle-orm/pg-core").PgTableWithColu
1629
1646
  driverParam: number;
1630
1647
  notNull: true;
1631
1648
  hasDefault: true;
1632
- isPrimaryKey: true;
1649
+ isPrimaryKey: false;
1633
1650
  isAutoincrement: false;
1634
1651
  hasRuntimeDefault: false;
1635
1652
  enumValues: undefined;
@@ -1646,7 +1663,7 @@ export declare const TVLBreakdown: import("drizzle-orm/pg-core").PgTableWithColu
1646
1663
  driverParam: string;
1647
1664
  notNull: true;
1648
1665
  hasDefault: true;
1649
- isPrimaryKey: false;
1666
+ isPrimaryKey: true;
1650
1667
  isAutoincrement: false;
1651
1668
  hasRuntimeDefault: false;
1652
1669
  enumValues: [string, ...string[]];
@@ -1813,7 +1830,7 @@ export declare const DailyRewardsBreakdown: import("drizzle-orm/pg-core").PgTabl
1813
1830
  driverParam: number;
1814
1831
  notNull: true;
1815
1832
  hasDefault: true;
1816
- isPrimaryKey: true;
1833
+ isPrimaryKey: false;
1817
1834
  isAutoincrement: false;
1818
1835
  hasRuntimeDefault: false;
1819
1836
  enumValues: undefined;
@@ -1830,7 +1847,7 @@ export declare const DailyRewardsBreakdown: import("drizzle-orm/pg-core").PgTabl
1830
1847
  driverParam: string;
1831
1848
  notNull: true;
1832
1849
  hasDefault: true;
1833
- isPrimaryKey: false;
1850
+ isPrimaryKey: true;
1834
1851
  isAutoincrement: false;
1835
1852
  hasRuntimeDefault: false;
1836
1853
  enumValues: [string, ...string[]];
@@ -2216,27 +2233,10 @@ export declare const RewardBreakdown: import("drizzle-orm/pg-core").PgTableWithC
2216
2233
  driverParam: number;
2217
2234
  notNull: true;
2218
2235
  hasDefault: true;
2219
- isPrimaryKey: true;
2220
- isAutoincrement: false;
2221
- hasRuntimeDefault: false;
2222
- enumValues: undefined;
2223
- baseColumn: never;
2224
- identity: undefined;
2225
- generated: undefined;
2226
- }, {}, {}>;
2227
- stringId: import("drizzle-orm/pg-core").PgColumn<{
2228
- name: "stringId";
2229
- tableName: "RewardBreakdown";
2230
- dataType: "string";
2231
- columnType: "PgText";
2232
- data: string;
2233
- driverParam: string;
2234
- notNull: true;
2235
- hasDefault: false;
2236
2236
  isPrimaryKey: false;
2237
2237
  isAutoincrement: false;
2238
2238
  hasRuntimeDefault: false;
2239
- enumValues: [string, ...string[]];
2239
+ enumValues: undefined;
2240
2240
  baseColumn: never;
2241
2241
  identity: undefined;
2242
2242
  generated: undefined;
@@ -2248,9 +2248,9 @@ export declare const RewardBreakdown: import("drizzle-orm/pg-core").PgTableWithC
2248
2248
  columnType: "PgText";
2249
2249
  data: string;
2250
2250
  driverParam: string;
2251
- notNull: false;
2251
+ notNull: true;
2252
2252
  hasDefault: true;
2253
- isPrimaryKey: false;
2253
+ isPrimaryKey: true;
2254
2254
  isAutoincrement: false;
2255
2255
  hasRuntimeDefault: false;
2256
2256
  enumValues: [string, ...string[]];
@@ -97,9 +97,9 @@ export const CampaignComputedValue = pgTable('CampaignComputedValue', {
97
97
  .onUpdate('cascade')
98
98
  }));
99
99
  export const UserComputedValue = pgTable('UserComputedValue', {
100
- id: serial('id').notNull().primaryKey(),
100
+ id: serial('id').notNull(),
101
101
  stringId: text('stringId').notNull(),
102
- uuid: text('uuid').notNull().default(sql `gen_random_uuid()`),
102
+ uuid: text('uuid').notNull().primaryKey().default(sql `gen_random_uuid()`),
103
103
  campaignId: text('campaignId').notNull(),
104
104
  address: text('address').notNull(),
105
105
  reason: text('reason').notNull(),
@@ -150,6 +150,7 @@ export const Opportunity = pgTable('Opportunity', {
150
150
  identifier: text('identifier').notNull(),
151
151
  name: text('name').notNull(),
152
152
  depositUrl: text('depositUrl'),
153
+ explorerAddress: text('explorerAddress'),
153
154
  status: Status('status').notNull(),
154
155
  action: OpportunityAction('action').notNull(),
155
156
  mainProtocolId: text('mainProtocolId'),
@@ -225,8 +226,8 @@ export const AprRecord = pgTable('AprRecord', {
225
226
  .on(AprRecord.opportunityId, AprRecord.timestamp)
226
227
  }));
227
228
  export const AprBreakdown = pgTable('AprBreakdown', {
228
- id: serial('id').notNull().primaryKey(),
229
- uuid: text('uuid').notNull().default(sql `gen_random_uuid()`),
229
+ id: serial('id').notNull(),
230
+ uuid: text('uuid').notNull().primaryKey().default(sql `gen_random_uuid()`),
230
231
  identifier: text('identifier').notNull(),
231
232
  type: AprType('type').notNull(),
232
233
  value: doublePrecision('value').notNull(),
@@ -257,8 +258,8 @@ export const TVLRecord = pgTable('TVLRecord', {
257
258
  .on(TVLRecord.opportunityId, TVLRecord.timestamp)
258
259
  }));
259
260
  export const TVLBreakdown = pgTable('TVLBreakdown', {
260
- id: serial('id').notNull().primaryKey(),
261
- uuid: text('uuid').notNull().default(sql `gen_random_uuid()`),
261
+ id: serial('id').notNull(),
262
+ uuid: text('uuid').notNull().primaryKey().default(sql `gen_random_uuid()`),
262
263
  identifier: text('identifier').notNull(),
263
264
  type: TvlType('type').notNull(),
264
265
  value: doublePrecision('value').notNull(),
@@ -289,8 +290,8 @@ export const DailyRewardsRecord = pgTable('DailyRewardsRecord', {
289
290
  .on(DailyRewardsRecord.opportunityId, DailyRewardsRecord.timestamp)
290
291
  }));
291
292
  export const DailyRewardsBreakdown = pgTable('DailyRewardsBreakdown', {
292
- id: serial('id').notNull().primaryKey(),
293
- uuid: text('uuid').notNull().default(sql `gen_random_uuid()`),
293
+ id: serial('id').notNull(),
294
+ uuid: text('uuid').notNull().primaryKey().default(sql `gen_random_uuid()`),
294
295
  value: doublePrecision('value').notNull(),
295
296
  campaignId: text('campaignId').notNull(),
296
297
  dailyRewardsRecordId: text('dailyRewardsRecordId').notNull()
@@ -363,9 +364,8 @@ export const Reward = pgTable('Reward', {
363
364
  .on(Reward.root, Reward.recipient, Reward.rewardTokenId)
364
365
  }));
365
366
  export const RewardBreakdown = pgTable('RewardBreakdown', {
366
- id: serial('id').notNull().primaryKey(),
367
- stringId: text('stringId').notNull(),
368
- uuid: text('uuid').default(sql `gen_random_uuid()`),
367
+ id: serial('id').notNull(),
368
+ uuid: text('uuid').notNull().primaryKey().default(sql `gen_random_uuid()`),
369
369
  protocolId: text('protocolId'),
370
370
  reason: text('reason').notNull(),
371
371
  amount: text('amount').notNull(),
@@ -112,9 +112,9 @@ export const CampaignComputedValue = pgTable('CampaignComputedValue', {
112
112
  }));
113
113
 
114
114
  export const UserComputedValue = pgTable('UserComputedValue', {
115
- id: serial('id').notNull().primaryKey(),
115
+ id: serial('id').notNull(),
116
116
  stringId: text('stringId').notNull(),
117
- uuid: text('uuid').notNull().default(sql`gen_random_uuid()`),
117
+ uuid: text('uuid').notNull().primaryKey().default(sql`gen_random_uuid()`),
118
118
  campaignId: text('campaignId').notNull(),
119
119
  address: text('address').notNull(),
120
120
  reason: text('reason').notNull(),
@@ -168,6 +168,7 @@ export const Opportunity = pgTable('Opportunity', {
168
168
  identifier: text('identifier').notNull(),
169
169
  name: text('name').notNull(),
170
170
  depositUrl: text('depositUrl'),
171
+ explorerAddress: text('explorerAddress'),
171
172
  status: Status('status').notNull(),
172
173
  action: OpportunityAction('action').notNull(),
173
174
  mainProtocolId: text('mainProtocolId'),
@@ -247,8 +248,8 @@ export const AprRecord = pgTable('AprRecord', {
247
248
  }));
248
249
 
249
250
  export const AprBreakdown = pgTable('AprBreakdown', {
250
- id: serial('id').notNull().primaryKey(),
251
- uuid: text('uuid').notNull().default(sql`gen_random_uuid()`),
251
+ id: serial('id').notNull(),
252
+ uuid: text('uuid').notNull().primaryKey().default(sql`gen_random_uuid()`),
252
253
  identifier: text('identifier').notNull(),
253
254
  type: AprType('type').notNull(),
254
255
  value: doublePrecision('value').notNull(),
@@ -281,8 +282,8 @@ export const TVLRecord = pgTable('TVLRecord', {
281
282
  }));
282
283
 
283
284
  export const TVLBreakdown = pgTable('TVLBreakdown', {
284
- id: serial('id').notNull().primaryKey(),
285
- uuid: text('uuid').notNull().default(sql`gen_random_uuid()`),
285
+ id: serial('id').notNull(),
286
+ uuid: text('uuid').notNull().primaryKey().default(sql`gen_random_uuid()`),
286
287
  identifier: text('identifier').notNull(),
287
288
  type: TvlType('type').notNull(),
288
289
  value: doublePrecision('value').notNull(),
@@ -315,8 +316,8 @@ export const DailyRewardsRecord = pgTable('DailyRewardsRecord', {
315
316
  }));
316
317
 
317
318
  export const DailyRewardsBreakdown = pgTable('DailyRewardsBreakdown', {
318
- id: serial('id').notNull().primaryKey(),
319
- uuid: text('uuid').notNull().default(sql`gen_random_uuid()`),
319
+ id: serial('id').notNull(),
320
+ uuid: text('uuid').notNull().primaryKey().default(sql`gen_random_uuid()`),
320
321
  value: doublePrecision('value').notNull(),
321
322
  campaignId: text('campaignId').notNull(),
322
323
  dailyRewardsRecordId: text('dailyRewardsRecordId').notNull()
@@ -393,9 +394,8 @@ export const Reward = pgTable('Reward', {
393
394
  }));
394
395
 
395
396
  export const RewardBreakdown = pgTable('RewardBreakdown', {
396
- id: serial('id').notNull().primaryKey(),
397
- stringId: text('stringId').notNull(),
398
- uuid: text('uuid').default(sql`gen_random_uuid()`),
397
+ id: serial('id').notNull(),
398
+ uuid: text('uuid').notNull().primaryKey().default(sql`gen_random_uuid()`),
399
399
  protocolId: text('protocolId'),
400
400
  reason: text('reason').notNull(),
401
401
  amount: text('amount').notNull(),