@crypticdot/defituna-api 1.1.52 → 1.1.54
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1241,6 +1241,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1241
1241
|
stakedTokenMint: z.ZodString;
|
|
1242
1242
|
rewardTokenMint: z.ZodString;
|
|
1243
1243
|
apy: z.ZodNumber;
|
|
1244
|
+
uniqueStakers: z.ZodNumber;
|
|
1244
1245
|
totalStaked: z.ZodObject<{
|
|
1245
1246
|
amount: z.ZodBigInt;
|
|
1246
1247
|
usd: z.ZodNumber;
|
|
@@ -1270,6 +1271,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1270
1271
|
stakedTokenMint: string;
|
|
1271
1272
|
rewardTokenMint: string;
|
|
1272
1273
|
apy: number;
|
|
1274
|
+
uniqueStakers: number;
|
|
1273
1275
|
totalStaked: {
|
|
1274
1276
|
amount: bigint;
|
|
1275
1277
|
usd: number;
|
|
@@ -1287,6 +1289,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1287
1289
|
stakedTokenMint: string;
|
|
1288
1290
|
rewardTokenMint: string;
|
|
1289
1291
|
apy: number;
|
|
1292
|
+
uniqueStakers: number;
|
|
1290
1293
|
totalStaked: {
|
|
1291
1294
|
amount: bigint;
|
|
1292
1295
|
usd: number;
|
|
@@ -1343,6 +1346,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1343
1346
|
amount: bigint;
|
|
1344
1347
|
usd: number;
|
|
1345
1348
|
}>;
|
|
1349
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
1346
1350
|
vesting: z.ZodObject<{
|
|
1347
1351
|
locked: z.ZodObject<{
|
|
1348
1352
|
amount: z.ZodBigInt;
|
|
@@ -1416,6 +1420,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1416
1420
|
amount: bigint;
|
|
1417
1421
|
usd: number;
|
|
1418
1422
|
};
|
|
1423
|
+
rank: number | null;
|
|
1419
1424
|
vesting: {
|
|
1420
1425
|
locked: {
|
|
1421
1426
|
amount: bigint;
|
|
@@ -1451,6 +1456,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1451
1456
|
amount: bigint;
|
|
1452
1457
|
usd: number;
|
|
1453
1458
|
};
|
|
1459
|
+
rank: number | null;
|
|
1454
1460
|
vesting: {
|
|
1455
1461
|
locked: {
|
|
1456
1462
|
amount: bigint;
|
|
@@ -3855,6 +3861,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3855
3861
|
amount: bigint;
|
|
3856
3862
|
usd: number;
|
|
3857
3863
|
}>;
|
|
3864
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
3858
3865
|
vesting: z.ZodObject<{
|
|
3859
3866
|
locked: z.ZodObject<{
|
|
3860
3867
|
amount: z.ZodBigInt;
|
|
@@ -3928,6 +3935,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3928
3935
|
amount: bigint;
|
|
3929
3936
|
usd: number;
|
|
3930
3937
|
};
|
|
3938
|
+
rank: number | null;
|
|
3931
3939
|
vesting: {
|
|
3932
3940
|
locked: {
|
|
3933
3941
|
amount: bigint;
|
|
@@ -3963,6 +3971,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3963
3971
|
amount: bigint;
|
|
3964
3972
|
usd: number;
|
|
3965
3973
|
};
|
|
3974
|
+
rank: number | null;
|
|
3966
3975
|
vesting: {
|
|
3967
3976
|
locked: {
|
|
3968
3977
|
amount: bigint;
|
|
@@ -4029,6 +4038,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4029
4038
|
amount: bigint;
|
|
4030
4039
|
usd: number;
|
|
4031
4040
|
}>;
|
|
4041
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
4032
4042
|
vesting: z.ZodObject<{
|
|
4033
4043
|
locked: z.ZodObject<{
|
|
4034
4044
|
amount: z.ZodBigInt;
|
|
@@ -4102,6 +4112,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4102
4112
|
amount: bigint;
|
|
4103
4113
|
usd: number;
|
|
4104
4114
|
};
|
|
4115
|
+
rank: number | null;
|
|
4105
4116
|
vesting: {
|
|
4106
4117
|
locked: {
|
|
4107
4118
|
amount: bigint;
|
|
@@ -4137,6 +4148,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4137
4148
|
amount: bigint;
|
|
4138
4149
|
usd: number;
|
|
4139
4150
|
};
|
|
4151
|
+
rank: number | null;
|
|
4140
4152
|
vesting: {
|
|
4141
4153
|
locked: {
|
|
4142
4154
|
amount: bigint;
|
|
@@ -4178,6 +4190,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4178
4190
|
amount: bigint;
|
|
4179
4191
|
usd: number;
|
|
4180
4192
|
};
|
|
4193
|
+
rank: number | null;
|
|
4181
4194
|
vesting: {
|
|
4182
4195
|
locked: {
|
|
4183
4196
|
amount: bigint;
|
|
@@ -4220,6 +4233,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4220
4233
|
amount: bigint;
|
|
4221
4234
|
usd: number;
|
|
4222
4235
|
};
|
|
4236
|
+
rank: number | null;
|
|
4223
4237
|
vesting: {
|
|
4224
4238
|
locked: {
|
|
4225
4239
|
amount: bigint;
|
|
@@ -4262,6 +4276,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4262
4276
|
amount: bigint;
|
|
4263
4277
|
usd: number;
|
|
4264
4278
|
};
|
|
4279
|
+
rank: number | null;
|
|
4265
4280
|
vesting: {
|
|
4266
4281
|
locked: {
|
|
4267
4282
|
amount: bigint;
|
|
@@ -4304,6 +4319,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4304
4319
|
amount: bigint;
|
|
4305
4320
|
usd: number;
|
|
4306
4321
|
};
|
|
4322
|
+
rank: number | null;
|
|
4307
4323
|
vesting: {
|
|
4308
4324
|
locked: {
|
|
4309
4325
|
amount: bigint;
|
|
@@ -4458,7 +4474,7 @@ declare class TunaApiClient {
|
|
|
4458
4474
|
getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
|
|
4459
4475
|
getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
|
|
4460
4476
|
getStakingTreasury(): Promise<StakingTreasury>;
|
|
4461
|
-
getStakingLeaderboard(page: number, pageSize: number): Promise<StakingLeaderboardPage>;
|
|
4477
|
+
getStakingLeaderboard(page: number, pageSize: number, search?: string): Promise<StakingLeaderboardPage>;
|
|
4462
4478
|
getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
|
|
4463
4479
|
getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
|
|
4464
4480
|
getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1241,6 +1241,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1241
1241
|
stakedTokenMint: z.ZodString;
|
|
1242
1242
|
rewardTokenMint: z.ZodString;
|
|
1243
1243
|
apy: z.ZodNumber;
|
|
1244
|
+
uniqueStakers: z.ZodNumber;
|
|
1244
1245
|
totalStaked: z.ZodObject<{
|
|
1245
1246
|
amount: z.ZodBigInt;
|
|
1246
1247
|
usd: z.ZodNumber;
|
|
@@ -1270,6 +1271,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1270
1271
|
stakedTokenMint: string;
|
|
1271
1272
|
rewardTokenMint: string;
|
|
1272
1273
|
apy: number;
|
|
1274
|
+
uniqueStakers: number;
|
|
1273
1275
|
totalStaked: {
|
|
1274
1276
|
amount: bigint;
|
|
1275
1277
|
usd: number;
|
|
@@ -1287,6 +1289,7 @@ declare const StakingTreasury$1: z.ZodObject<{
|
|
|
1287
1289
|
stakedTokenMint: string;
|
|
1288
1290
|
rewardTokenMint: string;
|
|
1289
1291
|
apy: number;
|
|
1292
|
+
uniqueStakers: number;
|
|
1290
1293
|
totalStaked: {
|
|
1291
1294
|
amount: bigint;
|
|
1292
1295
|
usd: number;
|
|
@@ -1343,6 +1346,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1343
1346
|
amount: bigint;
|
|
1344
1347
|
usd: number;
|
|
1345
1348
|
}>;
|
|
1349
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
1346
1350
|
vesting: z.ZodObject<{
|
|
1347
1351
|
locked: z.ZodObject<{
|
|
1348
1352
|
amount: z.ZodBigInt;
|
|
@@ -1416,6 +1420,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1416
1420
|
amount: bigint;
|
|
1417
1421
|
usd: number;
|
|
1418
1422
|
};
|
|
1423
|
+
rank: number | null;
|
|
1419
1424
|
vesting: {
|
|
1420
1425
|
locked: {
|
|
1421
1426
|
amount: bigint;
|
|
@@ -1451,6 +1456,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1451
1456
|
amount: bigint;
|
|
1452
1457
|
usd: number;
|
|
1453
1458
|
};
|
|
1459
|
+
rank: number | null;
|
|
1454
1460
|
vesting: {
|
|
1455
1461
|
locked: {
|
|
1456
1462
|
amount: bigint;
|
|
@@ -3855,6 +3861,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3855
3861
|
amount: bigint;
|
|
3856
3862
|
usd: number;
|
|
3857
3863
|
}>;
|
|
3864
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
3858
3865
|
vesting: z.ZodObject<{
|
|
3859
3866
|
locked: z.ZodObject<{
|
|
3860
3867
|
amount: z.ZodBigInt;
|
|
@@ -3928,6 +3935,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3928
3935
|
amount: bigint;
|
|
3929
3936
|
usd: number;
|
|
3930
3937
|
};
|
|
3938
|
+
rank: number | null;
|
|
3931
3939
|
vesting: {
|
|
3932
3940
|
locked: {
|
|
3933
3941
|
amount: bigint;
|
|
@@ -3963,6 +3971,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
3963
3971
|
amount: bigint;
|
|
3964
3972
|
usd: number;
|
|
3965
3973
|
};
|
|
3974
|
+
rank: number | null;
|
|
3966
3975
|
vesting: {
|
|
3967
3976
|
locked: {
|
|
3968
3977
|
amount: bigint;
|
|
@@ -4029,6 +4038,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4029
4038
|
amount: bigint;
|
|
4030
4039
|
usd: number;
|
|
4031
4040
|
}>;
|
|
4041
|
+
rank: z.ZodNullable<z.ZodNumber>;
|
|
4032
4042
|
vesting: z.ZodObject<{
|
|
4033
4043
|
locked: z.ZodObject<{
|
|
4034
4044
|
amount: z.ZodBigInt;
|
|
@@ -4102,6 +4112,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4102
4112
|
amount: bigint;
|
|
4103
4113
|
usd: number;
|
|
4104
4114
|
};
|
|
4115
|
+
rank: number | null;
|
|
4105
4116
|
vesting: {
|
|
4106
4117
|
locked: {
|
|
4107
4118
|
amount: bigint;
|
|
@@ -4137,6 +4148,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4137
4148
|
amount: bigint;
|
|
4138
4149
|
usd: number;
|
|
4139
4150
|
};
|
|
4151
|
+
rank: number | null;
|
|
4140
4152
|
vesting: {
|
|
4141
4153
|
locked: {
|
|
4142
4154
|
amount: bigint;
|
|
@@ -4178,6 +4190,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4178
4190
|
amount: bigint;
|
|
4179
4191
|
usd: number;
|
|
4180
4192
|
};
|
|
4193
|
+
rank: number | null;
|
|
4181
4194
|
vesting: {
|
|
4182
4195
|
locked: {
|
|
4183
4196
|
amount: bigint;
|
|
@@ -4220,6 +4233,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4220
4233
|
amount: bigint;
|
|
4221
4234
|
usd: number;
|
|
4222
4235
|
};
|
|
4236
|
+
rank: number | null;
|
|
4223
4237
|
vesting: {
|
|
4224
4238
|
locked: {
|
|
4225
4239
|
amount: bigint;
|
|
@@ -4262,6 +4276,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4262
4276
|
amount: bigint;
|
|
4263
4277
|
usd: number;
|
|
4264
4278
|
};
|
|
4279
|
+
rank: number | null;
|
|
4265
4280
|
vesting: {
|
|
4266
4281
|
locked: {
|
|
4267
4282
|
amount: bigint;
|
|
@@ -4304,6 +4319,7 @@ declare const StakingPositionNotification: z.ZodObject<{
|
|
|
4304
4319
|
amount: bigint;
|
|
4305
4320
|
usd: number;
|
|
4306
4321
|
};
|
|
4322
|
+
rank: number | null;
|
|
4307
4323
|
vesting: {
|
|
4308
4324
|
locked: {
|
|
4309
4325
|
amount: bigint;
|
|
@@ -4458,7 +4474,7 @@ declare class TunaApiClient {
|
|
|
4458
4474
|
getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
|
|
4459
4475
|
getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
|
|
4460
4476
|
getStakingTreasury(): Promise<StakingTreasury>;
|
|
4461
|
-
getStakingLeaderboard(page: number, pageSize: number): Promise<StakingLeaderboardPage>;
|
|
4477
|
+
getStakingLeaderboard(page: number, pageSize: number, search?: string): Promise<StakingLeaderboardPage>;
|
|
4462
4478
|
getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
|
|
4463
4479
|
getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
|
|
4464
4480
|
getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
|
package/dist/index.js
CHANGED
|
@@ -392,6 +392,7 @@ var StakingTreasury = import_zod.z.object({
|
|
|
392
392
|
stakedTokenMint: import_zod.z.string(),
|
|
393
393
|
rewardTokenMint: import_zod.z.string(),
|
|
394
394
|
apy: import_zod.z.number(),
|
|
395
|
+
uniqueStakers: import_zod.z.number(),
|
|
395
396
|
totalStaked: amountWithUsd,
|
|
396
397
|
totalReward: amountWithUsd,
|
|
397
398
|
unstakeCooldownSeconds: import_zod.z.number(),
|
|
@@ -406,6 +407,7 @@ var StakingPosition = import_zod.z.object({
|
|
|
406
407
|
unstaked: amountWithUsd,
|
|
407
408
|
claimedReward: amountWithUsd,
|
|
408
409
|
unclaimedReward: amountWithUsd,
|
|
410
|
+
rank: import_zod.z.nullable(import_zod.z.number()),
|
|
409
411
|
vesting: import_zod.z.object({
|
|
410
412
|
locked: amountWithUsd,
|
|
411
413
|
unlocked: amountWithUsd,
|
|
@@ -656,11 +658,12 @@ var TunaApiClient = class {
|
|
|
656
658
|
const url = this.buildURL(`staking/treasury`);
|
|
657
659
|
return await this.httpRequest(url.toString(), StakingTreasury);
|
|
658
660
|
}
|
|
659
|
-
async getStakingLeaderboard(page, pageSize) {
|
|
661
|
+
async getStakingLeaderboard(page, pageSize, search) {
|
|
660
662
|
const url = this.buildURL(`staking/leaderboard`);
|
|
661
663
|
this.appendUrlSearchParams(url, {
|
|
662
664
|
page: page.toString(),
|
|
663
|
-
page_size: pageSize.toString()
|
|
665
|
+
page_size: pageSize.toString(),
|
|
666
|
+
...search ? { search } : {}
|
|
664
667
|
});
|
|
665
668
|
return await this.httpRequest(url.toString(), StakingLeaderboardPage, { parseRoot: true });
|
|
666
669
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -357,6 +357,7 @@ var StakingTreasury = z.object({
|
|
|
357
357
|
stakedTokenMint: z.string(),
|
|
358
358
|
rewardTokenMint: z.string(),
|
|
359
359
|
apy: z.number(),
|
|
360
|
+
uniqueStakers: z.number(),
|
|
360
361
|
totalStaked: amountWithUsd,
|
|
361
362
|
totalReward: amountWithUsd,
|
|
362
363
|
unstakeCooldownSeconds: z.number(),
|
|
@@ -371,6 +372,7 @@ var StakingPosition = z.object({
|
|
|
371
372
|
unstaked: amountWithUsd,
|
|
372
373
|
claimedReward: amountWithUsd,
|
|
373
374
|
unclaimedReward: amountWithUsd,
|
|
375
|
+
rank: z.nullable(z.number()),
|
|
374
376
|
vesting: z.object({
|
|
375
377
|
locked: amountWithUsd,
|
|
376
378
|
unlocked: amountWithUsd,
|
|
@@ -621,11 +623,12 @@ var TunaApiClient = class {
|
|
|
621
623
|
const url = this.buildURL(`staking/treasury`);
|
|
622
624
|
return await this.httpRequest(url.toString(), StakingTreasury);
|
|
623
625
|
}
|
|
624
|
-
async getStakingLeaderboard(page, pageSize) {
|
|
626
|
+
async getStakingLeaderboard(page, pageSize, search) {
|
|
625
627
|
const url = this.buildURL(`staking/leaderboard`);
|
|
626
628
|
this.appendUrlSearchParams(url, {
|
|
627
629
|
page: page.toString(),
|
|
628
|
-
page_size: pageSize.toString()
|
|
630
|
+
page_size: pageSize.toString(),
|
|
631
|
+
...search ? { search } : {}
|
|
629
632
|
});
|
|
630
633
|
return await this.httpRequest(url.toString(), StakingLeaderboardPage, { parseRoot: true });
|
|
631
634
|
}
|