@sigrex/client 2.1.7 → 3.0.0
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/README.md +46 -2
- package/dist/index.d.mts +1223 -107
- package/dist/index.d.ts +1223 -107
- package/dist/index.js +227 -14
- package/dist/index.mjs +222 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ var ExchangesService = class {
|
|
|
36
36
|
/**
|
|
37
37
|
* Get all DEX exchanges by chain ID
|
|
38
38
|
*/
|
|
39
|
-
async
|
|
39
|
+
async listDex(chain) {
|
|
40
40
|
return this.client.request({
|
|
41
41
|
method: "GET",
|
|
42
42
|
path: `/api/v2/exchange/dex/${chain}`
|
|
@@ -1213,7 +1213,7 @@ var BotWebhooksService = class {
|
|
|
1213
1213
|
/**
|
|
1214
1214
|
* Get webhook shares
|
|
1215
1215
|
*/
|
|
1216
|
-
async
|
|
1216
|
+
async listShares(id) {
|
|
1217
1217
|
return this.client.request({
|
|
1218
1218
|
method: "GET",
|
|
1219
1219
|
path: `/api/v2/webhook/bot/${id}/shares`
|
|
@@ -1222,7 +1222,7 @@ var BotWebhooksService = class {
|
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Share webhook with user
|
|
1224
1224
|
*/
|
|
1225
|
-
async(id, body) {
|
|
1225
|
+
async createShare(id, body) {
|
|
1226
1226
|
return this.client.request({
|
|
1227
1227
|
method: "POST",
|
|
1228
1228
|
path: `/api/v2/webhook/bot/share/${id}`,
|
|
@@ -1291,7 +1291,7 @@ var BotWebhooksService = class {
|
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Get webhooks shared with specific user
|
|
1293
1293
|
*/
|
|
1294
|
-
async
|
|
1294
|
+
async listWithShared(id) {
|
|
1295
1295
|
return this.client.request({
|
|
1296
1296
|
method: "GET",
|
|
1297
1297
|
path: `/api/v2/webhook/bot/shared/with/${id}`
|
|
@@ -1300,7 +1300,7 @@ var BotWebhooksService = class {
|
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Get webhooks shared by specific user
|
|
1302
1302
|
*/
|
|
1303
|
-
async
|
|
1303
|
+
async listByShared(id) {
|
|
1304
1304
|
return this.client.request({
|
|
1305
1305
|
method: "GET",
|
|
1306
1306
|
path: `/api/v2/webhook/bot/shared/by/${id}`
|
|
@@ -1364,7 +1364,7 @@ var DataWebhooksService = class {
|
|
|
1364
1364
|
/**
|
|
1365
1365
|
* Get webhook shares
|
|
1366
1366
|
*/
|
|
1367
|
-
async
|
|
1367
|
+
async listShares(id) {
|
|
1368
1368
|
return this.client.request({
|
|
1369
1369
|
method: "GET",
|
|
1370
1370
|
path: `/api/v2/webhook/data/${id}/shares`
|
|
@@ -1373,7 +1373,7 @@ var DataWebhooksService = class {
|
|
|
1373
1373
|
/**
|
|
1374
1374
|
* Get LLM reactions for webhook
|
|
1375
1375
|
*/
|
|
1376
|
-
async
|
|
1376
|
+
async listLlmReactions(id, queryParams) {
|
|
1377
1377
|
return this.client.request({
|
|
1378
1378
|
method: "GET",
|
|
1379
1379
|
path: `/api/v2/webhook/data/${id}/llm-reactions`,
|
|
@@ -1383,7 +1383,7 @@ var DataWebhooksService = class {
|
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Get code reactions for webhook
|
|
1385
1385
|
*/
|
|
1386
|
-
async
|
|
1386
|
+
async listCodeReactions(id, queryParams) {
|
|
1387
1387
|
return this.client.request({
|
|
1388
1388
|
method: "GET",
|
|
1389
1389
|
path: `/api/v2/webhook/data/${id}/code-reactions`,
|
|
@@ -1393,7 +1393,7 @@ var DataWebhooksService = class {
|
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Share webhook with user
|
|
1395
1395
|
*/
|
|
1396
|
-
async(id, body) {
|
|
1396
|
+
async createShare(id, body) {
|
|
1397
1397
|
return this.client.request({
|
|
1398
1398
|
method: "POST",
|
|
1399
1399
|
path: `/api/v2/webhook/data/share/${id}`,
|
|
@@ -1432,7 +1432,7 @@ var DataWebhooksService = class {
|
|
|
1432
1432
|
/**
|
|
1433
1433
|
* Get data webhooks shared with specific user
|
|
1434
1434
|
*/
|
|
1435
|
-
async
|
|
1435
|
+
async listWithShared(id) {
|
|
1436
1436
|
return this.client.request({
|
|
1437
1437
|
method: "GET",
|
|
1438
1438
|
path: `/api/v2/webhook/data/shared/with/${id}`
|
|
@@ -1441,7 +1441,7 @@ var DataWebhooksService = class {
|
|
|
1441
1441
|
/**
|
|
1442
1442
|
* Get data webhooks shared by specific user
|
|
1443
1443
|
*/
|
|
1444
|
-
async
|
|
1444
|
+
async listByShared(id) {
|
|
1445
1445
|
return this.client.request({
|
|
1446
1446
|
method: "GET",
|
|
1447
1447
|
path: `/api/v2/webhook/data/shared/by/${id}`
|
|
@@ -1477,7 +1477,7 @@ var ExchangeApiKeysService = class {
|
|
|
1477
1477
|
/**
|
|
1478
1478
|
* Get signal bots that use an API key
|
|
1479
1479
|
*/
|
|
1480
|
-
async
|
|
1480
|
+
async listSignalBot(id, queryParams) {
|
|
1481
1481
|
return this.client.request({
|
|
1482
1482
|
method: "GET",
|
|
1483
1483
|
path: `/api/v2/api/exchange/bot/signal/${id}`,
|
|
@@ -1533,7 +1533,7 @@ var LlmApiKeysService = class {
|
|
|
1533
1533
|
/**
|
|
1534
1534
|
* Get models for a specific service
|
|
1535
1535
|
*/
|
|
1536
|
-
async
|
|
1536
|
+
async listModels(serviceId) {
|
|
1537
1537
|
return this.client.request({
|
|
1538
1538
|
method: "GET",
|
|
1539
1539
|
path: `/api/v2/api/llm/models/${serviceId}`
|
|
@@ -1607,7 +1607,7 @@ var PredictionApiKeysService = class {
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Get prediction signal bots by API ID
|
|
1609
1609
|
*/
|
|
1610
|
-
async
|
|
1610
|
+
async listSignalBot(id, queryParams) {
|
|
1611
1611
|
return this.client.request({
|
|
1612
1612
|
method: "GET",
|
|
1613
1613
|
path: `/api/v2/api/prediction/bot/signal/${id}`,
|
|
@@ -1645,6 +1645,202 @@ var PredictionApiKeysService = class {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
};
|
|
1647
1647
|
|
|
1648
|
+
// src/services/account.ts
|
|
1649
|
+
var AccountService = class {
|
|
1650
|
+
constructor(client) {
|
|
1651
|
+
this.client = client;
|
|
1652
|
+
}
|
|
1653
|
+
client;
|
|
1654
|
+
/**
|
|
1655
|
+
* Get the authenticated user's account
|
|
1656
|
+
*/
|
|
1657
|
+
async getMe() {
|
|
1658
|
+
return this.client.request({
|
|
1659
|
+
method: "GET",
|
|
1660
|
+
path: `/api/v2/account/me`
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Get all friendships by status
|
|
1665
|
+
*/
|
|
1666
|
+
async listAllFriend(status) {
|
|
1667
|
+
return this.client.request({
|
|
1668
|
+
method: "GET",
|
|
1669
|
+
path: `/api/v2/account/friend/all/${status}`
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Get paginated friendships by status and side
|
|
1674
|
+
*/
|
|
1675
|
+
async listFriend(status, side, queryParams) {
|
|
1676
|
+
return this.client.request({
|
|
1677
|
+
method: "GET",
|
|
1678
|
+
path: `/api/v2/account/friend/${status}/${side}`,
|
|
1679
|
+
queryParams
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Get paginated rejected friend requests
|
|
1684
|
+
*/
|
|
1685
|
+
async listFriendRejected(queryParams) {
|
|
1686
|
+
return this.client.request({
|
|
1687
|
+
method: "GET",
|
|
1688
|
+
path: `/api/v2/account/friend/rejected`,
|
|
1689
|
+
queryParams
|
|
1690
|
+
});
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
// src/services/signalLogs.ts
|
|
1695
|
+
var SignalLogsService = class {
|
|
1696
|
+
constructor(client) {
|
|
1697
|
+
this.client = client;
|
|
1698
|
+
}
|
|
1699
|
+
client;
|
|
1700
|
+
/**
|
|
1701
|
+
* Get paginated signal logs
|
|
1702
|
+
*/
|
|
1703
|
+
async list(queryParams) {
|
|
1704
|
+
return this.client.request({
|
|
1705
|
+
method: "GET",
|
|
1706
|
+
path: `/api/v2/log/signal/paginated`,
|
|
1707
|
+
queryParams
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Get paginated signal logs of a bot hook
|
|
1712
|
+
*/
|
|
1713
|
+
async listHook(hookId, queryParams) {
|
|
1714
|
+
return this.client.request({
|
|
1715
|
+
method: "GET",
|
|
1716
|
+
path: `/api/v2/log/signal/hook/${hookId}/paginated`,
|
|
1717
|
+
queryParams
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Get paginated signal logs by source
|
|
1722
|
+
*/
|
|
1723
|
+
async listBySource(source, queryParams) {
|
|
1724
|
+
return this.client.request({
|
|
1725
|
+
method: "GET",
|
|
1726
|
+
path: `/api/v2/log/signal/${source}/paginated`,
|
|
1727
|
+
queryParams
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Get paginated signal logs by source and source id
|
|
1732
|
+
*/
|
|
1733
|
+
async listBySourceAndId(source, id, queryParams) {
|
|
1734
|
+
return this.client.request({
|
|
1735
|
+
method: "GET",
|
|
1736
|
+
path: `/api/v2/log/signal/${source}/${id}/paginated`,
|
|
1737
|
+
queryParams
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
// src/services/transactionLogs.ts
|
|
1743
|
+
var TransactionLogsService = class {
|
|
1744
|
+
constructor(client) {
|
|
1745
|
+
this.client = client;
|
|
1746
|
+
}
|
|
1747
|
+
client;
|
|
1748
|
+
/**
|
|
1749
|
+
* Get paginated transaction logs
|
|
1750
|
+
*/
|
|
1751
|
+
async list(queryParams) {
|
|
1752
|
+
return this.client.request({
|
|
1753
|
+
method: "GET",
|
|
1754
|
+
path: `/api/v2/log/transaction`,
|
|
1755
|
+
queryParams
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Get paginated transaction logs of a signal bot
|
|
1760
|
+
*/
|
|
1761
|
+
async listSignalBot(type, service, id, queryParams) {
|
|
1762
|
+
return this.client.request({
|
|
1763
|
+
method: "GET",
|
|
1764
|
+
path: `/api/v2/log/transaction/bot/signal/${type}/${service}/${id}`,
|
|
1765
|
+
queryParams
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Get a transaction log by id
|
|
1770
|
+
*/
|
|
1771
|
+
async get(id) {
|
|
1772
|
+
return this.client.request({
|
|
1773
|
+
method: "GET",
|
|
1774
|
+
path: `/api/v2/log/transaction/${id}`
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
// src/services/dataLogs.ts
|
|
1780
|
+
var DataLogsService = class {
|
|
1781
|
+
constructor(client) {
|
|
1782
|
+
this.client = client;
|
|
1783
|
+
}
|
|
1784
|
+
client;
|
|
1785
|
+
/**
|
|
1786
|
+
* Get paginated data logs
|
|
1787
|
+
*/
|
|
1788
|
+
async list(queryParams) {
|
|
1789
|
+
return this.client.request({
|
|
1790
|
+
method: "GET",
|
|
1791
|
+
path: `/api/v2/log/data/paginated`,
|
|
1792
|
+
queryParams
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
/**
|
|
1796
|
+
* Get paginated data logs of a data hook
|
|
1797
|
+
*/
|
|
1798
|
+
async listHook(hookId, queryParams) {
|
|
1799
|
+
return this.client.request({
|
|
1800
|
+
method: "GET",
|
|
1801
|
+
path: `/api/v2/log/data/hook/${hookId}/paginated`,
|
|
1802
|
+
queryParams
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
// src/services/errorLogs.ts
|
|
1808
|
+
var ErrorLogsService = class {
|
|
1809
|
+
constructor(client) {
|
|
1810
|
+
this.client = client;
|
|
1811
|
+
}
|
|
1812
|
+
client;
|
|
1813
|
+
/**
|
|
1814
|
+
* Get paginated error logs
|
|
1815
|
+
*/
|
|
1816
|
+
async list(queryParams) {
|
|
1817
|
+
return this.client.request({
|
|
1818
|
+
method: "GET",
|
|
1819
|
+
path: `/api/v2/log/error/paginated`,
|
|
1820
|
+
queryParams
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Get paginated error logs by source and source id
|
|
1825
|
+
*/
|
|
1826
|
+
async listBySourceAndId(source, id, queryParams) {
|
|
1827
|
+
return this.client.request({
|
|
1828
|
+
method: "GET",
|
|
1829
|
+
path: `/api/v2/log/error/${source}/${id}`,
|
|
1830
|
+
queryParams
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* Get an error log by id
|
|
1835
|
+
*/
|
|
1836
|
+
async get(id) {
|
|
1837
|
+
return this.client.request({
|
|
1838
|
+
method: "GET",
|
|
1839
|
+
path: `/api/v2/log/error/${id}`
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1648
1844
|
// src/client.ts
|
|
1649
1845
|
var SigrexError = class extends Error {
|
|
1650
1846
|
status;
|
|
@@ -1765,14 +1961,24 @@ var SigrexClient = class extends SigrexBaseClient {
|
|
|
1765
1961
|
llm: new LlmApiKeysService(this),
|
|
1766
1962
|
prediction: new PredictionApiKeysService(this)
|
|
1767
1963
|
};
|
|
1964
|
+
account = new AccountService(this);
|
|
1965
|
+
logs = {
|
|
1966
|
+
signal: new SignalLogsService(this),
|
|
1967
|
+
transaction: new TransactionLogsService(this),
|
|
1968
|
+
data: new DataLogsService(this),
|
|
1969
|
+
error: new ErrorLogsService(this)
|
|
1970
|
+
};
|
|
1768
1971
|
};
|
|
1769
1972
|
export {
|
|
1973
|
+
AccountService,
|
|
1770
1974
|
BotWebhooksService,
|
|
1771
1975
|
CexBotsService,
|
|
1772
1976
|
CodeReactionsService,
|
|
1773
1977
|
CodeStrategiesService,
|
|
1978
|
+
DataLogsService,
|
|
1774
1979
|
DataWebhooksService,
|
|
1775
1980
|
DexBotsService,
|
|
1981
|
+
ErrorLogsService,
|
|
1776
1982
|
ExchangeApiKeysService,
|
|
1777
1983
|
ExchangesService,
|
|
1778
1984
|
LlmApiKeysService,
|
|
@@ -1780,8 +1986,10 @@ export {
|
|
|
1780
1986
|
LlmSessionsService,
|
|
1781
1987
|
PredictionApiKeysService,
|
|
1782
1988
|
PredictionBotsService,
|
|
1989
|
+
SignalLogsService,
|
|
1783
1990
|
SigrexBaseClient,
|
|
1784
1991
|
SigrexClient,
|
|
1785
1992
|
SigrexError,
|
|
1993
|
+
TransactionLogsService,
|
|
1786
1994
|
generateHmacSignature
|
|
1787
1995
|
};
|
package/package.json
CHANGED