flash-sdk 2.40.9 → 2.40.11
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/PerpetualsClient.d.ts +51 -51
- package/dist/PerpetualsClient.js +73 -72
- package/dist/idl/perpetuals.d.ts +393 -11
- package/dist/idl/perpetuals.js +393 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +11 -2
- package/dist/types/index.js +1 -1
- package/dist/utils/alt.d.ts +1 -0
- package/dist/utils/getReferralAccounts.d.ts +7 -0
- package/dist/utils/getReferralAccounts.js +33 -0
- package/package.json +1 -1
- package/dist/utils/getNftAccounts.d.ts +0 -7
- package/dist/utils/getNftAccounts.js +0 -33
@@ -343,11 +343,11 @@ export declare class PerpetualsClient {
|
|
343
343
|
sizeDecimals: number;
|
344
344
|
lockedDecimals: number;
|
345
345
|
collateralDecimals: number;
|
346
|
-
|
346
|
+
refererTokenStakeAccount: PublicKey;
|
347
347
|
refererBoosterAccount: PublicKey;
|
348
348
|
level: number;
|
349
|
-
|
350
|
-
|
349
|
+
withdrawRequestCount: number;
|
350
|
+
withdrawRequest: unknown;
|
351
351
|
activeStakeAmount: BN;
|
352
352
|
updateTimestamp: BN;
|
353
353
|
tradeTimestamp: BN;
|
@@ -660,11 +660,11 @@ export declare class PerpetualsClient {
|
|
660
660
|
sizeDecimals: number;
|
661
661
|
lockedDecimals: number;
|
662
662
|
collateralDecimals: number;
|
663
|
-
|
663
|
+
refererTokenStakeAccount: PublicKey;
|
664
664
|
refererBoosterAccount: PublicKey;
|
665
665
|
level: number;
|
666
|
-
|
667
|
-
|
666
|
+
withdrawRequestCount: number;
|
667
|
+
withdrawRequest: unknown;
|
668
668
|
activeStakeAmount: BN;
|
669
669
|
updateTimestamp: BN;
|
670
670
|
tradeTimestamp: BN;
|
@@ -976,11 +976,11 @@ export declare class PerpetualsClient {
|
|
976
976
|
sizeDecimals: number;
|
977
977
|
lockedDecimals: number;
|
978
978
|
collateralDecimals: number;
|
979
|
-
|
979
|
+
refererTokenStakeAccount: PublicKey;
|
980
980
|
refererBoosterAccount: PublicKey;
|
981
981
|
level: number;
|
982
|
-
|
983
|
-
|
982
|
+
withdrawRequestCount: number;
|
983
|
+
withdrawRequest: unknown;
|
984
984
|
activeStakeAmount: BN;
|
985
985
|
updateTimestamp: BN;
|
986
986
|
tradeTimestamp: BN;
|
@@ -1296,11 +1296,11 @@ export declare class PerpetualsClient {
|
|
1296
1296
|
sizeDecimals: number;
|
1297
1297
|
lockedDecimals: number;
|
1298
1298
|
collateralDecimals: number;
|
1299
|
-
|
1299
|
+
refererTokenStakeAccount: PublicKey;
|
1300
1300
|
refererBoosterAccount: PublicKey;
|
1301
1301
|
level: number;
|
1302
|
-
|
1303
|
-
|
1302
|
+
withdrawRequestCount: number;
|
1303
|
+
withdrawRequest: unknown;
|
1304
1304
|
activeStakeAmount: BN;
|
1305
1305
|
updateTimestamp: BN;
|
1306
1306
|
tradeTimestamp: BN;
|
@@ -1615,11 +1615,11 @@ export declare class PerpetualsClient {
|
|
1615
1615
|
sizeDecimals: number;
|
1616
1616
|
lockedDecimals: number;
|
1617
1617
|
collateralDecimals: number;
|
1618
|
-
|
1618
|
+
refererTokenStakeAccount: PublicKey;
|
1619
1619
|
refererBoosterAccount: PublicKey;
|
1620
1620
|
level: number;
|
1621
|
-
|
1622
|
-
|
1621
|
+
withdrawRequestCount: number;
|
1622
|
+
withdrawRequest: unknown;
|
1623
1623
|
activeStakeAmount: BN;
|
1624
1624
|
updateTimestamp: BN;
|
1625
1625
|
tradeTimestamp: BN;
|
@@ -1931,11 +1931,11 @@ export declare class PerpetualsClient {
|
|
1931
1931
|
sizeDecimals: number;
|
1932
1932
|
lockedDecimals: number;
|
1933
1933
|
collateralDecimals: number;
|
1934
|
-
|
1934
|
+
refererTokenStakeAccount: PublicKey;
|
1935
1935
|
refererBoosterAccount: PublicKey;
|
1936
1936
|
level: number;
|
1937
|
-
|
1938
|
-
|
1937
|
+
withdrawRequestCount: number;
|
1938
|
+
withdrawRequest: unknown;
|
1939
1939
|
activeStakeAmount: BN;
|
1940
1940
|
updateTimestamp: BN;
|
1941
1941
|
tradeTimestamp: BN;
|
@@ -2247,11 +2247,11 @@ export declare class PerpetualsClient {
|
|
2247
2247
|
sizeDecimals: number;
|
2248
2248
|
lockedDecimals: number;
|
2249
2249
|
collateralDecimals: number;
|
2250
|
-
|
2250
|
+
refererTokenStakeAccount: PublicKey;
|
2251
2251
|
refererBoosterAccount: PublicKey;
|
2252
2252
|
level: number;
|
2253
|
-
|
2254
|
-
|
2253
|
+
withdrawRequestCount: number;
|
2254
|
+
withdrawRequest: unknown;
|
2255
2255
|
activeStakeAmount: BN;
|
2256
2256
|
updateTimestamp: BN;
|
2257
2257
|
tradeTimestamp: BN;
|
@@ -2563,11 +2563,11 @@ export declare class PerpetualsClient {
|
|
2563
2563
|
sizeDecimals: number;
|
2564
2564
|
lockedDecimals: number;
|
2565
2565
|
collateralDecimals: number;
|
2566
|
-
|
2566
|
+
refererTokenStakeAccount: PublicKey;
|
2567
2567
|
refererBoosterAccount: PublicKey;
|
2568
2568
|
level: number;
|
2569
|
-
|
2570
|
-
|
2569
|
+
withdrawRequestCount: number;
|
2570
|
+
withdrawRequest: unknown;
|
2571
2571
|
activeStakeAmount: BN;
|
2572
2572
|
updateTimestamp: BN;
|
2573
2573
|
tradeTimestamp: BN;
|
@@ -2929,11 +2929,11 @@ export declare class PerpetualsClient {
|
|
2929
2929
|
sizeDecimals: number;
|
2930
2930
|
lockedDecimals: number;
|
2931
2931
|
collateralDecimals: number;
|
2932
|
-
|
2932
|
+
refererTokenStakeAccount: PublicKey;
|
2933
2933
|
refererBoosterAccount: PublicKey;
|
2934
2934
|
level: number;
|
2935
|
-
|
2936
|
-
|
2935
|
+
withdrawRequestCount: number;
|
2936
|
+
withdrawRequest: unknown;
|
2937
2937
|
activeStakeAmount: BN;
|
2938
2938
|
updateTimestamp: BN;
|
2939
2939
|
tradeTimestamp: BN;
|
@@ -3245,11 +3245,11 @@ export declare class PerpetualsClient {
|
|
3245
3245
|
sizeDecimals: number;
|
3246
3246
|
lockedDecimals: number;
|
3247
3247
|
collateralDecimals: number;
|
3248
|
-
|
3248
|
+
refererTokenStakeAccount: PublicKey;
|
3249
3249
|
refererBoosterAccount: PublicKey;
|
3250
3250
|
level: number;
|
3251
|
-
|
3252
|
-
|
3251
|
+
withdrawRequestCount: number;
|
3252
|
+
withdrawRequest: unknown;
|
3253
3253
|
activeStakeAmount: BN;
|
3254
3254
|
updateTimestamp: BN;
|
3255
3255
|
tradeTimestamp: BN;
|
@@ -3561,11 +3561,11 @@ export declare class PerpetualsClient {
|
|
3561
3561
|
sizeDecimals: number;
|
3562
3562
|
lockedDecimals: number;
|
3563
3563
|
collateralDecimals: number;
|
3564
|
-
|
3564
|
+
refererTokenStakeAccount: PublicKey;
|
3565
3565
|
refererBoosterAccount: PublicKey;
|
3566
3566
|
level: number;
|
3567
|
-
|
3568
|
-
|
3567
|
+
withdrawRequestCount: number;
|
3568
|
+
withdrawRequest: unknown;
|
3569
3569
|
activeStakeAmount: BN;
|
3570
3570
|
updateTimestamp: BN;
|
3571
3571
|
tradeTimestamp: BN;
|
@@ -3877,11 +3877,11 @@ export declare class PerpetualsClient {
|
|
3877
3877
|
sizeDecimals: number;
|
3878
3878
|
lockedDecimals: number;
|
3879
3879
|
collateralDecimals: number;
|
3880
|
-
|
3880
|
+
refererTokenStakeAccount: PublicKey;
|
3881
3881
|
refererBoosterAccount: PublicKey;
|
3882
3882
|
level: number;
|
3883
|
-
|
3884
|
-
|
3883
|
+
withdrawRequestCount: number;
|
3884
|
+
withdrawRequest: unknown;
|
3885
3885
|
activeStakeAmount: BN;
|
3886
3886
|
updateTimestamp: BN;
|
3887
3887
|
tradeTimestamp: BN;
|
@@ -4193,11 +4193,11 @@ export declare class PerpetualsClient {
|
|
4193
4193
|
sizeDecimals: number;
|
4194
4194
|
lockedDecimals: number;
|
4195
4195
|
collateralDecimals: number;
|
4196
|
-
|
4196
|
+
refererTokenStakeAccount: PublicKey;
|
4197
4197
|
refererBoosterAccount: PublicKey;
|
4198
4198
|
level: number;
|
4199
|
-
|
4200
|
-
|
4199
|
+
withdrawRequestCount: number;
|
4200
|
+
withdrawRequest: unknown;
|
4201
4201
|
activeStakeAmount: BN;
|
4202
4202
|
updateTimestamp: BN;
|
4203
4203
|
tradeTimestamp: BN;
|
@@ -4342,19 +4342,19 @@ export declare class PerpetualsClient {
|
|
4342
4342
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
4343
4343
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
4344
4344
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
4345
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege,
|
4345
|
+
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4346
4346
|
instructions: TransactionInstruction[];
|
4347
4347
|
additionalSigners: Signer[];
|
4348
4348
|
}>;
|
4349
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege,
|
4349
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4350
4350
|
instructions: TransactionInstruction[];
|
4351
4351
|
additionalSigners: Signer[];
|
4352
4352
|
}>;
|
4353
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN, minCollateralAmountOut: BN, priceWithSlippage: ContractOraclePrice, sizeAmount: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege,
|
4353
|
+
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN, minCollateralAmountOut: BN, priceWithSlippage: ContractOraclePrice, sizeAmount: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4354
4354
|
instructions: TransactionInstruction[];
|
4355
4355
|
additionalSigners: Signer[];
|
4356
4356
|
}>;
|
4357
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, minSwapAmountOut: BN, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege,
|
4357
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, minSwapAmountOut: BN, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
4358
4358
|
instructions: TransactionInstruction[];
|
4359
4359
|
additionalSigners: Signer[];
|
4360
4360
|
}>;
|
@@ -4382,11 +4382,11 @@ export declare class PerpetualsClient {
|
|
4382
4382
|
instructions: TransactionInstruction[];
|
4383
4383
|
additionalSigners: Signer[];
|
4384
4384
|
}>;
|
4385
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege,
|
4385
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4386
4386
|
instructions: TransactionInstruction[];
|
4387
4387
|
additionalSigners: Signer[];
|
4388
4388
|
}>;
|
4389
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege,
|
4389
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4390
4390
|
instructions: TransactionInstruction[];
|
4391
4391
|
additionalSigners: Signer[];
|
4392
4392
|
}>;
|
@@ -4481,11 +4481,11 @@ export declare class PerpetualsClient {
|
|
4481
4481
|
instructions: TransactionInstruction[];
|
4482
4482
|
additionalSigners: Signer[];
|
4483
4483
|
}>;
|
4484
|
-
withdrawToken: (owner: PublicKey,
|
4484
|
+
withdrawToken: (owner: PublicKey, withdrawRequestId: number, poolConfig: PoolConfig) => Promise<{
|
4485
4485
|
instructions: TransactionInstruction[];
|
4486
4486
|
additionalSigners: Signer[];
|
4487
4487
|
}>;
|
4488
|
-
cancelUnstakeRequest: (owner: PublicKey,
|
4488
|
+
cancelUnstakeRequest: (owner: PublicKey, withdrawRequestId: number, poolConfig: PoolConfig) => Promise<{
|
4489
4489
|
instructions: TransactionInstruction[];
|
4490
4490
|
additionalSigners: Signer[];
|
4491
4491
|
}>;
|
@@ -4521,11 +4521,11 @@ export declare class PerpetualsClient {
|
|
4521
4521
|
instructions: TransactionInstruction[];
|
4522
4522
|
additionalSigners: Signer[];
|
4523
4523
|
}>;
|
4524
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege,
|
4524
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4525
4525
|
instructions: TransactionInstruction[];
|
4526
4526
|
additionalSigners: Signer[];
|
4527
4527
|
}>;
|
4528
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege,
|
4528
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4529
4529
|
instructions: TransactionInstruction[];
|
4530
4530
|
additionalSigners: Signer[];
|
4531
4531
|
}>;
|
@@ -4541,11 +4541,11 @@ export declare class PerpetualsClient {
|
|
4541
4541
|
instructions: TransactionInstruction[];
|
4542
4542
|
additionalSigners: Signer[];
|
4543
4543
|
}>;
|
4544
|
-
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4544
|
+
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4545
4545
|
instructions: TransactionInstruction[];
|
4546
4546
|
additionalSigners: Signer[];
|
4547
4547
|
}>;
|
4548
|
-
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4548
|
+
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, rebateTokenAccount?: PublicKey) => Promise<{
|
4549
4549
|
instructions: TransactionInstruction[];
|
4550
4550
|
additionalSigners: Signer[];
|
4551
4551
|
}>;
|