@crypticdot/defituna-api 1.1.36 → 1.1.38
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/index.d.mts +280 -26
- package/dist/index.d.ts +280 -26
- package/dist/index.js +60 -0
- package/dist/index.mjs +60 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -29,6 +29,12 @@ declare const LimitOrderState: {
|
|
|
29
29
|
readonly COMPLETE: "complete";
|
|
30
30
|
readonly CANCELLED: "cancelled";
|
|
31
31
|
};
|
|
32
|
+
declare const StakingPositionHistoryActionType$1: {
|
|
33
|
+
readonly STAKE: "stake";
|
|
34
|
+
readonly UNSTAKE: "unstake";
|
|
35
|
+
readonly WITHDRAW: "withdraw";
|
|
36
|
+
readonly CLAIM_REWARDS: "claim_rewards";
|
|
37
|
+
};
|
|
32
38
|
declare const PoolSubscriptionTopic: {
|
|
33
39
|
readonly ORDER_BOOK: "order_book";
|
|
34
40
|
readonly POOL_PRICES: "pool_prices";
|
|
@@ -44,6 +50,7 @@ declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "upd
|
|
|
44
50
|
declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
45
51
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
46
52
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
53
|
+
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
47
54
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
48
55
|
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
49
56
|
declare const Mint$1: z.ZodObject<{
|
|
@@ -1201,6 +1208,245 @@ declare const LimitOrder$1: z.ZodObject<{
|
|
|
1201
1208
|
openTxSignature: string;
|
|
1202
1209
|
closeTxSignature: string | null;
|
|
1203
1210
|
}>;
|
|
1211
|
+
declare const StakingTreasury$1: z.ZodObject<{
|
|
1212
|
+
address: z.ZodString;
|
|
1213
|
+
stakedTokenMint: z.ZodString;
|
|
1214
|
+
rewardTokenMint: z.ZodString;
|
|
1215
|
+
apy: z.ZodNumber;
|
|
1216
|
+
totalStaked: z.ZodObject<{
|
|
1217
|
+
amount: z.ZodBigInt;
|
|
1218
|
+
usd: z.ZodNumber;
|
|
1219
|
+
}, "strip", z.ZodTypeAny, {
|
|
1220
|
+
amount: bigint;
|
|
1221
|
+
usd: number;
|
|
1222
|
+
}, {
|
|
1223
|
+
amount: bigint;
|
|
1224
|
+
usd: number;
|
|
1225
|
+
}>;
|
|
1226
|
+
totalReward: z.ZodObject<{
|
|
1227
|
+
amount: z.ZodBigInt;
|
|
1228
|
+
usd: z.ZodNumber;
|
|
1229
|
+
}, "strip", z.ZodTypeAny, {
|
|
1230
|
+
amount: bigint;
|
|
1231
|
+
usd: number;
|
|
1232
|
+
}, {
|
|
1233
|
+
amount: bigint;
|
|
1234
|
+
usd: number;
|
|
1235
|
+
}>;
|
|
1236
|
+
unstakeCooldownSeconds: z.ZodNumber;
|
|
1237
|
+
}, "strip", z.ZodTypeAny, {
|
|
1238
|
+
address: string;
|
|
1239
|
+
stakedTokenMint: string;
|
|
1240
|
+
rewardTokenMint: string;
|
|
1241
|
+
apy: number;
|
|
1242
|
+
totalStaked: {
|
|
1243
|
+
amount: bigint;
|
|
1244
|
+
usd: number;
|
|
1245
|
+
};
|
|
1246
|
+
totalReward: {
|
|
1247
|
+
amount: bigint;
|
|
1248
|
+
usd: number;
|
|
1249
|
+
};
|
|
1250
|
+
unstakeCooldownSeconds: number;
|
|
1251
|
+
}, {
|
|
1252
|
+
address: string;
|
|
1253
|
+
stakedTokenMint: string;
|
|
1254
|
+
rewardTokenMint: string;
|
|
1255
|
+
apy: number;
|
|
1256
|
+
totalStaked: {
|
|
1257
|
+
amount: bigint;
|
|
1258
|
+
usd: number;
|
|
1259
|
+
};
|
|
1260
|
+
totalReward: {
|
|
1261
|
+
amount: bigint;
|
|
1262
|
+
usd: number;
|
|
1263
|
+
};
|
|
1264
|
+
unstakeCooldownSeconds: number;
|
|
1265
|
+
}>;
|
|
1266
|
+
declare const StakingPosition$1: z.ZodObject<{
|
|
1267
|
+
address: z.ZodString;
|
|
1268
|
+
owner: z.ZodString;
|
|
1269
|
+
staked: z.ZodObject<{
|
|
1270
|
+
amount: z.ZodBigInt;
|
|
1271
|
+
usd: z.ZodNumber;
|
|
1272
|
+
}, "strip", z.ZodTypeAny, {
|
|
1273
|
+
amount: bigint;
|
|
1274
|
+
usd: number;
|
|
1275
|
+
}, {
|
|
1276
|
+
amount: bigint;
|
|
1277
|
+
usd: number;
|
|
1278
|
+
}>;
|
|
1279
|
+
unstaked: z.ZodObject<{
|
|
1280
|
+
amount: z.ZodBigInt;
|
|
1281
|
+
usd: z.ZodNumber;
|
|
1282
|
+
}, "strip", z.ZodTypeAny, {
|
|
1283
|
+
amount: bigint;
|
|
1284
|
+
usd: number;
|
|
1285
|
+
}, {
|
|
1286
|
+
amount: bigint;
|
|
1287
|
+
usd: number;
|
|
1288
|
+
}>;
|
|
1289
|
+
claimedReward: z.ZodObject<{
|
|
1290
|
+
amount: z.ZodBigInt;
|
|
1291
|
+
usd: z.ZodNumber;
|
|
1292
|
+
}, "strip", z.ZodTypeAny, {
|
|
1293
|
+
amount: bigint;
|
|
1294
|
+
usd: number;
|
|
1295
|
+
}, {
|
|
1296
|
+
amount: bigint;
|
|
1297
|
+
usd: number;
|
|
1298
|
+
}>;
|
|
1299
|
+
unclaimedReward: z.ZodObject<{
|
|
1300
|
+
amount: z.ZodBigInt;
|
|
1301
|
+
usd: z.ZodNumber;
|
|
1302
|
+
}, "strip", z.ZodTypeAny, {
|
|
1303
|
+
amount: bigint;
|
|
1304
|
+
usd: number;
|
|
1305
|
+
}, {
|
|
1306
|
+
amount: bigint;
|
|
1307
|
+
usd: number;
|
|
1308
|
+
}>;
|
|
1309
|
+
vesting: z.ZodObject<{
|
|
1310
|
+
locked: z.ZodObject<{
|
|
1311
|
+
amount: z.ZodBigInt;
|
|
1312
|
+
usd: z.ZodNumber;
|
|
1313
|
+
}, "strip", z.ZodTypeAny, {
|
|
1314
|
+
amount: bigint;
|
|
1315
|
+
usd: number;
|
|
1316
|
+
}, {
|
|
1317
|
+
amount: bigint;
|
|
1318
|
+
usd: number;
|
|
1319
|
+
}>;
|
|
1320
|
+
unlocked: z.ZodObject<{
|
|
1321
|
+
amount: z.ZodBigInt;
|
|
1322
|
+
usd: z.ZodNumber;
|
|
1323
|
+
}, "strip", z.ZodTypeAny, {
|
|
1324
|
+
amount: bigint;
|
|
1325
|
+
usd: number;
|
|
1326
|
+
}, {
|
|
1327
|
+
amount: bigint;
|
|
1328
|
+
usd: number;
|
|
1329
|
+
}>;
|
|
1330
|
+
unlockRate: z.ZodBigInt;
|
|
1331
|
+
unlockEverySeconds: z.ZodNumber;
|
|
1332
|
+
unlockCliffSeconds: z.ZodNumber;
|
|
1333
|
+
lockedAt: z.ZodNullable<z.ZodDate>;
|
|
1334
|
+
}, "strip", z.ZodTypeAny, {
|
|
1335
|
+
locked: {
|
|
1336
|
+
amount: bigint;
|
|
1337
|
+
usd: number;
|
|
1338
|
+
};
|
|
1339
|
+
unlocked: {
|
|
1340
|
+
amount: bigint;
|
|
1341
|
+
usd: number;
|
|
1342
|
+
};
|
|
1343
|
+
unlockRate: bigint;
|
|
1344
|
+
unlockEverySeconds: number;
|
|
1345
|
+
unlockCliffSeconds: number;
|
|
1346
|
+
lockedAt: Date | null;
|
|
1347
|
+
}, {
|
|
1348
|
+
locked: {
|
|
1349
|
+
amount: bigint;
|
|
1350
|
+
usd: number;
|
|
1351
|
+
};
|
|
1352
|
+
unlocked: {
|
|
1353
|
+
amount: bigint;
|
|
1354
|
+
usd: number;
|
|
1355
|
+
};
|
|
1356
|
+
unlockRate: bigint;
|
|
1357
|
+
unlockEverySeconds: number;
|
|
1358
|
+
unlockCliffSeconds: number;
|
|
1359
|
+
lockedAt: Date | null;
|
|
1360
|
+
}>;
|
|
1361
|
+
lastUnstakedAt: z.ZodNullable<z.ZodDate>;
|
|
1362
|
+
withdrawAvailableAt: z.ZodNullable<z.ZodDate>;
|
|
1363
|
+
}, "strip", z.ZodTypeAny, {
|
|
1364
|
+
address: string;
|
|
1365
|
+
owner: string;
|
|
1366
|
+
staked: {
|
|
1367
|
+
amount: bigint;
|
|
1368
|
+
usd: number;
|
|
1369
|
+
};
|
|
1370
|
+
unstaked: {
|
|
1371
|
+
amount: bigint;
|
|
1372
|
+
usd: number;
|
|
1373
|
+
};
|
|
1374
|
+
claimedReward: {
|
|
1375
|
+
amount: bigint;
|
|
1376
|
+
usd: number;
|
|
1377
|
+
};
|
|
1378
|
+
unclaimedReward: {
|
|
1379
|
+
amount: bigint;
|
|
1380
|
+
usd: number;
|
|
1381
|
+
};
|
|
1382
|
+
vesting: {
|
|
1383
|
+
locked: {
|
|
1384
|
+
amount: bigint;
|
|
1385
|
+
usd: number;
|
|
1386
|
+
};
|
|
1387
|
+
unlocked: {
|
|
1388
|
+
amount: bigint;
|
|
1389
|
+
usd: number;
|
|
1390
|
+
};
|
|
1391
|
+
unlockRate: bigint;
|
|
1392
|
+
unlockEverySeconds: number;
|
|
1393
|
+
unlockCliffSeconds: number;
|
|
1394
|
+
lockedAt: Date | null;
|
|
1395
|
+
};
|
|
1396
|
+
lastUnstakedAt: Date | null;
|
|
1397
|
+
withdrawAvailableAt: Date | null;
|
|
1398
|
+
}, {
|
|
1399
|
+
address: string;
|
|
1400
|
+
owner: string;
|
|
1401
|
+
staked: {
|
|
1402
|
+
amount: bigint;
|
|
1403
|
+
usd: number;
|
|
1404
|
+
};
|
|
1405
|
+
unstaked: {
|
|
1406
|
+
amount: bigint;
|
|
1407
|
+
usd: number;
|
|
1408
|
+
};
|
|
1409
|
+
claimedReward: {
|
|
1410
|
+
amount: bigint;
|
|
1411
|
+
usd: number;
|
|
1412
|
+
};
|
|
1413
|
+
unclaimedReward: {
|
|
1414
|
+
amount: bigint;
|
|
1415
|
+
usd: number;
|
|
1416
|
+
};
|
|
1417
|
+
vesting: {
|
|
1418
|
+
locked: {
|
|
1419
|
+
amount: bigint;
|
|
1420
|
+
usd: number;
|
|
1421
|
+
};
|
|
1422
|
+
unlocked: {
|
|
1423
|
+
amount: bigint;
|
|
1424
|
+
usd: number;
|
|
1425
|
+
};
|
|
1426
|
+
unlockRate: bigint;
|
|
1427
|
+
unlockEverySeconds: number;
|
|
1428
|
+
unlockCliffSeconds: number;
|
|
1429
|
+
lockedAt: Date | null;
|
|
1430
|
+
};
|
|
1431
|
+
lastUnstakedAt: Date | null;
|
|
1432
|
+
withdrawAvailableAt: Date | null;
|
|
1433
|
+
}>;
|
|
1434
|
+
declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
1435
|
+
position: z.ZodString;
|
|
1436
|
+
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
1437
|
+
txSignature: z.ZodString;
|
|
1438
|
+
time: z.ZodDate;
|
|
1439
|
+
}, "strip", z.ZodTypeAny, {
|
|
1440
|
+
time: Date;
|
|
1441
|
+
position: string;
|
|
1442
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1443
|
+
txSignature: string;
|
|
1444
|
+
}, {
|
|
1445
|
+
time: Date;
|
|
1446
|
+
position: string;
|
|
1447
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1448
|
+
txSignature: string;
|
|
1449
|
+
}>;
|
|
1204
1450
|
declare const PoolPriceCandle$1: z.ZodObject<{
|
|
1205
1451
|
time: z.ZodNumber;
|
|
1206
1452
|
open: z.ZodNumber;
|
|
@@ -1308,8 +1554,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1308
1554
|
}, "strip", z.ZodTypeAny, {
|
|
1309
1555
|
authority: string | null;
|
|
1310
1556
|
id: string;
|
|
1311
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1312
1557
|
action: "create" | "update";
|
|
1558
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1313
1559
|
data: {
|
|
1314
1560
|
time: Date;
|
|
1315
1561
|
pool: string;
|
|
@@ -1323,8 +1569,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1323
1569
|
} | {
|
|
1324
1570
|
authority: string | null;
|
|
1325
1571
|
id: string;
|
|
1326
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1327
1572
|
action: "create" | "update";
|
|
1573
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1328
1574
|
data: {
|
|
1329
1575
|
time: Date;
|
|
1330
1576
|
pool: string;
|
|
@@ -1338,8 +1584,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1338
1584
|
}, {
|
|
1339
1585
|
authority: string | null;
|
|
1340
1586
|
id: string;
|
|
1341
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1342
1587
|
action: "create" | "update";
|
|
1588
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1343
1589
|
data: {
|
|
1344
1590
|
time: Date;
|
|
1345
1591
|
pool: string;
|
|
@@ -1353,8 +1599,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1353
1599
|
} | {
|
|
1354
1600
|
authority: string | null;
|
|
1355
1601
|
id: string;
|
|
1356
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1357
1602
|
action: "create" | "update";
|
|
1603
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1358
1604
|
data: {
|
|
1359
1605
|
time: Date;
|
|
1360
1606
|
pool: string;
|
|
@@ -1413,8 +1659,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1413
1659
|
}, "strip", z.ZodTypeAny, {
|
|
1414
1660
|
authority: string | null;
|
|
1415
1661
|
id: string;
|
|
1416
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1417
1662
|
action: "create" | "update";
|
|
1663
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1418
1664
|
data: {
|
|
1419
1665
|
price: number;
|
|
1420
1666
|
time: Date;
|
|
@@ -1425,8 +1671,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1425
1671
|
} | {
|
|
1426
1672
|
authority: string | null;
|
|
1427
1673
|
id: string;
|
|
1428
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1429
1674
|
action: "create" | "update";
|
|
1675
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1430
1676
|
data: {
|
|
1431
1677
|
price: number;
|
|
1432
1678
|
time: Date;
|
|
@@ -1437,8 +1683,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1437
1683
|
}, {
|
|
1438
1684
|
authority: string | null;
|
|
1439
1685
|
id: string;
|
|
1440
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1441
1686
|
action: "create" | "update";
|
|
1687
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1442
1688
|
data: {
|
|
1443
1689
|
price: number;
|
|
1444
1690
|
time: Date;
|
|
@@ -1449,8 +1695,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1449
1695
|
} | {
|
|
1450
1696
|
authority: string | null;
|
|
1451
1697
|
id: string;
|
|
1452
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1453
1698
|
action: "create" | "update";
|
|
1699
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1454
1700
|
data: {
|
|
1455
1701
|
price: number;
|
|
1456
1702
|
time: Date;
|
|
@@ -1616,8 +1862,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1616
1862
|
}, "strip", z.ZodTypeAny, {
|
|
1617
1863
|
authority: string | null;
|
|
1618
1864
|
id: string;
|
|
1619
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1620
1865
|
action: "create" | "update";
|
|
1866
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1621
1867
|
data: {
|
|
1622
1868
|
entries: {
|
|
1623
1869
|
price: number;
|
|
@@ -1641,8 +1887,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1641
1887
|
} | {
|
|
1642
1888
|
authority: string | null;
|
|
1643
1889
|
id: string;
|
|
1644
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1645
1890
|
action: "create" | "update";
|
|
1891
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1646
1892
|
data: {
|
|
1647
1893
|
entries: {
|
|
1648
1894
|
price: number;
|
|
@@ -1666,8 +1912,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1666
1912
|
}, {
|
|
1667
1913
|
authority: string | null;
|
|
1668
1914
|
id: string;
|
|
1669
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1670
1915
|
action: "create" | "update";
|
|
1916
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1671
1917
|
data: {
|
|
1672
1918
|
entries: {
|
|
1673
1919
|
price: number;
|
|
@@ -1691,8 +1937,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1691
1937
|
} | {
|
|
1692
1938
|
authority: string | null;
|
|
1693
1939
|
id: string;
|
|
1694
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1695
1940
|
action: "create" | "update";
|
|
1941
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1696
1942
|
data: {
|
|
1697
1943
|
entries: {
|
|
1698
1944
|
price: number;
|
|
@@ -2463,8 +2709,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2463
2709
|
}, "strip", z.ZodTypeAny, {
|
|
2464
2710
|
authority: string | null;
|
|
2465
2711
|
id: string;
|
|
2466
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2467
2712
|
action: "create" | "update";
|
|
2713
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2468
2714
|
data: {
|
|
2469
2715
|
address: string;
|
|
2470
2716
|
liquidity: bigint;
|
|
@@ -2558,8 +2804,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2558
2804
|
} | {
|
|
2559
2805
|
authority: string | null;
|
|
2560
2806
|
id: string;
|
|
2561
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2562
2807
|
action: "create" | "update";
|
|
2808
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2563
2809
|
data: {
|
|
2564
2810
|
address: string;
|
|
2565
2811
|
liquidity: bigint;
|
|
@@ -2653,8 +2899,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2653
2899
|
}, {
|
|
2654
2900
|
authority: string | null;
|
|
2655
2901
|
id: string;
|
|
2656
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2657
2902
|
action: "create" | "update";
|
|
2903
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2658
2904
|
data: {
|
|
2659
2905
|
address: string;
|
|
2660
2906
|
liquidity: bigint;
|
|
@@ -2748,8 +2994,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2748
2994
|
} | {
|
|
2749
2995
|
authority: string | null;
|
|
2750
2996
|
id: string;
|
|
2751
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2752
2997
|
action: "create" | "update";
|
|
2998
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2753
2999
|
data: {
|
|
2754
3000
|
address: string;
|
|
2755
3001
|
liquidity: bigint;
|
|
@@ -2966,8 +3212,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
2966
3212
|
}, "strip", z.ZodTypeAny, {
|
|
2967
3213
|
authority: string | null;
|
|
2968
3214
|
id: string;
|
|
2969
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2970
3215
|
action: "create" | "update";
|
|
3216
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2971
3217
|
data: {
|
|
2972
3218
|
mint: string;
|
|
2973
3219
|
address: string;
|
|
@@ -2987,8 +3233,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
2987
3233
|
} | {
|
|
2988
3234
|
authority: string | null;
|
|
2989
3235
|
id: string;
|
|
2990
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2991
3236
|
action: "create" | "update";
|
|
3237
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2992
3238
|
data: {
|
|
2993
3239
|
mint: string;
|
|
2994
3240
|
address: string;
|
|
@@ -3008,8 +3254,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
3008
3254
|
}, {
|
|
3009
3255
|
authority: string | null;
|
|
3010
3256
|
id: string;
|
|
3011
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3012
3257
|
action: "create" | "update";
|
|
3258
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3013
3259
|
data: {
|
|
3014
3260
|
mint: string;
|
|
3015
3261
|
address: string;
|
|
@@ -3029,8 +3275,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
3029
3275
|
} | {
|
|
3030
3276
|
authority: string | null;
|
|
3031
3277
|
id: string;
|
|
3032
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3033
3278
|
action: "create" | "update";
|
|
3279
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3034
3280
|
data: {
|
|
3035
3281
|
mint: string;
|
|
3036
3282
|
address: string;
|
|
@@ -3209,8 +3455,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3209
3455
|
}, "strip", z.ZodTypeAny, {
|
|
3210
3456
|
authority: string | null;
|
|
3211
3457
|
id: string;
|
|
3212
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3213
3458
|
action: "create" | "update";
|
|
3459
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3214
3460
|
data: {
|
|
3215
3461
|
mint: string;
|
|
3216
3462
|
address: string;
|
|
@@ -3236,8 +3482,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3236
3482
|
} | {
|
|
3237
3483
|
authority: string | null;
|
|
3238
3484
|
id: string;
|
|
3239
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3240
3485
|
action: "create" | "update";
|
|
3486
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3241
3487
|
data: {
|
|
3242
3488
|
mint: string;
|
|
3243
3489
|
address: string;
|
|
@@ -3263,8 +3509,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3263
3509
|
}, {
|
|
3264
3510
|
authority: string | null;
|
|
3265
3511
|
id: string;
|
|
3266
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3267
3512
|
action: "create" | "update";
|
|
3513
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3268
3514
|
data: {
|
|
3269
3515
|
mint: string;
|
|
3270
3516
|
address: string;
|
|
@@ -3290,8 +3536,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3290
3536
|
} | {
|
|
3291
3537
|
authority: string | null;
|
|
3292
3538
|
id: string;
|
|
3293
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3294
3539
|
action: "create" | "update";
|
|
3540
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3295
3541
|
data: {
|
|
3296
3542
|
mint: string;
|
|
3297
3543
|
address: string;
|
|
@@ -3332,6 +3578,7 @@ declare const schemas_PoolProviderSchema: typeof PoolProviderSchema;
|
|
|
3332
3578
|
declare const schemas_PoolSubscriptionTopic: typeof PoolSubscriptionTopic;
|
|
3333
3579
|
declare const schemas_PoolSubscriptionTopicSchema: typeof PoolSubscriptionTopicSchema;
|
|
3334
3580
|
declare const schemas_PoolSwapNotification: typeof PoolSwapNotification;
|
|
3581
|
+
declare const schemas_StakingPositionHistoryActionTypeSchema: typeof StakingPositionHistoryActionTypeSchema;
|
|
3335
3582
|
declare const schemas_TunaPositionNotification: typeof TunaPositionNotification;
|
|
3336
3583
|
declare const schemas_TunaPositionState: typeof TunaPositionState;
|
|
3337
3584
|
declare const schemas_TunaPositionStateSchema: typeof TunaPositionStateSchema;
|
|
@@ -3339,12 +3586,13 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
3339
3586
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
3340
3587
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
3341
3588
|
declare namespace schemas {
|
|
3342
|
-
export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
|
|
3589
|
+
export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
|
|
3343
3590
|
}
|
|
3344
3591
|
|
|
3345
3592
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
3346
3593
|
type TunaPositionStateType = z.infer<typeof TunaPositionStateSchema>;
|
|
3347
3594
|
type LimitOrderStateType = z.infer<typeof LimitOrderStateSchema>;
|
|
3595
|
+
type StakingPositionHistoryActionType = z.infer<typeof StakingPositionHistoryActionTypeSchema>;
|
|
3348
3596
|
type PoolSubscriptionTopicType = z.infer<typeof PoolSubscriptionTopicSchema>;
|
|
3349
3597
|
type WalletSubscriptionTopicType = z.infer<typeof WalletSubscriptionTopicSchema>;
|
|
3350
3598
|
type Mint = z.infer<typeof Mint$1>;
|
|
@@ -3361,6 +3609,9 @@ type OrderBook = z.infer<typeof OrderBook$1>;
|
|
|
3361
3609
|
type LendingPosition = z.infer<typeof LendingPosition$1>;
|
|
3362
3610
|
type TunaPosition = z.infer<typeof TunaPosition$1>;
|
|
3363
3611
|
type LimitOrder = z.infer<typeof LimitOrder$1>;
|
|
3612
|
+
type StakingPosition = z.infer<typeof StakingPosition$1>;
|
|
3613
|
+
type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
3614
|
+
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
3364
3615
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
3365
3616
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
3366
3617
|
type SubscriptionPayload = {
|
|
@@ -3436,12 +3687,15 @@ declare class TunaApiClient {
|
|
|
3436
3687
|
getPoolSwaps(poolAddress: string): Promise<PoolSwap[]>;
|
|
3437
3688
|
getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
|
|
3438
3689
|
getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
|
|
3690
|
+
getStakingTreasury(): Promise<StakingTreasury>;
|
|
3439
3691
|
getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
|
|
3440
3692
|
getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
|
|
3441
3693
|
getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
|
|
3442
3694
|
getUserTunaPositionByAddress(userAddress: string, tunaPositionAddress: string): Promise<TunaPosition>;
|
|
3443
3695
|
getUserLimitOrders(userAddress: string, poolFilter?: string): Promise<LimitOrder[]>;
|
|
3444
3696
|
getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
|
|
3697
|
+
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
3698
|
+
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
3445
3699
|
/**
|
|
3446
3700
|
* @deprecated Use getUpdatesStream instead
|
|
3447
3701
|
*/
|
|
@@ -3452,4 +3706,4 @@ declare class TunaApiClient {
|
|
|
3452
3706
|
private appendUrlSearchParams;
|
|
3453
3707
|
}
|
|
3454
3708
|
|
|
3455
|
-
export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
|
3709
|
+
export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ declare const LimitOrderState: {
|
|
|
29
29
|
readonly COMPLETE: "complete";
|
|
30
30
|
readonly CANCELLED: "cancelled";
|
|
31
31
|
};
|
|
32
|
+
declare const StakingPositionHistoryActionType$1: {
|
|
33
|
+
readonly STAKE: "stake";
|
|
34
|
+
readonly UNSTAKE: "unstake";
|
|
35
|
+
readonly WITHDRAW: "withdraw";
|
|
36
|
+
readonly CLAIM_REWARDS: "claim_rewards";
|
|
37
|
+
};
|
|
32
38
|
declare const PoolSubscriptionTopic: {
|
|
33
39
|
readonly ORDER_BOOK: "order_book";
|
|
34
40
|
readonly POOL_PRICES: "pool_prices";
|
|
@@ -44,6 +50,7 @@ declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "upd
|
|
|
44
50
|
declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
45
51
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
46
52
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
53
|
+
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
47
54
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
48
55
|
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
49
56
|
declare const Mint$1: z.ZodObject<{
|
|
@@ -1201,6 +1208,245 @@ declare const LimitOrder$1: z.ZodObject<{
|
|
|
1201
1208
|
openTxSignature: string;
|
|
1202
1209
|
closeTxSignature: string | null;
|
|
1203
1210
|
}>;
|
|
1211
|
+
declare const StakingTreasury$1: z.ZodObject<{
|
|
1212
|
+
address: z.ZodString;
|
|
1213
|
+
stakedTokenMint: z.ZodString;
|
|
1214
|
+
rewardTokenMint: z.ZodString;
|
|
1215
|
+
apy: z.ZodNumber;
|
|
1216
|
+
totalStaked: z.ZodObject<{
|
|
1217
|
+
amount: z.ZodBigInt;
|
|
1218
|
+
usd: z.ZodNumber;
|
|
1219
|
+
}, "strip", z.ZodTypeAny, {
|
|
1220
|
+
amount: bigint;
|
|
1221
|
+
usd: number;
|
|
1222
|
+
}, {
|
|
1223
|
+
amount: bigint;
|
|
1224
|
+
usd: number;
|
|
1225
|
+
}>;
|
|
1226
|
+
totalReward: z.ZodObject<{
|
|
1227
|
+
amount: z.ZodBigInt;
|
|
1228
|
+
usd: z.ZodNumber;
|
|
1229
|
+
}, "strip", z.ZodTypeAny, {
|
|
1230
|
+
amount: bigint;
|
|
1231
|
+
usd: number;
|
|
1232
|
+
}, {
|
|
1233
|
+
amount: bigint;
|
|
1234
|
+
usd: number;
|
|
1235
|
+
}>;
|
|
1236
|
+
unstakeCooldownSeconds: z.ZodNumber;
|
|
1237
|
+
}, "strip", z.ZodTypeAny, {
|
|
1238
|
+
address: string;
|
|
1239
|
+
stakedTokenMint: string;
|
|
1240
|
+
rewardTokenMint: string;
|
|
1241
|
+
apy: number;
|
|
1242
|
+
totalStaked: {
|
|
1243
|
+
amount: bigint;
|
|
1244
|
+
usd: number;
|
|
1245
|
+
};
|
|
1246
|
+
totalReward: {
|
|
1247
|
+
amount: bigint;
|
|
1248
|
+
usd: number;
|
|
1249
|
+
};
|
|
1250
|
+
unstakeCooldownSeconds: number;
|
|
1251
|
+
}, {
|
|
1252
|
+
address: string;
|
|
1253
|
+
stakedTokenMint: string;
|
|
1254
|
+
rewardTokenMint: string;
|
|
1255
|
+
apy: number;
|
|
1256
|
+
totalStaked: {
|
|
1257
|
+
amount: bigint;
|
|
1258
|
+
usd: number;
|
|
1259
|
+
};
|
|
1260
|
+
totalReward: {
|
|
1261
|
+
amount: bigint;
|
|
1262
|
+
usd: number;
|
|
1263
|
+
};
|
|
1264
|
+
unstakeCooldownSeconds: number;
|
|
1265
|
+
}>;
|
|
1266
|
+
declare const StakingPosition$1: z.ZodObject<{
|
|
1267
|
+
address: z.ZodString;
|
|
1268
|
+
owner: z.ZodString;
|
|
1269
|
+
staked: z.ZodObject<{
|
|
1270
|
+
amount: z.ZodBigInt;
|
|
1271
|
+
usd: z.ZodNumber;
|
|
1272
|
+
}, "strip", z.ZodTypeAny, {
|
|
1273
|
+
amount: bigint;
|
|
1274
|
+
usd: number;
|
|
1275
|
+
}, {
|
|
1276
|
+
amount: bigint;
|
|
1277
|
+
usd: number;
|
|
1278
|
+
}>;
|
|
1279
|
+
unstaked: z.ZodObject<{
|
|
1280
|
+
amount: z.ZodBigInt;
|
|
1281
|
+
usd: z.ZodNumber;
|
|
1282
|
+
}, "strip", z.ZodTypeAny, {
|
|
1283
|
+
amount: bigint;
|
|
1284
|
+
usd: number;
|
|
1285
|
+
}, {
|
|
1286
|
+
amount: bigint;
|
|
1287
|
+
usd: number;
|
|
1288
|
+
}>;
|
|
1289
|
+
claimedReward: z.ZodObject<{
|
|
1290
|
+
amount: z.ZodBigInt;
|
|
1291
|
+
usd: z.ZodNumber;
|
|
1292
|
+
}, "strip", z.ZodTypeAny, {
|
|
1293
|
+
amount: bigint;
|
|
1294
|
+
usd: number;
|
|
1295
|
+
}, {
|
|
1296
|
+
amount: bigint;
|
|
1297
|
+
usd: number;
|
|
1298
|
+
}>;
|
|
1299
|
+
unclaimedReward: z.ZodObject<{
|
|
1300
|
+
amount: z.ZodBigInt;
|
|
1301
|
+
usd: z.ZodNumber;
|
|
1302
|
+
}, "strip", z.ZodTypeAny, {
|
|
1303
|
+
amount: bigint;
|
|
1304
|
+
usd: number;
|
|
1305
|
+
}, {
|
|
1306
|
+
amount: bigint;
|
|
1307
|
+
usd: number;
|
|
1308
|
+
}>;
|
|
1309
|
+
vesting: z.ZodObject<{
|
|
1310
|
+
locked: z.ZodObject<{
|
|
1311
|
+
amount: z.ZodBigInt;
|
|
1312
|
+
usd: z.ZodNumber;
|
|
1313
|
+
}, "strip", z.ZodTypeAny, {
|
|
1314
|
+
amount: bigint;
|
|
1315
|
+
usd: number;
|
|
1316
|
+
}, {
|
|
1317
|
+
amount: bigint;
|
|
1318
|
+
usd: number;
|
|
1319
|
+
}>;
|
|
1320
|
+
unlocked: z.ZodObject<{
|
|
1321
|
+
amount: z.ZodBigInt;
|
|
1322
|
+
usd: z.ZodNumber;
|
|
1323
|
+
}, "strip", z.ZodTypeAny, {
|
|
1324
|
+
amount: bigint;
|
|
1325
|
+
usd: number;
|
|
1326
|
+
}, {
|
|
1327
|
+
amount: bigint;
|
|
1328
|
+
usd: number;
|
|
1329
|
+
}>;
|
|
1330
|
+
unlockRate: z.ZodBigInt;
|
|
1331
|
+
unlockEverySeconds: z.ZodNumber;
|
|
1332
|
+
unlockCliffSeconds: z.ZodNumber;
|
|
1333
|
+
lockedAt: z.ZodNullable<z.ZodDate>;
|
|
1334
|
+
}, "strip", z.ZodTypeAny, {
|
|
1335
|
+
locked: {
|
|
1336
|
+
amount: bigint;
|
|
1337
|
+
usd: number;
|
|
1338
|
+
};
|
|
1339
|
+
unlocked: {
|
|
1340
|
+
amount: bigint;
|
|
1341
|
+
usd: number;
|
|
1342
|
+
};
|
|
1343
|
+
unlockRate: bigint;
|
|
1344
|
+
unlockEverySeconds: number;
|
|
1345
|
+
unlockCliffSeconds: number;
|
|
1346
|
+
lockedAt: Date | null;
|
|
1347
|
+
}, {
|
|
1348
|
+
locked: {
|
|
1349
|
+
amount: bigint;
|
|
1350
|
+
usd: number;
|
|
1351
|
+
};
|
|
1352
|
+
unlocked: {
|
|
1353
|
+
amount: bigint;
|
|
1354
|
+
usd: number;
|
|
1355
|
+
};
|
|
1356
|
+
unlockRate: bigint;
|
|
1357
|
+
unlockEverySeconds: number;
|
|
1358
|
+
unlockCliffSeconds: number;
|
|
1359
|
+
lockedAt: Date | null;
|
|
1360
|
+
}>;
|
|
1361
|
+
lastUnstakedAt: z.ZodNullable<z.ZodDate>;
|
|
1362
|
+
withdrawAvailableAt: z.ZodNullable<z.ZodDate>;
|
|
1363
|
+
}, "strip", z.ZodTypeAny, {
|
|
1364
|
+
address: string;
|
|
1365
|
+
owner: string;
|
|
1366
|
+
staked: {
|
|
1367
|
+
amount: bigint;
|
|
1368
|
+
usd: number;
|
|
1369
|
+
};
|
|
1370
|
+
unstaked: {
|
|
1371
|
+
amount: bigint;
|
|
1372
|
+
usd: number;
|
|
1373
|
+
};
|
|
1374
|
+
claimedReward: {
|
|
1375
|
+
amount: bigint;
|
|
1376
|
+
usd: number;
|
|
1377
|
+
};
|
|
1378
|
+
unclaimedReward: {
|
|
1379
|
+
amount: bigint;
|
|
1380
|
+
usd: number;
|
|
1381
|
+
};
|
|
1382
|
+
vesting: {
|
|
1383
|
+
locked: {
|
|
1384
|
+
amount: bigint;
|
|
1385
|
+
usd: number;
|
|
1386
|
+
};
|
|
1387
|
+
unlocked: {
|
|
1388
|
+
amount: bigint;
|
|
1389
|
+
usd: number;
|
|
1390
|
+
};
|
|
1391
|
+
unlockRate: bigint;
|
|
1392
|
+
unlockEverySeconds: number;
|
|
1393
|
+
unlockCliffSeconds: number;
|
|
1394
|
+
lockedAt: Date | null;
|
|
1395
|
+
};
|
|
1396
|
+
lastUnstakedAt: Date | null;
|
|
1397
|
+
withdrawAvailableAt: Date | null;
|
|
1398
|
+
}, {
|
|
1399
|
+
address: string;
|
|
1400
|
+
owner: string;
|
|
1401
|
+
staked: {
|
|
1402
|
+
amount: bigint;
|
|
1403
|
+
usd: number;
|
|
1404
|
+
};
|
|
1405
|
+
unstaked: {
|
|
1406
|
+
amount: bigint;
|
|
1407
|
+
usd: number;
|
|
1408
|
+
};
|
|
1409
|
+
claimedReward: {
|
|
1410
|
+
amount: bigint;
|
|
1411
|
+
usd: number;
|
|
1412
|
+
};
|
|
1413
|
+
unclaimedReward: {
|
|
1414
|
+
amount: bigint;
|
|
1415
|
+
usd: number;
|
|
1416
|
+
};
|
|
1417
|
+
vesting: {
|
|
1418
|
+
locked: {
|
|
1419
|
+
amount: bigint;
|
|
1420
|
+
usd: number;
|
|
1421
|
+
};
|
|
1422
|
+
unlocked: {
|
|
1423
|
+
amount: bigint;
|
|
1424
|
+
usd: number;
|
|
1425
|
+
};
|
|
1426
|
+
unlockRate: bigint;
|
|
1427
|
+
unlockEverySeconds: number;
|
|
1428
|
+
unlockCliffSeconds: number;
|
|
1429
|
+
lockedAt: Date | null;
|
|
1430
|
+
};
|
|
1431
|
+
lastUnstakedAt: Date | null;
|
|
1432
|
+
withdrawAvailableAt: Date | null;
|
|
1433
|
+
}>;
|
|
1434
|
+
declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
1435
|
+
position: z.ZodString;
|
|
1436
|
+
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
1437
|
+
txSignature: z.ZodString;
|
|
1438
|
+
time: z.ZodDate;
|
|
1439
|
+
}, "strip", z.ZodTypeAny, {
|
|
1440
|
+
time: Date;
|
|
1441
|
+
position: string;
|
|
1442
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1443
|
+
txSignature: string;
|
|
1444
|
+
}, {
|
|
1445
|
+
time: Date;
|
|
1446
|
+
position: string;
|
|
1447
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1448
|
+
txSignature: string;
|
|
1449
|
+
}>;
|
|
1204
1450
|
declare const PoolPriceCandle$1: z.ZodObject<{
|
|
1205
1451
|
time: z.ZodNumber;
|
|
1206
1452
|
open: z.ZodNumber;
|
|
@@ -1308,8 +1554,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1308
1554
|
}, "strip", z.ZodTypeAny, {
|
|
1309
1555
|
authority: string | null;
|
|
1310
1556
|
id: string;
|
|
1311
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1312
1557
|
action: "create" | "update";
|
|
1558
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1313
1559
|
data: {
|
|
1314
1560
|
time: Date;
|
|
1315
1561
|
pool: string;
|
|
@@ -1323,8 +1569,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1323
1569
|
} | {
|
|
1324
1570
|
authority: string | null;
|
|
1325
1571
|
id: string;
|
|
1326
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1327
1572
|
action: "create" | "update";
|
|
1573
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1328
1574
|
data: {
|
|
1329
1575
|
time: Date;
|
|
1330
1576
|
pool: string;
|
|
@@ -1338,8 +1584,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1338
1584
|
}, {
|
|
1339
1585
|
authority: string | null;
|
|
1340
1586
|
id: string;
|
|
1341
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1342
1587
|
action: "create" | "update";
|
|
1588
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1343
1589
|
data: {
|
|
1344
1590
|
time: Date;
|
|
1345
1591
|
pool: string;
|
|
@@ -1353,8 +1599,8 @@ declare const PoolSwapNotification: z.ZodObject<{
|
|
|
1353
1599
|
} | {
|
|
1354
1600
|
authority: string | null;
|
|
1355
1601
|
id: string;
|
|
1356
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1357
1602
|
action: "create" | "update";
|
|
1603
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1358
1604
|
data: {
|
|
1359
1605
|
time: Date;
|
|
1360
1606
|
pool: string;
|
|
@@ -1413,8 +1659,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1413
1659
|
}, "strip", z.ZodTypeAny, {
|
|
1414
1660
|
authority: string | null;
|
|
1415
1661
|
id: string;
|
|
1416
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1417
1662
|
action: "create" | "update";
|
|
1663
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1418
1664
|
data: {
|
|
1419
1665
|
price: number;
|
|
1420
1666
|
time: Date;
|
|
@@ -1425,8 +1671,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1425
1671
|
} | {
|
|
1426
1672
|
authority: string | null;
|
|
1427
1673
|
id: string;
|
|
1428
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1429
1674
|
action: "create" | "update";
|
|
1675
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1430
1676
|
data: {
|
|
1431
1677
|
price: number;
|
|
1432
1678
|
time: Date;
|
|
@@ -1437,8 +1683,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1437
1683
|
}, {
|
|
1438
1684
|
authority: string | null;
|
|
1439
1685
|
id: string;
|
|
1440
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1441
1686
|
action: "create" | "update";
|
|
1687
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1442
1688
|
data: {
|
|
1443
1689
|
price: number;
|
|
1444
1690
|
time: Date;
|
|
@@ -1449,8 +1695,8 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
|
|
|
1449
1695
|
} | {
|
|
1450
1696
|
authority: string | null;
|
|
1451
1697
|
id: string;
|
|
1452
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1453
1698
|
action: "create" | "update";
|
|
1699
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1454
1700
|
data: {
|
|
1455
1701
|
price: number;
|
|
1456
1702
|
time: Date;
|
|
@@ -1616,8 +1862,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1616
1862
|
}, "strip", z.ZodTypeAny, {
|
|
1617
1863
|
authority: string | null;
|
|
1618
1864
|
id: string;
|
|
1619
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1620
1865
|
action: "create" | "update";
|
|
1866
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1621
1867
|
data: {
|
|
1622
1868
|
entries: {
|
|
1623
1869
|
price: number;
|
|
@@ -1641,8 +1887,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1641
1887
|
} | {
|
|
1642
1888
|
authority: string | null;
|
|
1643
1889
|
id: string;
|
|
1644
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1645
1890
|
action: "create" | "update";
|
|
1891
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1646
1892
|
data: {
|
|
1647
1893
|
entries: {
|
|
1648
1894
|
price: number;
|
|
@@ -1666,8 +1912,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1666
1912
|
}, {
|
|
1667
1913
|
authority: string | null;
|
|
1668
1914
|
id: string;
|
|
1669
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1670
1915
|
action: "create" | "update";
|
|
1916
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1671
1917
|
data: {
|
|
1672
1918
|
entries: {
|
|
1673
1919
|
price: number;
|
|
@@ -1691,8 +1937,8 @@ declare const OrderBookNotification: z.ZodObject<{
|
|
|
1691
1937
|
} | {
|
|
1692
1938
|
authority: string | null;
|
|
1693
1939
|
id: string;
|
|
1694
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1695
1940
|
action: "create" | "update";
|
|
1941
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
1696
1942
|
data: {
|
|
1697
1943
|
entries: {
|
|
1698
1944
|
price: number;
|
|
@@ -2463,8 +2709,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2463
2709
|
}, "strip", z.ZodTypeAny, {
|
|
2464
2710
|
authority: string | null;
|
|
2465
2711
|
id: string;
|
|
2466
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2467
2712
|
action: "create" | "update";
|
|
2713
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2468
2714
|
data: {
|
|
2469
2715
|
address: string;
|
|
2470
2716
|
liquidity: bigint;
|
|
@@ -2558,8 +2804,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2558
2804
|
} | {
|
|
2559
2805
|
authority: string | null;
|
|
2560
2806
|
id: string;
|
|
2561
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2562
2807
|
action: "create" | "update";
|
|
2808
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2563
2809
|
data: {
|
|
2564
2810
|
address: string;
|
|
2565
2811
|
liquidity: bigint;
|
|
@@ -2653,8 +2899,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2653
2899
|
}, {
|
|
2654
2900
|
authority: string | null;
|
|
2655
2901
|
id: string;
|
|
2656
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2657
2902
|
action: "create" | "update";
|
|
2903
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2658
2904
|
data: {
|
|
2659
2905
|
address: string;
|
|
2660
2906
|
liquidity: bigint;
|
|
@@ -2748,8 +2994,8 @@ declare const TunaPositionNotification: z.ZodObject<{
|
|
|
2748
2994
|
} | {
|
|
2749
2995
|
authority: string | null;
|
|
2750
2996
|
id: string;
|
|
2751
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2752
2997
|
action: "create" | "update";
|
|
2998
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2753
2999
|
data: {
|
|
2754
3000
|
address: string;
|
|
2755
3001
|
liquidity: bigint;
|
|
@@ -2966,8 +3212,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
2966
3212
|
}, "strip", z.ZodTypeAny, {
|
|
2967
3213
|
authority: string | null;
|
|
2968
3214
|
id: string;
|
|
2969
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2970
3215
|
action: "create" | "update";
|
|
3216
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2971
3217
|
data: {
|
|
2972
3218
|
mint: string;
|
|
2973
3219
|
address: string;
|
|
@@ -2987,8 +3233,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
2987
3233
|
} | {
|
|
2988
3234
|
authority: string | null;
|
|
2989
3235
|
id: string;
|
|
2990
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2991
3236
|
action: "create" | "update";
|
|
3237
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
2992
3238
|
data: {
|
|
2993
3239
|
mint: string;
|
|
2994
3240
|
address: string;
|
|
@@ -3008,8 +3254,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
3008
3254
|
}, {
|
|
3009
3255
|
authority: string | null;
|
|
3010
3256
|
id: string;
|
|
3011
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3012
3257
|
action: "create" | "update";
|
|
3258
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3013
3259
|
data: {
|
|
3014
3260
|
mint: string;
|
|
3015
3261
|
address: string;
|
|
@@ -3029,8 +3275,8 @@ declare const LendingPositionNotification: z.ZodObject<{
|
|
|
3029
3275
|
} | {
|
|
3030
3276
|
authority: string | null;
|
|
3031
3277
|
id: string;
|
|
3032
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3033
3278
|
action: "create" | "update";
|
|
3279
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3034
3280
|
data: {
|
|
3035
3281
|
mint: string;
|
|
3036
3282
|
address: string;
|
|
@@ -3209,8 +3455,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3209
3455
|
}, "strip", z.ZodTypeAny, {
|
|
3210
3456
|
authority: string | null;
|
|
3211
3457
|
id: string;
|
|
3212
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3213
3458
|
action: "create" | "update";
|
|
3459
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3214
3460
|
data: {
|
|
3215
3461
|
mint: string;
|
|
3216
3462
|
address: string;
|
|
@@ -3236,8 +3482,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3236
3482
|
} | {
|
|
3237
3483
|
authority: string | null;
|
|
3238
3484
|
id: string;
|
|
3239
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3240
3485
|
action: "create" | "update";
|
|
3486
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3241
3487
|
data: {
|
|
3242
3488
|
mint: string;
|
|
3243
3489
|
address: string;
|
|
@@ -3263,8 +3509,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3263
3509
|
}, {
|
|
3264
3510
|
authority: string | null;
|
|
3265
3511
|
id: string;
|
|
3266
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3267
3512
|
action: "create" | "update";
|
|
3513
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3268
3514
|
data: {
|
|
3269
3515
|
mint: string;
|
|
3270
3516
|
address: string;
|
|
@@ -3290,8 +3536,8 @@ declare const LimitOrderNotification: z.ZodObject<{
|
|
|
3290
3536
|
} | {
|
|
3291
3537
|
authority: string | null;
|
|
3292
3538
|
id: string;
|
|
3293
|
-
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3294
3539
|
action: "create" | "update";
|
|
3540
|
+
entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "fusion_limit_order";
|
|
3295
3541
|
data: {
|
|
3296
3542
|
mint: string;
|
|
3297
3543
|
address: string;
|
|
@@ -3332,6 +3578,7 @@ declare const schemas_PoolProviderSchema: typeof PoolProviderSchema;
|
|
|
3332
3578
|
declare const schemas_PoolSubscriptionTopic: typeof PoolSubscriptionTopic;
|
|
3333
3579
|
declare const schemas_PoolSubscriptionTopicSchema: typeof PoolSubscriptionTopicSchema;
|
|
3334
3580
|
declare const schemas_PoolSwapNotification: typeof PoolSwapNotification;
|
|
3581
|
+
declare const schemas_StakingPositionHistoryActionTypeSchema: typeof StakingPositionHistoryActionTypeSchema;
|
|
3335
3582
|
declare const schemas_TunaPositionNotification: typeof TunaPositionNotification;
|
|
3336
3583
|
declare const schemas_TunaPositionState: typeof TunaPositionState;
|
|
3337
3584
|
declare const schemas_TunaPositionStateSchema: typeof TunaPositionStateSchema;
|
|
@@ -3339,12 +3586,13 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
3339
3586
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
3340
3587
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
3341
3588
|
declare namespace schemas {
|
|
3342
|
-
export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
|
|
3589
|
+
export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
|
|
3343
3590
|
}
|
|
3344
3591
|
|
|
3345
3592
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
3346
3593
|
type TunaPositionStateType = z.infer<typeof TunaPositionStateSchema>;
|
|
3347
3594
|
type LimitOrderStateType = z.infer<typeof LimitOrderStateSchema>;
|
|
3595
|
+
type StakingPositionHistoryActionType = z.infer<typeof StakingPositionHistoryActionTypeSchema>;
|
|
3348
3596
|
type PoolSubscriptionTopicType = z.infer<typeof PoolSubscriptionTopicSchema>;
|
|
3349
3597
|
type WalletSubscriptionTopicType = z.infer<typeof WalletSubscriptionTopicSchema>;
|
|
3350
3598
|
type Mint = z.infer<typeof Mint$1>;
|
|
@@ -3361,6 +3609,9 @@ type OrderBook = z.infer<typeof OrderBook$1>;
|
|
|
3361
3609
|
type LendingPosition = z.infer<typeof LendingPosition$1>;
|
|
3362
3610
|
type TunaPosition = z.infer<typeof TunaPosition$1>;
|
|
3363
3611
|
type LimitOrder = z.infer<typeof LimitOrder$1>;
|
|
3612
|
+
type StakingPosition = z.infer<typeof StakingPosition$1>;
|
|
3613
|
+
type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
3614
|
+
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
3364
3615
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
3365
3616
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
3366
3617
|
type SubscriptionPayload = {
|
|
@@ -3436,12 +3687,15 @@ declare class TunaApiClient {
|
|
|
3436
3687
|
getPoolSwaps(poolAddress: string): Promise<PoolSwap[]>;
|
|
3437
3688
|
getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
|
|
3438
3689
|
getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
|
|
3690
|
+
getStakingTreasury(): Promise<StakingTreasury>;
|
|
3439
3691
|
getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
|
|
3440
3692
|
getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
|
|
3441
3693
|
getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
|
|
3442
3694
|
getUserTunaPositionByAddress(userAddress: string, tunaPositionAddress: string): Promise<TunaPosition>;
|
|
3443
3695
|
getUserLimitOrders(userAddress: string, poolFilter?: string): Promise<LimitOrder[]>;
|
|
3444
3696
|
getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
|
|
3697
|
+
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
3698
|
+
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
3445
3699
|
/**
|
|
3446
3700
|
* @deprecated Use getUpdatesStream instead
|
|
3447
3701
|
*/
|
|
@@ -3452,4 +3706,4 @@ declare class TunaApiClient {
|
|
|
3452
3706
|
private appendUrlSearchParams;
|
|
3453
3707
|
}
|
|
3454
3708
|
|
|
3455
|
-
export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
|
3709
|
+
export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,11 @@ __export(schemas_exports, {
|
|
|
73
73
|
PoolSwap: () => PoolSwap,
|
|
74
74
|
PoolSwapNotification: () => PoolSwapNotification,
|
|
75
75
|
PoolTicks: () => PoolTicks,
|
|
76
|
+
StakingPosition: () => StakingPosition,
|
|
77
|
+
StakingPositionHistoryAction: () => StakingPositionHistoryAction,
|
|
78
|
+
StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
|
|
79
|
+
StakingPositionHistoryActionTypeSchema: () => StakingPositionHistoryActionTypeSchema,
|
|
80
|
+
StakingTreasury: () => StakingTreasury,
|
|
76
81
|
Tick: () => Tick,
|
|
77
82
|
TokenOraclePrice: () => TokenOraclePrice,
|
|
78
83
|
TunaPosition: () => TunaPosition,
|
|
@@ -130,6 +135,12 @@ var LimitOrderState = {
|
|
|
130
135
|
COMPLETE: "complete",
|
|
131
136
|
CANCELLED: "cancelled"
|
|
132
137
|
};
|
|
138
|
+
var StakingPositionHistoryActionType = {
|
|
139
|
+
STAKE: "stake",
|
|
140
|
+
UNSTAKE: "unstake",
|
|
141
|
+
WITHDRAW: "withdraw",
|
|
142
|
+
CLAIM_REWARDS: "claim_rewards"
|
|
143
|
+
};
|
|
133
144
|
var PoolSubscriptionTopic = {
|
|
134
145
|
ORDER_BOOK: "order_book",
|
|
135
146
|
POOL_PRICES: "pool_prices",
|
|
@@ -145,6 +156,10 @@ var NotificationActionSchema = import_zod.z.enum([NotificationAction.CREATE, ...
|
|
|
145
156
|
var PoolProviderSchema = import_zod.z.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
|
|
146
157
|
var TunaPositionStateSchema = import_zod.z.enum([TunaPositionState.OPEN, ...Object.values(TunaPositionState)]);
|
|
147
158
|
var LimitOrderStateSchema = import_zod.z.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
|
|
159
|
+
var StakingPositionHistoryActionTypeSchema = import_zod.z.enum([
|
|
160
|
+
StakingPositionHistoryActionType.STAKE,
|
|
161
|
+
...Object.values(StakingPositionHistoryActionType)
|
|
162
|
+
]);
|
|
148
163
|
var PoolSubscriptionTopicSchema = import_zod.z.enum([
|
|
149
164
|
PoolSubscriptionTopic.ORDER_BOOK,
|
|
150
165
|
...Object.values(PoolSubscriptionTopic)
|
|
@@ -354,6 +369,39 @@ var LimitOrder = import_zod.z.object({
|
|
|
354
369
|
openedAt: import_zod.z.coerce.date(),
|
|
355
370
|
closedAt: import_zod.z.nullable(import_zod.z.coerce.date())
|
|
356
371
|
});
|
|
372
|
+
var StakingTreasury = import_zod.z.object({
|
|
373
|
+
address: import_zod.z.string(),
|
|
374
|
+
stakedTokenMint: import_zod.z.string(),
|
|
375
|
+
rewardTokenMint: import_zod.z.string(),
|
|
376
|
+
apy: import_zod.z.number(),
|
|
377
|
+
totalStaked: amountWithUsd,
|
|
378
|
+
totalReward: amountWithUsd,
|
|
379
|
+
unstakeCooldownSeconds: import_zod.z.number()
|
|
380
|
+
});
|
|
381
|
+
var StakingPosition = import_zod.z.object({
|
|
382
|
+
address: import_zod.z.string(),
|
|
383
|
+
owner: import_zod.z.string(),
|
|
384
|
+
staked: amountWithUsd,
|
|
385
|
+
unstaked: amountWithUsd,
|
|
386
|
+
claimedReward: amountWithUsd,
|
|
387
|
+
unclaimedReward: amountWithUsd,
|
|
388
|
+
vesting: import_zod.z.object({
|
|
389
|
+
locked: amountWithUsd,
|
|
390
|
+
unlocked: amountWithUsd,
|
|
391
|
+
unlockRate: import_zod.z.coerce.bigint(),
|
|
392
|
+
unlockEverySeconds: import_zod.z.number(),
|
|
393
|
+
unlockCliffSeconds: import_zod.z.number(),
|
|
394
|
+
lockedAt: import_zod.z.nullable(import_zod.z.date())
|
|
395
|
+
}),
|
|
396
|
+
lastUnstakedAt: import_zod.z.nullable(import_zod.z.date()),
|
|
397
|
+
withdrawAvailableAt: import_zod.z.nullable(import_zod.z.date())
|
|
398
|
+
});
|
|
399
|
+
var StakingPositionHistoryAction = import_zod.z.object({
|
|
400
|
+
position: import_zod.z.string(),
|
|
401
|
+
action: StakingPositionHistoryActionTypeSchema,
|
|
402
|
+
txSignature: import_zod.z.string(),
|
|
403
|
+
time: import_zod.z.date()
|
|
404
|
+
});
|
|
357
405
|
var PoolPriceCandle = import_zod.z.object({
|
|
358
406
|
time: import_zod.z.number(),
|
|
359
407
|
open: import_zod.z.number(),
|
|
@@ -530,6 +578,10 @@ var TunaApiClient = class {
|
|
|
530
578
|
});
|
|
531
579
|
return await this.httpRequest(url.toString(), PoolPriceCandle.array());
|
|
532
580
|
}
|
|
581
|
+
async getStakingTreasury() {
|
|
582
|
+
const url = this.buildURL(`staking/treasury`);
|
|
583
|
+
return await this.httpRequest(url.toString(), StakingTreasury);
|
|
584
|
+
}
|
|
533
585
|
async getUserLendingPositions(userAddress) {
|
|
534
586
|
const url = this.buildURL(`users/${userAddress}/lending-positions`);
|
|
535
587
|
return await this.httpRequest(url.toString(), LendingPosition.array());
|
|
@@ -557,6 +609,14 @@ var TunaApiClient = class {
|
|
|
557
609
|
const url = this.buildURL(`users/${userAddress}/limit-orders/${limitOrderAddress}`);
|
|
558
610
|
return await this.httpRequest(url.toString(), LimitOrder);
|
|
559
611
|
}
|
|
612
|
+
async getUserStakingPosition(userAddress) {
|
|
613
|
+
const url = this.buildURL(`users/${userAddress}/staking-position`);
|
|
614
|
+
return await this.httpRequest(url.toString(), StakingPosition);
|
|
615
|
+
}
|
|
616
|
+
async getUserStakingPositionHistory(userAddress) {
|
|
617
|
+
const url = this.buildURL(`users/${userAddress}/staking-position/history`);
|
|
618
|
+
return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
|
|
619
|
+
}
|
|
560
620
|
/**
|
|
561
621
|
* @deprecated Use getUpdatesStream instead
|
|
562
622
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -38,6 +38,11 @@ __export(schemas_exports, {
|
|
|
38
38
|
PoolSwap: () => PoolSwap,
|
|
39
39
|
PoolSwapNotification: () => PoolSwapNotification,
|
|
40
40
|
PoolTicks: () => PoolTicks,
|
|
41
|
+
StakingPosition: () => StakingPosition,
|
|
42
|
+
StakingPositionHistoryAction: () => StakingPositionHistoryAction,
|
|
43
|
+
StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
|
|
44
|
+
StakingPositionHistoryActionTypeSchema: () => StakingPositionHistoryActionTypeSchema,
|
|
45
|
+
StakingTreasury: () => StakingTreasury,
|
|
41
46
|
Tick: () => Tick,
|
|
42
47
|
TokenOraclePrice: () => TokenOraclePrice,
|
|
43
48
|
TunaPosition: () => TunaPosition,
|
|
@@ -95,6 +100,12 @@ var LimitOrderState = {
|
|
|
95
100
|
COMPLETE: "complete",
|
|
96
101
|
CANCELLED: "cancelled"
|
|
97
102
|
};
|
|
103
|
+
var StakingPositionHistoryActionType = {
|
|
104
|
+
STAKE: "stake",
|
|
105
|
+
UNSTAKE: "unstake",
|
|
106
|
+
WITHDRAW: "withdraw",
|
|
107
|
+
CLAIM_REWARDS: "claim_rewards"
|
|
108
|
+
};
|
|
98
109
|
var PoolSubscriptionTopic = {
|
|
99
110
|
ORDER_BOOK: "order_book",
|
|
100
111
|
POOL_PRICES: "pool_prices",
|
|
@@ -110,6 +121,10 @@ var NotificationActionSchema = z.enum([NotificationAction.CREATE, ...Object.valu
|
|
|
110
121
|
var PoolProviderSchema = z.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
|
|
111
122
|
var TunaPositionStateSchema = z.enum([TunaPositionState.OPEN, ...Object.values(TunaPositionState)]);
|
|
112
123
|
var LimitOrderStateSchema = z.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
|
|
124
|
+
var StakingPositionHistoryActionTypeSchema = z.enum([
|
|
125
|
+
StakingPositionHistoryActionType.STAKE,
|
|
126
|
+
...Object.values(StakingPositionHistoryActionType)
|
|
127
|
+
]);
|
|
113
128
|
var PoolSubscriptionTopicSchema = z.enum([
|
|
114
129
|
PoolSubscriptionTopic.ORDER_BOOK,
|
|
115
130
|
...Object.values(PoolSubscriptionTopic)
|
|
@@ -319,6 +334,39 @@ var LimitOrder = z.object({
|
|
|
319
334
|
openedAt: z.coerce.date(),
|
|
320
335
|
closedAt: z.nullable(z.coerce.date())
|
|
321
336
|
});
|
|
337
|
+
var StakingTreasury = z.object({
|
|
338
|
+
address: z.string(),
|
|
339
|
+
stakedTokenMint: z.string(),
|
|
340
|
+
rewardTokenMint: z.string(),
|
|
341
|
+
apy: z.number(),
|
|
342
|
+
totalStaked: amountWithUsd,
|
|
343
|
+
totalReward: amountWithUsd,
|
|
344
|
+
unstakeCooldownSeconds: z.number()
|
|
345
|
+
});
|
|
346
|
+
var StakingPosition = z.object({
|
|
347
|
+
address: z.string(),
|
|
348
|
+
owner: z.string(),
|
|
349
|
+
staked: amountWithUsd,
|
|
350
|
+
unstaked: amountWithUsd,
|
|
351
|
+
claimedReward: amountWithUsd,
|
|
352
|
+
unclaimedReward: amountWithUsd,
|
|
353
|
+
vesting: z.object({
|
|
354
|
+
locked: amountWithUsd,
|
|
355
|
+
unlocked: amountWithUsd,
|
|
356
|
+
unlockRate: z.coerce.bigint(),
|
|
357
|
+
unlockEverySeconds: z.number(),
|
|
358
|
+
unlockCliffSeconds: z.number(),
|
|
359
|
+
lockedAt: z.nullable(z.date())
|
|
360
|
+
}),
|
|
361
|
+
lastUnstakedAt: z.nullable(z.date()),
|
|
362
|
+
withdrawAvailableAt: z.nullable(z.date())
|
|
363
|
+
});
|
|
364
|
+
var StakingPositionHistoryAction = z.object({
|
|
365
|
+
position: z.string(),
|
|
366
|
+
action: StakingPositionHistoryActionTypeSchema,
|
|
367
|
+
txSignature: z.string(),
|
|
368
|
+
time: z.date()
|
|
369
|
+
});
|
|
322
370
|
var PoolPriceCandle = z.object({
|
|
323
371
|
time: z.number(),
|
|
324
372
|
open: z.number(),
|
|
@@ -495,6 +543,10 @@ var TunaApiClient = class {
|
|
|
495
543
|
});
|
|
496
544
|
return await this.httpRequest(url.toString(), PoolPriceCandle.array());
|
|
497
545
|
}
|
|
546
|
+
async getStakingTreasury() {
|
|
547
|
+
const url = this.buildURL(`staking/treasury`);
|
|
548
|
+
return await this.httpRequest(url.toString(), StakingTreasury);
|
|
549
|
+
}
|
|
498
550
|
async getUserLendingPositions(userAddress) {
|
|
499
551
|
const url = this.buildURL(`users/${userAddress}/lending-positions`);
|
|
500
552
|
return await this.httpRequest(url.toString(), LendingPosition.array());
|
|
@@ -522,6 +574,14 @@ var TunaApiClient = class {
|
|
|
522
574
|
const url = this.buildURL(`users/${userAddress}/limit-orders/${limitOrderAddress}`);
|
|
523
575
|
return await this.httpRequest(url.toString(), LimitOrder);
|
|
524
576
|
}
|
|
577
|
+
async getUserStakingPosition(userAddress) {
|
|
578
|
+
const url = this.buildURL(`users/${userAddress}/staking-position`);
|
|
579
|
+
return await this.httpRequest(url.toString(), StakingPosition);
|
|
580
|
+
}
|
|
581
|
+
async getUserStakingPositionHistory(userAddress) {
|
|
582
|
+
const url = this.buildURL(`users/${userAddress}/staking-position/history`);
|
|
583
|
+
return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
|
|
584
|
+
}
|
|
525
585
|
/**
|
|
526
586
|
* @deprecated Use getUpdatesStream instead
|
|
527
587
|
*/
|