@merkl/api 0.16.28 → 0.16.30
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 +231 -24
- package/dist/src/entities/opportunity.js +2 -2
- package/dist/src/index.d.ts +55 -24
- package/dist/src/modules/v4/bucket/bucket.service.d.ts +1 -0
- package/dist/src/modules/v4/bucket/bucket.service.js +11 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +423 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +423 -0
- package/dist/src/modules/v4/router.d.ts +55 -24
- package/dist/src/modules/v4/token/token.controller.d.ts +55 -24
- package/dist/src/modules/v4/token/token.controller.js +10 -2
- package/dist/src/modules/v4/token/token.model.d.ts +33 -0
- package/dist/src/modules/v4/token/token.model.js +12 -0
- package/dist/src/modules/v4/token/token.service.d.ts +2 -0
- package/dist/src/modules/v4/token/token.service.js +31 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -1265,6 +1265,7 @@ declare const eden: {
|
|
1265
1265
|
}>>;
|
1266
1266
|
})) & {};
|
1267
1267
|
patch: (body: {
|
1268
|
+
name?: string | undefined;
|
1268
1269
|
icon?: string | undefined;
|
1269
1270
|
displaySymbol?: string | undefined;
|
1270
1271
|
isTest?: boolean | undefined;
|
@@ -1424,6 +1425,49 @@ declare const eden: {
|
|
1424
1425
|
200: void;
|
1425
1426
|
}>>;
|
1426
1427
|
};
|
1428
|
+
webhooks: {
|
1429
|
+
notion: {
|
1430
|
+
post: (body: {
|
1431
|
+
data: {
|
1432
|
+
properties: {
|
1433
|
+
Symbol: {
|
1434
|
+
rich_text: {
|
1435
|
+
plain_text: string;
|
1436
|
+
}[];
|
1437
|
+
};
|
1438
|
+
Name: {
|
1439
|
+
rich_text: {
|
1440
|
+
plain_text: string;
|
1441
|
+
}[];
|
1442
|
+
};
|
1443
|
+
Icon: {
|
1444
|
+
files: {
|
1445
|
+
file: {
|
1446
|
+
url: string;
|
1447
|
+
};
|
1448
|
+
}[];
|
1449
|
+
};
|
1450
|
+
Address: {
|
1451
|
+
rich_text: {
|
1452
|
+
plain_text: string;
|
1453
|
+
}[];
|
1454
|
+
};
|
1455
|
+
"Chain ID": {
|
1456
|
+
number: number;
|
1457
|
+
};
|
1458
|
+
};
|
1459
|
+
};
|
1460
|
+
}, options: {
|
1461
|
+
headers: {
|
1462
|
+
authorization: string;
|
1463
|
+
};
|
1464
|
+
query?: Record<string, unknown> | undefined;
|
1465
|
+
fetch?: RequestInit | undefined;
|
1466
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
1467
|
+
200: void;
|
1468
|
+
}>>;
|
1469
|
+
};
|
1470
|
+
};
|
1427
1471
|
};
|
1428
1472
|
rewards: {
|
1429
1473
|
index: {
|
@@ -4457,6 +4501,7 @@ declare const eden: {
|
|
4457
4501
|
}>>;
|
4458
4502
|
})) & {};
|
4459
4503
|
patch: (body: {
|
4504
|
+
name?: string | undefined;
|
4460
4505
|
icon?: string | undefined;
|
4461
4506
|
displaySymbol?: string | undefined;
|
4462
4507
|
isTest?: boolean | undefined;
|
@@ -4616,6 +4661,49 @@ declare const eden: {
|
|
4616
4661
|
200: void;
|
4617
4662
|
}>>;
|
4618
4663
|
};
|
4664
|
+
webhooks: {
|
4665
|
+
notion: {
|
4666
|
+
post: (body: {
|
4667
|
+
data: {
|
4668
|
+
properties: {
|
4669
|
+
Symbol: {
|
4670
|
+
rich_text: {
|
4671
|
+
plain_text: string;
|
4672
|
+
}[];
|
4673
|
+
};
|
4674
|
+
Name: {
|
4675
|
+
rich_text: {
|
4676
|
+
plain_text: string;
|
4677
|
+
}[];
|
4678
|
+
};
|
4679
|
+
Icon: {
|
4680
|
+
files: {
|
4681
|
+
file: {
|
4682
|
+
url: string;
|
4683
|
+
};
|
4684
|
+
}[];
|
4685
|
+
};
|
4686
|
+
Address: {
|
4687
|
+
rich_text: {
|
4688
|
+
plain_text: string;
|
4689
|
+
}[];
|
4690
|
+
};
|
4691
|
+
"Chain ID": {
|
4692
|
+
number: number;
|
4693
|
+
};
|
4694
|
+
};
|
4695
|
+
};
|
4696
|
+
}, options: {
|
4697
|
+
headers: {
|
4698
|
+
authorization: string;
|
4699
|
+
};
|
4700
|
+
query?: Record<string, unknown> | undefined;
|
4701
|
+
fetch?: RequestInit | undefined;
|
4702
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
4703
|
+
200: void;
|
4704
|
+
}>>;
|
4705
|
+
};
|
4706
|
+
};
|
4619
4707
|
};
|
4620
4708
|
rewards: {
|
4621
4709
|
index: {
|
@@ -8537,9 +8625,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8537
8625
|
};
|
8538
8626
|
};
|
8539
8627
|
};
|
8540
|
-
}
|
8541
|
-
} & {
|
8542
|
-
tokens: {
|
8628
|
+
} & {
|
8543
8629
|
":id": {
|
8544
8630
|
allowance: {
|
8545
8631
|
":owner": {
|
@@ -8573,9 +8659,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8573
8659
|
};
|
8574
8660
|
};
|
8575
8661
|
};
|
8576
|
-
}
|
8577
|
-
} & {
|
8578
|
-
tokens: {
|
8662
|
+
} & {
|
8579
8663
|
reward: {
|
8580
8664
|
":chainId": {
|
8581
8665
|
get: {
|
@@ -8604,9 +8688,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8604
8688
|
};
|
8605
8689
|
};
|
8606
8690
|
};
|
8607
|
-
}
|
8608
|
-
} & {
|
8609
|
-
tokens: {
|
8691
|
+
} & {
|
8610
8692
|
balances: {
|
8611
8693
|
get: {
|
8612
8694
|
body: unknown;
|
@@ -8638,9 +8720,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8638
8720
|
};
|
8639
8721
|
};
|
8640
8722
|
};
|
8641
|
-
}
|
8642
|
-
} & {
|
8643
|
-
tokens: {
|
8723
|
+
} & {
|
8644
8724
|
index: {
|
8645
8725
|
get: {
|
8646
8726
|
body: unknown;
|
@@ -8672,9 +8752,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8672
8752
|
};
|
8673
8753
|
};
|
8674
8754
|
};
|
8675
|
-
}
|
8676
|
-
} & {
|
8677
|
-
tokens: {
|
8755
|
+
} & {
|
8678
8756
|
count: {
|
8679
8757
|
get: {
|
8680
8758
|
body: unknown;
|
@@ -8694,9 +8772,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8694
8772
|
};
|
8695
8773
|
};
|
8696
8774
|
};
|
8697
|
-
}
|
8698
|
-
} & {
|
8699
|
-
tokens: {
|
8775
|
+
} & {
|
8700
8776
|
index: {
|
8701
8777
|
post: {
|
8702
8778
|
body: {
|
@@ -8727,12 +8803,11 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8727
8803
|
};
|
8728
8804
|
};
|
8729
8805
|
};
|
8730
|
-
}
|
8731
|
-
} & {
|
8732
|
-
tokens: {
|
8806
|
+
} & {
|
8733
8807
|
":id": {
|
8734
8808
|
patch: {
|
8735
8809
|
body: {
|
8810
|
+
name?: string | undefined;
|
8736
8811
|
icon?: string | undefined;
|
8737
8812
|
displaySymbol?: string | undefined;
|
8738
8813
|
isTest?: boolean | undefined;
|
@@ -8761,9 +8836,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8761
8836
|
};
|
8762
8837
|
};
|
8763
8838
|
};
|
8764
|
-
}
|
8765
|
-
} & {
|
8766
|
-
tokens: {
|
8839
|
+
} & {
|
8767
8840
|
sync: {
|
8768
8841
|
get: {
|
8769
8842
|
body: unknown;
|
@@ -8775,6 +8848,52 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
8775
8848
|
};
|
8776
8849
|
};
|
8777
8850
|
};
|
8851
|
+
} & {
|
8852
|
+
webhooks: {
|
8853
|
+
notion: {
|
8854
|
+
post: {
|
8855
|
+
body: {
|
8856
|
+
data: {
|
8857
|
+
properties: {
|
8858
|
+
Symbol: {
|
8859
|
+
rich_text: {
|
8860
|
+
plain_text: string;
|
8861
|
+
}[];
|
8862
|
+
};
|
8863
|
+
Name: {
|
8864
|
+
rich_text: {
|
8865
|
+
plain_text: string;
|
8866
|
+
}[];
|
8867
|
+
};
|
8868
|
+
Icon: {
|
8869
|
+
files: {
|
8870
|
+
file: {
|
8871
|
+
url: string;
|
8872
|
+
};
|
8873
|
+
}[];
|
8874
|
+
};
|
8875
|
+
Address: {
|
8876
|
+
rich_text: {
|
8877
|
+
plain_text: string;
|
8878
|
+
}[];
|
8879
|
+
};
|
8880
|
+
"Chain ID": {
|
8881
|
+
number: number;
|
8882
|
+
};
|
8883
|
+
};
|
8884
|
+
};
|
8885
|
+
};
|
8886
|
+
params: {};
|
8887
|
+
query: unknown;
|
8888
|
+
headers: {
|
8889
|
+
authorization: string;
|
8890
|
+
};
|
8891
|
+
response: {
|
8892
|
+
200: void;
|
8893
|
+
};
|
8894
|
+
};
|
8895
|
+
};
|
8896
|
+
};
|
8778
8897
|
};
|
8779
8898
|
};
|
8780
8899
|
} & {
|
@@ -13214,6 +13333,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
13214
13333
|
}>>;
|
13215
13334
|
})) & {};
|
13216
13335
|
patch: (body: {
|
13336
|
+
name?: string | undefined;
|
13217
13337
|
icon?: string | undefined;
|
13218
13338
|
displaySymbol?: string | undefined;
|
13219
13339
|
isTest?: boolean | undefined;
|
@@ -13373,6 +13493,49 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
13373
13493
|
200: void;
|
13374
13494
|
}>>;
|
13375
13495
|
};
|
13496
|
+
webhooks: {
|
13497
|
+
notion: {
|
13498
|
+
post: (body: {
|
13499
|
+
data: {
|
13500
|
+
properties: {
|
13501
|
+
Symbol: {
|
13502
|
+
rich_text: {
|
13503
|
+
plain_text: string;
|
13504
|
+
}[];
|
13505
|
+
};
|
13506
|
+
Name: {
|
13507
|
+
rich_text: {
|
13508
|
+
plain_text: string;
|
13509
|
+
}[];
|
13510
|
+
};
|
13511
|
+
Icon: {
|
13512
|
+
files: {
|
13513
|
+
file: {
|
13514
|
+
url: string;
|
13515
|
+
};
|
13516
|
+
}[];
|
13517
|
+
};
|
13518
|
+
Address: {
|
13519
|
+
rich_text: {
|
13520
|
+
plain_text: string;
|
13521
|
+
}[];
|
13522
|
+
};
|
13523
|
+
"Chain ID": {
|
13524
|
+
number: number;
|
13525
|
+
};
|
13526
|
+
};
|
13527
|
+
};
|
13528
|
+
}, options: {
|
13529
|
+
headers: {
|
13530
|
+
authorization: string;
|
13531
|
+
};
|
13532
|
+
query?: Record<string, unknown> | undefined;
|
13533
|
+
fetch?: RequestInit | undefined;
|
13534
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
13535
|
+
200: void;
|
13536
|
+
}>>;
|
13537
|
+
};
|
13538
|
+
};
|
13376
13539
|
};
|
13377
13540
|
rewards: {
|
13378
13541
|
index: {
|
@@ -16406,6 +16569,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
16406
16569
|
}>>;
|
16407
16570
|
})) & {};
|
16408
16571
|
patch: (body: {
|
16572
|
+
name?: string | undefined;
|
16409
16573
|
icon?: string | undefined;
|
16410
16574
|
displaySymbol?: string | undefined;
|
16411
16575
|
isTest?: boolean | undefined;
|
@@ -16565,6 +16729,49 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
16565
16729
|
200: void;
|
16566
16730
|
}>>;
|
16567
16731
|
};
|
16732
|
+
webhooks: {
|
16733
|
+
notion: {
|
16734
|
+
post: (body: {
|
16735
|
+
data: {
|
16736
|
+
properties: {
|
16737
|
+
Symbol: {
|
16738
|
+
rich_text: {
|
16739
|
+
plain_text: string;
|
16740
|
+
}[];
|
16741
|
+
};
|
16742
|
+
Name: {
|
16743
|
+
rich_text: {
|
16744
|
+
plain_text: string;
|
16745
|
+
}[];
|
16746
|
+
};
|
16747
|
+
Icon: {
|
16748
|
+
files: {
|
16749
|
+
file: {
|
16750
|
+
url: string;
|
16751
|
+
};
|
16752
|
+
}[];
|
16753
|
+
};
|
16754
|
+
Address: {
|
16755
|
+
rich_text: {
|
16756
|
+
plain_text: string;
|
16757
|
+
}[];
|
16758
|
+
};
|
16759
|
+
"Chain ID": {
|
16760
|
+
number: number;
|
16761
|
+
};
|
16762
|
+
};
|
16763
|
+
};
|
16764
|
+
}, options: {
|
16765
|
+
headers: {
|
16766
|
+
authorization: string;
|
16767
|
+
};
|
16768
|
+
query?: Record<string, unknown> | undefined;
|
16769
|
+
fetch?: RequestInit | undefined;
|
16770
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
16771
|
+
200: void;
|
16772
|
+
}>>;
|
16773
|
+
};
|
16774
|
+
};
|
16568
16775
|
};
|
16569
16776
|
rewards: {
|
16570
16777
|
index: {
|
@@ -989,10 +989,10 @@ export const extractOpportunities = {
|
|
989
989
|
};
|
990
990
|
return opportunity;
|
991
991
|
},
|
992
|
-
[Campaign.ENCOMPASSING]: ({ chainId, mainParameter, campaignParameters: params, tvl, apr }, campaigns) => {
|
992
|
+
[Campaign.ENCOMPASSING]: ({ chainId, mainParameter, campaignParameters: params, tvl, apr, opportunityName }, campaigns) => {
|
993
993
|
const opportunity = {
|
994
994
|
id: `${Campaign.ENCOMPASSING}_${mainParameter}`,
|
995
|
-
name:
|
995
|
+
name: opportunityName ?? ["Distribution of", params.symbolRewardToken].join(" "),
|
996
996
|
chainId,
|
997
997
|
action: "drop",
|
998
998
|
status: getStatus(campaigns.all),
|
package/dist/src/index.d.ts
CHANGED
@@ -1455,9 +1455,7 @@ declare const app: Elysia<"", false, {
|
|
1455
1455
|
};
|
1456
1456
|
};
|
1457
1457
|
};
|
1458
|
-
}
|
1459
|
-
} & {
|
1460
|
-
tokens: {
|
1458
|
+
} & {
|
1461
1459
|
":id": {
|
1462
1460
|
allowance: {
|
1463
1461
|
":owner": {
|
@@ -1491,9 +1489,7 @@ declare const app: Elysia<"", false, {
|
|
1491
1489
|
};
|
1492
1490
|
};
|
1493
1491
|
};
|
1494
|
-
}
|
1495
|
-
} & {
|
1496
|
-
tokens: {
|
1492
|
+
} & {
|
1497
1493
|
reward: {
|
1498
1494
|
":chainId": {
|
1499
1495
|
get: {
|
@@ -1522,9 +1518,7 @@ declare const app: Elysia<"", false, {
|
|
1522
1518
|
};
|
1523
1519
|
};
|
1524
1520
|
};
|
1525
|
-
}
|
1526
|
-
} & {
|
1527
|
-
tokens: {
|
1521
|
+
} & {
|
1528
1522
|
balances: {
|
1529
1523
|
get: {
|
1530
1524
|
body: unknown;
|
@@ -1556,9 +1550,7 @@ declare const app: Elysia<"", false, {
|
|
1556
1550
|
};
|
1557
1551
|
};
|
1558
1552
|
};
|
1559
|
-
}
|
1560
|
-
} & {
|
1561
|
-
tokens: {
|
1553
|
+
} & {
|
1562
1554
|
index: {
|
1563
1555
|
get: {
|
1564
1556
|
body: unknown;
|
@@ -1590,9 +1582,7 @@ declare const app: Elysia<"", false, {
|
|
1590
1582
|
};
|
1591
1583
|
};
|
1592
1584
|
};
|
1593
|
-
}
|
1594
|
-
} & {
|
1595
|
-
tokens: {
|
1585
|
+
} & {
|
1596
1586
|
count: {
|
1597
1587
|
get: {
|
1598
1588
|
body: unknown;
|
@@ -1612,9 +1602,7 @@ declare const app: Elysia<"", false, {
|
|
1612
1602
|
};
|
1613
1603
|
};
|
1614
1604
|
};
|
1615
|
-
}
|
1616
|
-
} & {
|
1617
|
-
tokens: {
|
1605
|
+
} & {
|
1618
1606
|
index: {
|
1619
1607
|
post: {
|
1620
1608
|
body: {
|
@@ -1645,12 +1633,11 @@ declare const app: Elysia<"", false, {
|
|
1645
1633
|
};
|
1646
1634
|
};
|
1647
1635
|
};
|
1648
|
-
}
|
1649
|
-
} & {
|
1650
|
-
tokens: {
|
1636
|
+
} & {
|
1651
1637
|
":id": {
|
1652
1638
|
patch: {
|
1653
1639
|
body: {
|
1640
|
+
name?: string | undefined;
|
1654
1641
|
icon?: string | undefined;
|
1655
1642
|
displaySymbol?: string | undefined;
|
1656
1643
|
isTest?: boolean | undefined;
|
@@ -1679,9 +1666,7 @@ declare const app: Elysia<"", false, {
|
|
1679
1666
|
};
|
1680
1667
|
};
|
1681
1668
|
};
|
1682
|
-
}
|
1683
|
-
} & {
|
1684
|
-
tokens: {
|
1669
|
+
} & {
|
1685
1670
|
sync: {
|
1686
1671
|
get: {
|
1687
1672
|
body: unknown;
|
@@ -1693,6 +1678,52 @@ declare const app: Elysia<"", false, {
|
|
1693
1678
|
};
|
1694
1679
|
};
|
1695
1680
|
};
|
1681
|
+
} & {
|
1682
|
+
webhooks: {
|
1683
|
+
notion: {
|
1684
|
+
post: {
|
1685
|
+
body: {
|
1686
|
+
data: {
|
1687
|
+
properties: {
|
1688
|
+
Symbol: {
|
1689
|
+
rich_text: {
|
1690
|
+
plain_text: string;
|
1691
|
+
}[];
|
1692
|
+
};
|
1693
|
+
Name: {
|
1694
|
+
rich_text: {
|
1695
|
+
plain_text: string;
|
1696
|
+
}[];
|
1697
|
+
};
|
1698
|
+
Icon: {
|
1699
|
+
files: {
|
1700
|
+
file: {
|
1701
|
+
url: string;
|
1702
|
+
};
|
1703
|
+
}[];
|
1704
|
+
};
|
1705
|
+
Address: {
|
1706
|
+
rich_text: {
|
1707
|
+
plain_text: string;
|
1708
|
+
}[];
|
1709
|
+
};
|
1710
|
+
"Chain ID": {
|
1711
|
+
number: number;
|
1712
|
+
};
|
1713
|
+
};
|
1714
|
+
};
|
1715
|
+
};
|
1716
|
+
params: {};
|
1717
|
+
query: unknown;
|
1718
|
+
headers: {
|
1719
|
+
authorization: string;
|
1720
|
+
};
|
1721
|
+
response: {
|
1722
|
+
200: void;
|
1723
|
+
};
|
1724
|
+
};
|
1725
|
+
};
|
1726
|
+
};
|
1696
1727
|
};
|
1697
1728
|
};
|
1698
1729
|
} & {
|
@@ -5,6 +5,7 @@ export declare class BucketService {
|
|
5
5
|
constructor(bucket: string, projectId: string);
|
6
6
|
pushArray<T>(filename: string, arr: T[], options?: UploadOptions<T>): Promise<number>;
|
7
7
|
push(filename: string, text: string, options?: Omit<UploadOptions<never>, "transform" | "separator">): Promise<number>;
|
8
|
+
pushRaw(filename: string, data: Uint8Array, options?: Omit<UploadOptions<never>, "transform" | "separator">): Promise<number>;
|
8
9
|
pullArray<T>(filename: string, callback: (elem: string) => T, separator?: string): Promise<T[]>;
|
9
10
|
pull(filename: string): Promise<string>;
|
10
11
|
}
|
@@ -118,6 +118,17 @@ export class BucketService {
|
|
118
118
|
// ─── Return The Number Of Bytes Written ──────────────────────
|
119
119
|
return bytes;
|
120
120
|
}
|
121
|
+
async pushRaw(filename, data, options) {
|
122
|
+
options = { ...this.defaultUploadOptions, ...options };
|
123
|
+
const file = this.#s3Client.file(filename);
|
124
|
+
data = options?.compression ? gzipSync(data) : data;
|
125
|
+
const bytes = await file.write(data);
|
126
|
+
if (options.compression)
|
127
|
+
await this.#gcsBucket.file(filename).setMetadata({ contentEncoding: "gzip" });
|
128
|
+
if (options.isPublic)
|
129
|
+
await this.#gcsBucket.file(filename).makePublic();
|
130
|
+
return bytes;
|
131
|
+
}
|
121
132
|
// ─── Download And Process Chunks Of Data ─────────────────────────────
|
122
133
|
async pullArray(filename, callback, separator = "\n") {
|
123
134
|
const file = this.#s3Client.file(filename);
|