flash-sdk 2.18.0 → 2.18.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2714,6 +2714,867 @@ export declare class PerpetualsClient {
2714
2714
  timestamp: BN;
2715
2715
  counter: BN;
2716
2716
  }>[]>;
2717
+ getAllActivePositions: () => Promise<import("@coral-xyz/anchor").ProgramAccount<{
2718
+ pool: PublicKey;
2719
+ mint: PublicKey;
2720
+ tokenAccount: PublicKey;
2721
+ decimals: number;
2722
+ isStable: boolean;
2723
+ depegAdjustment: boolean;
2724
+ isVirtual: boolean;
2725
+ distributeRewards: boolean;
2726
+ oracle: {
2727
+ intOracleAccount: PublicKey;
2728
+ extOracleAccount: PublicKey;
2729
+ oracleType: {
2730
+ none?: Record<string, never>;
2731
+ custom?: Record<string, never>;
2732
+ pyth?: Record<string, never>;
2733
+ };
2734
+ maxDivergenceBps: BN;
2735
+ maxConfBps: BN;
2736
+ maxPriceAgeSec: BN;
2737
+ };
2738
+ pricing: {
2739
+ tradeSpreadMin: BN;
2740
+ tradeSpreadMax: BN;
2741
+ swapSpread: BN;
2742
+ minInitialLeverage: BN;
2743
+ maxInitialLeverage: BN;
2744
+ maxLeverage: BN;
2745
+ minCollateralUsd: BN;
2746
+ delaySeconds: BN;
2747
+ maxUtilization: BN;
2748
+ maxPositionLockedUsd: BN;
2749
+ maxExposureUsd: BN;
2750
+ };
2751
+ permissions: {
2752
+ allowSwap: boolean;
2753
+ allowAddLiquidity: boolean;
2754
+ allowRemoveLiquidity: boolean;
2755
+ allowOpenPosition: boolean;
2756
+ allowClosePosition: boolean;
2757
+ allowCollateralWithdrawal: boolean;
2758
+ allowSizeChange: boolean;
2759
+ allowLiquidation: boolean;
2760
+ allowLpStaking: boolean;
2761
+ allowFeeDistribution: boolean;
2762
+ allowUngatedTrading: boolean;
2763
+ allowFeeDiscounts: boolean;
2764
+ allowReferralRebates: boolean;
2765
+ } | {
2766
+ allowOpenPosition: boolean;
2767
+ allowClosePosition: boolean;
2768
+ allowCollateralWithdrawal: boolean;
2769
+ allowSizeChange: boolean;
2770
+ };
2771
+ fees: {
2772
+ mode: {
2773
+ fixed?: Record<string, never>;
2774
+ linear?: Record<string, never>;
2775
+ };
2776
+ swapIn: {
2777
+ minFee: BN;
2778
+ targetFee: BN;
2779
+ maxFee: BN;
2780
+ };
2781
+ swapOut: {
2782
+ minFee: BN;
2783
+ targetFee: BN;
2784
+ maxFee: BN;
2785
+ };
2786
+ stableSwapIn: {
2787
+ minFee: BN;
2788
+ targetFee: BN;
2789
+ maxFee: BN;
2790
+ };
2791
+ stableSwapOut: {
2792
+ minFee: BN;
2793
+ targetFee: BN;
2794
+ maxFee: BN;
2795
+ };
2796
+ addLiquidity: {
2797
+ minFee: BN;
2798
+ targetFee: BN;
2799
+ maxFee: BN;
2800
+ };
2801
+ removeLiquidity: {
2802
+ minFee: BN;
2803
+ targetFee: BN;
2804
+ maxFee: BN;
2805
+ };
2806
+ openPosition: BN;
2807
+ closePosition: BN;
2808
+ removeCollateral: BN;
2809
+ };
2810
+ borrowRate: {
2811
+ baseRate: BN;
2812
+ slope1: BN;
2813
+ slope2: BN;
2814
+ optimalUtilization: BN;
2815
+ };
2816
+ rewardThreshold: BN;
2817
+ assets: {
2818
+ collateral: BN;
2819
+ owned: BN;
2820
+ locked: BN;
2821
+ };
2822
+ feesStats: {
2823
+ accrued: BN;
2824
+ distributed: BN;
2825
+ paid: BN;
2826
+ rewardPerLpStaked: BN;
2827
+ protocolFee: BN;
2828
+ };
2829
+ borrowRateState: {
2830
+ currentRate: BN;
2831
+ cumulativeLockFee: BN;
2832
+ lastUpdate: BN;
2833
+ };
2834
+ bump: number;
2835
+ tokenAccountBump: number;
2836
+ sizeFactorForSpread: number;
2837
+ null: number;
2838
+ reservedAmount: BN;
2839
+ minReserveUsd: BN;
2840
+ limitPriceBufferBps: BN;
2841
+ padding: number[] | BN[] | number[] | BN[] | BN[];
2842
+ owner: PublicKey;
2843
+ stakeStats: {
2844
+ pendingActivation: BN;
2845
+ activeAmount: BN;
2846
+ pendingDeactivation: BN;
2847
+ deactivatedAmount: BN;
2848
+ };
2849
+ rewardSnapshot: BN;
2850
+ unclaimedRewards: BN;
2851
+ feeShareBps: BN;
2852
+ isInitialized: boolean;
2853
+ targetCustody: PublicKey;
2854
+ collateralCustody: PublicKey;
2855
+ side: {
2856
+ none?: Record<string, never>;
2857
+ long?: Record<string, never>;
2858
+ short?: Record<string, never>;
2859
+ };
2860
+ correlation: boolean;
2861
+ maxPayoffBps: BN;
2862
+ openInterest: BN;
2863
+ collectivePosition: {
2864
+ openPositions: BN;
2865
+ updateTime: BN;
2866
+ averageEntryPrice: {
2867
+ price: BN;
2868
+ exponent: number;
2869
+ };
2870
+ sizeAmount: BN;
2871
+ sizeUsd: BN;
2872
+ lockedAmount: BN;
2873
+ lockedUsd: BN;
2874
+ collateralAmount: BN;
2875
+ collateralUsd: BN;
2876
+ unsettledFeeUsd: BN;
2877
+ cumulativeLockFeeSnapshot: BN;
2878
+ sizeDecimals: number;
2879
+ lockedDecimals: number;
2880
+ collateralDecimals: number;
2881
+ };
2882
+ targetCustodyId: BN;
2883
+ collateralCustodyId: BN;
2884
+ numSigners: number;
2885
+ numSigned: number;
2886
+ minSignatures: number;
2887
+ instructionAccountsLen: number;
2888
+ instructionDataLen: number;
2889
+ instructionHash: BN;
2890
+ signers: PublicKey[];
2891
+ signed: number[];
2892
+ price: BN;
2893
+ expo: number;
2894
+ conf: BN;
2895
+ ema: BN;
2896
+ publishTime: BN;
2897
+ market: PublicKey;
2898
+ limitOrders: unknown;
2899
+ takeProfitOrders: unknown;
2900
+ stopLossOrders: unknown;
2901
+ isInitialised: boolean;
2902
+ openOrders: number;
2903
+ openSl: number;
2904
+ openTp: number;
2905
+ inactiveSl: number;
2906
+ inactiveTp: number;
2907
+ activeOrders: number;
2908
+ pools: PublicKey[];
2909
+ collections: PublicKey[];
2910
+ voltageMultiplier: {
2911
+ volume: BN;
2912
+ rewards: BN;
2913
+ rebates: BN;
2914
+ };
2915
+ tradingDiscount: BN[];
2916
+ referralRebate: BN[];
2917
+ referralDiscount: BN;
2918
+ inceptionTime: BN;
2919
+ transferAuthorityBump: number;
2920
+ perpetualsBump: number;
2921
+ tradeLimit: number;
2922
+ rebateLimitUsd: number;
2923
+ name: string;
2924
+ lpMint: PublicKey;
2925
+ oracleAuthority: PublicKey;
2926
+ stakedLpVault: PublicKey;
2927
+ rewardCustody: PublicKey;
2928
+ custodies: PublicKey[];
2929
+ ratios: {
2930
+ target: BN;
2931
+ min: BN;
2932
+ max: BN;
2933
+ }[];
2934
+ markets: PublicKey[];
2935
+ maxAumUsd: BN;
2936
+ aumUsd: BN;
2937
+ totalStaked: {
2938
+ pendingActivation: BN;
2939
+ activeAmount: BN;
2940
+ pendingDeactivation: BN;
2941
+ deactivatedAmount: BN;
2942
+ };
2943
+ stakingFeeShareBps: BN;
2944
+ lpMintBump: number;
2945
+ stakedLpVaultBump: number;
2946
+ vpVolumeFactor: number;
2947
+ stakingFeeBoostBps: BN[];
2948
+ compoundingMint: PublicKey;
2949
+ compoundingLpVault: PublicKey;
2950
+ compoundingStats: {
2951
+ activeAmount: BN;
2952
+ totalSupply: BN;
2953
+ rewardSnapshot: BN;
2954
+ feeShareBps: BN;
2955
+ lastCompoundTime: BN;
2956
+ };
2957
+ compoundingMintBump: number;
2958
+ compoundingLpVaultBump: number;
2959
+ delegate: PublicKey;
2960
+ openTime: BN;
2961
+ updateTime: BN;
2962
+ entryPrice: {
2963
+ price: BN;
2964
+ exponent: number;
2965
+ };
2966
+ sizeAmount: BN;
2967
+ sizeUsd: BN;
2968
+ lockedAmount: BN;
2969
+ lockedUsd: BN;
2970
+ collateralAmount: BN;
2971
+ collateralUsd: BN;
2972
+ unsettledAmount: BN;
2973
+ unsettledFeesUsd: BN;
2974
+ cumulativeLockFeeSnapshot: BN;
2975
+ takeProfitPrice: {
2976
+ price: BN;
2977
+ exponent: number;
2978
+ };
2979
+ stopLossPrice: {
2980
+ price: BN;
2981
+ exponent: number;
2982
+ };
2983
+ sizeDecimals: number;
2984
+ lockedDecimals: number;
2985
+ collateralDecimals: number;
2986
+ refererTradingAccount: PublicKey;
2987
+ refererBoosterAccount: PublicKey;
2988
+ nftMint: PublicKey;
2989
+ level: number;
2990
+ voltagePoints: BN;
2991
+ stats: {
2992
+ volumeUsd: BN;
2993
+ lpRewardsUsd: BN;
2994
+ referralRebateUsd: BN;
2995
+ };
2996
+ snapshot: {
2997
+ volumeUsd: BN;
2998
+ lpRewardsUsd: BN;
2999
+ referralRebateUsd: BN;
3000
+ };
3001
+ timestamp: BN;
3002
+ counter: BN;
3003
+ }>[]>;
3004
+ getAllPositionsByMarket: (marketKey: PublicKey) => Promise<import("@coral-xyz/anchor").ProgramAccount<{
3005
+ pool: PublicKey;
3006
+ mint: PublicKey;
3007
+ tokenAccount: PublicKey;
3008
+ decimals: number;
3009
+ isStable: boolean;
3010
+ depegAdjustment: boolean;
3011
+ isVirtual: boolean;
3012
+ distributeRewards: boolean;
3013
+ oracle: {
3014
+ intOracleAccount: PublicKey;
3015
+ extOracleAccount: PublicKey;
3016
+ oracleType: {
3017
+ none?: Record<string, never>;
3018
+ custom?: Record<string, never>;
3019
+ pyth?: Record<string, never>;
3020
+ };
3021
+ maxDivergenceBps: BN;
3022
+ maxConfBps: BN;
3023
+ maxPriceAgeSec: BN;
3024
+ };
3025
+ pricing: {
3026
+ tradeSpreadMin: BN;
3027
+ tradeSpreadMax: BN;
3028
+ swapSpread: BN;
3029
+ minInitialLeverage: BN;
3030
+ maxInitialLeverage: BN;
3031
+ maxLeverage: BN;
3032
+ minCollateralUsd: BN;
3033
+ delaySeconds: BN;
3034
+ maxUtilization: BN;
3035
+ maxPositionLockedUsd: BN;
3036
+ maxExposureUsd: BN;
3037
+ };
3038
+ permissions: {
3039
+ allowSwap: boolean;
3040
+ allowAddLiquidity: boolean;
3041
+ allowRemoveLiquidity: boolean;
3042
+ allowOpenPosition: boolean;
3043
+ allowClosePosition: boolean;
3044
+ allowCollateralWithdrawal: boolean;
3045
+ allowSizeChange: boolean;
3046
+ allowLiquidation: boolean;
3047
+ allowLpStaking: boolean;
3048
+ allowFeeDistribution: boolean;
3049
+ allowUngatedTrading: boolean;
3050
+ allowFeeDiscounts: boolean;
3051
+ allowReferralRebates: boolean;
3052
+ } | {
3053
+ allowOpenPosition: boolean;
3054
+ allowClosePosition: boolean;
3055
+ allowCollateralWithdrawal: boolean;
3056
+ allowSizeChange: boolean;
3057
+ };
3058
+ fees: {
3059
+ mode: {
3060
+ fixed?: Record<string, never>;
3061
+ linear?: Record<string, never>;
3062
+ };
3063
+ swapIn: {
3064
+ minFee: BN;
3065
+ targetFee: BN;
3066
+ maxFee: BN;
3067
+ };
3068
+ swapOut: {
3069
+ minFee: BN;
3070
+ targetFee: BN;
3071
+ maxFee: BN;
3072
+ };
3073
+ stableSwapIn: {
3074
+ minFee: BN;
3075
+ targetFee: BN;
3076
+ maxFee: BN;
3077
+ };
3078
+ stableSwapOut: {
3079
+ minFee: BN;
3080
+ targetFee: BN;
3081
+ maxFee: BN;
3082
+ };
3083
+ addLiquidity: {
3084
+ minFee: BN;
3085
+ targetFee: BN;
3086
+ maxFee: BN;
3087
+ };
3088
+ removeLiquidity: {
3089
+ minFee: BN;
3090
+ targetFee: BN;
3091
+ maxFee: BN;
3092
+ };
3093
+ openPosition: BN;
3094
+ closePosition: BN;
3095
+ removeCollateral: BN;
3096
+ };
3097
+ borrowRate: {
3098
+ baseRate: BN;
3099
+ slope1: BN;
3100
+ slope2: BN;
3101
+ optimalUtilization: BN;
3102
+ };
3103
+ rewardThreshold: BN;
3104
+ assets: {
3105
+ collateral: BN;
3106
+ owned: BN;
3107
+ locked: BN;
3108
+ };
3109
+ feesStats: {
3110
+ accrued: BN;
3111
+ distributed: BN;
3112
+ paid: BN;
3113
+ rewardPerLpStaked: BN;
3114
+ protocolFee: BN;
3115
+ };
3116
+ borrowRateState: {
3117
+ currentRate: BN;
3118
+ cumulativeLockFee: BN;
3119
+ lastUpdate: BN;
3120
+ };
3121
+ bump: number;
3122
+ tokenAccountBump: number;
3123
+ sizeFactorForSpread: number;
3124
+ null: number;
3125
+ reservedAmount: BN;
3126
+ minReserveUsd: BN;
3127
+ limitPriceBufferBps: BN;
3128
+ padding: number[] | BN[] | number[] | BN[] | BN[];
3129
+ owner: PublicKey;
3130
+ stakeStats: {
3131
+ pendingActivation: BN;
3132
+ activeAmount: BN;
3133
+ pendingDeactivation: BN;
3134
+ deactivatedAmount: BN;
3135
+ };
3136
+ rewardSnapshot: BN;
3137
+ unclaimedRewards: BN;
3138
+ feeShareBps: BN;
3139
+ isInitialized: boolean;
3140
+ targetCustody: PublicKey;
3141
+ collateralCustody: PublicKey;
3142
+ side: {
3143
+ none?: Record<string, never>;
3144
+ long?: Record<string, never>;
3145
+ short?: Record<string, never>;
3146
+ };
3147
+ correlation: boolean;
3148
+ maxPayoffBps: BN;
3149
+ openInterest: BN;
3150
+ collectivePosition: {
3151
+ openPositions: BN;
3152
+ updateTime: BN;
3153
+ averageEntryPrice: {
3154
+ price: BN;
3155
+ exponent: number;
3156
+ };
3157
+ sizeAmount: BN;
3158
+ sizeUsd: BN;
3159
+ lockedAmount: BN;
3160
+ lockedUsd: BN;
3161
+ collateralAmount: BN;
3162
+ collateralUsd: BN;
3163
+ unsettledFeeUsd: BN;
3164
+ cumulativeLockFeeSnapshot: BN;
3165
+ sizeDecimals: number;
3166
+ lockedDecimals: number;
3167
+ collateralDecimals: number;
3168
+ };
3169
+ targetCustodyId: BN;
3170
+ collateralCustodyId: BN;
3171
+ numSigners: number;
3172
+ numSigned: number;
3173
+ minSignatures: number;
3174
+ instructionAccountsLen: number;
3175
+ instructionDataLen: number;
3176
+ instructionHash: BN;
3177
+ signers: PublicKey[];
3178
+ signed: number[];
3179
+ price: BN;
3180
+ expo: number;
3181
+ conf: BN;
3182
+ ema: BN;
3183
+ publishTime: BN;
3184
+ market: PublicKey;
3185
+ limitOrders: unknown;
3186
+ takeProfitOrders: unknown;
3187
+ stopLossOrders: unknown;
3188
+ isInitialised: boolean;
3189
+ openOrders: number;
3190
+ openSl: number;
3191
+ openTp: number;
3192
+ inactiveSl: number;
3193
+ inactiveTp: number;
3194
+ activeOrders: number;
3195
+ pools: PublicKey[];
3196
+ collections: PublicKey[];
3197
+ voltageMultiplier: {
3198
+ volume: BN;
3199
+ rewards: BN;
3200
+ rebates: BN;
3201
+ };
3202
+ tradingDiscount: BN[];
3203
+ referralRebate: BN[];
3204
+ referralDiscount: BN;
3205
+ inceptionTime: BN;
3206
+ transferAuthorityBump: number;
3207
+ perpetualsBump: number;
3208
+ tradeLimit: number;
3209
+ rebateLimitUsd: number;
3210
+ name: string;
3211
+ lpMint: PublicKey;
3212
+ oracleAuthority: PublicKey;
3213
+ stakedLpVault: PublicKey;
3214
+ rewardCustody: PublicKey;
3215
+ custodies: PublicKey[];
3216
+ ratios: {
3217
+ target: BN;
3218
+ min: BN;
3219
+ max: BN;
3220
+ }[];
3221
+ markets: PublicKey[];
3222
+ maxAumUsd: BN;
3223
+ aumUsd: BN;
3224
+ totalStaked: {
3225
+ pendingActivation: BN;
3226
+ activeAmount: BN;
3227
+ pendingDeactivation: BN;
3228
+ deactivatedAmount: BN;
3229
+ };
3230
+ stakingFeeShareBps: BN;
3231
+ lpMintBump: number;
3232
+ stakedLpVaultBump: number;
3233
+ vpVolumeFactor: number;
3234
+ stakingFeeBoostBps: BN[];
3235
+ compoundingMint: PublicKey;
3236
+ compoundingLpVault: PublicKey;
3237
+ compoundingStats: {
3238
+ activeAmount: BN;
3239
+ totalSupply: BN;
3240
+ rewardSnapshot: BN;
3241
+ feeShareBps: BN;
3242
+ lastCompoundTime: BN;
3243
+ };
3244
+ compoundingMintBump: number;
3245
+ compoundingLpVaultBump: number;
3246
+ delegate: PublicKey;
3247
+ openTime: BN;
3248
+ updateTime: BN;
3249
+ entryPrice: {
3250
+ price: BN;
3251
+ exponent: number;
3252
+ };
3253
+ sizeAmount: BN;
3254
+ sizeUsd: BN;
3255
+ lockedAmount: BN;
3256
+ lockedUsd: BN;
3257
+ collateralAmount: BN;
3258
+ collateralUsd: BN;
3259
+ unsettledAmount: BN;
3260
+ unsettledFeesUsd: BN;
3261
+ cumulativeLockFeeSnapshot: BN;
3262
+ takeProfitPrice: {
3263
+ price: BN;
3264
+ exponent: number;
3265
+ };
3266
+ stopLossPrice: {
3267
+ price: BN;
3268
+ exponent: number;
3269
+ };
3270
+ sizeDecimals: number;
3271
+ lockedDecimals: number;
3272
+ collateralDecimals: number;
3273
+ refererTradingAccount: PublicKey;
3274
+ refererBoosterAccount: PublicKey;
3275
+ nftMint: PublicKey;
3276
+ level: number;
3277
+ voltagePoints: BN;
3278
+ stats: {
3279
+ volumeUsd: BN;
3280
+ lpRewardsUsd: BN;
3281
+ referralRebateUsd: BN;
3282
+ };
3283
+ snapshot: {
3284
+ volumeUsd: BN;
3285
+ lpRewardsUsd: BN;
3286
+ referralRebateUsd: BN;
3287
+ };
3288
+ timestamp: BN;
3289
+ counter: BN;
3290
+ }>[]>;
3291
+ getAllActivePositionsByMarket: (marketKey: PublicKey) => Promise<import("@coral-xyz/anchor").ProgramAccount<{
3292
+ pool: PublicKey;
3293
+ mint: PublicKey;
3294
+ tokenAccount: PublicKey;
3295
+ decimals: number;
3296
+ isStable: boolean;
3297
+ depegAdjustment: boolean;
3298
+ isVirtual: boolean;
3299
+ distributeRewards: boolean;
3300
+ oracle: {
3301
+ intOracleAccount: PublicKey;
3302
+ extOracleAccount: PublicKey;
3303
+ oracleType: {
3304
+ none?: Record<string, never>;
3305
+ custom?: Record<string, never>;
3306
+ pyth?: Record<string, never>;
3307
+ };
3308
+ maxDivergenceBps: BN;
3309
+ maxConfBps: BN;
3310
+ maxPriceAgeSec: BN;
3311
+ };
3312
+ pricing: {
3313
+ tradeSpreadMin: BN;
3314
+ tradeSpreadMax: BN;
3315
+ swapSpread: BN;
3316
+ minInitialLeverage: BN;
3317
+ maxInitialLeverage: BN;
3318
+ maxLeverage: BN;
3319
+ minCollateralUsd: BN;
3320
+ delaySeconds: BN;
3321
+ maxUtilization: BN;
3322
+ maxPositionLockedUsd: BN;
3323
+ maxExposureUsd: BN;
3324
+ };
3325
+ permissions: {
3326
+ allowSwap: boolean;
3327
+ allowAddLiquidity: boolean;
3328
+ allowRemoveLiquidity: boolean;
3329
+ allowOpenPosition: boolean;
3330
+ allowClosePosition: boolean;
3331
+ allowCollateralWithdrawal: boolean;
3332
+ allowSizeChange: boolean;
3333
+ allowLiquidation: boolean;
3334
+ allowLpStaking: boolean;
3335
+ allowFeeDistribution: boolean;
3336
+ allowUngatedTrading: boolean;
3337
+ allowFeeDiscounts: boolean;
3338
+ allowReferralRebates: boolean;
3339
+ } | {
3340
+ allowOpenPosition: boolean;
3341
+ allowClosePosition: boolean;
3342
+ allowCollateralWithdrawal: boolean;
3343
+ allowSizeChange: boolean;
3344
+ };
3345
+ fees: {
3346
+ mode: {
3347
+ fixed?: Record<string, never>;
3348
+ linear?: Record<string, never>;
3349
+ };
3350
+ swapIn: {
3351
+ minFee: BN;
3352
+ targetFee: BN;
3353
+ maxFee: BN;
3354
+ };
3355
+ swapOut: {
3356
+ minFee: BN;
3357
+ targetFee: BN;
3358
+ maxFee: BN;
3359
+ };
3360
+ stableSwapIn: {
3361
+ minFee: BN;
3362
+ targetFee: BN;
3363
+ maxFee: BN;
3364
+ };
3365
+ stableSwapOut: {
3366
+ minFee: BN;
3367
+ targetFee: BN;
3368
+ maxFee: BN;
3369
+ };
3370
+ addLiquidity: {
3371
+ minFee: BN;
3372
+ targetFee: BN;
3373
+ maxFee: BN;
3374
+ };
3375
+ removeLiquidity: {
3376
+ minFee: BN;
3377
+ targetFee: BN;
3378
+ maxFee: BN;
3379
+ };
3380
+ openPosition: BN;
3381
+ closePosition: BN;
3382
+ removeCollateral: BN;
3383
+ };
3384
+ borrowRate: {
3385
+ baseRate: BN;
3386
+ slope1: BN;
3387
+ slope2: BN;
3388
+ optimalUtilization: BN;
3389
+ };
3390
+ rewardThreshold: BN;
3391
+ assets: {
3392
+ collateral: BN;
3393
+ owned: BN;
3394
+ locked: BN;
3395
+ };
3396
+ feesStats: {
3397
+ accrued: BN;
3398
+ distributed: BN;
3399
+ paid: BN;
3400
+ rewardPerLpStaked: BN;
3401
+ protocolFee: BN;
3402
+ };
3403
+ borrowRateState: {
3404
+ currentRate: BN;
3405
+ cumulativeLockFee: BN;
3406
+ lastUpdate: BN;
3407
+ };
3408
+ bump: number;
3409
+ tokenAccountBump: number;
3410
+ sizeFactorForSpread: number;
3411
+ null: number;
3412
+ reservedAmount: BN;
3413
+ minReserveUsd: BN;
3414
+ limitPriceBufferBps: BN;
3415
+ padding: number[] | BN[] | number[] | BN[] | BN[];
3416
+ owner: PublicKey;
3417
+ stakeStats: {
3418
+ pendingActivation: BN;
3419
+ activeAmount: BN;
3420
+ pendingDeactivation: BN;
3421
+ deactivatedAmount: BN;
3422
+ };
3423
+ rewardSnapshot: BN;
3424
+ unclaimedRewards: BN;
3425
+ feeShareBps: BN;
3426
+ isInitialized: boolean;
3427
+ targetCustody: PublicKey;
3428
+ collateralCustody: PublicKey;
3429
+ side: {
3430
+ none?: Record<string, never>;
3431
+ long?: Record<string, never>;
3432
+ short?: Record<string, never>;
3433
+ };
3434
+ correlation: boolean;
3435
+ maxPayoffBps: BN;
3436
+ openInterest: BN;
3437
+ collectivePosition: {
3438
+ openPositions: BN;
3439
+ updateTime: BN;
3440
+ averageEntryPrice: {
3441
+ price: BN;
3442
+ exponent: number;
3443
+ };
3444
+ sizeAmount: BN;
3445
+ sizeUsd: BN;
3446
+ lockedAmount: BN;
3447
+ lockedUsd: BN;
3448
+ collateralAmount: BN;
3449
+ collateralUsd: BN;
3450
+ unsettledFeeUsd: BN;
3451
+ cumulativeLockFeeSnapshot: BN;
3452
+ sizeDecimals: number;
3453
+ lockedDecimals: number;
3454
+ collateralDecimals: number;
3455
+ };
3456
+ targetCustodyId: BN;
3457
+ collateralCustodyId: BN;
3458
+ numSigners: number;
3459
+ numSigned: number;
3460
+ minSignatures: number;
3461
+ instructionAccountsLen: number;
3462
+ instructionDataLen: number;
3463
+ instructionHash: BN;
3464
+ signers: PublicKey[];
3465
+ signed: number[];
3466
+ price: BN;
3467
+ expo: number;
3468
+ conf: BN;
3469
+ ema: BN;
3470
+ publishTime: BN;
3471
+ market: PublicKey;
3472
+ limitOrders: unknown;
3473
+ takeProfitOrders: unknown;
3474
+ stopLossOrders: unknown;
3475
+ isInitialised: boolean;
3476
+ openOrders: number;
3477
+ openSl: number;
3478
+ openTp: number;
3479
+ inactiveSl: number;
3480
+ inactiveTp: number;
3481
+ activeOrders: number;
3482
+ pools: PublicKey[];
3483
+ collections: PublicKey[];
3484
+ voltageMultiplier: {
3485
+ volume: BN;
3486
+ rewards: BN;
3487
+ rebates: BN;
3488
+ };
3489
+ tradingDiscount: BN[];
3490
+ referralRebate: BN[];
3491
+ referralDiscount: BN;
3492
+ inceptionTime: BN;
3493
+ transferAuthorityBump: number;
3494
+ perpetualsBump: number;
3495
+ tradeLimit: number;
3496
+ rebateLimitUsd: number;
3497
+ name: string;
3498
+ lpMint: PublicKey;
3499
+ oracleAuthority: PublicKey;
3500
+ stakedLpVault: PublicKey;
3501
+ rewardCustody: PublicKey;
3502
+ custodies: PublicKey[];
3503
+ ratios: {
3504
+ target: BN;
3505
+ min: BN;
3506
+ max: BN;
3507
+ }[];
3508
+ markets: PublicKey[];
3509
+ maxAumUsd: BN;
3510
+ aumUsd: BN;
3511
+ totalStaked: {
3512
+ pendingActivation: BN;
3513
+ activeAmount: BN;
3514
+ pendingDeactivation: BN;
3515
+ deactivatedAmount: BN;
3516
+ };
3517
+ stakingFeeShareBps: BN;
3518
+ lpMintBump: number;
3519
+ stakedLpVaultBump: number;
3520
+ vpVolumeFactor: number;
3521
+ stakingFeeBoostBps: BN[];
3522
+ compoundingMint: PublicKey;
3523
+ compoundingLpVault: PublicKey;
3524
+ compoundingStats: {
3525
+ activeAmount: BN;
3526
+ totalSupply: BN;
3527
+ rewardSnapshot: BN;
3528
+ feeShareBps: BN;
3529
+ lastCompoundTime: BN;
3530
+ };
3531
+ compoundingMintBump: number;
3532
+ compoundingLpVaultBump: number;
3533
+ delegate: PublicKey;
3534
+ openTime: BN;
3535
+ updateTime: BN;
3536
+ entryPrice: {
3537
+ price: BN;
3538
+ exponent: number;
3539
+ };
3540
+ sizeAmount: BN;
3541
+ sizeUsd: BN;
3542
+ lockedAmount: BN;
3543
+ lockedUsd: BN;
3544
+ collateralAmount: BN;
3545
+ collateralUsd: BN;
3546
+ unsettledAmount: BN;
3547
+ unsettledFeesUsd: BN;
3548
+ cumulativeLockFeeSnapshot: BN;
3549
+ takeProfitPrice: {
3550
+ price: BN;
3551
+ exponent: number;
3552
+ };
3553
+ stopLossPrice: {
3554
+ price: BN;
3555
+ exponent: number;
3556
+ };
3557
+ sizeDecimals: number;
3558
+ lockedDecimals: number;
3559
+ collateralDecimals: number;
3560
+ refererTradingAccount: PublicKey;
3561
+ refererBoosterAccount: PublicKey;
3562
+ nftMint: PublicKey;
3563
+ level: number;
3564
+ voltagePoints: BN;
3565
+ stats: {
3566
+ volumeUsd: BN;
3567
+ lpRewardsUsd: BN;
3568
+ referralRebateUsd: BN;
3569
+ };
3570
+ snapshot: {
3571
+ volumeUsd: BN;
3572
+ lpRewardsUsd: BN;
3573
+ referralRebateUsd: BN;
3574
+ };
3575
+ timestamp: BN;
3576
+ counter: BN;
3577
+ }>[]>;
2717
3578
  getAllOrderAccounts: () => Promise<import("@coral-xyz/anchor").ProgramAccount<{
2718
3579
  pool: PublicKey;
2719
3580
  mint: PublicKey;
@@ -3081,6 +3942,7 @@ export declare class PerpetualsClient {
3081
3942
  };
3082
3943
  getIndexPriceAtParticularTime: (poolConfig: PoolConfig, targetPricesAtT1Ui: Number[], targetPricesAtT2Ui: Number[], tokenRatiosAtT2BN: BN[]) => string;
3083
3944
  getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
3945
+ getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
3084
3946
  getAddLiquidityAmountAndFee: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
3085
3947
  amount: BN;
3086
3948
  fee: BN;