flash-sdk 13.0.2 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/OraclePrice.d.ts +1 -0
- package/dist/OrderAccount.d.ts +1 -0
- package/dist/PerpetualsClient.d.ts +52 -233
- package/dist/PerpetualsClient.js +309 -321
- package/dist/PoolAccount.d.ts +1 -0
- package/dist/PoolDataClient.d.ts +1 -0
- package/dist/PositionAccount.d.ts +1 -0
- package/dist/TokenStakeAccount.d.ts +17 -3
- package/dist/TokenStakeAccount.js +36 -0
- package/dist/TokenVaultAccount.d.ts +2 -0
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.js +4 -4
- package/dist/constants/index.d.ts +1 -0
- package/dist/idl/perpetuals.d.ts +300 -479
- package/dist/idl/perpetuals.json +300 -479
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/generated.d.ts +24 -15
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -3
- package/dist/utils/IdlCoder.js +7 -17
- package/dist/utils/alt.js +6 -5
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
package/dist/OraclePrice.d.ts
CHANGED
package/dist/OrderAccount.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="bn.js" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
2
4
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
3
5
|
import { PoolAccount } from "./PoolAccount";
|
|
@@ -9,6 +11,7 @@ import type { Perpetuals } from './idl/perpetuals';
|
|
|
9
11
|
import { SendTransactionOpts } from "./utils/rpc";
|
|
10
12
|
import { MarketConfig, PoolConfig, Token } from "./PoolConfig";
|
|
11
13
|
import { MarketAccount } from "./MarketAccount";
|
|
14
|
+
import { TokenStakeAccount } from "./TokenStakeAccount";
|
|
12
15
|
export type PerpClientOptions = {
|
|
13
16
|
postSendTxCallback?: ({ txid }: {
|
|
14
17
|
txid: string;
|
|
@@ -75,79 +78,24 @@ export declare class PerpetualsClient {
|
|
|
75
78
|
bump: number;
|
|
76
79
|
};
|
|
77
80
|
adjustTokenRatios: (ratios: TokenRatios[]) => TokenRatios[];
|
|
78
|
-
getPerpetuals: () => Promise<
|
|
79
|
-
permissions: {
|
|
80
|
-
allowSwap: boolean;
|
|
81
|
-
allowAddLiquidity: boolean;
|
|
82
|
-
allowRemoveLiquidity: boolean;
|
|
83
|
-
allowOpenPosition: boolean;
|
|
84
|
-
allowClosePosition: boolean;
|
|
85
|
-
allowCollateralWithdrawal: boolean;
|
|
86
|
-
allowSizeChange: boolean;
|
|
87
|
-
allowLiquidation: boolean;
|
|
88
|
-
allowLpStaking: boolean;
|
|
89
|
-
allowFeeDistribution: boolean;
|
|
90
|
-
allowUngatedTrading: boolean;
|
|
91
|
-
allowFeeDiscounts: boolean;
|
|
92
|
-
allowReferralRebates: boolean;
|
|
93
|
-
};
|
|
94
|
-
pools: PublicKey[];
|
|
95
|
-
collections: PublicKey[];
|
|
96
|
-
voltageMultiplier: {
|
|
97
|
-
volume: BN;
|
|
98
|
-
rewards: BN;
|
|
99
|
-
rebates: BN;
|
|
100
|
-
};
|
|
101
|
-
tradingDiscount: BN[];
|
|
102
|
-
referralRebate: BN[];
|
|
103
|
-
defaultRebate: BN;
|
|
104
|
-
inceptionTime: BN;
|
|
105
|
-
transferAuthorityBump: number;
|
|
106
|
-
perpetualsBump: number;
|
|
107
|
-
tradeLimit: number;
|
|
108
|
-
triggerOrderLimit: number;
|
|
109
|
-
rebateLimitUsd: number;
|
|
110
|
-
}>;
|
|
81
|
+
getPerpetuals: () => Promise<any>;
|
|
111
82
|
getPoolKey: (name: string) => PublicKey;
|
|
112
83
|
getPool: (name: string) => Promise<{
|
|
113
84
|
name: string;
|
|
114
|
-
permissions:
|
|
115
|
-
allowSwap: boolean;
|
|
116
|
-
allowAddLiquidity: boolean;
|
|
117
|
-
allowRemoveLiquidity: boolean;
|
|
118
|
-
allowOpenPosition: boolean;
|
|
119
|
-
allowClosePosition: boolean;
|
|
120
|
-
allowCollateralWithdrawal: boolean;
|
|
121
|
-
allowSizeChange: boolean;
|
|
122
|
-
allowLiquidation: boolean;
|
|
123
|
-
allowLpStaking: boolean;
|
|
124
|
-
allowFeeDistribution: boolean;
|
|
125
|
-
allowUngatedTrading: boolean;
|
|
126
|
-
allowFeeDiscounts: boolean;
|
|
127
|
-
allowReferralRebates: boolean;
|
|
128
|
-
};
|
|
85
|
+
permissions: any;
|
|
129
86
|
inceptionTime: BN;
|
|
130
87
|
lpMint: PublicKey;
|
|
131
88
|
oracleAuthority: PublicKey;
|
|
132
89
|
stakedLpVault: PublicKey;
|
|
133
90
|
rewardCustody: PublicKey;
|
|
134
91
|
custodies: PublicKey[];
|
|
135
|
-
ratios:
|
|
136
|
-
target: BN;
|
|
137
|
-
min: BN;
|
|
138
|
-
max: BN;
|
|
139
|
-
}[];
|
|
92
|
+
ratios: any[];
|
|
140
93
|
markets: PublicKey[];
|
|
141
94
|
maxAumUsd: BN;
|
|
142
95
|
buffer: BN;
|
|
143
96
|
rawAumUsd: BN;
|
|
144
97
|
equityUsd: BN;
|
|
145
|
-
totalStaked:
|
|
146
|
-
pendingActivation: BN;
|
|
147
|
-
activeAmount: BN;
|
|
148
|
-
pendingDeactivation: BN;
|
|
149
|
-
deactivatedAmount: BN;
|
|
150
|
-
};
|
|
98
|
+
totalStaked: any;
|
|
151
99
|
stakingFeeShareBps: BN;
|
|
152
100
|
bump: number;
|
|
153
101
|
lpMintBump: number;
|
|
@@ -158,13 +106,7 @@ export declare class PerpetualsClient {
|
|
|
158
106
|
stakingFeeBoostBps: BN[];
|
|
159
107
|
compoundingMint: PublicKey;
|
|
160
108
|
compoundingLpVault: PublicKey;
|
|
161
|
-
compoundingStats:
|
|
162
|
-
activeAmount: BN;
|
|
163
|
-
totalSupply: BN;
|
|
164
|
-
rewardSnapshot: BN;
|
|
165
|
-
feeShareBps: BN;
|
|
166
|
-
lastCompoundTime: BN;
|
|
167
|
-
};
|
|
109
|
+
compoundingStats: any;
|
|
168
110
|
compoundingMintBump: number;
|
|
169
111
|
compoundingLpVaultBump: number;
|
|
170
112
|
minLpPriceUsd: BN;
|
|
@@ -178,43 +120,20 @@ export declare class PerpetualsClient {
|
|
|
178
120
|
}>;
|
|
179
121
|
getPools: () => Promise<{
|
|
180
122
|
name: string;
|
|
181
|
-
permissions:
|
|
182
|
-
allowSwap: boolean;
|
|
183
|
-
allowAddLiquidity: boolean;
|
|
184
|
-
allowRemoveLiquidity: boolean;
|
|
185
|
-
allowOpenPosition: boolean;
|
|
186
|
-
allowClosePosition: boolean;
|
|
187
|
-
allowCollateralWithdrawal: boolean;
|
|
188
|
-
allowSizeChange: boolean;
|
|
189
|
-
allowLiquidation: boolean;
|
|
190
|
-
allowLpStaking: boolean;
|
|
191
|
-
allowFeeDistribution: boolean;
|
|
192
|
-
allowUngatedTrading: boolean;
|
|
193
|
-
allowFeeDiscounts: boolean;
|
|
194
|
-
allowReferralRebates: boolean;
|
|
195
|
-
};
|
|
123
|
+
permissions: any;
|
|
196
124
|
inceptionTime: BN;
|
|
197
125
|
lpMint: PublicKey;
|
|
198
126
|
oracleAuthority: PublicKey;
|
|
199
127
|
stakedLpVault: PublicKey;
|
|
200
128
|
rewardCustody: PublicKey;
|
|
201
129
|
custodies: PublicKey[];
|
|
202
|
-
ratios:
|
|
203
|
-
target: BN;
|
|
204
|
-
min: BN;
|
|
205
|
-
max: BN;
|
|
206
|
-
}[];
|
|
130
|
+
ratios: any[];
|
|
207
131
|
markets: PublicKey[];
|
|
208
132
|
maxAumUsd: BN;
|
|
209
133
|
buffer: BN;
|
|
210
134
|
rawAumUsd: BN;
|
|
211
135
|
equityUsd: BN;
|
|
212
|
-
totalStaked:
|
|
213
|
-
pendingActivation: BN;
|
|
214
|
-
activeAmount: BN;
|
|
215
|
-
pendingDeactivation: BN;
|
|
216
|
-
deactivatedAmount: BN;
|
|
217
|
-
};
|
|
136
|
+
totalStaked: any;
|
|
218
137
|
stakingFeeShareBps: BN;
|
|
219
138
|
bump: number;
|
|
220
139
|
lpMintBump: number;
|
|
@@ -225,13 +144,7 @@ export declare class PerpetualsClient {
|
|
|
225
144
|
stakingFeeBoostBps: BN[];
|
|
226
145
|
compoundingMint: PublicKey;
|
|
227
146
|
compoundingLpVault: PublicKey;
|
|
228
|
-
compoundingStats:
|
|
229
|
-
activeAmount: BN;
|
|
230
|
-
totalSupply: BN;
|
|
231
|
-
rewardSnapshot: BN;
|
|
232
|
-
feeShareBps: BN;
|
|
233
|
-
lastCompoundTime: BN;
|
|
234
|
-
};
|
|
147
|
+
compoundingStats: any;
|
|
235
148
|
compoundingMintBump: number;
|
|
236
149
|
compoundingLpVaultBump: number;
|
|
237
150
|
minLpPriceUsd: BN;
|
|
@@ -256,10 +169,7 @@ export declare class PerpetualsClient {
|
|
|
256
169
|
delegate: PublicKey;
|
|
257
170
|
openTime: BN;
|
|
258
171
|
updateTime: BN;
|
|
259
|
-
entryPrice:
|
|
260
|
-
price: BN;
|
|
261
|
-
exponent: number;
|
|
262
|
-
};
|
|
172
|
+
entryPrice: any;
|
|
263
173
|
sizeAmount: BN;
|
|
264
174
|
sizeUsd: BN;
|
|
265
175
|
lockedAmount: BN;
|
|
@@ -270,10 +180,7 @@ export declare class PerpetualsClient {
|
|
|
270
180
|
unsettledFeesUsd: BN;
|
|
271
181
|
cumulativeLockFeeSnapshot: BN;
|
|
272
182
|
degenSizeUsd: BN;
|
|
273
|
-
referencePrice:
|
|
274
|
-
price: BN;
|
|
275
|
-
exponent: number;
|
|
276
|
-
};
|
|
183
|
+
referencePrice: any;
|
|
277
184
|
buffer: number[];
|
|
278
185
|
priceImpactSet: number;
|
|
279
186
|
sizeDecimals: number;
|
|
@@ -286,40 +193,9 @@ export declare class PerpetualsClient {
|
|
|
286
193
|
getOrderAccount: (orderAccountKey: PublicKey) => Promise<{
|
|
287
194
|
owner: PublicKey;
|
|
288
195
|
market: PublicKey;
|
|
289
|
-
limitOrders:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
exponent: number;
|
|
293
|
-
};
|
|
294
|
-
reserveAmount: BN;
|
|
295
|
-
reserveCustodyUid: number;
|
|
296
|
-
receiveCustodyUid: number;
|
|
297
|
-
sizeAmount: BN;
|
|
298
|
-
stopLossPrice: {
|
|
299
|
-
price: BN;
|
|
300
|
-
exponent: number;
|
|
301
|
-
};
|
|
302
|
-
takeProfitPrice: {
|
|
303
|
-
price: BN;
|
|
304
|
-
exponent: number;
|
|
305
|
-
};
|
|
306
|
-
}[];
|
|
307
|
-
takeProfitOrders: {
|
|
308
|
-
triggerPrice: {
|
|
309
|
-
price: BN;
|
|
310
|
-
exponent: number;
|
|
311
|
-
};
|
|
312
|
-
triggerSize: BN;
|
|
313
|
-
receiveCustodyUid: number;
|
|
314
|
-
}[];
|
|
315
|
-
stopLossOrders: {
|
|
316
|
-
triggerPrice: {
|
|
317
|
-
price: BN;
|
|
318
|
-
exponent: number;
|
|
319
|
-
};
|
|
320
|
-
triggerSize: BN;
|
|
321
|
-
receiveCustodyUid: number;
|
|
322
|
-
}[];
|
|
196
|
+
limitOrders: any[];
|
|
197
|
+
takeProfitOrders: any[];
|
|
198
|
+
stopLossOrders: any[];
|
|
323
199
|
isInitialised: boolean;
|
|
324
200
|
openOrders: number;
|
|
325
201
|
openSl: number;
|
|
@@ -338,10 +214,7 @@ export declare class PerpetualsClient {
|
|
|
338
214
|
delegate: PublicKey;
|
|
339
215
|
openTime: BN;
|
|
340
216
|
updateTime: BN;
|
|
341
|
-
entryPrice:
|
|
342
|
-
price: BN;
|
|
343
|
-
exponent: number;
|
|
344
|
-
};
|
|
217
|
+
entryPrice: any;
|
|
345
218
|
sizeAmount: BN;
|
|
346
219
|
sizeUsd: BN;
|
|
347
220
|
lockedAmount: BN;
|
|
@@ -352,10 +225,7 @@ export declare class PerpetualsClient {
|
|
|
352
225
|
unsettledFeesUsd: BN;
|
|
353
226
|
cumulativeLockFeeSnapshot: BN;
|
|
354
227
|
degenSizeUsd: BN;
|
|
355
|
-
referencePrice:
|
|
356
|
-
price: BN;
|
|
357
|
-
exponent: number;
|
|
358
|
-
};
|
|
228
|
+
referencePrice: any;
|
|
359
229
|
buffer: number[];
|
|
360
230
|
priceImpactSet: number;
|
|
361
231
|
sizeDecimals: number;
|
|
@@ -370,10 +240,7 @@ export declare class PerpetualsClient {
|
|
|
370
240
|
delegate: PublicKey;
|
|
371
241
|
openTime: BN;
|
|
372
242
|
updateTime: BN;
|
|
373
|
-
entryPrice:
|
|
374
|
-
price: BN;
|
|
375
|
-
exponent: number;
|
|
376
|
-
};
|
|
243
|
+
entryPrice: any;
|
|
377
244
|
sizeAmount: BN;
|
|
378
245
|
sizeUsd: BN;
|
|
379
246
|
lockedAmount: BN;
|
|
@@ -384,10 +251,7 @@ export declare class PerpetualsClient {
|
|
|
384
251
|
unsettledFeesUsd: BN;
|
|
385
252
|
cumulativeLockFeeSnapshot: BN;
|
|
386
253
|
degenSizeUsd: BN;
|
|
387
|
-
referencePrice:
|
|
388
|
-
price: BN;
|
|
389
|
-
exponent: number;
|
|
390
|
-
};
|
|
254
|
+
referencePrice: any;
|
|
391
255
|
buffer: number[];
|
|
392
256
|
priceImpactSet: number;
|
|
393
257
|
sizeDecimals: number;
|
|
@@ -448,10 +312,7 @@ export declare class PerpetualsClient {
|
|
|
448
312
|
delegate: PublicKey;
|
|
449
313
|
openTime: BN;
|
|
450
314
|
updateTime: BN;
|
|
451
|
-
entryPrice:
|
|
452
|
-
price: BN;
|
|
453
|
-
exponent: number;
|
|
454
|
-
};
|
|
315
|
+
entryPrice: any;
|
|
455
316
|
sizeAmount: BN;
|
|
456
317
|
sizeUsd: BN;
|
|
457
318
|
lockedAmount: BN;
|
|
@@ -462,10 +323,7 @@ export declare class PerpetualsClient {
|
|
|
462
323
|
unsettledFeesUsd: BN;
|
|
463
324
|
cumulativeLockFeeSnapshot: BN;
|
|
464
325
|
degenSizeUsd: BN;
|
|
465
|
-
referencePrice:
|
|
466
|
-
price: BN;
|
|
467
|
-
exponent: number;
|
|
468
|
-
};
|
|
326
|
+
referencePrice: any;
|
|
469
327
|
buffer: number[];
|
|
470
328
|
priceImpactSet: number;
|
|
471
329
|
sizeDecimals: number;
|
|
@@ -480,10 +338,7 @@ export declare class PerpetualsClient {
|
|
|
480
338
|
delegate: PublicKey;
|
|
481
339
|
openTime: BN;
|
|
482
340
|
updateTime: BN;
|
|
483
|
-
entryPrice:
|
|
484
|
-
price: BN;
|
|
485
|
-
exponent: number;
|
|
486
|
-
};
|
|
341
|
+
entryPrice: any;
|
|
487
342
|
sizeAmount: BN;
|
|
488
343
|
sizeUsd: BN;
|
|
489
344
|
lockedAmount: BN;
|
|
@@ -494,10 +349,7 @@ export declare class PerpetualsClient {
|
|
|
494
349
|
unsettledFeesUsd: BN;
|
|
495
350
|
cumulativeLockFeeSnapshot: BN;
|
|
496
351
|
degenSizeUsd: BN;
|
|
497
|
-
referencePrice:
|
|
498
|
-
price: BN;
|
|
499
|
-
exponent: number;
|
|
500
|
-
};
|
|
352
|
+
referencePrice: any;
|
|
501
353
|
buffer: number[];
|
|
502
354
|
priceImpactSet: number;
|
|
503
355
|
sizeDecimals: number;
|
|
@@ -512,10 +364,7 @@ export declare class PerpetualsClient {
|
|
|
512
364
|
delegate: PublicKey;
|
|
513
365
|
openTime: BN;
|
|
514
366
|
updateTime: BN;
|
|
515
|
-
entryPrice:
|
|
516
|
-
price: BN;
|
|
517
|
-
exponent: number;
|
|
518
|
-
};
|
|
367
|
+
entryPrice: any;
|
|
519
368
|
sizeAmount: BN;
|
|
520
369
|
sizeUsd: BN;
|
|
521
370
|
lockedAmount: BN;
|
|
@@ -526,10 +375,7 @@ export declare class PerpetualsClient {
|
|
|
526
375
|
unsettledFeesUsd: BN;
|
|
527
376
|
cumulativeLockFeeSnapshot: BN;
|
|
528
377
|
degenSizeUsd: BN;
|
|
529
|
-
referencePrice:
|
|
530
|
-
price: BN;
|
|
531
|
-
exponent: number;
|
|
532
|
-
};
|
|
378
|
+
referencePrice: any;
|
|
533
379
|
buffer: number[];
|
|
534
380
|
priceImpactSet: number;
|
|
535
381
|
sizeDecimals: number;
|
|
@@ -544,10 +390,7 @@ export declare class PerpetualsClient {
|
|
|
544
390
|
delegate: PublicKey;
|
|
545
391
|
openTime: BN;
|
|
546
392
|
updateTime: BN;
|
|
547
|
-
entryPrice:
|
|
548
|
-
price: BN;
|
|
549
|
-
exponent: number;
|
|
550
|
-
};
|
|
393
|
+
entryPrice: any;
|
|
551
394
|
sizeAmount: BN;
|
|
552
395
|
sizeUsd: BN;
|
|
553
396
|
lockedAmount: BN;
|
|
@@ -558,10 +401,7 @@ export declare class PerpetualsClient {
|
|
|
558
401
|
unsettledFeesUsd: BN;
|
|
559
402
|
cumulativeLockFeeSnapshot: BN;
|
|
560
403
|
degenSizeUsd: BN;
|
|
561
|
-
referencePrice:
|
|
562
|
-
price: BN;
|
|
563
|
-
exponent: number;
|
|
564
|
-
};
|
|
404
|
+
referencePrice: any;
|
|
565
405
|
buffer: number[];
|
|
566
406
|
priceImpactSet: number;
|
|
567
407
|
sizeDecimals: number;
|
|
@@ -573,40 +413,9 @@ export declare class PerpetualsClient {
|
|
|
573
413
|
getAllOrderAccounts: () => Promise<import("@coral-xyz/anchor").ProgramAccount<{
|
|
574
414
|
owner: PublicKey;
|
|
575
415
|
market: PublicKey;
|
|
576
|
-
limitOrders:
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
exponent: number;
|
|
580
|
-
};
|
|
581
|
-
reserveAmount: BN;
|
|
582
|
-
reserveCustodyUid: number;
|
|
583
|
-
receiveCustodyUid: number;
|
|
584
|
-
sizeAmount: BN;
|
|
585
|
-
stopLossPrice: {
|
|
586
|
-
price: BN;
|
|
587
|
-
exponent: number;
|
|
588
|
-
};
|
|
589
|
-
takeProfitPrice: {
|
|
590
|
-
price: BN;
|
|
591
|
-
exponent: number;
|
|
592
|
-
};
|
|
593
|
-
}[];
|
|
594
|
-
takeProfitOrders: {
|
|
595
|
-
triggerPrice: {
|
|
596
|
-
price: BN;
|
|
597
|
-
exponent: number;
|
|
598
|
-
};
|
|
599
|
-
triggerSize: BN;
|
|
600
|
-
receiveCustodyUid: number;
|
|
601
|
-
}[];
|
|
602
|
-
stopLossOrders: {
|
|
603
|
-
triggerPrice: {
|
|
604
|
-
price: BN;
|
|
605
|
-
exponent: number;
|
|
606
|
-
};
|
|
607
|
-
triggerSize: BN;
|
|
608
|
-
receiveCustodyUid: number;
|
|
609
|
-
}[];
|
|
416
|
+
limitOrders: any[];
|
|
417
|
+
takeProfitOrders: any[];
|
|
418
|
+
stopLossOrders: any[];
|
|
610
419
|
isInitialised: boolean;
|
|
611
420
|
openOrders: number;
|
|
612
421
|
openSl: number;
|
|
@@ -726,6 +535,20 @@ export declare class PerpetualsClient {
|
|
|
726
535
|
};
|
|
727
536
|
getIndexPriceAtParticularTime: (poolConfig: PoolConfig, targetPricesAtT1Ui: Number[], targetPricesAtT2Ui: Number[], tokenRatiosAtT2BN: BN[]) => string;
|
|
728
537
|
getUserClaimableRevenueAmount: (POOL_CONFIG: PoolConfig, userPublicKey: PublicKey, enableDebuglogs?: boolean) => Promise<BN>;
|
|
538
|
+
getTokenStakeAccount: (poolConfig: PoolConfig, userPublicKey: PublicKey) => Promise<TokenStakeAccount | null>;
|
|
539
|
+
getUserUnstakingStatus: (poolConfig: PoolConfig, userPublicKey: PublicKey) => Promise<{
|
|
540
|
+
activeStakeAmount: BN;
|
|
541
|
+
totalLocked: BN;
|
|
542
|
+
totalWithdrawable: BN;
|
|
543
|
+
revenueEligibleAmount: BN;
|
|
544
|
+
requests: {
|
|
545
|
+
requestId: number;
|
|
546
|
+
lockedAmount: BN;
|
|
547
|
+
withdrawableAmount: BN;
|
|
548
|
+
timeRemaining: BN;
|
|
549
|
+
totalAmount: BN;
|
|
550
|
+
}[];
|
|
551
|
+
} | null>;
|
|
729
552
|
getLpTokenPriceView: (poolConfig: PoolConfig, includeRemainingAccounts?: boolean) => Promise<any>;
|
|
730
553
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig, includeRemainingAccounts?: boolean) => Promise<string>;
|
|
731
554
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig, includeRemainingAccounts?: boolean) => Promise<string>;
|
|
@@ -842,10 +665,6 @@ export declare class PerpetualsClient {
|
|
|
842
665
|
instructions: TransactionInstruction[];
|
|
843
666
|
additionalSigners: Signer[];
|
|
844
667
|
}>;
|
|
845
|
-
migrateTokenStake: (tokenStakeAccounts: PublicKey[]) => Promise<{
|
|
846
|
-
instructions: TransactionInstruction[];
|
|
847
|
-
additionalSigners: Signer[];
|
|
848
|
-
}>;
|
|
849
668
|
migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
850
669
|
instructions: TransactionInstruction[];
|
|
851
670
|
additionalSigners: Signer[];
|
|
@@ -862,15 +681,11 @@ export declare class PerpetualsClient {
|
|
|
862
681
|
instructions: TransactionInstruction[];
|
|
863
682
|
additionalSigners: Signer[];
|
|
864
683
|
}>;
|
|
865
|
-
unstakeTokenInstant: (owner: PublicKey, unstakeAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
866
|
-
instructions: TransactionInstruction[];
|
|
867
|
-
additionalSigners: Signer[];
|
|
868
|
-
}>;
|
|
869
684
|
withdrawToken: (owner: PublicKey, withdrawRequestId: number, poolConfig: PoolConfig) => Promise<{
|
|
870
685
|
instructions: TransactionInstruction[];
|
|
871
686
|
additionalSigners: Signer[];
|
|
872
687
|
}>;
|
|
873
|
-
|
|
688
|
+
cancelUnstakeTokenRequest: (owner: PublicKey, withdrawRequestId: number, poolConfig: PoolConfig) => Promise<{
|
|
874
689
|
instructions: TransactionInstruction[];
|
|
875
690
|
additionalSigners: Signer[];
|
|
876
691
|
}>;
|
|
@@ -882,6 +697,10 @@ export declare class PerpetualsClient {
|
|
|
882
697
|
instructions: TransactionInstruction[];
|
|
883
698
|
additionalSigners: Signer[];
|
|
884
699
|
}>;
|
|
700
|
+
refreshTokenStake: (tokenStakeAccounts: PublicKey[], poolConfig: PoolConfig) => Promise<{
|
|
701
|
+
instructions: TransactionInstruction[];
|
|
702
|
+
additionalSigners: Signer[];
|
|
703
|
+
}>;
|
|
885
704
|
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
886
705
|
instructions: TransactionInstruction[];
|
|
887
706
|
additionalSigners: Signer[];
|
|
@@ -1003,7 +822,7 @@ export declare class PerpetualsClient {
|
|
|
1003
822
|
instructions: TransactionInstruction[];
|
|
1004
823
|
additionalSigners: Signer[];
|
|
1005
824
|
}>;
|
|
1006
|
-
setTokenVaultConfig: (token_permissions: TokenPermissions, withdrawTimeLimit: BN, withdrawInstantFee: BN, stakeLevel: BN[], poolConfig: PoolConfig) => Promise<{
|
|
825
|
+
setTokenVaultConfig: (token_permissions: TokenPermissions, withdrawTimeLimit: BN, withdrawInstantFee: BN, stakeLevel: BN[], unlockPeriod: BN, poolConfig: PoolConfig) => Promise<{
|
|
1007
826
|
instructions: TransactionInstruction[];
|
|
1008
827
|
additionalSigners: Signer[];
|
|
1009
828
|
}>;
|